Qidian213 / deep_sort_yolov3

Real-time Multi-person tracker using YOLO v3 and deep_sort with tensorflow
GNU General Public License v3.0
1.66k stars 592 forks source link

demo.py 异常 #161

Open XHQC opened 4 years ago

XHQC commented 4 years ago

File "C:...\deep_sort_yolov3-master\demo.py", line 132, in main(YOLO())

File "C:...\deep_sort_yolov3-master\demo.py", line 87, in main tracker.update(detections)

File "C:...\deep_sort_yolov3-master\deep_sort\tracker.py", line 69, in update self._match(detections)

File "C:...\deep_sort_yolov3-master\deep_sort\tracker.py", line 127, in _match detections, iou_track_candidates, unmatched_detections)

File "C:...\deep_sort_yolov3-master\deep_sort\linear_assignment.py", line 63, in min_cost_matching if col not in indices[:, 1]:

TypeError: tuple indices must be integers or slices, not tuple

Veronica1997 commented 4 years ago

Hi! I meet the same problem with you , have you solved it? Thanks a lot !

Indigo6 commented 4 years ago

Just solved it. Change if col not in indices[:, 1]: to if col not in indices[1]: if row not in indices[:, 0]: to if row not in indices[0]: and for row, col in indices: to for row, col in list(zip(indices[0], indices[1])): @Veronica1997 @cvlmm