To run
python main.py path-to-video
This project is pretty simple thanks to yolov8 with new implementation of tracker. You can change tracking algorithm with
-
BoT-SORT - botsort.yaml
-
ByteTrack - bytetrack.yaml
results = model.track(source="https://youtu.be/Zgi9g1ksQHc", tracker="bytetrack.yaml")
If you have GPU,
- Set trigger position
- Load the model (of course)
- Iterate frame by frame of the video
- Set unique ID for each object
- Check if any object cross the trigger
- Draw result
- End
Note: this project uses supervision to detect when objects cross the trigger. It's on beta and many thing has changed so their documentation is outdated at the moment. You should watch their latest video instead.
The video used to test is recorded from camstreamer