|
7 | 7 | "# Face Recognition with OpenCV and Python"
|
8 | 8 | ]
|
9 | 9 | },
|
| 10 | + { |
| 11 | + "cell_type": "markdown", |
| 12 | + "metadata": {}, |
| 13 | + "source": [ |
| 14 | + "## Introduction" |
| 15 | + ] |
| 16 | + }, |
10 | 17 | {
|
11 | 18 | "cell_type": "markdown",
|
12 | 19 | "metadata": {},
|
|
26 | 33 | ""
|
27 | 34 | ]
|
28 | 35 | },
|
| 36 | + { |
| 37 | + "cell_type": "markdown", |
| 38 | + "metadata": {}, |
| 39 | + "source": [ |
| 40 | + "## OpenCV Face Recognizers" |
| 41 | + ] |
| 42 | + }, |
| 43 | + { |
| 44 | + "cell_type": "markdown", |
| 45 | + "metadata": {}, |
| 46 | + "source": [ |
| 47 | + "OpenCV has three built in face recognizers and thanks to OpenCV's clean coding, you can use any of them by just changing a single line of code. Below are the names of those face recognizers and their OpenCV calls. \n", |
| 48 | + "\n", |
| 49 | + "1. EigenFaces Recognizer - `cv2.face.createEigenFaceRecognizer()`\n", |
| 50 | + "2. FisherFaces Recognizer - `cv2.face.createFisherFaceRecognizer()`\n", |
| 51 | + "3. Local Binary Patterns Histograms (LBPH) Face Recognizer - `cv2.face.createLBPHFaceRecognizer()`" |
| 52 | + ] |
| 53 | + }, |
| 54 | + { |
| 55 | + "cell_type": "markdown", |
| 56 | + "metadata": {}, |
| 57 | + "source": [ |
| 58 | + "### Eigen Faces Recognizer" |
| 59 | + ] |
| 60 | + }, |
| 61 | + { |
| 62 | + "cell_type": "code", |
| 63 | + "execution_count": null, |
| 64 | + "metadata": { |
| 65 | + "collapsed": true |
| 66 | + }, |
| 67 | + "outputs": [], |
| 68 | + "source": [] |
| 69 | + }, |
29 | 70 | {
|
30 | 71 | "cell_type": "markdown",
|
31 | 72 | "metadata": {},
|
|
52 | 93 | "cell_type": "markdown",
|
53 | 94 | "metadata": {},
|
54 | 95 | "source": [
|
55 |
| - "## Import Required Modules" |
| 96 | + "### Import Required Modules" |
56 | 97 | ]
|
57 | 98 | },
|
58 | 99 | {
|
59 | 100 | "cell_type": "markdown",
|
60 | 101 | "metadata": {},
|
61 | 102 | "source": [
|
| 103 | + "Before starting the actual coding we need to import the required modules for coding. So let's import them first. \n", |
| 104 | + "\n", |
62 | 105 | "- **cv2:** is _OpenCV_ module for Python which we will use for face detection and face recognition.\n",
|
63 | 106 | "- **os:** We will use this Python module to read our training directories and file names.\n",
|
64 | 107 | "- **numpy:** We will use this module to convert Python lists to numpy arrays as OpenCV face recognizers accept numpy arrays."
|
|
85 | 128 | "%matplotlib inline "
|
86 | 129 | ]
|
87 | 130 | },
|
| 131 | + { |
| 132 | + "cell_type": "markdown", |
| 133 | + "metadata": {}, |
| 134 | + "source": [ |
| 135 | + "### Training Data" |
| 136 | + ] |
| 137 | + }, |
88 | 138 | {
|
89 | 139 | "cell_type": "markdown",
|
90 | 140 | "metadata": {},
|
|
380 | 430 | "cell_type": "markdown",
|
381 | 431 | "metadata": {},
|
382 | 432 | "source": [
|
383 |
| - "As OpenCV comes equipped with three face recognizers.\n", |
| 433 | + "As we know, OpenCV comes equipped with three face recognizers.\n", |
384 | 434 | "\n",
|
385 | 435 | "1. EigenFace Recognizer: This can be created with `cv2.face.createEigenFaceRecognizer()`\n",
|
386 | 436 | "2. FisherFace Recognizer: This can be created with `cv2.face.createFisherFaceRecognizer()`\n",
|
|
0 commit comments