rykov8 / ssd_keras

Port of Single Shot MultiBox Detector to Keras
MIT License
1.1k stars 553 forks source link

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

Closed Bella722 closed 6 years ago

Bella722 commented 6 years ago

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
Bella722 commented 6 years ago

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.