12/09/2019
OUR NEURAL NETWORK DEVELOPMENT
It is really difficult to shock somebody with neural networks nowadays. Whereas previously it was scientific works understandable only by mathematical geniuses, now every programmer can learn a little theory and create a program to search for cats in the picture. Already we have some experience in neural networks, namely in face recognition, our team wants to share results with the community.
Our product requires comparing a large number of faces and finding the same ones in real-time. It is a high-load system with a bulky architecture and complex interaction between the services. Our neural network is a core part of the system and it deserves a more detailed review.
To start creating artificial intelligence we should know how people recognize other people they saw before. Face recognition in our brain and in our system consists of several steps:
Firstly, we need to look carefully at the picture and find all the faces in it.
Secondly, we need to look carefully at each face and find all unique facial features
Thirdly, we need to compare these features with all the features we already have in our brain(system). If weβve never seen this person before we can save all this information to recognize this human in the future.
Our brain does all this point instantly. We identify our acquaintances rarely making mistakes, but our computers arenβt so advanced. Needless to say, we should spend a lot of time to make the computer able to go through every step.
The first step is the easiest one. To find a face on the picture we donβt need even a color. We used a histogram of oriented gradients. It shows a direction of brightness change. Then we found all parts of the picture where the histogram is similar to the existing histogram of people face created using many photos. Then we saved all these parts as people faces and showed it in a small rectangle in the picture.
The second step is much more difficult. To find all these unique facial features we need to know some biological facts about the human face. There 68 unique points which could be used to identify people such as inner edges of each eyebrow and lip. We taught our neural network to find these anthropometric points on each face.
The third step is very complicated. Using the information, we got from the last step we are trying to find 128 main characteristics. Getting another picture of the person we are trying to change these characteristics to make these photos looking more similar. If our system made a mistake it is trying to change these characteristics to make these photos looking more different.
To be honest, these algorithms look difficult to implement, but there are many tools we could use to make our system better using much easier ways. We used OpenCV to analyze our video in real-time and to get some prepared patterns to train our neural networks or creating histograms. This library is the best one among all existing tools. The main problem for us was using several cameras for recognition of the same object. It is really a challenge to analyze the same data and find the best picture of the person to recognize because OpenCV is single-threaded. Our team is working on this part now to create our own multithreading tools.
If you are interested in this topic you can start from some ready-made solutions. There are plenty of such tools on the Net. The only problem is then you canβt improve them. You can start from the easiest system and improve it until it would be ready to recognize objects with high probability.
Feel free to contact us if you have any questions.
*Dmytro Honcharov, Python and Data Science developer in AntHouse.