From 958906f2b9e3e4d2afa0bf4e3a63c4b80a972778 Mon Sep 17 00:00:00 2001 From: lanlingsheng Date: Tue, 21 Feb 2023 15:53:01 +0800 Subject: [PATCH] fix bug: compute_face_descriptor() --- examples/facerec_from_webcam_multiprocessing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/facerec_from_webcam_multiprocessing.py b/examples/facerec_from_webcam_multiprocessing.py index a22c31c70..3ff1a8fd8 100644 --- a/examples/facerec_from_webcam_multiprocessing.py +++ b/examples/facerec_from_webcam_multiprocessing.py @@ -78,7 +78,7 @@ def process(worker_id, read_frame_list, write_frame_list, Global, worker_num): Global.read_num = next_id(Global.read_num, worker_num) # Convert the image from BGR color (which OpenCV uses) to RGB color (which face_recognition uses) - rgb_frame = frame_process[:, :, ::-1] + rgb_frame = numpy.ascontiguousarray(frame_process[:, :, ::-1]) # Find all the faces and face encodings in the frame of video, cost most time face_locations = face_recognition.face_locations(rgb_frame)