rykov8/ssd_keras

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

Bella722 opened this issue · 1 comments

TypeError Traceback (most recent call last)
in ()
1 for i, img in enumerate(images):
2 # Parse the outputs.
----> 3 det_label = results[i][:, 0]
4 det_conf = results[i][:, 1]
5 det_xmin = results[i][:, 2]

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

I have solved this problem,the reason is my trained model leran nothing at all ,so the results[i] is empty.
And the truely problem is that my data is gray img, the image depth is 1, but the input in net is 3, I use cv2.imread instead the imread, then everything is normal.