| | |
| | | print(frame_num) |
| | | |
| | | ret,frame = video.read() |
| | | |
| | | if ret == False: |
| | | break |
| | | |
| | | |
| | | frame = cv2.resize(frame, (960, 540), interpolation=cv2.INTER_LINEAR) |
| | | print(frame.shape) |
| | | cv2_frame = cv2.cvtColor(frame,cv2.COLOR_BGR2RGB) |
| | | |
| | | # Dlib detect |
| | | dets = cnn_face_detector(cv2_frame, 1) |
| | | |
| | | for idx, det in enumerate(dets): |
| | | print('**********************yes****************************yes********************************yes************************************') |
| | | # Get x_min, y_min, x_max, y_max, conf |
| | | x_min = det.rect.left() |
| | | y_min = det.rect.top() |