VGG16 Net for Facial Recognition using Web Scraping with Selenium (Advanced CNN Project) - Transfer Learning & Augmentation.
Under the guidance of Sir Vimal Daga.

VGG16 Net for Facial Recognition using Web Scraping with Selenium (Advanced CNN Project) - Transfer Learning & Augmentation.

This project is regarding facial recognition with VGG16 Net pretrained weights & coefficients using Web Scraping with Python - Selenium to collect our image data from the web and retrain our model for optimum hardware resources (RAM, CPU & GPU) utilization with the concept of transfer learning and image augmentation.

No alt text provided for this image

So let's understand first the core concept behind Transfer Learning & Image Augmentation :-

Theoretically, Transfer Learning is a research based approach in Machine Learning which involves storing the experience gained previously - which are the weights & coefficients precisely for a machine and utilizing this gained experience in another problem with the same calculated weights and coefficients and retraining again which minimizes the utilization of limited hardware resources like RAM, CPU & GPU of a machine. We freeze the intermediate layers of the pretrained CNN architecture such that it won't feed forward and back propagate to select the kernel from the feature map and use the already calculated accurate weights, coefficients and kernel size to retrain our model with our new image data.

No alt text provided for this image
No alt text provided for this image


Image Augmentation is a process which involves resizing, shifting, rescaling, flipping and rotating operations on our image using the image preprocessing techniques from Image Data Generator module from image library in keras. These techniques minimize the time required in retraining the model through manipulating our data in such a way that the labor required in training is minimized and the features are preserved.

No alt text provided for this image


Using pretrained models like VGG16 to optimize our machine performance and minimizing the time and hardware resources required in retraining through Transfer Learning :-

VGG16 Net is a CNN architecture proposed in an ImageNet Competition which has been proved for it's high accuracy as much as 92.7% for more than 580000 objects on ImageNet. This involves freezing the intermediate layers of the Convolution Neural Network architecture and adding another fully connected layer at the end of the architecture to select the unique features of our newly added image data and tag it through Supervised Learning. The architecture of VGG16 Net :-

No alt text provided for this image
0 InputLayer 
1 Conv2D 
2 Conv2D 
3 MaxPooling2D
4 Conv2D 
5 Conv2D 
6 MaxPooling2D 
7 Conv2D 
8 Conv2D 
9 Conv2D 
10 MaxPooling2D 
11 Conv2D 
12 Conv2D 
13 Conv2D 
14 MaxPooling2D 
15 Conv2D 
16 Conv2D 
17 Conv2D 
18 MaxPooling2D 


So now the real challenge was collecting our Data set which must be sufficiently large for retraining our model with VGG16 Net, this is when Web Scraping comes into picture where we use Selenium with chrome web driver for web scraping:-

Web scraping a web page involves fetching data and extracting required information from it. Fetching is the downloading of a page (which a browser does when you view the page). Therefore, web crawling is a main component of web scraping, to fetch pages for later processing. Once fetched, then extraction can take place. The content of a page may be parsed searched, reformatted, its data copied into a spreadsheet, and so on. Web scrapers typically take something out of a page, to make use of it for another purpose somewhere else. An example would be to find and copy names and phone numbers, or companies and their URLs, to a list (contact scraping). So this how it looks like in my project when we tweak our code for 'Tim Cook' - CEO- Apple Inc :-

The complete detailed code of the project with explanation for each line :-

https://github.com/PranavShekhar13/VGG16-WebSCraper

No alt text provided for this image
Concludingly, I would like to thank my guru - Sir Vimal Daga who constantly motivates us to think out of the blue and harness our ideas into complete solutions. He always brings something new to us everyday and that quench for knowledge keeps my thirst to learn rooted.

要查看或添加评论,请登录

Pranav Shekhar的更多文章

社区洞察

其他会员也浏览了