Krasjet-Yu / YOLO-FaceV2

YOLO-FaceV2: A Scale and Occlusion Aware Face Detector
163 stars 24 forks source link

How to determine simply whether an occlusion exists or not? #31

Open antongonz opened 1 year ago

antongonz commented 1 year ago

Hello,

What is the same code to do the following:

bool test = occulsion_exists_in_face(img)

I simply want to pass an image of a face and determine whether there exists an occlusion or not.

Thanks!

Krasjet-Yu commented 1 year ago

You can follow the pseudo-code: def occulsion_exists_in_face(bboxes):

a and b in bboxes, interArea is intersection

   return interArea(a, b) > thres

bboxes = yolofacev2.detect(img) test = occulsion_exists_in_face(bboxes)

antongonz commented 1 year ago

I am looking to see if the face is occluded anywhere. What are a & b? I only have one bbox, which is the face.

Thanks!

Krasjet-Yu commented 1 year ago

This can only happen through visualization.

antongonz commented 1 year ago

You face detector is not "occlusion aware" then ;)