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 #131

Closed lechatthecat closed 6 years ago

lechatthecat commented 6 years ago

I changed the dataset and ran the SSD_training.ipynb. I keep getting this error.


TypeError Traceback (most recent call last)

in () 1 for i, img in enumerate(images): 2 # Parse the outputs. ----> 3 det_label = results[0][:, 0] 4 det_conf = results[0][:, 1] 5 det_xmin = results[0][:, 2] TypeError: list indices must be integers or slices, not tuple How can I remove this error?
logoman04 commented 6 years ago

How did you remove this error?

lechatthecat commented 6 years ago

It was because pkl file wasn't made properly. I re-created the pkl file and training worked without problems.

logoman04 commented 6 years ago

Why is this issue related to any pkl file? This error occurs during prediction. Additionally, if it is a pkl file issue, what was the issue? As in, how was it made incorrectly?

lechatthecat commented 6 years ago

For me, the problem was the num of classes. It was wrong value.
I followed this instruction: https://noteoneverything.blogspot.com/2018/03/single-shot-multibox-detector-how-to.html