New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trained model converted for inference/testing #21
Comments
This is because the model with iou outputs one more element, try this:
|
@yafeunteun thank you, i have made the modification on the for-loop as well, now it's working, but i'm still unsure whether the inference pipeline is correct, i mean how to properly utilize hard_scores and soft_scores on the prediction |
Here is a (quick and dirty) example that takes an image and plot bounding box detections as well as labels (tested with a single class): https://github.com/yafeunteun/SKU110K_code/blob/master/examples/retinanet.ipynb Here I've set the hard_score_rate argument to .3, from what I understand (I may be wrong, please double check), that means that the model will set the confidence that a box contains an object to .3hard_score + .7soft_score (both hard_score and soft_score are output by the model for each bounding box detected). |
@yafeunteun thanks for being so helpful |
The weights shared at #9 outputs only 3 elements. Wanted to confirm if hard and soft scores are merged in that? |
i converted both models the results from
train.py
andtrain_iou.py
usingconvert_model.py
, and use those models to perform inference/testing using this notebook from keras-retinanet https://github.com/delftrobotics/keras-retinanet/blob/master/examples/ResNet50RetinaNet.ipynbModified the imports accordingly
from object_detector_retinanet.keras_retinanet
and run the inference/testinginference/testing using model converted from
train.py
went successfully, but inference/testing using model converted fromtrain_iou.py
i received the following error---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-5-c86318e1b643> in <module>
12 # process image
13 start = time.time()
---> 14 boxes, scores, labels = model.predict_on_batch(np.expand_dims(image, axis=0))
15 print("processing time: ", time.time() - start)
16
ValueError: too many values to unpack (expected 3)
The text was updated successfully, but these errors were encountered: