Skip to main content

fotonet

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

Install

python -m pip install fotonet

For a development checkout:

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:

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:

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=fotonete \
  data=path/to/data.yaml \
  epochs=300 \
  batch=16 \
  imgsz=640 \
  run_dir=runs/fotonete

Resume an interrupted run:

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

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 for available formats and optional dependencies.

Documentation

License

Apache License 2.0. See LICENSE.

Release files for fotonet 1.0.1

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.0.1
File Size Uploaded
fotonet-1.0.1.tar.gz 182.6 kB Details

Built distribution (wheel)

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

Total release size: 384.4 kB

Release files / fotonet-1.0.1.tar.gz

Download URL fotonet-1.0.1.tar.gz
Size 182.6 kB
Tags Source
SHA-256 checksum
How to use checksums
fdbdaf84da50b87dbc2ecf5c760e426a8ae6d93d45db6b12957f38eadc24ba9e
BLAKE2b-256 checksum
How to use checksums
e39e3e6ee6e7ac1874f7d0f15da8c487d20eca4bf16c844b669b40bceefc7029
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.0.1-py3-none-any.whl

Download URL fotonet-1.0.1-py3-none-any.whl
Size 201.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4edfcd799dad36a1efee850aff77e908c56214d5be9a07a88bee7098ab123459
BLAKE2b-256 checksum
How to use checksums
f252b7fdd364cef445792c1d0c7fc03b39b67a663ecbd467c9e799b0200d692d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11
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