fotonet UltraDense

Just Ultra.

Free and open source under Apache‑2.0.
pip install fotonet

Get the highlights.

Codename UltraDense

Dense.
In the best way.

fotonet is a new family of object detectors, built from scratch. It starts with fotonetn, at 2.85 million parameters, now retrained with our new trainer in v1.2, and grows to four sizes up to fotonetl. Every one is NMS-free, so what the network outputs is the final answer. One API across all of them, free and open source under Apache-2.0.

fotonetn at a glance

  • Accuracy32.1 APCOCO mAP50-95, all 5,000 val2017 images1
  • Forward pass1.22 msTensorRT FP16, batch 1, on an RTX 40601
  • Parameters2.85M6.95 GFLOPs at 640 × 6402
from fotonet import Fotonet model = Fotonet("fotonetn")results = model.predict("surf.jpg", conf=0.5) for det in results[0].boxes:    print(det.cls, det.conf, det.xyxy)  # corners, 0 to 1
A surf lesson on a beach. Six people and a surfboard are outlined by detection boxes.

7 objects found

Real fotonetn output, not a mockup.4

Live demo

Try it. Right here.

It runs in your browser on ONNX Runtime Web. Your images and video never leave your device.

WebGPU runs on your graphics card. WASM runs on the CPU and works everywhere.

  1. Run the model to see what it finds.

The model loads when you press Run.

Runtime
–
Inference
–
Objects
–
FPS
–

Runs the released fotonetn model (32.1 mAP on COCO) exported to FP16 ONNX for the browser. The first run downloads the 5.8 MB model and ONNX Runtime Web.

Speed

UltraFast.

fotonet has no NMS step at all. The network is trained to give one box per object, so all that's left after it is a sort and a confidence cut. No IoU threshold to set.

Zero 0 NMS steps to run or tune
Forward pass 1.22 ms fotonetn, TensorRT FP16, batch 1, on an RTX 40601

NMS? Not here.

Traditional detectors predict thousands of overlapping boxes, then run Non-Maximum Suppression to delete duplicates. fotonet learns one-to-one box assignment during training, skipping the suppression pass entirely.

Traditional detector
Preprocess Forward pass NMS pass
fotonet
Preprocess Forward pass Done

Nothing to tune.
Everything to ship.

  • One threshold. Set a confidence and go. There is no IoU threshold, because there is no NMS.

    conf=0.25
  • Video ready. Pass OpenCV frames as they are, or track a video. Every object keeps its ID.

    model.predict_bgr(frame)
  • Plain results. Class, confidence and box for every object. Nothing to decode.

    det.cls, det.conf, det.xyxy
  • Train your own. Point it at a YAML dataset and pick a size. Resume whenever you like.

    fotonet train model=fotonetn data=data.yaml

Efficiency

UltraEfficient.
Every parameter pulls its weight.

Just 2.85M parameters in fotonetn2

fotonetn fits in 2.85 million parameters and 6.95 GFLOPs at 640 × 640: small enough for a laptop, a modest GPU or an edge box. When you need more accuracy, move up to a larger size without changing your code.

Pick your size.
Keep your code.

fotonetn. Maximum speed. The smallest UltraDense model, for laptops, small GPUs and edge boxes.

Light on memory.
Easy on the GPU.

Built as a TensorRT FP16 engine, fotonetn holds 20 MB of GPU memory at batch 1, weights included, and 96 MB at batch 8. It can share a card with the rest of your application.1

20 MBGPU memory with TensorRT, batch 1

Compare

Measured.
Not promised.

Every number in this section comes from one harness on one machine, with both models measured in the same runs. YOLO26n ran through its official package.

Measured on 3 November 2026 on an RTX 4060 with an i3-13100F, Windows 11, CUDA 12.8 and PyTorch 2.11. Image to boxes is a photo in, boxes out, through each package's own predict path running an FP16 TensorRT engine at batch 1: resize, inference, picking the boxes and mapping them back to the photo. It is the median of 500 runs on one COCO photo. Accuracy is mAP on all 5,000 images of COCO val2017, scored with pycocotools at confidence 0.01. Each model returns up to 300 boxes per image, as Ultralytics does, and pycocotools keeps up to 100 per class. Ultralytics lists 40.9 for YOLO26n from its own validator; this harness measures it lower, and it scores both models the same way. TensorRT times are the median GPU compute time from trtexec for an FP16 engine built by each package's own export, TensorRT 10.16. YOLO26n's engine also picks its final boxes; fotonetn reads its boxes after the engine. TensorRT memory is what TensorRT reports holding for the engine, weights and working memory. TensorRT cold start runs from the engine file to the first result back on the CPU, in a fresh process with CUDA already started. Parameters and GFLOPs are measured at 640 × 640 on each model's fused deployed graph with PyTorch's ATen FLOP counter (2 × MACs, including attention matmuls).

The engine

Meet UltraDense.

UltraDense is the engine inside every fotonet model since v1.1. It scores every part of the image in one pass, and it is trained to keep one box per object. There is no NMS step to clean up afterwards. And everything it knows, it learned from scratch.

Two heads to learn.
One to ship.

While training, a helper head shows the model more examples of where objects are. It is removed before export, so it costs nothing when you run it.

Scores that
mean something.

Confidence follows how well a box fits, not only what is inside it. A high score means a tight box.

Trained from scratch.
No shortcuts.

No pretrained ImageNet backbone and no distilled teacher weights. Every fotonet model since v1.1 learns COCO directly from random initialization.

Zeroborrowed weights

The toolkit

More than a model.
All in fotonet.

Predict, train, validate and export from one pip install, in Python or from the command line. And fotonet Studio, our desktop app for labeling and training, is on the way.

Get started.
It takes a minute.

Install

One line.

pip install fotonet

Python 3.10 to 3.12, on Windows, macOS and Linux.

Predict

Three more.

from fotonet import Fotonet
model = Fotonet("fotonetn")
results = model.predict("image.jpg")

Read the quick start