Skip to main content

OpenDetect

PyPI version Python versions Documentation Status License: Apache-2.0

OpenDetect header

Open-source object detection for production Python applications.
Commercial-use friendly. Python API + CLI.

opendetect gives you one consistent interface for modern ONNX detectors across CPU and accelerated runtimes.

Why OpenDetect

  • Unified API across detector families
  • Runtime-aware acceleration with ONNX Runtime
  • Stable OpenCV/NumPy-first workflow for real video/image pipelines
  • Built-in model registry, auto-download, and caching
  • First-class CLI for inference, benchmarking, and model management

Install

pip install opendetect

Optional extras:

pip install "opendetect[cpu]"
pip install "opendetect[gpu]"
pip install "opendetect[tensorrt]"

Quickstart (Python)

import cv2
from opendetect import Detector

detector = Detector(model="rfdetr-m")

image = cv2.imread("input.jpg")
detections = detector.predict(image, color="bgr")
annotated = detector.annotate(image, detections, color="bgr")

cv2.imwrite("output.jpg", annotated)

File helpers:

from opendetect import Detector

detector = Detector(model="yolox-s")
detector.infer_image_file("input.jpg", output_path="output.jpg")
detector.infer_video_file("input.mp4", output_path="output.mp4", max_frames=300)

Quickstart (CLI)

opendetect-infer --image input.jpg --model-id rfdetr-m --output output.png
opendetect-infer --video input.mp4 --model-id yolox-s --tensor-rt --output output.mp4
opendetect-benchmark --model-id rfdetr-l --mode dummy --warmup 20 --iterations 200
opendetect-models list

Runtime Support

OpenDetect uses ONNX Runtime execution providers and selects the best available runtime automatically:

  • CPU
  • CoreML (Apple Silicon / macOS)
  • CUDA
  • TensorRT
  • DirectML
  • OpenVINO
  • ROCm / MIGraphX

TensorRT note:

  • opendetect[tensorrt] installs Python dependencies only.
  • A compatible system TensorRT/CUDA stack is still required.

Model Families

Family Year License
RF-DETR 2026 Apache-2.0
RTMDet 2022 Apache-2.0
YOLOX 2021 Apache-2.0

For stable IDs across frames, install opendetect[tracking] and pass a detector's boxes and scores to ByteTracker.

Documentation

Hosted docs:

Full guides are in docs/:

  • Start here: docs/index.md
  • Installation and runtimes: docs/getting-started/installation.md, docs/getting-started/runtimes.md
  • Python and CLI usage: docs/getting-started/python.md, docs/getting-started/cli.md
  • Benchmarks: docs/guides/benchmarks.md

Build docs locally:

pip install -r docs/requirements.txt
make -C docs html

License

Apache License 2.0 (LICENSE).

Metadata

Release files for opendetect 0.3.0

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

Source distribution (sdist)

Source distribution for opendetect 0.3.0
File Size Uploaded Provenance Actions
opendetect-0.3.0.tar.gz 42.0 kB With provenance Details for opendetect-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 91.9 kB

Release files / opendetect-0.3.0.tar.gz

Download URL opendetect-0.3.0.tar.gz
Size 42.0 kB
Tags Source
SHA-256 checksum
How to use checksums
86f3f25b89228b7abfb20be0286f5cea5c020a4a3b56eed033f219dbcc66a1a1
BLAKE2b-256 checksum
How to use checksums
301c0dbf5df695384a00c61524c855dff0581080542d6f1623a87013f04059aa
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 24, 2026.

Transparency log

Release files / opendetect-0.3.0-py3-none-any.whl

Download URL opendetect-0.3.0-py3-none-any.whl
Size 49.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b3f95e1ef3569f16ba1652d82de0342931f1f3c1e0d693b912908a9bec615c6
BLAKE2b-256 checksum
How to use checksums
cbe80cd935493878a4e34e32b35a5f6bb09a05281d9e34319003ab52aad4ecb8
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 24, 2026.

Transparency log

Security for opendetect 0.3.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.

Select from 2 files

Attestation for opendetect-0.3.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 24, 2026.

Transparency log

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