tFace Detection by Transfer Learning by using resnet model

Resnet is a per trained model on the imagenet dataset and we can use weights of this model to train our own model and from this model we can predict the face.

For the dataset i have use the harrcascade classifier. For this i use cv2 library to click images from the webcam of my laptop and by harrcascade i detect the face and crop the image accordingly . By doing this my dataset get a proper collection of images.

Link of code for collecting dataset:-

Then i used resnet pretrained model weights to predict the data i collected. Also add 1 Flatten layer , 3 dense layer into this pre trained model and done transfer learning only on this layers by using weights from resnet.

Link of code for Transfer learning and Face Detection:-



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store