ActionAI
ActionAI copied to clipboard
IndexError: index 0 is out of bounds for axis 0 with size 0
I run iva.py on Jetson Nano using this command: python3 iva.py 0 But there is an error:
WARNING:tensorflow:Layer lstm will not use cuDNN kernel since it doesn't meet the cuDNN kernel criteria. It will use generic GPU kernel as fallback when running on GPU
Traceback (most recent call last):
File "iva.py", line 275, in
Any ideas? Thanks!
I found a fix. That error happens whenever there is nothing to be tracked on the video.
I added: if bboxes != []:
before calling the function tracker_match
on line 278, so the function won't be called if there is nothing to be tracked.
But now I get this other error instead (when there is something to be tracked):
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-4-791b3d45521f> in <module>
13 track_boxes = [tracker.bbox for tracker in trackers]
14 if bboxes != []:
---> 15 matched, unmatched_trackers, unmatched_detections = tracker_match(track_boxes, [b[0] for b in bboxes])
16
17
<ipython-input-1-3f9cc776614e> in tracker_match(trackers, detections, iou_thrd)
130
131 for d, det in enumerate(detections):
--> 132 if(d not in matched_idx[:,1]):
133 unmatched_detections.append(d)
134
TypeError: tuple indices must be integers or slices, not tuple