You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: