fix(worker): 保持旧关键点契约并验证内部鉴权
This commit is contained in:
@@ -65,10 +65,15 @@ def detect_framed_ratio_points(image):
|
||||
def _detect_ratio_points(image, landmarks):
|
||||
from hairline.face_landmarks import to_landmark_list
|
||||
|
||||
from .calibration import normalized_to_pixel
|
||||
from .special_points import detect_special_points
|
||||
|
||||
data = detect_special_points(image, landmarks_override=to_landmark_list(landmarks))
|
||||
override = to_landmark_list(landmarks)
|
||||
data = detect_special_points(image, landmarks_override=override)
|
||||
points = data["points"]
|
||||
height, width = image.shape[:2]
|
||||
x, y = normalized_to_pixel(override.landmark[454], width, height)
|
||||
points["face_edge_454"] = {"x": round(x), "y": round(y)}
|
||||
data["ft_original_points"] = {key: points[key] for key in FT_POINTS}
|
||||
a, b = (points[key] for key in FT_POINTS)
|
||||
if a is not None and b is not None:
|
||||
|
||||
Reference in New Issue
Block a user