Metadata-Version: 2.4
Name: fotonet
Version: 1.0.1
Summary: Lightweight NMS-free object detection with a familiar API.
Author: FOTO-NET contributors
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/hazegreleases/fotonet
Project-URL: Documentation, https://github.com/hazegreleases/fotonet/tree/main/docs
Project-URL: Source, https://github.com/hazegreleases/fotonet
Keywords: object-detection,computer-vision,deep-learning,fotonet
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch>=2.1
Requires-Dist: torchvision>=0.16
Requires-Dist: numpy>=1.23
Requires-Dist: pillow>=9.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: pycocotools>=2.0.7
Requires-Dist: opencv-python>=4.7
Requires-Dist: matplotlib>=3.6
Requires-Dist: scipy>=1.10
Requires-Dist: tqdm>=4.64
Provides-Extra: metrics
Provides-Extra: export
Requires-Dist: onnx>=1.14; extra == "export"
Requires-Dist: onnxruntime>=1.16; extra == "export"
Requires-Dist: onnxsim>=0.4.36; extra == "export"
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: tomli>=2.0; python_version < "3.11" and extra == "dev"
Requires-Dist: twine>=5.0; extra == "dev"
Dynamic: license-file

# fotonet

`fotonet` is a compact Python object-detection library for local inference,
training, evaluation, and model export. The supported model is `fotonete`.

## Install

```bash
python -m pip install fotonet
```

For a development checkout:

```bash
git clone https://github.com/hazegreleases/fotonet.git
cd fotonet
python -m pip install -e ".[dev]"
```

## Quick start

Load the verified release checkpoint, then run inference from Python:

```python
from fotonet import Fotonet

model = Fotonet("fotonete")
results = model.predict("image.jpg", conf=0.25, imgsz=640)

for detection in results[0].boxes:
    print(detection.cls, detection.conf, detection.xyxy)
```

For a BGR frame from OpenCV:

```python
frame = cv2.imread("image.jpg")
results = model.predict_bgr(frame, conf=0.25, imgsz=640)
```

## Train

Training uses a YAML dataset configuration and writes checkpoints to a local run directory:

```bash
fotonet train \
  model=fotonete \
  data=path/to/data.yaml \
  epochs=300 \
  batch=16 \
  imgsz=640 \
  run_dir=runs/fotonete
```

Resume an interrupted run:

```bash
fotonet train \
  model=fotonete \
  data=path/to/data.yaml \
  resume=runs/fotonete/fotonet_last.pt
```

Weights and training outputs are not stored in the Git repository.

## Export

```python
from fotonet import Fotonet

model = Fotonet("fotonete")
output = model.export(
    format="onnx",
    path="exports/fotonete.onnx",
    imgsz=640,
)
print(output["artifact"])
```

See the [export guide](docs/export.md) for available formats and optional dependencies.

## Documentation

- [Documentation portal](docs/index.md)
- [Installation](docs/installation.md)
- [Quick start](docs/quickstart.md)
- [Inference and results](docs/inference.md)
- [Training and resume](docs/training.md)
- [Models and runtime](docs/model-zoo.md)
- [Model configuration](docs/model-config.md)
- [Export](docs/export.md)
- [Transform API](docs/transform-api.md)
- [Security](docs/security.md)
- [Contributing](docs/contributing.md)

## License

Apache License 2.0. See [LICENSE](LICENSE).
