Lightweight NMS-free object detection with an Ultralytics-like API.
Project description
FOTO-NET
FOTO-NET is a lightweight NMS-free object detector with an Ultralytics-like Python API and an application-friendly transform layer for working with detection boxes.
This is the alpha release, everything is subject to change. Not recommended for production workflows, just a demo of what is coming.
What It Is
FOTO-NET focuses on practical object detection:
- compact model scales
- NMS-free one-to-one inference
- optional one-to-many training supervision
- small-object friendly P2 variants
- direct Python results objects
- transform helpers for crops, anchors, pixel movement, containment, and box manipulation
- export paths for ONNX, TorchScript, TensorRT, and CoreML where dependencies are available
Alpha Status
The alpha release is intended for experimentation, training runs, integration tests, and feedback. The core Python API, training path, inference path, transform API, and ONNX export should be usable. CoreML export code exists, but it should not be treated as certified until fresh platform-specific verification is published.
Install
pip install fotonet
Or
git clone https://github.com/hazegreleases/fotonet.git
cd fotonet
python -m pip install torch torchvision numpy pillow pyyaml opencv-python matplotlib scipy tqdm
Quick Start
from fotonet import FOTONET
model = FOTONET("fotonetn")
results = model.predict("image.jpg", conf=0.25)
for box in results.boxes:
print(box.cls, box.conf, box.xyxy)
CLI:
python -m fotonet.cli.main predict model=fotonet-n source=image.jpg conf=0.25 save=true
Transform API
from fotonet import AnchorPoint
box = results.boxes[0]
crop = (
box.transform
.setAnchor(AnchorPoint.CENTER)
.pixelExpand(40)
.clamp()
.crop(results.orig_img)
)
The raw box formats remain available through box.xywh, box.xyxy, and results.boxes.numpy().
Training
FOTO-NET expects YOLO-format labels:
class_id x_center y_center width height
Train through Python:
from fotonet import FOTONET
model = FOTONET("fotonetn")
model.train(data="data.yaml", epochs=100, imgsz=640, batch=16)
Train through CLI:
fotonet train model=fotonetn data=data.yaml epochs=100 imgsz=640 batch=16
Export
from fotonet import FOTONET
model = FOTONET("fotonet-n")
model.export(format="onnx", path="dev-tools/runs/fotonet.onnx", imgsz=640)
Model Status
The alpha package includes the fotonetn nano architecture. Training outputs and development weights live outside the public surface.
Alpha Model Metrics
fotonetn is the current nano architecture. The public alpha training run is in progress.
| Model | mAP@.50:.95 | Parameters | MACs at 640 | GFLOPs at 640 |
|---|---|---|---|---|
fotonetn |
[Training] | 3.88M | 2.35G | 4.69G |
Inference times are not out yet because the benchmark computer is IO bottlenecked, so the timing numbers are not reliable enough to publish.
Documentation
- Installation:
docs/installation.md - Quick start:
docs/quickstart.md - Inference:
docs/inference.md - Training:
docs/training.md - Export:
docs/export.md - Transform API:
docs/transform-api.md - Model zoo:
docs/model-zoo.md
License
FOTO-NET is licensed under the Apache License, Version 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fotonet-0.2.1.1a0.tar.gz.
File metadata
- Download URL: fotonet-0.2.1.1a0.tar.gz
- Upload date:
- Size: 99.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5063256b5fcfa90904825c48570d639bfaaf93c1f4fd978beb62079a1d2a9ed9
|
|
| MD5 |
2a9c2fa9a11fc27da04f5727c49868d7
|
|
| BLAKE2b-256 |
7997b5b5ffe14b0eccd29c16ed0140c60623eae24d1fd294a810130b44ab6c0a
|
File details
Details for the file fotonet-0.2.1.1a0-py3-none-any.whl.
File metadata
- Download URL: fotonet-0.2.1.1a0-py3-none-any.whl
- Upload date:
- Size: 104.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36aad92e91ee5405e1a34185edaa10b1afe90d3b3375e9524aeb9cc1415a8b91
|
|
| MD5 |
d09717cdec06c0be9eb1b21f264a14f7
|
|
| BLAKE2b-256 |
0004ea2da16d46e6d6fb54bd7b5127bf603557691610278b761b4a3c39db1f1d
|