kcg2015 / Vehicle-Detection-and-Tracking

Computer vision based vehicle detection and tracking using Tensorflow Object Detection API and Kalman-filtering
533 stars 191 forks source link

TypeError in main.py #32

Open jamalihuzaifa9 opened 4 years ago

jamalihuzaifa9 commented 4 years ago

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

nuriakiin commented 3 years ago

@jamalihuzaifa9 Did you solve this problem?

NirmalJainCM commented 3 years ago

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

moumed commented 3 years ago

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

moumed commented 3 years ago

Hey again, I'have resolved the problem by reinstalling scikit-learn to 0.22.2. The problem was here "from sklearn.utils.linearassignment 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.linearassignment import linear_assignment, everything works perfectly. I hope that it will help you.

SushVK18 commented 2 years ago

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?