This Git repository is dedicated to the development of a Python library aimed at correcting the results of tracking algorithms. The primary goal of this library is to reconcile and reassign lost or misidentified IDs, ensuring a consistent and accurate tracking of objects over time.
See the detailed documentation of this project
Bytetrack x yolov8l x trackreid, 4 objects
Bytetrack x yolov8l, 42 objects
Demo with better quality can be found here
Model | Time difference | Time per iteration |
---|---|---|
yolo + bytetrack | -- | -- |
yolo + bytetrack + trackreid | +0.95% | +2e-6 s/it |
To install the library, run the following command:
pip install git+https://github.com/artefactory-fr/track-reid.git@main
To install a specific version, run the following command:
pip install git+https://github.com/artefactory-fr/[email protected]
Suppose you have a list of frames, a model and a tracker. You can call the ReidProcessor
update method on each outputs of your tracker as follow:
for frame_id, image_filename in enumerate(available_frames):
img = cv2.imread(image_filename)
detections = model.predict(img)
tracked_objects = tracker.update(detections, frame_id)
corrected_tracked_objects = reid_processor.update(tracked_objects, frame_id)
At the end of the for loop, information about the correction can be retrieved using the ReidProcessor
properties. For instance, the list of tracked object can be accessed using:
reid_processor.seen_objects()
For a complete example you can refer to examples/trackreid/starter_kit_reid.ipynb