Face recognition for access control and logging of the office attendance
Automation of work for receptionist
Logging of arrivals and departures of staff and visitors
Module system with functionality for further improvements
Our company's moving to the spacious new office had raised a question of controlled access to the office, as well as logging of the office attendance. The system with a magnetic lock seemed to be troublesome. Magnetic locks were to be duplicated and delivered among the staff - this did not facilitate their control or logging of the office attendance. Thus, an urgent internal task had made us develop our own system, satisfying our needs and taking into account the latest trends of IT industry.
Developing a technology for access control and logging of the Intaro office attendance
Developing a hardware and software system by means of Python and RaspberryPi
Nowadays technologies of machine learning and computer vision are developing rapidly. We had decided to keep up with the times and refuse from any material identifiers of a person. The face was to be an identifier.

First of all it was necessary to realize the interface interaction of program code with door opener. A door phone with an opening button from inside had been selected as an interaction point. For this task we selected RaspberryPi.
Raspberry Pi
It has outputs to which one can signal in a programmatic manner, besides its platform is Linux. This facilitated the program implementation. RaspberryPi was incorporated into the corporate LAN and API for the user authorization and the door opener was realized upon it.

Thus, RaspberryPi became the "hand" of our future concierge and "eyes" were to be developed.

Our company uses Bitrix24 corporate portal for keeping information on employees and their current status (online/offline) as well as their photos. Bitrix24 has an API for receiving this information that allowed to use it as the source of the master data.

The system prototype was written in Python because this language already had modules for face recognition.
The system had two parts.
The first one was service for searching and recognizing faces with their following logging in database. We hung two cameras on both sides of the door in order to log the arrivals and departures.
The second part was web integrator for monitoring log data and making reports. Also, a bunch of regular tasks was realized for data updating from Bitrix24.

As a result
As a result we got a system, which recognized the employee at the door and, if access was permitted, opened the door, made photo and recorded the time in the attendance log. The system could recognize and log several faces simultaneously.
First of all, the system could not recognize "unknown people". Since employees of contracting entities came to our office, we wanted to control their attendance.

Secondly, photo quality in Bitrix24 limited the recognition process. When the face in the photo was blurred, the recognition process was slow or was blocked.
Nevertheless, there was the need for improvement of the system.
Therefore, it was necessary to realize functionality on the user creation, which further would be identified from the record of the attendance log about the unknown person. In order to increase operating speed, the system was to learn on successful and unsuccessful recognitions.

All in all, the system was changed radically. Dlib became the basis for building faces models.

Unlike the previous version, in which data on models of known employees was stored in random access memory and data updating could not do without the reset of the service with the new data, the current system stores all data in PostgreSQL database system and any data change on employee is applied instantly.

Thus, background tasks change the user data in a real time mode. The system has got a module architecture on the basis of unix philosophy. Each module of the system carries out its own task and forwards the result to another module. In such a way, we have formed several standard modules, which can be replaced or improved according to the needs.
Sensor works with input platform. In our case it is a camera. It receives frames from the camera and forwards them to the detector. Sensor has a motion detector in order to minimize the load on the processor when there is no motion in the frame.
Detector analyzes frames for the presence of faces and forwards all detected faces to the recognizer.
Recognizer rechecks the detected faces for possibility of building models on them. In case of success it makes a query to the database in order to obtain the data on the person.
All these modules are combined into a single background process (worker), which deals with the end result. As soon as the detector of the sensor signals that there is no motion in the frame for some time, the worker logs the received data in the database. Separate worker runs for each camera, as a result, the system deals with all cameras asynchronously.

For additional modules is realized an event model. Modules, coded for a certain event, receive the data about this certain event. For example, if the door opener module recognizes the face successfully, it receives the data about the recognized person and then decides whether to open the door or not. Developing additional modules, you can transform the system into the module system with functionality for further improvements. For instance, it is possible to teach the system to greet employee at his / her first arrival to the office during the day.
The system is capable of self-learning and completing the user models based on the camera recognitions. Now it carries out the recognitions of our employees very quickly.

Since unknown people are logged into the attendance log, we can create a local user on the log record and allow him / her access to the office. Also, you can show to the system its errors. If it has not recognized somebody and this person is logged as "unknown" into the attendance log, then in the web interface we can show to the system who it was. Next time the system will recognize this person successfully.
Thus, we have got the module system with functionality for further improvements which logs office attendance, arrivals and departures of employees and visitors of the office, it also makes videos at the entry and controls access to the office non-materially. The system is tightly integrated with the company's processes and does not need administrators attention.
Usually any technological application solution leads to new ideas and their implementations. Computer vision is in the headlines of Silicon Valley news nowadays, police of many countries is testing criminals recognition in a stream of people and we, in our turn, will try to make these ideas popular among large omni-channel companies.

+7 495 268-02-56
We are in web-development business since 2007. We rank among Top 100 RuNet web-developers and Top 5 e-shop developers.
Khlebozavodskiy proezd 7, Unit 9, Moscow, 115230
Got interesting projects? Contact us!