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.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 opendetect 0.3.1
File Size Uploaded Provenance Actions
opendetect-0.3.1.tar.gz 43.4 kB With provenance Details for opendetect-0.3.1.tar.gz

Built distribution (wheel)

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

Total release size: 95.1 kB

Release files / opendetect-0.3.1.tar.gz

Download URL opendetect-0.3.1.tar.gz
Size 43.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d861b20cfb6b66404a33788689c38f06715dc259950fe59612769eb0894978d6
BLAKE2b-256 checksum
How to use checksums
cd37f6c7fa61f771e2dfde00132b49049212f63f28780d11232189a1579c9105
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.1-py3-none-any.whl

Download URL opendetect-0.3.1-py3-none-any.whl
Size 51.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b97015ac04a2e9477536e54e9e50e28ac60d50776d04e527ab61277e6ca84fe
BLAKE2b-256 checksum
How to use checksums
ca3835dadca08443f8633297ff613bdc987c6e87e89eb3735068b72db6a8eac9
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.1

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.1.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