How to use the mtcnn.mtcnn_detector.MtcnnDetector function in mtcnn

To help you get started, we’ve selected a few mtcnn examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github xieqk / wider_person_search / face_det_em.py View on Github external
def main(args):
    is_test = True if args.is_test == '1' else False
    _t = Timer()
    detector_cast = MtcnnDetector(model_folder='./mtcnn/model', 
                            minsize = 20,
                            threshold = [0.1, 0.5, 0.9],
                            factor = 0.709,
                            ctx=mx.gpu(args.gpu), num_worker = 4 , 
                            accurate_landmark = False)
    detector_candi = MtcnnDetector(model_folder='./mtcnn/model', 
                            minsize = 20,
                            threshold = [0.5, 0.5, 0.9],
                            factor = 0.709,
                            ctx=mx.gpu(args.gpu), num_worker = 4 , 
                            accurate_landmark = False)
    embedding = FaceModel(model='./arcface/model/model-r50-am-lfw',
                          ctx=mx.gpu(args.gpu))
    if is_test:
        this_dir, json_path, save_name = osp.join(test_root, 'test'), osp.join(test_root, 'test.json'), 'face_em_test.pkl'
    else:
        this_dir, json_path, save_name = osp.join(trainval_root, 'val'), osp.join(trainval_root, 'val.json'), 'face_em_val.pkl'
    data_raw = load_json(json_path)
    movie_num, movie_cnt = len(data_raw.keys()), 0

    face_dict = {}
    # det/extract val face feat
github xieqk / wider_person_search / face_det_em.py View on Github external
def main(args):
    is_test = True if args.is_test == '1' else False
    _t = Timer()
    detector_cast = MtcnnDetector(model_folder='./mtcnn/model', 
                            minsize = 20,
                            threshold = [0.1, 0.5, 0.9],
                            factor = 0.709,
                            ctx=mx.gpu(args.gpu), num_worker = 4 , 
                            accurate_landmark = False)
    detector_candi = MtcnnDetector(model_folder='./mtcnn/model', 
                            minsize = 20,
                            threshold = [0.5, 0.5, 0.9],
                            factor = 0.709,
                            ctx=mx.gpu(args.gpu), num_worker = 4 , 
                            accurate_landmark = False)
    embedding = FaceModel(model='./arcface/model/model-r50-am-lfw',
                          ctx=mx.gpu(args.gpu))
    if is_test:
        this_dir, json_path, save_name = osp.join(test_root, 'test'), osp.join(test_root, 'test.json'), 'face_em_test.pkl'
    else:
github chenlinzhong / face-login / face_detect.py View on Github external
def __init__(self):
        self.detector = MtcnnDetector(model_folder=model, ctx=mx.cpu(0), num_worker=4, accurate_landmark=False)
    def detect_face(self,image):