Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mikel-brostrom committed Jul 12, 2024
1 parent 71214c8 commit 8e5417d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,13 @@ while True:
dets = np.array([[144, 212, 578, 480, 0.82, 0],
[425, 281, 576, 472, 0.56, 65]])

tracker.update(dets, im) # --> M X (x, y, x, y, id, conf, cls, ind)
# Check if there are any detections
if dets.size > 0:
tracker.update(dets, im) # --> M X (x, y, x, y, id, conf, cls, ind)
# If no prediction, make prediction ahead
else:
dets = np.empty((0, 6)) # empty N X (x, y, x, y, conf, cls)
tracker.update(dets, im) # --> M X (x, y, x, y, id, conf, cls, ind)
tracker.plot_results(im, show_trajectories=True)

# break on pressing q or space
Expand Down

0 comments on commit 8e5417d

Please sign in to comment.