ultralytics 8.0.224 Counting and Heatmaps updates (#6855)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: Muhammad Rizwan Munawar <chr043416@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
0f5406ec21
commit
2b49d71772
15 changed files with 225 additions and 145 deletions
|
|
@ -119,7 +119,8 @@ class ObjectCounter:
|
|||
# Draw Tracks
|
||||
track_line = self.track_history[track_id]
|
||||
track_line.append((float((box[0] + box[2]) / 2), float((box[1] + box[3]) / 2)))
|
||||
track_line.pop(0) if len(track_line) > 30 else None
|
||||
if len(track_line) > 30:
|
||||
track_line.pop(0)
|
||||
|
||||
if self.draw_tracks:
|
||||
self.annotator.draw_centroid_and_tracks(track_line,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue