Vehicle-Detection-and-Tracking icon indicating copy to clipboard operation
Vehicle-Detection-and-Tracking copied to clipboard

TypeError in main.py

Open jamalihuzaifa9 opened this issue 4 years ago • 5 comments

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

jamalihuzaifa9 avatar Jun 19 '20 11:06 jamalihuzaifa9

@jamalihuzaifa9 Did you solve this problem?

nuriakiin avatar Aug 26 '20 16:08 nuriakiin

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

NirmalJainCM avatar Dec 17 '20 13:12 NirmalJainCM

Does someone resolved this problem ? I'am getting this error when trying to test the project on a video.

moumed avatar Jan 31 '21 20:01 moumed

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.

moumed avatar Jan 31 '21 23:01 moumed

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?

SushVK18 avatar Jan 23 '22 14:01 SushVK18