mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-05-23 13:34:23 +08:00
Fix tracks=None
bug in YOLOv8-Region-Counting module (#5977)
This commit is contained in:
parent
e58db228c2
commit
ae6fa2fb02
@ -120,6 +120,8 @@ def run(
|
||||
|
||||
# Extract the results
|
||||
results = model.track(frame, persist=True)
|
||||
|
||||
if results[0].boxes.id is not None:
|
||||
boxes = results[0].boxes.xywh.cpu()
|
||||
track_ids = results[0].boxes.id.int().cpu().tolist()
|
||||
clss = results[0].boxes.cls.cpu().tolist()
|
||||
|
Loading…
x
Reference in New Issue
Block a user