Use 255.0 everywhere

This commit is contained in:
henryruhs
2025-01-18 15:00:57 +01:00
parent 2f66bde116
commit 330f86a4e4
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ def classify_face(temp_vision_frame : VisionFrame, face_landmark_5 : FaceLandmar
model_mean = get_model_options().get('mean')
model_standard_deviation = get_model_options().get('standard_deviation')
crop_vision_frame, _ = warp_face_by_face_landmark_5(temp_vision_frame, face_landmark_5, model_template, model_size)
crop_vision_frame = crop_vision_frame.astype(numpy.float32)[:, :, ::-1] / 255
crop_vision_frame = crop_vision_frame.astype(numpy.float32)[:, :, ::-1] / 255.0
crop_vision_frame -= model_mean
crop_vision_frame /= model_standard_deviation
crop_vision_frame = crop_vision_frame.transpose(2, 0, 1)