There Is a Range of Tasks Your Face Recognition App Can Be Designed to Perform If You Use the Right Face Recognition Methods. We’d like to Share Our Experience


The Facial Recognition technology has been one of those, gaining ground fastest over recent years and one that is still, obviously, pretty far from its heyday. Invented to, virtually, enhance, or rather, extend one of the 6 human senses, it is finding new, often, critically important (for example, public security-related) uses and becoming more wide-spread globally by the day.

According to Researchandmarkets.com, the total worth of the global Face Recognition software market is estimated to have constituted some USD 3.85 billion in 2017 and it is predicted to reach USD 9.78 billion in 2023, thus showing a nearly threefold growth. This can only mean that while giving those better equipped with Face Recognition apps an edge and an additional means of control, the rapidly developing Facial Recognition technology is also becoming a competitive factor for businesses in various industry sectors. Simultaneously, it is also creating more challenges and opportunities for IT companies, engaged in developing Face Recognition applications.

In this article, we’ll dwell on the challenges we’ve encountered and dealt with while developing our Face Recognition system. We’ll also tell you about the various opportunities, associated with the Facial Recognition technology, and share several interesting insights we’ve gleaned. These insights can be of interest both to those looking to develop a Face Recognition app and to Face Recognition app developers.

So, get buckled up and here is our story…

The Task at Hand: Reliably Securing the Office Premises of a Mid-Sized Eastern-European IT Company

Facial Biometric identification

Our AI team was created when the rise of the AI technologies we have witnessed over recent years had just begun. Face Recognition became sort of a natural choice for us here, as one could foresee, relatively easily, many of the technology’s numerous forthcoming applications.

Although we’ve been involved in Face Recognition app development for close to two years by now, our first internal project, focusing on the development of a Face Recognition system to secure access to our company premises, has become a major experimentation ground that is still helping us choose and test the recognition approaches that are more optimal for various objects (including a human body, physical objects or facial mimics).

Our spacious office is located centrally in Downtown Kharkiv, and we feel, generally, safe. However, from the very outset, we wanted to acquire a consummate grasp of the Facial Recognition technology, so we opted for a full-blown, feature-rich and high-performance solution that would be on the cutting edge of technology. More specifically, the objectives of our Face Recognition app development endeavor can be summed up as follows:

  1. Finding out more precisely how the different Face Recognition algorithms work.

  2. Cutting down on our security costs.

  3. Obtaining office attendance stats.

  4. Entering a budding business niche and establishing a business presence in it.

Looking to Develop a Robust and Well-Performing Face Recognition App?

Our ultimate goal was developing a Face Recognition system that would not only identify faces unfailingly and give an alarm if a face is not recognized, but would also be integrated with a card system, block access to the company premises under certain circumstances, when set to do so, and, finally, serve as the only means of security in the longer run (statistically, a well-developed Face Recognition app proves to be, at least, 10% more “observant” than a human guard, who can easily get diverted or become less attentive for weariness).

Although, we, currently, still have all the required physical security in place, we’ve envisaged two options here: a system that is intended to reinforce our physical security, and one that is capable of reliably securing the premises all on its own.

We’ve extensively used both Face Recognition (SVM, and, more specifically, the version with the multi-classification with probability) and Face Detection (HOG from Dlib) for achieving the objectives under the above goal. It took us quite a spell to gauge the efficiency of these tools and techniques for solving the different tasks that needed to be solved. Those interested in the technical details of our quest for the right solution, can see some of the process of us sifting through mullock and whatever insights we’ve managed to dig up in the following table. Those, who are not interested in the technical details, can, probably skip this one right to the conclusion we’ve made, presented here below.

Face Recognition and Detection Methods


Method Usage Area Advantages Disadvantages Languages & Libraries Used
Haar Classifier Face Detection (FD) OpenCV provides pre-trained FD and LCP models that can be trained on one’s own data. The model has to be trained on a lot of examples, both negative and positive. Unlike with OpenCV, there are no pre-trained models provided by Dlib.
While Dlib makes it is possible to train a model, this is a labor-intensive and time-consuming process.
  • OpenCV
  • Dlib
  • C++
  • Python
  • Java
LBP (Local Binary Patterns) Face Detection OpenCV provides a pre-trained FD model that can be trained on one’s own data.
The required computations are simple and quick to perform. A relatively short training period is required.
The model has to be trained on a lot of examples, both negative and positive.
  • OpenCV
  • C++
  • Python
  • Java
HOG (Histogram of Oriented Gradients). Face Detection Dlib provides pre-trained models.
The HOG from Dlib seems to be more accurate that Haar Classifier and LBP and works in the 5 following modes:
HOG front, HOG left, HOG right, HOG rotate left, and HOG rotate right.
The HOG is faster than the OpenCV CNN and Dlib DNN.
The model has to be trained on a lot of examples, both negative and positive. No pre-trained model is provided by OpenCV.
HOG is less accurate than OpenCV CNN and Dlib DNN.
  • OpenCV
  • Dlib
  • C++
  • Python
  • Java
