From fc2f7b3b8e33c1af3601267b42e55bd5c6d55d4f Mon Sep 17 00:00:00 2001 From: chikangxi Date: Fri, 19 Mar 2021 18:41:09 +0800 Subject: [PATCH] fix python code that can not run alone --- docs/solutions/face_detection.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/solutions/face_detection.md b/docs/solutions/face_detection.md index f04af27d7..5f9a01fc7 100644 --- a/docs/solutions/face_detection.md +++ b/docs/solutions/face_detection.md @@ -77,7 +77,9 @@ Supported configuration options: ```python import cv2 import mediapipe as mp -mp_face_detction = mp.solutions.face_detection +mp_face_detection = mp.solutions.face_detection +mp_drawing = mp.solutions.drawing_utils +file_list = [] # For static images: with mp_face_detection.FaceDetection( @@ -124,6 +126,7 @@ with mp_face_detection.FaceDetection( for detection in results.detections: mp_drawing.draw_detection(image, detection) cv2.imshow('MediaPipe Face Detection', image) + #Press ESC to quit. if cv2.waitKey(5) & 0xFF == 27: break cap.release()