Fix queue `counts` (#15971)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Muhammad Rizwan Munawar <muhammadrizwanmunawar123@gmail.com>
Co-authored-by: RizwanMunawar <chr043416@gmail.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
pull/15976/head^2
TechWolf21 3 months ago committed by GitHub
parent 7c7f456710
commit b2ab667f00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      ultralytics/solutions/queue_management.py

@ -89,7 +89,7 @@ class QueueManager:
"""Extracts and processes tracks for queue management in a video stream."""
# Initialize annotator and draw the queue region
self.annotator = Annotator(self.im0, self.tf, self.names)
self.counts = 0 # Reset counts every frame
if tracks[0].boxes.id is not None:
boxes = tracks[0].boxes.xyxy.cpu()
clss = tracks[0].boxes.cls.cpu().tolist()
@ -132,7 +132,6 @@ class QueueManager:
txt_color=self.count_txt_color,
)
self.counts = 0 # Reset counts after displaying
self.display_frames()
def display_frames(self):

Loading…
Cancel
Save