detection_threshold=args.detection_threshold, use_retinaface=args.scan_retinaface, max_feature_updates=args.max_feature_updates, static_model=True if args.no_3d_adapt == 1 else False, try_hard=args.try_hard == 1) if not args.video_out is None: out = cv2.VideoWriter( args.video_out, cv2.VideoWriter_fourcc('F', 'F', 'V', '1'), args.video_fps, (width * args.video_scale, height * args.video_scale)) try: start = time.time() rects = [] inference_start = time.perf_counter() faces1 = tracker.detect_faces(frame) for face in faces1: x, y, w, h = face.astype('int') x1 = x y1 = y x2 = x + w y2 = y + h x1 = x + int(w * 0.25) y1 = y # int(h * 0.125) x2 = x + int(w * 0.85) y2 = y + h + int(h * 0.125) # x1, y1 = clamp_to_im((x1, y1), width, height) # x2, y2 = clamp_to_im((x2, y2), width, height)