修改跟踪算法cpu gpu切换错误

This commit is contained in:
2025-01-15 15:38:50 +08:00
parent 31db54fa37
commit ad850221c5
4 changed files with 16 additions and 11 deletions

View File

@ -217,7 +217,7 @@ def yolo_resnet_tracker(
# Rescale boxes from img_size to im0 size
det[:, :4] = scale_boxes(im.shape[2:], det[:, :4], im0.shape).round()
# det = det.cpu().numpy()
det = det.cpu().numpy()
## ================================================================ writed by WQG
'''tracks: [x1, y1, x2, y2, track_id, score, cls, frame_index, box_index]
0 1 2 3 4 5 6 7 8