Skip to main content

fotonet

Turkey Python PyTorch

fotonet is an open-source, NMS-free object-detection library for Python covering local inference, video tracking, training, validation, and model export.

Models

Model Generation Parameters Compute (640 × 640) Status
fotonetn v1.1 (UltraDense) 2.85M 6.95 GFLOPs Available
fotonets v1.1 (UltraDense) 11.49M 27.43 GFLOPs Architecture in package, weights coming soon
fotonetm v1.1 (UltraDense) 22.23M 63.38 GFLOPs Architecture in package, weights coming soon
fotonetl v1.1 (UltraDense) 70.32M 161.51 GFLOPs Architecture in package, weights coming soon
fotonete v1 1.70M 5.20 GFLOPs Available

fotonetn now loads weights retrained with the 1.2 trainer: 32.1 mAP50-95 on COCO val2017, up from 29.9, with the same model, size and speed. The first weights stay in the release as fotonetn-ex.pt. See published weights and trainer 1.2.

Install

pip install fotonet

For a development checkout:

git clone https://github.com/iMGEai/fotonet.git
cd fotonet
pip install -e ".[dev]"

Quick start

Load the released checkpoint and run inference from Python:

from fotonet import Fotonet

model = Fotonet("fotonetn")
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:

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:

fotonet train \
  model=fotonetn \
  data=path/to/data.yaml \
  epochs=100 \
  batch=16 \
  imgsz=640 \
  run_dir=runs/fotonetn

Resume an interrupted run:

fotonet train \
  model=fotonetn \
  data=path/to/data.yaml \
  resume=runs/fotonetn/fotonet_last.pt

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

Export

from fotonet import Fotonet

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

See the export guide for ONNX, TensorRT, and TorchScript options.

Documentation

License

Apache License 2.0. See LICENSE.

Metadata

Release files for fotonet 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fotonet 1.2
File Size Uploaded Provenance Actions
fotonet-1.2.tar.gz 349.5 kB Without provenance Details for fotonet-1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fotonet 1.2
File Interpreter ABI Platform Actions
fotonet-1.2-py3-none-any.whl Python 3 none any Details for fotonet-1.2-py3-none-any.whl

Total release size: 761.6 kB

Release files / fotonet-1.2.tar.gz

Download URL fotonet-1.2.tar.gz
Size 349.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9b4ef272ee185012ec83456be810428d87afc800666a535189f2b2b284e8a101
BLAKE2b-256 checksum
How to use checksums
61fce3cecbd712966d827866c18aa2ee7d4b9116a168e63d8374b14775fd896b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release files / fotonet-1.2-py3-none-any.whl

Download URL fotonet-1.2-py3-none-any.whl
Size 412.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
efde7ee6e23e93fdf01a56bf53c835d5010655c4093feda080a986706d327f1e
BLAKE2b-256 checksum
How to use checksums
a1d1573eca4c2002259d070c74e3635d1ce30e8c746bbf311b39095f2ccd381a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Security for fotonet 1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page