def __init__(self,
                 device_id_facedetection,
                 checkpoint_path_face=None,
                 checkpoint_path_landmark=None,
                 model_points_file=None):
        download_external_landmark_models()
        self.model_size_rescale = 16.0
        self.head_pitch = 0.0
        self.interpupillary_distance = 0.058
        self.eye_image_size = (60, 36)

        tqdm.write("Using device {} for face detection.".format(
            device_id_facedetection))

        self.device = device_id_facedetection
        self.face_net = SFDDetector(device=device_id_facedetection,
                                    path_to_detector=checkpoint_path_face)
        self.facial_landmark_nn = self.load_face_landmark_model(
            checkpoint_path_landmark)

        self.model_points = self.get_full_model_points(model_points_file)
Example #2
0
#!/usr/bin/env python

# Licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode)

from __future__ import print_function, division, absolute_import

import rt_gene.download_tools as download_tools

if __name__ == '__main__':
    download_tools.download_gaze_tensorflow_models()
    download_tools.download_gaze_pytorch_models()
    download_tools.download_blink_models()
    download_tools.download_external_landmark_models()