Closed superhrdina8 closed 3 years ago
even when i try it with classic GaussianBlur it dont show anything for i in range(faces.shape[0]): box = faces[i].astype(np.int) face = im[(box[1], box[3]), (box[0], box[2])] face = cv2.GaussianBlur(face,(23,23),30) im[(box[1], box[3]), (box[0], box[2])] = face
Okay I already found out that it just has to be done like this:
startX = box[0] startY = box[1] endX = box[2] endY = box[3] face = im[startY:endY, startX:endX] face = anonymize_face_pixelate(face,blocks=10) im [startY:endY, startX:endX] = face
Hi, so im trying to get Region of Interest from detected faces and then blur them using this code:
for i in range(faces.shape[0]): box = faces[i].astype(np.int) face = image[(box[1], box[3]), (box[0], box[2])] face = anonymize_face_pixelate(face, blocks=3) image[(box[1], box[3]), (box[0], box[2])] = face
I have my function "anonymize_face_pixelate" that will pixelate that region of interest but something is wrong probably with format of coordinates in "box[-]". When i run code, it executes without error, even print correct number of detected faces, but they are not pixelated. Any advice? Thank you so much