Identical & low confidence predictions
See original GitHub issuePlease 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:
pip install git+git://github.com/fchollet/keras.git --upgrade --no-deps
-
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:
pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps
-
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:
from vgg16_places_365 import VGG16_Places365
from keras.preprocessing import image
model = VGG16_Places365(weights='places')
img_path = 'restaurant.jpg'
img = image.load_img(img_path, target_size=(224, 224))
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
x = preprocess_input(x)
preds = model.predict(x)
print('Predicted:', preds)
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):
0.023 -> museum/indoor
0.023 -> coffee_shop
0.022 -> art_studio
0.021 -> campus
0.019 -> yard
0.019 -> inn/outdoor
0.016 -> science_museum
0.015 -> motel
0.015 -> building_facade
0.015 -> staircase
Not sure whether that’s a problem with my preprocess_input
method or something else, but I’d really appreciate some help!
Issue Analytics
- State:
- Created 6 years ago
- Comments:20 (8 by maintainers)
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.