Anurag14 / accessfaceid

Face Detection, verification and recognition in Near real time on CPU brewing with all the SOTA all over
Apache License 2.0
18 stars 5 forks source link

Face alignment library uses inferior detection implicitly #50

Open Anurag14 opened 5 years ago

Anurag14 commented 5 years ago
class FaceAlignment:
    def __init__(self, landmarks_type, network_size=NetworkSize.LARGE,
                 device='cuda', flip_input=False, face_detector='sfd', verbose=False):
        self.device = device
        self.flip_input = flip_input
        self.landmarks_type = landmarks_type
        self.verbose = verbose

        network_size = int(network_size)

        if 'cuda' in device:
            torch.backends.cudnn.benchmark = True

        # Get the face detector
        face_detector_module = __import__('face_alignment.detection.' + face_detector,
                                          globals(), locals(), [face_detector], 0)
        self.face_detector = face_detector_module.FaceDetector(device=device, verbose=verbose)
Anurag14 commented 5 years ago

Face alignment code must be imported from source and modified. Also build along with the package. It can help in better detection of images as usually faces when detected by faced algorithm cannot be detected by sfd detector.