Introduction: Facial Recognition in Practice

About: Do you like technology? Follow my channel on Youtube and my Blog. In them I put videos every week of microcontrollers, arduinos, networks, among other subjects.

This is a subject I'm so fascinated for, that it makes me lose sleep: Computer Vision, the detection of objects and people through a pre-trained model.

Step 1: Introduction

We will use the YoloV3 algorithm , to run an application and run the project.

I worked with neural network 15 years ago and I can say that these were “difficult” times, given the resources available at the time.

Step 2: Resources Used

· Logitech C270 camera

· Computer

· NVIDIA GeForce GTX 1660

Step 3:

Step 4: Prerequisites

To run deep neural networks (DNN) it is necessary to use parallel computing, with a GPU.

So you will need a powerful video card from NVIDIA and run the algorithm using the CUDA API ( GPU virtual instruction set ).

To run the algorithm you must first have the following packages installed:

- NVIDIA Video Card Drive

- CUDA

- CUDNN (CUDA Deep Neural Network Library)

- OpenCV

Step 5: Computer Requirements

Step 6: Setup YOLO

Detection using a pre-trained model

Open the terminal and enter the above commands.

Step 7: Modify MakeFile

Modify the “MakeFile” file as in the figure above, because we will use GPU, CUDNN and OpenCV processing. After modifying, run the ‘make’ command.

Step 8: Wait for It to Complete

The command 'make' in Step 7 will compile everything for use by the algorithms, and it takes a while to run.

Step 9: For Computers That Don't Match the Requirements

If your computer and video card are not as powerful or you want better performance, change the file 'cfg /yolov3.cfg'.

The above configuration was used in this project.

Step 10: YOLO V3

Detection systems typically apply the model to an image at several different locations and scales.

YOLO applies a single neural network to the entire image. This network divides the image into regions and provides bounding boxes and probabilities for each region.

YOLO has several advantages. It sees the image as a whole, so its predictions are generated by the global context in the image.

It makes predictions with a single network assessment, unlike R-CNN which makes thousands of assessments for a single image.

It is up to 1000 times faster than R-CNN and 100 times faster than Fast R-CNN.

Step 11: Running YOLO

To run YOLO, just open the terminal in the “ darknet ” folder and enter a command.

You can run YOLO in 4 ways:

· Image

· Multiple Images

· Streaming (Webcam)

· Video

Step 12: YOLO V3 - Image

Place the image you want in the “data” folder inside darknet and after that run the command above modifying the image name.

Step 13: YOLO V3 - Input Image

Step 14: YOLO V3 - Output Image

Step 15: YOLO V3 - Multiple Images

Place the images in some folder, and instead of providing the image path, leave it blank and run the command as you can see above (in the left).

After that, something like the figure in the right will appear, just place the image path and click on “ enter ” and repeat these steps for several images.

Step 16: YOLO V3 - WebCam

Run the command above and after loading the network, the webcam will appear.

Step 17: YOLO V3 - Video

Place the video you want in the “data” folder inside darknet and after that run the command above modifying the video name.

Step 18: YOLO V3 - EXPO3D Video 1

Step 19: YOLO V3 - Video EXPO3D 2

Step 20: YOLO V3 - Video EXPO3D 3

Step 21: PDF to Download