Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
1
Hello and welcome back to module one face recognition you had your intuition lectures with Curiel to
2
understand how Cascades work.
3
So now we're going to put them into action and we're going to put them into action to do some face recognition
4
and we're going to do it through the web cam that is that I'm going to put on my web cam and we're going
5
to try to protect my face and my eyes and some extra stuff that will be for the homework but that's
6
what we'll be doing we'll be working with the Cascades that is with open city to do this face recognition.
7
So as you can see I launched my spider in my virtual platform environment which is a virtual environment.
8
And now the first thing we have to do when launching spider is to find the right folder because this
9
folder is going to contain the Cascades ex-MIL.
10
And so we need to be in this folder because we will be calling the Cascades to execute our code.
11
So let's do that right now we're going to go to File Explorer and we're going to go to our computer
12
vision A.D.C. folder which is right now on my desktop.
13
So you go into this folder and you go to module one face recognition the first module of discours.
14
So I'm very excited to start this.
15
And actually right now I want to tell you that the more we evolve in the course the more the models
16
will be working with will be powerful and that means that actually open city is great but it's definitely
17
not the most powerful models of discourse and of the virtual platform that some of you might have noticed
18
that it is no longer in development.
19
We have some much better models today we will see that with object detection for object detection we'll
20
be using something much more powerful than open city.
21
I will let you find out about the surprise but still open city is going to do some great stuff here
22
for face recognition.
23
But keep in mind that you should really follow the course until the end because we will be working with
24
some much more powerful models.
25
But let's start with open city.
26
So this is the right folder.
27
Make sure that you're in the right folder.
28
And now I'm quickly going to describe the folder.
29
So we have four files.
30
The first file is the code that we're about to implement right now but the connected version of the
31
code.
32
So if you open this file you will have each line of the code commented.
33
So that's in case you don't have time to watch the video.
34
But really I strongly recommend to watch the video because I will be seeing much more than the comments
35
and this is actually this face recognition that bites and fowl.
36
And this is actually where we're going to implement the code.
37
Then we have the cascade for the eye.
38
That's the cascade that we'll use to detect the eyes and the web.
39
That is my eyes.
40
But you will use the code to detect your eyes too.
41
And the cascade to detect the face.
42
So these are X-amount files that's not very important.
43
But this is what we'll use from open city to do these face protections.
44
So there we go that's the folder.
45
Make sure that you have all these files.
46
And now we're going to start.
47
So as you can see there is this first code section here in the libraries.
48
And of course the only library that we need here is open city and that is silly to say Make sure you
49
import too.
50
I'm going to execute the whole code in the end but make sure that you import 3:2 that's entirely compulsory.
51
And the reason why we don't import much more is that actually we're not doing some deep learning here.
52
If you noticed in the intuition lectures the Cascades are actually not some neural networks.
53
There is a deep series of filters but this is not a series of layers so open city cascades are not based
54
on any neural networks.
55
And that's why for open city we don't need to import any neural network libraries like the torched libraries
56
or tenso flow or anything.
57
We just need open city.
58
And what we need from open city is mainly the Cascades.
59
And that is exactly what we're going to do now.
60
We're going to be loading the Cascades one cascade for the face and one cascade for the eyes and to
61
do this we're going to create two objects because these are going to be some objects of some class that
62
is called Cascade classifier.
63
And this class will take as arguments exactly the SML file that contains the cascade.
64
So the first object will take an argument while the frontal face cascade and the second object will
65
take its argument.
66
I Harker's Kate.
67
So let's do this.
68
We're going to create a first object here for the face and we're going to call it face cascade.
69
All right so that's the object.
70
And now since it's an object of some class we need to call the class.
71
Now this class is actually a class of the CB2 module from the open library.
72
So what.
73
And here we type the name of the class which is cascade class C fire cascade classifier.
74
All right.
75
And as I just said in argument here we just need to put one argument which is the name of the ex-MIL
76
Harker's Kate.
77
And since we're starting with a face well we need to put exactly that heart cascade underscore frontal
78
face underscore default.
79
SNL but we need to put that in quotes.
80
There we go.
81
Let's do that har cascade underscore frontal face underscore default and there we go.
82
That SNL and that's will import the cascade for the face.
83
So as a reminder the cascade is a series of filters that will apply one after the other to detect the
84
face.
85
All right so now we're going to do exactly the same for the eye.
86
So I'm copying this line to be efficient and basic in here and I'm just going to play face Cascades
87
by I cascade.
88
All right.
89
And of course here I need to replace Hargus Cade's frontal face default SNL by hardcase gate.
90
I am just selecting this and replacing it by.
91
There we go.
92
So now we have our two Cascades the cascades of the face and the cascade of the eye so perfect we were
93
ready to move onto the next code section which will be about implementing a function that will do the
94
detection itself that will use those cascades to detect the face and the eye.
95
But you're going to see that there is a little trick which is about computational efficiency and that
96
is we're going to do the phase detection on the global referential the main differential but we're going
97
to do the detection and the referential of the face and that will save us some computation time.
98
All right so let's do that in the next tutorial.
99
And until then the computer vision.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.