Created
January 10, 2020 22:44
-
-
Save iamatulsingh/5c2441af4221eafbe640b7dadd0d48c1 to your computer and use it in GitHub Desktop.
face recognition scratch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from face_recognition import FaceRecognition | |
if __name__ == '__main__': | |
model_name = "face_recognition.h5" | |
image_path = 'test.jpg' | |
face_recognition = FaceRecognition() | |
face_recognition.training() | |
face_recognition.save_model(model_name) | |
model = FaceRecognition.load_saved_model(os.path.join("model", model_name)) | |
k = FaceRecognition.model_prediction(image_path, os.path.join("model", model_name), | |
os.path.join("model", "face_recognition_class_names.npy")) | |
print(f"detected class is {k}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment