Nitid Object detection that's actually open source
Train, validate, export and run vision models. The code and the official pretrained weights are released under the Apache License 2.0, so you can ship them inside your own product without opening your code or paying for a license.
nitid, from Latin nitidus: clear, transparent, precise.
No AGPL, no surprises.
Installation · Quick start · Models · Documentation
Why nitid?
- Edge first. The models are designed to run at the edge, on the hardware next to your cameras, not only on a datacenter GPU or NPU.
- Self-contained checkpoints. Every checkpoint carries the config and the class names it needs to be reproduced and checked — one file per model.
- Handles messy datasets. COCO and YOLO layouts are read directly, with no conversion step, and the inconsistencies real datasets have are tolerated.
- Export anywhere. OpenVINO, ONNX, TorchScript and TensorRT, from the same checkpoint.
One library, three tasks, five operations
Object detection, instance segmentation and semantic segmentation, through one
API: predict, track, train, val and export. The DETR family moves fast
— RT-DETR, D-FINE — and nitid brings the best DETR made easy, so getting
from your dataset to an exported model does not mean following every paper.
What comes with it:
- Python API and command line
- Automatic download of the official COCO checkpoints for detection and instance segmentation; semantic segmentation is fine-tuned on your own masks
- Fine-tuning and validation for boxes, masks and dense semantic maps
- ByteTrack, BoT-SORT, and OC-SORT tracking with persistent IDs and annotated video output
What "open" means here
The nitid code is released under the Apache License 2.0. You can use it commercially, modify it, and ship it in closed products.
The official pretrained weights are published by their authors under Apache 2.0
as well: the detection checkpoints by D-FINE
and the instance-segmentation checkpoints by
D-FINE-seg. nitid downloads them from
those sources on first use. The public datasets used for pretraining keep their
own terms: the checkpoints listed in Verified models are
trained on COCO, and optionally Objects365. The default weights (coco) are trained on COCO
only. The upstream D-FINE authors note that Objects365 checkpoints (weights="obj2coco", opt-in)
may be subject to the Objects365 dataset terms and should not be assumed to be commercially
cleared; see THIRD_PARTY_NOTICES.md. nitid prints that notice when you
download them.
Installation
Requires Python 3.10, 3.11, 3.12 or 3.13.
pip install nitid
Inference and export work out of the box. Other features are optional extras:
| Extra | Adds |
|---|---|
train |
Fine-tuning and COCO-style validation |
track |
ByteTrack, BoT-SORT, and OC-SORT object tracking |
openvino |
OpenVINO export and runtime for Intel CPU, iGPU, and NPU |
wandb, mlflow |
Experiment tracking during training |
pip install "nitid[train,track]"
pip installs the default PyTorch build for your platform. If you need a specific CUDA version, install PyTorch first following pytorch.org, then install nitid. TensorRT export has its own requirements; see docs/export.md.
Quick Start
The canonical quickstart lives in docs/quickstart.md; use the docs guide for the full walkthrough.
Inference
from nitid import NITID
model = NITID("nitid1s", task="detect")
results = model.predict("image.jpg", conf=0.5)
results[0].save("out.jpg")
# Export detections to Pandas DataFrame or crop bounding boxes
df = results[0].pandas()
results[0].crop(save_dir="crops/")
| Input | Detection |
|---|---|
Generated with:
nitid predict model=nitid1m task=detect source=docs/assets/demo/source/ski.jpg conf=0.5 save=true
Instance segmentation uses the same API and downloads the matching COCO mask checkpoint:
model = NITID("nitid1s", task="segment")
result = model.predict("image.jpg", conf=0.5)[0]
print(result.masks.data.shape) # [N, H, W]
result.save("segmented.jpg")
| Input | Instance segmentation |
|---|---|
Generated with:
nitid predict model=nitid1l task=segment source=docs/assets/demo/source/watchmaker.jpg conf=0.3 save=true
Semantic segmentation returns one class ID per pixel. There are no pretrained
semantic weights yet: NITID("nitid1s", task="semantic") is a starting point for
fine-tuning, so predict with your fine-tuned checkpoint:
model = NITID("semantic_best.pth", task="semantic")
result = model.predict("image.jpg", return_probs=True)[0]
print(result.semantic.mask.shape) # [H, W]
result.save_semantic("class_ids.png")
Training
metrics = model.train(
data="configs/datasets/my_dataset.yml",
epochs=50,
batch=8,
)
print(f"mAP50: {metrics['mAP50']:.4f}, mAP50-95: {metrics['mAP50-95']:.4f}")
See fine-tuning for COCO, YOLO, and semantic-mask dataset formats.
Tracking
for result in model.track("video.mp4", conf=0.5, stream=True, save=True):
if result.boxes.id is not None:
track_ids = result.boxes.id
nitid1s detection with ByteTrack and vid_stride=2 on a CC0 street video.
The annotated video is saved under runs/track/exp/. Tracking dependencies
are optional; install them with pip install "nitid[track]".
Validation
metrics = model.val(
data="configs/datasets/my_dataset.yml",
project="runs/val",
name="exp",
)
# saves validation plots to runs/val/exp by default
Export
model.export(format="openvino")
model.export(format="onnx")
model.export(format="torchscript")
model.export(format="tensorrt")
| Deployment target | Hardware | Export format | Extra install |
|---|---|---|---|
| OpenVINO | Intel CPU, iGPU and NPU | format="openvino" |
pip install "nitid[openvino]" |
| ONNX | Any ONNX runtime (CPU, GPU) | format="onnx" |
A runtime, e.g. pip install onnxruntime |
| PyTorch | CPU, CUDA GPU | .pth checkpoint |
None |
| TorchScript | LibTorch (C++) | format="torchscript" |
None |
| TensorRT | NVIDIA GPU (Jetson, RTX, data center) | format="tensorrt" |
tensorrt>=8.6 (see docs/export.md) |
Capture Python API output, environment details, and failure tracebacks in one attachable log:
from nitid import NITID, bugreport
with bugreport("prediction") as report:
model = NITID("nitid1s", task="detect")
model.predict("image.jpg")
print(report.path)
Command Line Interface
nitid predict model=nitid1s task=detect source=image.jpg
nitid predict model=semantic_best.pth task=semantic source=image.jpg save=true
nitid track model=nitid1s source=video.mp4 conf=0.5 save=true
nitid train model=nitid1s task=detect data=my_dataset.yml epochs=50
nitid val model=nitid1s task=detect data=my_dataset.yml
nitid export model=nitid1s task=detect format=onnx
nitid predict model=nitid1s source=image.jpg --report
nitid bugreport
For the full guide:
- Full quickstart: docs/quickstart.md
- Notebooks and scripts: examples/
- Fine-tuning and validation: docs/fine_tuning.md
- Export: docs/export.md
- Deployment: docs/deployment.md
- CLI: docs/cli.md
Migrating from YOLO & Compatibility
If you are coming from a YOLO codebase, the quickstart has a side-by-side mapping of the API and the behaviour that differs: Coming from YOLO.
Verified models
💡
NITID("nitid1s", task=...)is the canonical constructor. The trailing size letter selects the model size, andnitid1identifies the model generation (oldermodel1*names and thed-fine-*alias still resolve to the same models). Supported tasks aredetect,segment, andsemantic.
Object Detection (task="detect")
Evaluated on COCO val2017 at 640x640 resolution.
| Model Alias | Architecture | COCO mAP50-95 (vs YOLO11) | SpeedT4 TRT10 FP16 (vs YOLO11) | SpeedArc B390 OV FP16 | Params | FLOPs | Config | Official Checkpoint |
|---|---|---|---|---|---|---|---|---|
nitid1n† |
D-FINE-N | 42.8 (40.9) | 2.12 ms (1.70 ms) | — | 4.0M | 7B | yml | pth |
nitid1s |
D-FINE-S | 48.5 (48.6) | 3.49 ms (2.50 ms) | 5.22 ms | 10.0M | 25B | yml | pth |
nitid1m |
D-FINE-M | 52.3 (53.1) | 5.62 ms (4.70 ms) | 9.58 ms | 19.0M | 57B | yml | pth |
nitid1l |
D-FINE-L | 54.0 (55.0) | 8.07 ms (6.20 ms) | 12.14 ms | 31.0M | 91B | yml | pth |
nitid1x |
D-FINE-X | 55.8 (57.5) | 12.89 ms (11.80 ms) | 17.49 ms | 62.0M | 202B | yml | pth |
Numbers in parentheses correspond to the equivalent YOLO11 model (YOLO11n/s/m/l/x) for quick reference.
SpeedT4 TRT10 FP16 comes from the D-FINE paper. SpeedArc B390 OV FP16 is our own measurement with the same method (how to reproduce it): integrated Arc B390 GPU of an Intel Core Ultra X7 358H, OpenVINO 2026.4.1, mean over 1000 COCO val2017 images. COCO mAP on this GPU is within 0.1 of the table. nitid1n was not measured.
The detection table shows the default COCO-only weights (weights="coco"). The published COCO mAP of the opt-in Objects365+COCO weights (weights="obj2coco"; see the licence caveat above) is 50.7 / 55.1 / 57.3 / 59.3 for S / M / L / X. The Arc B390 latency was measured with those weights; latency depends on the architecture, and the mAP check against the table was done with them too, not re-run with the COCO-only weights.
Official checkpoints for nitid1n/s/m/l/x download automatically upon first use.
† nitid1n detection has COCO weights only (dfine_n_coco.pth, trained on COCO train2017): there is no Objects365 pre-trained variant, unlike nitid1s/m/l/x. nitid download model=nitid1n prints this notice. nitid1n was not measured on the Arc B390 GPU.
Instance Segmentation (task="segment")
Based on D-FINE-seg. Published in the official D-FINE-seg model repository. Official checkpoints download automatically upon first use.
| Model Alias | Architecture | Backing Checkpoint | Weights |
|---|---|---|---|
nitid1n |
D-FINE-Seg-N | dfine_seg_n_coco.pt |
Auto-download / Hugging Face |
nitid1s |
D-FINE-Seg-S | dfine_seg_s_coco.pt |
Auto-download / Hugging Face |
nitid1m |
D-FINE-Seg-M | dfine_seg_m_coco.pt |
Auto-download / Hugging Face |
nitid1l |
D-FINE-Seg-L | dfine_seg_l_coco.pt |
Auto-download / Hugging Face |
nitid1x |
D-FINE-Seg-X | dfine_seg_x_coco.pt |
Auto-download / Hugging Face |
Semantic Segmentation (task="semantic")
There are no pretrained semantic checkpoints. NITID("nitid1s", task="semantic") starts
from the instance-segmentation checkpoint of the same size and is meant for
fine-tuning on your own masks.
Documentation
| Doc | Description |
|---|---|
| docs/quickstart.md | Full quickstart |
| examples/ | Notebooks (Colab) and runnable scripts |
| docs/fine_tuning.md | Training, validation, AMP, EMA, dataset formats |
| docs/export.md | OpenVINO, ONNX, TorchScript, and TensorRT export |
| docs/deployment.md | Running exported models with ONNX Runtime, OpenVINO, LibTorch, Triton |
| docs/training_cuda_openvino.md | End-to-end run on an NVIDIA GPU or an Intel machine with OpenVINO |
| docs/cli.md | Command-line reference |
| docs/api_reference.md | Full Python API reference |
| docs/troubleshooting.md | FAQ and fixes for common install, model, Docker, CUDA, and CLI problems |
| docs/macos_docker_setup.md | macOS / Apple Silicon development environment with Docker |
| docs/brand.md | Brand: logo, palette, typography, and demo image sources |
Development
Everything above is for using nitid. To work on nitid itself, use a source
checkout and uv, which installs the exact
dependency versions pinned in uv.lock — including CUDA 12.1 PyTorch wheels on
Linux and Windows.
git clone https://github.com/Nitidio/nitid.git && cd nitid
uv sync --extra dev --extra train
Inside the checkout, run the CLI and tools through the project environment:
uv run nitid predict model=nitid1s task=detect source=image.jpg
# Unit tests (no GPU, no checkpoint needed)
uv run pytest tests/unit
# All tests (integration tests build a tiny checkpoint automatically)
uv run pytest
# Lint and format
uv run ruff check .
uv run ruff format --check .
# Type-check
uv run mypy dfine tools
Integration tests use a session-scoped fixture in tests/conftest.py that
builds a small D-FINE-S model with random weights at test time — no download
required.
- docs/onboarding.md — start here if you're new to the codebase: architecture, conventions, gotchas
- CONTRIBUTING.md — branch workflow, commit conventions, and the PR checklist
Docker Environment
For developers on macOS (Apple Silicon) or environments needing isolated Linux containers, a preconfigured Dockerfile and docker-compose.yml are provided:
docker compose run --rm nitid-dev
See macOS Docker Setup for the setup guide.
Acknowledgements & Citation
nitid contains code derived from D-FINE and D-FINE-seg, with smaller portions from RT-DETR, DETR and PaddleDetection. See THIRD_PARTY_NOTICES.md and the Apache 2.0 License.
If you use nitid in your research or product, please cite:
@software{nitid2026,
title={nitid: Real-Time Open Source Computer Vision},
author={{Vaelsys}},
year={2026},
url={https://github.com/Nitidio/nitid}
}
@article{peng2024dfine,
title={D-FINE: Redefine Regression Task in DETRs as Fine-grained Distribution Refinement},
author={Peng, Yansong and Shi, Hongtao and Li, Shiyu and Wang, Yan and Li, Hongbin and Liu, Guozheng and Li, Bing and Hu, Weiming},
journal={arXiv preprint arXiv:2410.13842},
year={2024}
}
@article{saakyan2026dfineseg,
title={D-FINE-seg: Object Detection and Instance Segmentation Framework with multi-backend deployment},
author={Saakyan, Argo and Solntsev, Dmitry},
journal={arXiv preprint arXiv:2602.23043},
year={2026}
}
Metadata
Release files for nitid 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nitid-0.10.0.tar.gz | 4.3 MB | With provenance | Details for nitid-0.10.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nitid-0.10.0-py3-none-any.whl | Python 3 | none | any | Details for nitid-0.10.0-py3-none-any.whl |
Total release size: 8.6 MB
Release files / nitid-0.10.0.tar.gz
| Download URL | nitid-0.10.0.tar.gz |
|---|---|
| Size | 4.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6f1b9fbb249c3449e7ee637a15a238d8b069c30114a44220c4012a97a8aa1cf
|
|
BLAKE2b-256 checksum How to use checksums |
8680b02fbd6dbe7582df6bf15c33c021d660023e984a40332e89c08f3b2a6ffa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logRelease files / nitid-0.10.0-py3-none-any.whl
| Download URL | nitid-0.10.0-py3-none-any.whl |
|---|---|
| Size | 4.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4da3b625434af1da29ca2b9a6755e87d9fae590bec791a059d1104c6bd699c55
|
|
BLAKE2b-256 checksum How to use checksums |
3c27b1d6b7499963f39c16a2cca2caab605e6e9d14c2769d0d02d70647dbba3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logSecurity for nitid 0.10.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for nitid-0.10.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logA 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.