-
Notifications
You must be signed in to change notification settings - Fork 76
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
Identical & low confidence predictions #5
Comments
Hi, this is the official If you have a look at the official documentation HERE print('Predicted:', decode_predictions(preds, top=3)[0])
# Predicted: [(u'n02504013', u'Indian_elephant', 0.82658225), (u'n01871265', u'tusker', 0.1122357), (u'n02504458', u'African_elephant', 0.061040461)] You'll need to have a function similar to |
@several27 Can you please try now with the newly created |
@GKalliatakis anyway, you should add |
@Oktai15 Thanks for that. Examples have now been updated. |
I can confirm i have the same problem. No matter the image i get very small confidence scores. |
@ppgiannak You are right. I have dumped out the weights from scratch again but I keep getting the same predicted classes with low (0.023) confidence scores no matter what the selected image is. Although feature extraction seems to work fine. Would you like to work on that? The JSON class_index file has now been added to releases |
I have already tried several tools available to transfer the pre-trained weights from Caffe to Keras but with no luck. I may have to develop my own. |
There is no dedicated tool for converting Caffe weights to Keras models, that's why I have created Keras Application Zoo - A public clearinghouse for Keras Applications-like image classification models to promote progress and reproduce research. The original model structure must be manually defined and then transfer the converted weights layer by layer (this is what I've done for this repo). I don't believe dimension ordering and the type of back-end poses the greatest threat for that. I have successfully tested Places for extracting features, but I had never used it for directly for classifying images with the defined categories. Any help will be appreciated. |
I am facing the same problem (identical non-confident predictions) with the given example code. Were anyone able to figure this out yet? Thanks |
I am experiencing the same problem (low confident predictions) with the given example code. Were anyone able to figure this out yet? Thank you very much! |
I think the error may come from the wrong pre-trained weights |
I have tried dumping out the original caffe weights again from scratch (for both Places365 [which is the latest version] and Places205 [previous version]) but there seems to be the same error, which leads me to believe that there is an error with my code for dumping out caffe weights. The code can be found here Can anyone help with exporting the original weights from caffe to numpy arrays? |
a) I suspect that the test script for the VGG16 Places 365 model is hardwired for the jpg image 'restaurant.jpg' as shown in the example on the github. Is there a way to change a configuration file and/or a part of a specific .py code to allow for new and different test images? |
|
Ok, it looks like there is a lot of interest in those. P.S.: Please don't email me directly, keeping the conversation open in github is the best practice always. :) |
@ppgiannak Thank you. Looking forward. |
I faced the same problem when using the provided weights to make predictions. Maybe you can add a WARNING in Readme.md to save others' time. Thanks for your effort anyway. |
You can use our keras versions of VGG16Places365 and VGG16PlacesHybrid1365 that were converted from original caffe files https://github.com/antorsae/landmark-recognition-challenge/blob/master/extra/vgg16_places365.py Here is a demo: https://gist.github.com/pavelgonchar/4ebdb19b575eb3b102ad0840563b14c3 |
Thanks for that @pavelgonchar. |
This issue is now fixed thanks to the @pavelgonchar and his release with the correct converted weights found in landmark-recognition-challenge.Also the README file has been updated accordingly.This issue will now close. |
Please make sure that the boxes below are checked before you submit your issue.
Thank you!
Check that you are up-to-date with the master branch of Keras. You can update with:
If running on TensorFlow, check that you are up-to-date with the latest version. The installation instructions can be found here.
If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with:
Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).
Hi, first of all, huge thanks for creating this repo and training the models!
I'm running into a weird problem, where I can't seem to run even the most simple example:
The code above is missing the
preprocess_input
, so I tried with keras, pytorch and my own implementations of it (by guessing what it does). But I keep getting basically the same predictions, doesn't matter on what image I run them on or what preprocess function I use (all from places365 dataset):Not sure whether that's a problem with my
preprocess_input
method or something else, but I'd really appreciate some help!The text was updated successfully, but these errors were encountered: