norfair
Lightweight Python library for adding real-time multi-object tracking to any detector.
What it is and what it does
Norfair is a Python library that integrates tracking into video processing pipelines by taking detections (expressed as coordinate sets) from any object or keypoint detector and assigning consistent identities across frames. It uses Kalman filtering to predict object positions and matches predictions to new detections via customizable distance functions, enabling you to track centroids, bounding boxes, human keypoints, or 3D points with minimal code changes.
The library is designed for modularity and speed: it plugs into existing detection workflows (YOLO, Detectron2, OpenPose, etc.) and supports advanced scenarios including moving cameras, appearance-based re-identification, and n-dimensional tracking. It depends on numpy, scipy, and filterpy for numerical computation, and rich for terminal output, making it lightweight enough for embedded systems when optional video and metrics features are not needed.
Use it for:
- Track vehicle or pedestrian centroids in traffic monitoring or surveillance video with a YOLO or Detectron2 detector.
- Track human body keypoints across video frames for pose-based analytics or sports performance analysis.
- Maintain object identity in scenes with camera motion by estimating and compensating for pan, tilt, rotation, and zoom.
- Re-identify occluded or briefly lost objects using appearance embeddings to improve tracking robustness in crowded scenes.
- Track 3D points from depth sensors or multi-view systems for robotics or 3D reconstruction workflows.
- Integrate tracking into a custom video inference loop without external frameworks, using only Norfair and a detector.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Norfair adds real-time multi-object tracking to any detector by matching detected coordinates across frames using configurable distance functions and Kalman filtering.
Yes, with conditions. Norfair is production-stable and well-maintained for its core use case: adding tracking to any detector with minimal code. Install it if you need real-time multi-object tracking in video and already have a detector. The low install friction and permissive license make adoption straightforward. However, the aging maintenance status (471 days since last release) means you should verify that its Kalman filter and distance-matching approach fit your specific tracking problem before committing to it in a new project.
Install
norfair on PyPI
pip
pip install norfairuv
uv add norfairpoetry
poetry add norfairInstalling norfair
Before you install
Low friction: pure Python wheel with five runtime dependencies (numpy, scipy, filterpy, rich, importlib-metadata). Status is aging—last release 471 days ago—but the repository remains active with recent commits and no archived flag.
License in practice
BSD-3-Clause is permissive; you can use, modify, and distribute Norfair with minimal restrictions, provided you include the license notice.
Quickstart
pip install norfair
from norfair import Tracker
tracker = Tracker(distance_function=your_distance_fn)
tracked_objects = tracker.update(detections=new_detections)
Requires Python 3.8 or later. Optional features (video helpers, MOT metrics) need additional dependencies installable via norfair[video] or norfair[metrics].
Verify before relying
- Actual performance characteristics (latency, throughput) on typical video resolutions and frame rates.
- Maturity of re-identification and camera-motion features relative to production use.
- Community adoption and real-world deployment feedback beyond the 2,675 GitHub stars.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (<4.0,>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — filterpy, rich, scipy, numpy, importlib-metadata |
| Maintenance | aging — 471 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 123,406/month — #11,910 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: norfair-2.3.0-py3-none-any.whl
Keywords: tracking, object-detection, object-tracking, kalman-filter, pose-estimation, re-identification, multi-object-tracking, re-id, tracking-algorithm, deepsort, video-tracking, video-inference-loop
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
boxmotBoxMOT provides pluggable multi-object tracking…
agpl · top 15,000 on PyPI
pupil-apriltagsPython bindings for the AprilTags v3 library,…
permissive · top 15,000 on PyPI
filterpyFilterPy provides Kalman filters, Extended…
permissive · top 5,000 on PyPI
motmetricsComputes multiple object tracker (MOT)…
permissive · top 15,000 on PyPI
pykalmanpykalman provides Kalman filtering, smoothing,…
permissive · top 15,000 on PyPI
yolov5YOLOv5 is a packaged object detection model…
copyleft · top 15,000 on PyPI
ultralyticsUltralytics YOLO provides a unified framework…
agpl · top 5,000 on PyPI
mtcnnDetects faces and facial landmarks (eyes, nose,…
permissive · top 5,000 on PyPI
simdkalmanImplements vectorized Kalman filters that run…
permissive · top 15,000 on PyPI