This function is to draw facial landmarks into transformed images
(image, landmarks)
| 70 | |
| 71 | |
| 72 | def draw_landmarks(image, landmarks): |
| 73 | """This function is to draw facial landmarks into transformed images |
| 74 | """ |
| 75 | assert landmarks is not None, "Landmarks can not be None!" |
| 76 | |
| 77 | img_cp = deepcopy(image) |
| 78 | |
| 79 | for i, p in enumerate(landmarks): |
| 80 | img_cp = cv2.circle(img_cp, (p[0], p[1]), 2, (0, 255, 0), 1) |
| 81 | |
| 82 | return img_cp |
| 83 | |
| 84 | |
| 85 | def get_center_scale(shape, aspect_ratio, pixel_std=200): |
no outgoing calls
no test coverage detected