Skip to content

Commit

Permalink
added function usage exampl
Browse files Browse the repository at this point in the history
  • Loading branch information
nmathieufact authored Mar 13, 2024
1 parent d8f23a1 commit 45dae71
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ pip install git+https://github.com/artefactory-fr/bytetrack.git@main
ByteTrack is a multi-object tracking computer vision model.
Using ByteTrack, you can allocate IDs for unique objects in a video for use in tracking objects.

### Detection object with Bytetracker and YOLO
```
from bytetracker import BYTETracker
tracker = BYTETracker(args)
BaseTrack._count = 0
for frame_id, image_filename in enumerate(frames):
img = cv2.imread(image_filename)
detections = model.predict(img, *yolo_args)[0]
detections_bytetrack_format = yolo_results_to_bytetrack_format(detections)
tracked_objects = tracker.update(detections_bytetrack_format, frame_id)
```


## Copyright

Copyright (c) 2022 Kadir Nar
Expand Down

0 comments on commit 45dae71

Please sign in to comment.