Category : face-detection

I am trying to build a face detection in python using opencv. Please see below for my code snippets: # https://google.github.io/mediapipe/solutions/face_detection.html import cv2 import mediapipe as mpenter code here mpFace = mp.solutions.face_detection Faces = mpFace.FaceDetection() mpDraw = mp.solutions.drawing_utils #FaceKeyPoint #RIGHT_EYE = 0 #LEFT_EYE = 1 #NOSE_TIP = 2 #MOUTH_CENTER = 3 #RIGHT_EAR_TRAGION = 4 #LEFT_EAR_TRAGION ..

Read more

face_recognition version: newest Python version: 3.7 Operating System: windows 10 Description In function face_recognition.api.face_encodings(face_image, known_face_locations=None, num_jitters=1, model=’small’) I used parameter known_face_locations, and this location is given by a SOTA face detection model. bounding_box = [(left_top_x, left_top_y, right_bottom_x, right_bottom_y)] face_encodings(image, known_face_locations = bounding_box) Before I notice this parameter I did a manual face cut for every ..

Read more

need help this is my code: import mediapipe as mp mp_drawing = mp.solutions.drawing_utils # Drawing helpers mp_holistic = mp.solutions.holistic # Mediapipe Solutions cap = cv2.VideoCapture(0) Initiate holistic model with mp_holistic.Holistic(min_detection_confidence=0.5, min_tracking_confidence=0.5) as holistic: while cap.isOpened(): ret, frame = cap.read() # Recolor Feed image = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) image.flags.writeable = False # Make Detections results = holistic.process(image) ..

Read more

I am asking a question about OpenCV Python. Haarcascade frontalface default does not detect a person’s face who has sunglasses on. I have this code: ”’ import cv2 path = "#path" img = cv2.imread(path) gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) faceCascade = cv2.CascadeClassifier(cv2.data.haarcascades + "haarcascade_frontalface_default.xml") faces = faceCascade.detectMultiScale(gray, 1.25, 15) grey = cv2.resize(gray, (400, 400)) for x, ..

Read more