Sync motion-tracking from metro-analytics-catalog
Browse files
LICENSE
CHANGED
|
@@ -43,3 +43,15 @@ Ultralytics and licensed under the GNU Affero General Public License v3.0
|
|
| 43 |
Users must comply with the AGPL-3.0 license terms when using, modifying,
|
| 44 |
or distributing the YOLO26 model weights or Ultralytics software.
|
| 45 |
For commercial licensing options, see https://www.ultralytics.com/license.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
Users must comply with the AGPL-3.0 license terms when using, modifying,
|
| 44 |
or distributing the YOLO26 model weights or Ultralytics software.
|
| 45 |
For commercial licensing options, see https://www.ultralytics.com/license.
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
BoT-SORT / ByteTrack Trackers
|
| 49 |
+
------------------------------
|
| 50 |
+
|
| 51 |
+
The BoT-SORT and ByteTrack tracking algorithms are integrated into the
|
| 52 |
+
Ultralytics framework. Original implementations:
|
| 53 |
+
|
| 54 |
+
BoT-SORT: https://github.com/NirAharon/BoT-SORT
|
| 55 |
+
ByteTrack: https://github.com/FoundationVision/ByteTrack
|
| 56 |
+
|
| 57 |
+
Users should consult the respective repositories for license terms.
|
README.md
CHANGED
|
@@ -10,7 +10,6 @@ tags:
|
|
| 10 |
- yolo26
|
| 11 |
- motion-tracking
|
| 12 |
- multi-object-tracking
|
| 13 |
-
- bot-sort
|
| 14 |
- edge-ai
|
| 15 |
- metro
|
| 16 |
- dlstreamer
|
|
@@ -25,7 +24,7 @@ language:
|
|
| 25 |
| Property | Value |
|
| 26 |
|---|---|
|
| 27 |
| **Category** | Object Detection + Multi-Object Tracking |
|
| 28 |
-
| **Base Model** | [YOLO26](https://docs.ultralytics.com/models/yolo26/) (Ultralytics) +
|
| 29 |
| **Source Framework** | PyTorch (Ultralytics) |
|
| 30 |
| **Supported Precisions** | FP32, FP16, INT8 (mixed-precision) |
|
| 31 |
| **Inference Engine** | OpenVINO |
|
|
@@ -54,7 +53,8 @@ Typical Metro deployments include:
|
|
| 54 |
|
| 55 |
Available YOLO26 variants: `yolo26n`, `yolo26s`, `yolo26m`, `yolo26l`, `yolo26x`.
|
| 56 |
Smaller variants (`yolo26n`, `yolo26s`) are recommended for high-FPS edge deployment.
|
| 57 |
-
The default tracker is
|
|
|
|
| 58 |
|
| 59 |
---
|
| 60 |
|
|
@@ -158,8 +158,8 @@ import numpy as np
|
|
| 158 |
import gi
|
| 159 |
|
| 160 |
gi.require_version("Gst", "1.0")
|
| 161 |
-
|
| 162 |
-
from
|
| 163 |
|
| 164 |
Gst.init(None)
|
| 165 |
|
|
@@ -211,16 +211,34 @@ while True:
|
|
| 211 |
stdin=subprocess.PIPE, stderr=subprocess.DEVNULL,
|
| 212 |
)
|
| 213 |
|
| 214 |
-
# Read detection / tracking metadata.
|
| 215 |
-
|
| 216 |
regions_data = []
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 224 |
|
| 225 |
# Map buffer read-only and copy pixels to a writable numpy array.
|
| 226 |
success, map_info = buf.map(Gst.MapFlags.READ)
|
|
@@ -271,9 +289,8 @@ Licensed under the MIT License. See [LICENSE](LICENSE) for details.
|
|
| 271 |
|
| 272 |
- [YOLO26 Documentation](https://docs.ultralytics.com/models/yolo26/)
|
| 273 |
- [Ultralytics Multi-Object Tracking](https://docs.ultralytics.com/modes/track/)
|
| 274 |
-
- [BoT-SORT Tracker](https://github.com/NirAharon/BoT-SORT)
|
| 275 |
-
- [ByteTrack Tracker](https://github.com/FoundationVision/ByteTrack)
|
| 276 |
- [Intel DLStreamer gvatrack](https://docs.openedgeplatform.intel.com/2026.0/edge-ai-libraries/dlstreamer/elements/gvatrack.html)
|
|
|
|
| 277 |
- [OpenVINO Documentation](https://docs.openvino.ai/)
|
| 278 |
- [NNCF Post-Training Quantization](https://docs.openvino.ai/latest/nncf_ptq_introduction.html)
|
| 279 |
- [Intel DLStreamer](https://docs.openedgeplatform.intel.com/2026.0/edge-ai-libraries/dlstreamer/index.html)
|
|
|
|
| 10 |
- yolo26
|
| 11 |
- motion-tracking
|
| 12 |
- multi-object-tracking
|
|
|
|
| 13 |
- edge-ai
|
| 14 |
- metro
|
| 15 |
- dlstreamer
|
|
|
|
| 24 |
| Property | Value |
|
| 25 |
|---|---|
|
| 26 |
| **Category** | Object Detection + Multi-Object Tracking |
|
| 27 |
+
| **Base Model** | [YOLO26](https://docs.ultralytics.com/models/yolo26/) (Ultralytics) + DLStreamer `gvatrack` (Kalman filter tracker) |
|
| 28 |
| **Source Framework** | PyTorch (Ultralytics) |
|
| 29 |
| **Supported Precisions** | FP32, FP16, INT8 (mixed-precision) |
|
| 30 |
| **Inference Engine** | OpenVINO |
|
|
|
|
| 53 |
|
| 54 |
Available YOLO26 variants: `yolo26n`, `yolo26s`, `yolo26m`, `yolo26l`, `yolo26x`.
|
| 55 |
Smaller variants (`yolo26n`, `yolo26s`) are recommended for high-FPS edge deployment.
|
| 56 |
+
The default tracker is `short-term-imageless` (Kalman filter-based, no image data required).
|
| 57 |
+
DLStreamer also supports `tracking-type=deep-sort` for more robust re-identification using a feature extraction model (e.g., mars-small128).
|
| 58 |
|
| 59 |
---
|
| 60 |
|
|
|
|
| 158 |
import gi
|
| 159 |
|
| 160 |
gi.require_version("Gst", "1.0")
|
| 161 |
+
gi.require_version("GstAnalytics", "1.0")
|
| 162 |
+
from gi.repository import Gst, GLib, GstAnalytics
|
| 163 |
|
| 164 |
Gst.init(None)
|
| 165 |
|
|
|
|
| 211 |
stdin=subprocess.PIPE, stderr=subprocess.DEVNULL,
|
| 212 |
)
|
| 213 |
|
| 214 |
+
# Read detection / tracking metadata via GstAnalytics.
|
| 215 |
+
rmeta = GstAnalytics.buffer_get_analytics_relation_meta(buf)
|
| 216 |
regions_data = []
|
| 217 |
+
if rmeta is not None:
|
| 218 |
+
od_entries = []
|
| 219 |
+
trk_map = {} # metadata_id -> tracking_id
|
| 220 |
+
idx = 1
|
| 221 |
+
while True:
|
| 222 |
+
ok_od, od = rmeta.get_od_mtd(idx)
|
| 223 |
+
ok_trk, trk = rmeta.get_tracking_mtd(idx)
|
| 224 |
+
if not ok_od and not ok_trk:
|
| 225 |
+
break
|
| 226 |
+
if ok_od:
|
| 227 |
+
label = GLib.quark_to_string(od.get_obj_type())
|
| 228 |
+
_, x, y, w, h, conf = od.get_location()
|
| 229 |
+
od_entries.append((idx, label, int(x + w / 2), int(y + h / 2)))
|
| 230 |
+
if ok_trk:
|
| 231 |
+
ok2, tid, _, _, _ = trk.get_info()
|
| 232 |
+
if ok2:
|
| 233 |
+
trk_map[idx] = tid
|
| 234 |
+
idx += 1
|
| 235 |
+
for od_id, label, cx, cy in od_entries:
|
| 236 |
+
tid = 0
|
| 237 |
+
for trk_meta_id, tracking_id in trk_map.items():
|
| 238 |
+
if rmeta.get_relation(od_id, trk_meta_id) != GstAnalytics.RelTypes.NONE:
|
| 239 |
+
tid = tracking_id
|
| 240 |
+
break
|
| 241 |
+
regions_data.append((tid, label, cx, cy))
|
| 242 |
|
| 243 |
# Map buffer read-only and copy pixels to a writable numpy array.
|
| 244 |
success, map_info = buf.map(Gst.MapFlags.READ)
|
|
|
|
| 289 |
|
| 290 |
- [YOLO26 Documentation](https://docs.ultralytics.com/models/yolo26/)
|
| 291 |
- [Ultralytics Multi-Object Tracking](https://docs.ultralytics.com/modes/track/)
|
|
|
|
|
|
|
| 292 |
- [Intel DLStreamer gvatrack](https://docs.openedgeplatform.intel.com/2026.0/edge-ai-libraries/dlstreamer/elements/gvatrack.html)
|
| 293 |
+
- [DLStreamer Object Tracking Guide](https://docs.openedgeplatform.intel.com/2026.0/edge-ai-libraries/dlstreamer/dev_guide/object_tracking.html)
|
| 294 |
- [OpenVINO Documentation](https://docs.openvino.ai/)
|
| 295 |
- [NNCF Post-Training Quantization](https://docs.openvino.ai/latest/nncf_ptq_introduction.html)
|
| 296 |
- [Intel DLStreamer](https://docs.openedgeplatform.intel.com/2026.0/edge-ai-libraries/dlstreamer/index.html)
|