Vehicle-Detection-and-Tracking
Vehicle-Detection-and-Tracking copied to clipboard
TypeError in main.py
Traceback (most recent call last):
File "main.py", line 200, in
File "main.py", line 112, in pipeline
= assign_detections_to_trackers(x_box, z_box, iou_thrd = 0.3)
File "main.py", line 56, in assign_detections_to_trackers
if (d not in matched_idx[ : ,1]):
TypeError: tuple indices must be integers or slices, not tuple
@jamalihuzaifa9 Did you solve this problem?
Traceback (most recent call last): File "main.py", line 200, in image_box = pipeline(image) File "main.py", line 112, in pipeline = assign_detections_to_trackers(x_box, z_box, iou_thrd = 0.3) File "main.py", line 56, in assign_detections_to_trackers if (d not in matched_idx[ : ,1]): TypeError: tuple indices must be integers or slices, not tuple
I have been facing the same issue Can somebody help
Does someone resolved this problem ? I'am getting this error when trying to test the project on a video.
Hey again, I'have resolved the problem by reinstalling scikit-learn to 0.22.2. The problem was here "from sklearn.utils.linear_assignment_ import linear_assignment", I tried tu use linear_assignment from scipy like this : "from scipy.optimize import linear_sum_assignment as linear_assignment", and that causes the problem. By reinstalling to another version like that : pip install scikit-learn==0.22.2 , and using from sklearn.utils.linear_assignment_ import linear_assignment, everything works perfectly. I hope that it will help you.
hey ,
can you tell me where I should make changes in the code for detecting my video?
Like in the detector file , i am not sure which file path to provide?