main
parent
3940be3370
commit
51f4406c5b
6
app.py
6
app.py
|
@ -79,9 +79,9 @@ def worker(id,source,region=None,stream=False):
|
|||
result = model.track(frame,show=False,stream=False,persist=True,device=int(id)%4)
|
||||
result = result[0]
|
||||
detections = sv.Detections.from_yolov8(result)
|
||||
if result.boxes.id is not None:
|
||||
detections.tracker_id = result.boxes.id.cpu().numpy().astype(int)
|
||||
detections = detections[(detections.tracker_id is not None)]
|
||||
# if result.boxes.id is not None:
|
||||
# detections.tracker_id = result.boxes.id.cpu().numpy().astype(int)
|
||||
# detections = detections[(detections.tracker_id is not None)]
|
||||
|
||||
count += 1
|
||||
names = {}
|
||||
|
|
Loading…
Reference in New Issue