Deep Neural Network (DNN) Face Detection, Face Recognition and more.
Each of the different DNN models allows one to perform one the required operations: Face Detection, Face Recognition (the detection of 5 or 68 landmarks, depending on the model variation) and Facial Characteristics’ Detection.
Dlib provides several powerful models for Face Detection and the performance of the invariant calculations for a face to be recognized.
The Face Detection results are more accurate than those, produced by the other methods (Haar Classifier, HOG, LBP).
The computations are complex and slow.
For real-time, a video card with CUDA is required.
Training one’s own model requires a very powerful computer.
  • Dlib
  • C++
  • Python
  • Java

Classification Methods


Method Usage Area Advantages Disadvantages Languages & Libraries Used
Support Vector Machine (SVMs, also support vector networks). A Classification and Regression analysis method. The method yields good classification results when applied to large data volumes.
Re-training is fast (32 000 faces has taken up to 1 minute to re-train).
In our case, the SVM has also proven to be more accurate than Random Forest.
OpenCV contains the version of Libsvm without probability.
Dlib supports only the probability version of the binary classification model and the non-probability version of the svm_multiclass model.
Libsvm’s latest version supports probability.
No universal parameter selection methods are provided and the selection process can become quite complicated.
  • Libsvm
  • OpenCV
  • Dlib
  • C++
  • Python
  • Java
Random Forest A Classification and Regression analysis method. It is a supervised learning algorithm that creates”Random Forest” (or a collection) of Decision Trees. Supports multi-classification with probability. In our specific case, Random Forest has failed to fully train itself on our learning data set (the result was 97%, while the SVM produced a 100% positive result).
  • OpenCV
  • Python

So… Having done quite a bit of R &D, we, eventually, arrived at the conclusion that the following combination of tools and techniques would be more optimal for reaching the objectives we’ve outlined above (building a robust Face Recognition app to take over full control over office premises in a multi-story building and create an alternative to physical security):

  • HOG – preferable for face detection purposes.

  • Dlib NN –optimal for obtaining a face descriptor (the unique identifier of a face that consists of 128 facial features or points).

  • SVM – preferable for comparing the obtained visual information with theface descriptors, stored in the application database.

