How to detect faces in real time (video) or in a single image using pytorch?

how to detect faces in real time (video) or in a single image using pytorch (neural network ?
regards …

1 Like

Could you elaborate a bit more on what exactly you are looking for? Do you plan to get bounding boxes for each face? Or just detect the presence of a face? A little more information will allow people to help you better :sweat_smile:

its clear ,just detect the faces using neural network.
i dont want to use neither haar cascade and viola jones methods

You could do something like a bounding box like @akashpalrecha mentioned, there’s a few notebooks detailing bounding boxes in 1.0, or you could segment the face in the image and do it via image segmentation instead as a few options.

2 Likes

does face alignment can be used for face recognition ? @muellerzr

Not sure. Honestly a better model for that would be something like a Siamese model. I don’t have experience with that type of model itself or the techniques you mention (or facial recognition) but there’s plenty of pytorch examples you could find.

1 Like

checkout https://github.com/timesler/facenet-pytorch

You can also use MTCNN it is also ggod