You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When testing with a certain video the code is giving this error.
Traceback (most recent call last):
File "D:\Documents\Ripik\truck_detect\main.py", line 31, in
track_ids = mot_tracker.update(np.asarray(detections_))
File "D:\Documents\Ripik\truck_detect\sort\sort.py", line 232, in update
matched, unmatched_dets, unmatched_trks = associate_detections_to_trackers(dets,trks, self.iou_threshold)
File "D:\Documents\Ripik\truck_detect\sort\sort.py", line 163, in associate_detections_to_trackers
iou_matrix = iou_batch(detections, trackers)
File "D:\Documents\Ripik\truck_detect\sort\sort.py", line 54, in iou_batch
xx1 = np.maximum(bb_test[..., 0], bb_gt[..., 0])
ValueError: operands could not be broadcast together with shapes (0,) (1,3)
The text was updated successfully, but these errors were encountered:
I have encountered similar problems before. Thank you for your answer at @sauravns. In the iou_batch() function of sort.py, we should first check if the length of bb_test is 0, and then set the detection to an empty numpy array.
When testing with a certain video the code is giving this error.
Traceback (most recent call last):
File "D:\Documents\Ripik\truck_detect\main.py", line 31, in
track_ids = mot_tracker.update(np.asarray(detections_))
File "D:\Documents\Ripik\truck_detect\sort\sort.py", line 232, in update
matched, unmatched_dets, unmatched_trks = associate_detections_to_trackers(dets,trks, self.iou_threshold)
File "D:\Documents\Ripik\truck_detect\sort\sort.py", line 163, in associate_detections_to_trackers
iou_matrix = iou_batch(detections, trackers)
File "D:\Documents\Ripik\truck_detect\sort\sort.py", line 54, in iou_batch
xx1 = np.maximum(bb_test[..., 0], bb_gt[..., 0])
ValueError: operands could not be broadcast together with shapes (0,) (1,3)
The text was updated successfully, but these errors were encountered: