-
Notifications
You must be signed in to change notification settings - Fork 12
/
index.html
65 lines (62 loc) · 6.01 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>README</title>
<link rel="stylesheet" href="https://stackedit.io/style.css" />
</head>
<body class="stackedit">
<div class="stackedit__html"><h1 id="face-recognition---ii">04 - Face Recognition - II</h1>
<h2 id="assignment">Assignment</h2>
<ol>
<li>Refer to this beautiful <a href="https://towardsdatascience.com/finetune-a-facial-recognition-classifier-to-recognize-your-face-using-pytorch-d00a639d9a79">blog (Links to an external site.)</a>.</li>
<li>Collect 10 facial images of 10 people you know (stars, politicians, etc). The more the images you collect, the better your experience would be. Add it to this <a href="http://vis-www.cs.umass.edu/lfw/lfw-funneled.tgz">LFW (Links to an external site.)</a> dataset.</li>
<li>Train as in the blog and upload the FR model to Lambda</li>
<li>Share the link to “that” single page.</li>
<li>Share the link to GitHub repo.</li>
</ol>
<h2 id="solution">Solution</h2>
<p><code>160x160</code> Face Aligned dataset:<br>
<a href="https://github.com/satyajitghana/TSAI-DeepVision-EVA4.0-Phase-2/tree/master/04-FaceRecognition-II/indian_face_dataset_160">https://github.com/satyajitghana/TSAI-DeepVision-EVA4.0-Phase-2/tree/master/04-FaceRecognition-II/indian_face_dataset_160</a></p>
<p><strong>Dataset Creation</strong>: <a href="https://github.com/satyajitghana/TSAI-DeepVision-EVA4.0-Phase-2/blob/master/04-FaceRecognition-II/CustomLFW%26Indian_Face_Dataset.ipynb">https://github.com/satyajitghana/TSAI-DeepVision-EVA4.0-Phase-2/blob/master/04-FaceRecognition-II/CustomLFW%26Indian_Face_Dataset.ipynb</a></p>
<p>[The above dataset was then added to LFW Dataset]</p>
<p>LFW-Plus-Dataset (LFW + 10 Indian People): <a href="https://drive.google.com/file/d/17k_3guDwSKclVjpyxEmgSmRvB0Z64LCq/view?usp=sharing">https://drive.google.com/file/d/17k_3guDwSKclVjpyxEmgSmRvB0Z64LCq/view?usp=sharing</a></p>
<p>Training:<br>
(Training on LFW + 10 Indian People)<br>
<a href="https://github.com/satyajitghana/TSAI-DeepVision-EVA4.0-Phase-2/blob/master/04-FaceRecognition-II/Train_MTCNN_LFW_Plus.ipynb">https://github.com/satyajitghana/TSAI-DeepVision-EVA4.0-Phase-2/blob/master/04-FaceRecognition-II/Train_MTCNN_LFW_Plus.ipynb</a></p>
<p>(Training on 10 faces only)<br>
<a href="https://github.com/satyajitghana/TSAI-DeepVision-EVA4.0-Phase-2/blob/master/04-FaceRecognition-II/Train_MTCNN_Indian_Face.ipynb">https://github.com/satyajitghana/TSAI-DeepVision-EVA4.0-Phase-2/blob/master/04-FaceRecognition-II/Train_MTCNN_Indian_Face.ipynb</a></p>
<p>All of the TensorClan Models can be found at <a href="https://drive.google.com/drive/folders/15y4WyvaJI9AsfioKUNX1inJtrDqn2UvV?usp=sharing">https://drive.google.com/drive/folders/15y4WyvaJI9AsfioKUNX1inJtrDqn2UvV?usp=sharing</a></p>
<h2 id="dataset">Dataset</h2>
<p>Indian Faces Dataset<br>
<img src="https://github.com/satyajitghana/TSAI-DeepVision-EVA4.0-Phase-2/blob/master/04-FaceRecognition-II/faces.png?raw=true" alt="enter image description here"></p>
<p>LFW Dataset<br>
<img src="https://github.com/satyajitghana/TSAI-DeepVision-EVA4.0-Phase-2/blob/master/04-FaceRecognition-II/lfw_dataset.png?raw=true" alt="enter image description here"></p>
<h2 id="link-httpsthetensorclan-web.herokuapp.com">Link <a href="https://thetensorclan-web.herokuapp.com/">https://thetensorclan-web.herokuapp.com/</a></h2>
<p><strong>Backend:</strong> <a href="https://thetensorclan-backend.herokuapp.com/">https://thetensorclan-backend.herokuapp.com/</a></p>
<p>Code for FrontEnd: <a href="https://github.com/extensive-vision-ai/thetensorclan-web">https://github.com/extensive-vision-ai/thetensorclan-web</a><br>
Code for BackEnd: <a href="https://github.com/extensive-vision-ai/thetensorclan-backend-heroku">https://github.com/extensive-vision-ai/thetensorclan-backend-heroku</a></p>
<h2 id="demo">Demo</h2>
<h3 id="lfw---plus-recognizer-contains-10-additional-people">LFW - Plus Recognizer (contains 10 additional people)</h3>
<p><img src="https://github.com/satyajitghana/TSAI-DeepVision-EVA4.0-Phase-2/blob/master/04-FaceRecognition-II/demo3.gif?raw=true" alt="enter image description here"></p>
<h3 id="indian-faces-recognizer">Indian Faces Recognizer</h3>
<p><img src="https://github.com/satyajitghana/TSAI-DeepVision-EVA4.0-Phase-2/blob/master/04-FaceRecognition-II/demo2.gif?raw=true" alt="enter image description here"></p>
<p><code>[right click -> open image in a new tab]</code> for better experience</p>
<h2 id="train-metrics">Train Metrics</h2>
<p><img src="https://github.com/satyajitghana/TSAI-DeepVision-EVA4.0-Phase-2/blob/master/04-FaceRecognition-II/train_loss.png?raw=true" alt="enter image description here"></p>
<h2 id="explanation">Explanation</h2>
<p>Remember that we had created FaceAlign previously in Face-Recognition-I ? we simply supply our face image to that AWS Lambda API and get the aligned face, now we have added the face recognition model to heroku(why ? see notes), and now its simply matter of sending the aligned face to the model backend and fetching the results ! that’s it !</p>
<h2 id="notes">Notes</h2>
<ul>
<li>I moved the backend (Flask) to heroku, why ? because AWS has uncompressed requirement to 500MB, and i cannot use PyTorch 1.6.0 with it, something i discussed earlier in previous assignment as well</li>
<li>Heroku provides a slug size (compressed) python app to 500MB, but even after adding all dependencies my slug size of below 250MB, quite good ain’t it !</li>
</ul>
<h2 id="personal-notes">Personal Notes</h2>
<ul>
<li>I don’t know but, for being a student developer i really like Heroku !, it gives a lot of free things without charging anything ! i can even transfer apps between accounts since every account has 5 apps limit. but a lot of flexibility ! love Heroku !</li>
<li>AWS is good, don’t get me wrong, but too much work, also docker is necessary for lambda, else you WILL face issues, its not the case in Heroku, you simply commit and push to heroku, and rest it will take care ! simply use a build pack of whatever you like.</li>
</ul>
</div>
</body>
</html>