keras-arcface
keras-arcface copied to clipboard
how to predict by trained model?
cosface_model = load_model('models/attention_vgg8_cosface_3d/model.hdf5', custom_objects={'CosFace': CosFace}) cosface_model = Model(inputs=cosface_model.input[0], outputs=cosface_model.layers[-3].output) cosface_features = cosface_model.predict(X_test, verbose=1) cosface_features /= np.linalg.norm(cosface_features, axis=1, keepdims=True)
as far as i know, cosface_features is 3d-coordinate for each cls, how to get a result when set a input. when 10-cls like mnist, output will be [*, 10]
np.argmax(embedded_features[0]) - > Class label
np.argmax(embedded_features[0]) - > Class label
this is class feature, not class probability