Skip to content
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

Predictions Incorrect #56

Open
deluongo opened this issue Oct 15, 2019 · 0 comments
Open

Predictions Incorrect #56

deluongo opened this issue Oct 15, 2019 · 0 comments

Comments

@deluongo
Copy link

deluongo commented Oct 15, 2019

I've seen a number of issues raised about the predictions not being correct. When predicting on a face that's included in the VGG2 dataset I get all incorrect predictions. I've included a screen shot of the predictions. I am using the version 2 processing. The only change I made to the code was to replace keras with tensorflow.keras. However, I tested using base keras as well and I am not seeing correct predictions either.

tf.keras.backend.image_data_format()
model = VGGFace(model='resnet50',  weights='vggface')

def predictFacePic(imagePath):
    img = image.load_img(imagePath, target_size=(224, 224))
    x = image.img_to_array(img)
    x = np.expand_dims(x, axis=0)
    x = utils.preprocess_input(x, version=2)
    preds = loaded_model.predict(x)
    return utils.decode_predictions(preds)

Screen Shot 2019-10-15 at 11 01 45 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant