April 2020
Intermediate to advanced
438 pages
12h 2m
English
Run the following steps to implement face recognition with the pre-trained FaceNet model you downloaded:
model = load_model('models/facenet_keras.h5')
def extract_face(image_file, required_size=(160, 160)): image = imread(image_file) image = gray2rgb(image) if len(image.shape) < 3 else \ image[...,:3] detector = MTCNN() results = detector.detect_faces(image) x1, y1, width, ...
Read now
Unlock full access