Fix tracks=None bug in YOLOv8-Region-Counting module (#5977)
This commit is contained in:
parent
e58db228c2
commit
ae6fa2fb02
1 changed files with 25 additions and 23 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue