MCPcopy Create free account
hub / github.com/10Ring/LAA-Net / draw_landmarks

Function draw_landmarks

package_utils/transform.py:72–82  ·  view source on GitHub ↗

This function is to draw facial landmarks into transformed images

(image, landmarks)

Source from the content-addressed store, hash-verified

70
71
72def 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
85def get_center_scale(shape, aspect_ratio, pixel_std=200):

Callers 3

facial_landmarksMethod · 0.90
__getitem__Method · 0.90
__getitem__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected