Hi, I have been using this software for quite a while. In the recent version, I am facing the following error during inference while loading the model. Surprisingly, training worked fine.
ValueError: Unknown layer: ClipBoxes
Hey, did you convert your model to an inference model?
https://github.com/fizyr/keras-retinanet#converting-a-training-model-to-inference-model
Also, what command are you running to load your model?
Hi, Thanks for your prompt reply. No, I did not convert the inference model. As in the previous version, training models can be directly used for the test, I skipped that. Now I notice the updated README file. Thanks for the reference. I will try that.
I am loading the model using the following commands
model_path = 'path_to_model/resnet101_csv_21.h5'
model = keras.models.load_model(model_path, custom_objects=custom_objects)
True, we changed it not so long ago because it caused some odd things. During training some outputs had to be ignored and during testing the inverse had to be ignored. It's an extra step, but it streamlines the models more.
Hi, I tried converting model, but it did not work for the already trained model. Perhaps it is because of the version mismatch. Any suggestion how to convert the already trained models such it can be used for inference using the new version of the repo? Thank you.
Yeah there's a little trick to update a model:
resnet50_retinanet for instance)model.load_weights(weights_path, by_name=True)Ok, I will try this. Thanks for the help!
Hi, I got the problem solved. Thanks for your help!
With the new version, the number of detections per image is much higher than the older version:
389205 now compared to only 300 in the previous version.
Any particular reason for that.
Alos, I was wondering if its possible to run non-maxima suppression on the output detections.
If you convert it to an inference model you have the option of adding NMS.
Ok, Thanks!
Most helpful comment
If you convert it to an inference model you have the option of adding NMS.