Keras-retinanet: Problem with retinanet-evaluate

Created on 28 Nov 2018  路  6Comments  路  Source: fizyr/keras-retinanet

After i trained a model, i want to evaluate my model using test set with command :
csv anotasi.csv classes.csv snapshots/resnet50_csv_14.h5 --convert-model

How can i solve this error ?
```Running network: N/A% (0 of 744) | | Elapsed Time: 0:00:00 ETA: --:--:--Traceback (most recent call last):
File "../../keras-retinanet/keras_retinanet/bin/evaluate.py", line 188, in
main()
File "../../keras-retinanet/keras_retinanet/bin/evaluate.py", line 167, in main
save_path=args.save_path
File "../../keras-retinanet/keras_retinanet/bin/../../keras_retinanet/utils/eval.py", line 168, in evaluate
all_detections = _get_detections(generator, model, score_threshold=score_threshold, max_detections=max_detections, save_path=save_path)
File "../../keras-retinanet/keras_retinanet/bin/../../keras_retinanet/utils/eval.py", line 115, in _get_detections
all_detections[i][label] = image_detections[image_detections[:, -1] == label, :-1]
IndexError: list assignment index out of range

Most helpful comment

That problem appeared because my classes index start from 1,
i just added dummy classes with index 0

All 6 comments

That problem appeared because my classes index start from 1,
i just added dummy classes with index 0

terima kasih pak, solved

That problem appeared because my classes index start from 1,
i just added dummy classes with index 0

How did you do this exactly?

That problem appeared because my classes index start from 1,
i just added dummy classes with index 0

How did you do this exactly?

just add a line to you class mapping .csv file
i.e .dummy, 0

Thank you. I had a similar problem, but it was solved by adding dummy 0.

But I don't know why it's being solved ... Can you tell me why?

The code uses loops which iterate over label indices from 0 to number of classes. Assuming that classes for each index in the csv there is a class.

The this lines

I would be nicer if the loops iterate over the labels directly though.

Was this page helpful?
0 / 5 - 0 ratings