However, the efficiency of a Face Recognition solution does not hinge solely upon the choice of the more optimal one in a combination of technologies for solving a specific constituent task. There are several strategically important subtleties we discovered during our system’s implementation, which must necessarily be duly taken care of by Face Recognition apps’ developers. What are they?

  1. Your Face Recognition app must be able to identify not only faces, but also objects. This would be especially topical for major corporates with a very large number of employees, or for those businesses, that have heightened security requirements due to the nature and specifics of their production process. For example, someone carrying a chain is unlikely to be welcome at a stadium during a soccer match, and someone carrying a rifle would, most probably, not be so welcome at an airport. A Face Recognition app can be trained to identify such objects and, in theory, can, sometimes, even, be used to prevent pilferage at some production facilities.

  2. Most often, a person’s head does not remain immobile as they walk. The quality with which a Face Recognition application can identify a face depends on the camera’s distance to this face, the position of this face and its movements.

    There is a bunch of tricks that can help you solve the distance-to-the-face problem:

    • Positioning the cameras of one’s Facial Recognition solution so, that their resolution will be optimal for the distance to the future object (s).

      Certainly, there are cameras that are expensive enough to be able to ensure a sufficiently good image quality, but the above approach is a great deal more preferable unless you want your bill to skyrocket.

    • Installing a sufficient number of light sources in the proper places.

    • Using one’s Face Recognition app to enhance an image received by it so, that this image will fit a certain pattern, suitable for recognition purposes.

    • Using one’s Face Recognition app in such a way that it will take into account how significantly an incoming image has had to be adjusted.

      For instance, if, as required by the recognition algorithm, a 30x30 face image has had to be zoomed up to 150x150, the application should assign a lesser score to this image.

    As far as the face movement problem is concerned, one can solve this problem through the implementation of an object-tracking capability: the app will track the face throughout the duration of its being captured by the camera.

    Often, visitors enter premises in a group, all at once, and this can well throw a not so well-thought-out Face Recognition system for a loop. Can this be prevented? Positive. It will be necessary to implement an object-tracking capability and the ability to follow simultaneously multiple photo sets.

  3. Face-turn angle matters a whole lot too, and it can, often, be rather difficult to handle.

    As mentioned previously, ideally, it takes 128 different facial features or points to immediately identify a human face. The further from the front-face view the turn-angle of this face is, the harder it is for your Face Recognition app to identify the person correctly.

    We’ve done a whale of research by experimenting with a variety of turn-angles and images that featured various facial parts to arrive at the conclusion that no single pure approach works well enough.

    That is why training your neural network solely on your employees' facial parts is not going to be of assistance: you will still need something closer to the front-face angle and that angle occurs relatively seldom, if your camera isn’t positioned in a well-suited spot. That is why one should always try to position his cameras optimally in order to be able to capture as many high-quality front face-angle images, as possible.

    Moreover, a lots more efficient approach to the face recognition process is the combined one we’ve opted for: we take the full set of the variously angled images, captured by the camera, determine how close to the front-face angle they are (we calculate the turn-face angle for each of the images), and measure the distance to the object for those of the images, that can be considered front-face ones.

    The images that have the more optimal front-face angle-distance ratio take precedence over the rest of the images. However, the rest of the images are used in the recognition process too. In other words, your Face Recognition app must be designed to use, at first, as many front face samples, as you have in your database, and then proceed by using other samples, preferably, those that are as close to the front face view, as possible.

    Ideally, your Face Recognition application should make a decision solely based on the obtained front face images and  corresponding front face samples.

    Simultaneously, we’ve hiked up our app’s recognition ability through the use of the “best available” images, i.e. those of the obtained snapshots, in which the combination of the face-turn angle and distance to the object corresponds to the training photo set most (and which are, consequently, the most suitable ones for recognition purposes).

  4. Each time a new person is added, a new cluster of no less than 50 images (including both front face view ones and  left head-turn and right head-turn images) must be added to your Face Recognition app’s database. After this, the SVM must be re-trained to accommodate this information and be able to use it.

  5. If you are a IT entrepreneur, eyeing up the Facial Recognition business niche, or a software development outfit, just probing into this area of Artificial Intelligence with a view to making it one of your near-future specialties, it is imperative that the Administration Module of your first Face Recognition app have enough flexibility to cater to the varying needs of your different clients. This means that the parameters the system uses for identification purposes must be easily configurable in order to fit the specifics of the environment and conditions in which it may be utilized by an individual client. For instance, in our Face Recognition solution, one can configure about anything, including the Neural Network, used for recognition purposes: you can, simply, switch from the SVM to some other neural network that is more fitting for your needs.

  6. A Face Recognition system that can potentially serve a broader range of purposes in a company where it will be installed must also be designed to perform Body Recognition (and our Face Recognition solution is, incidentally, capable of performing this task). For example, if you run a supermarket chain, this ability will turn your system into a valuable Marketing Intelligence asset by allowing you to count visitors to your different departments. Moreover, if you don’t have too many premises to secure, this may become a great way to help cover the cost of your Face Recognition app’s purchase and implementation.

  7. Talking of Marketing, there is just another potential ability of the Facial Recognition technology that you or your clients may well appreciate greatly, if you or they are in the brick-and-mortar Retail business. A more advanced Face Recognition solution can enable one to perform what is, normally, referred to as Basket Analysis. Simply put, you can identify those products that sell well together, and place them accordingly on your merchandise shelves. Similarly, you can identify products that sell poorly when placed next to one another.

  8. Believe it or not, a Face Recognition system can also be used in Human Resources Management. More specifically, the Face Recognition technology can be used to measure employee emotions with the goal to achieve greater employee satisfaction or, even, find out one’s employees’ reaction to the imposition of a corporate policy or some other important event. And this is precisely what we’ve set as our next major Face Recognition app development goal and been successfully working on of late. By all appearances, we’ll shortly add this functionality to our system.

Disclaimer: The present article reflects solely the subjective viewpoint and findings of the SYTOSS AI Development Team on the topics, covered herein and does not represent an advice to buy or not to buy, or use or not to use any software product or technology.

Related Articles

Facial Recognition: the Advent of a New Era in Non-Digital Marketing?
AI, Data Science and Neural Networks

Facial Recognition: the Advent of a New Era in Non-Digital Marketing?

Facial Recognition is making inroads into Banking, Public and Corporate Security, and even, Gambling, equipping businesses in them with better means of control and security-related customer identification.

However, Facial Recognition apps can also be used to gain valuable business insights. In this sense, they are uniquely positioned to advance the area of Non-Digital Marketing, in which meaningful innovations seem to emerge rather infrequently.

Read More
Artificial Intelligence & Data Science In Telecom: How Can Telcos Gain?
Software Development , AI, Data Science and Neural Networks

Artificial Intelligence & Data Science In Telecom: How Can Telcos Gain?

Artificial Intelligence and Data Analytics have created numerous exciting opportunities, disrupting a range of industries and business niches.

AI in Telecom is a relative newcomer, but, already at this point, there are numerous applications of Artificial Intelligence and Data Analytics in the Telco sector that allow Telecom companies to not only provide more reliable service more cost-efficiently, but also to find new, meaningful revenue sources.

Read More
5 Popular Uses Of Face Recognition
AI, Data Science and Neural Networks

5 Popular Uses Of Face Recognition

Due to the very nature of this technology, Face Detection and Recognition is bound to phase out many current business practices in those sectors that can benefit from enhanced security or discipline. The range of applications of face detection algorithms is continually growing and the technology is mature enough to give birth to many more usage scenarios before long. 

Let’s look at some of these applications and abilities of the Face Detection technology: who knows, perhaps, one of them will help solve your business needs too?

Read More