How to Integrate Face Recognition With Access Control
You can find the original article in our blog.
Surely you have heard lately in the news of some federal or international facial recognition project that has been launched. Indeed, there has been a lot of news on the subject and it seems that this technology is already available to the private sector but only to some multimillion-dollar companies with large numbers of employees.
However, in this text, we want to show you that facial recognition solutions are already available for all companies, even the smallest in their niche. In addition, we want to explain how many telecommunications operators, integrators and installers can expand their range of services and open a new market, one that is showing great demand and popularity and that consequently can generate a significant new income source for them.
Here at Flussonic, for more than a decade, we have been developing software to launch video subscriber services and some time ago, we started developing our own video analytics modules, one of the first being the facial recognition module. The development process was complex and, to explain it, we will need another article. We will write one. It is a promise. For now we will concentrate on how we became clients of the Access Control System (ACS), how much it cost us to install the system and how the integration of the face recognition and ACS was configured.
This journey started because we, as in the case of most businesses in the world, have a physical office where, in addition to our ever growing number of employees, we are constantly receiving visitors. Unfortunately, we began to notice that the greater the number of visitors, the greater the number of robberies and acts of vandalism. It was for this reason that we decided to install a ACS at the main entrance to the office.
We chose a system, one of the most popular on the market at that particular time, and bought a single door access control kit consisting of:
- A controller to control the door lock
- An electromagnetic lock to hold the door
- A door closer, so we did not have to worry about the door being closed
- An access card reader that reads employee IDs
- Exit buttons, so that the door can be exited freely
- An intercom IP call panel
- A small tablet at the reception, to control the IP intercom and open the door
- A power supply unit
- Access control software, to control the controller, its settings, view reports, etc.
The total cost of the installed system was 700 USD. However, it is important to keep in mind that we did not have to buy an additional server for the control access system, since we deployed a virtual one in our local network. No one outside of Flussonic was involved in the deployment, we did it ourselves in one day. Teamwork!
When everything was ready to go, we collected all the pass data that was issued in our BC, added everyone in our team to the system and, in a matter of a few hours, we turned off our ACS. The reason for that was the extreme inconvenience of having to carry the access cards. A card can be forgotten at home, forgotten on the desk when leaving the office, and it is very easy to break. About half of our employees faced these problems and in order to save everyone’s nerves we decided to turn off the ACS until better times.
Why didn’t we create rules and force employees to carry their cards all the time? Simple, it’s bad practice. It is much better to provide additional automation and focus the employee’s attention on his or her work duties than on the fact that he or she must always carry the badge. At that time we already had a high degree of readiness for face recognition and we decided that access to the office would be exclusively by face recognition.
At that time our recognition module had not yet gone into production, but was fully ready for the integration task with the office ACS. So, we began the integration process.
The recognition module allows you to create lists of individuals, assign each employee a photo and a unique identifier.
At the time of recognition, an event remains in the system where a person has been recognized and a report can be viewed from these events. This is not enough to implement integration with the ACS. Separately during the development of the recognition module, we developed scenarios for integration with other systems where the recognition event should trigger a reaction from the system being integrated. In order to implement this logic, we have provided a mechanism to subscribe to events within Flussonic Watcher. How it works: Through the API, you can specify the URL to which Flussonic Watcher will send JSON with the recognized face data.
The method of sending recognition events to a given URL is called this way:
http: // host / vsaas / api / v2 / my / subscriptions with parameters:
-event_type = ‘push_person_list’
-notification_type — id of the list of persons created in advance
-notify_url — url where to send notifications
There may be two notifications:
- About the appearance of a specific person:
-event_type = ‘push_person_single’
-notification_type — person id
-notify_url — url that will be notified of the recognition event
2. About any person from the category
-event_type = ‘push_person_category’
-notification_type = category id
After the subscription is completed, the specified URL at the time of recognition will be sent in JSON format:
{“registration_ids”: [ ],
“priority”: “high”,
“notification”: {
“id”: “person.detection.test.camera-7d8ea4ebf2”,
“body”: “Person detected”,
“group”: “camera1_group1”
},
“data”: {
“targetScreen”: “camera_events”,
“event”: “person”,
“person_look_took”: 0,
“event_start_at”: 1593706529,
“camera”: “person.detection.test.camera-7d8ea4ebf2”,
“person”: {
“id”: 135,
“first_seen_at”: “2020–06–23 14:18:31”,
“last_seen_at”: “2020–06–25 17:09:36”,
“person_list_id”: 1,
“name”: “Person 135”},
“camera_id”: “person.detection.test.camera-7d8ea4ebf2”,
“utc”: “1593706530”}
This JSON has all the information you need about a person to make a decision about a pass to the office or not.
The next step was to contact the developer of the ACS that we had installed in our office and request the API of their system. Their integration protocol turned out to be somewhat different. It was not the http API we were used to. To communicate with the access control system we need to establish a TCP connection to its server, pass authorization and send commands of the specified format. From the whole list of commands we need only one, the essence of which is to tell which access point which object is trying to pass through.
“ALLOWPASS” <ap-id> <obj> <direction>
Further the decision on the person’s admission, on opening the door is already taken care of by the ACS server. On the whole, it is also easy.
So, we approached the very process of integration. Our recognition module was able to send events, and the ACS had the ability to receive commands. The task was very simple: We had to write a small integration module that raises the web server, receives events from our event recognition module, establishes a connection with the ACS server and sends a command to the connection established with the ACS server.
We have synchronized the identifiers in both systems. Thus, the integration module simply translated the person’s identifier into the ACS. It took us about one day to create the integration module.
Ok all running! Let’s test it!
An employee comes to the office, pulls his hand at the door and, within seconds, the facial recognition system is triggered. The employee is identified by a list of persons, an event about the facial recognition fact is sent to the integration module server, where it is unpacked and the identifier of the recognized person is sent as a command to request access to the ACS, which decides whether to let the employee in or not based on access rules. The door to the employee gets unlocked. The opening is accompanied by an acoustic alarm and a green glow on the access card reader. The integration works!
All new faces recognized by the system are listed separately and assigned a unique identifier. At any time we can see the guest list with photos of visitors coming to us. And if a new employee comes to the office, the system will automatically create a profile and ask for the necessary data, we only need to assign him/her an identifier in the ACS and specify the name of the employee to generate reports.
You can also view a list of recognition events with screenshots of recognized faces, date and time of recognition in the Flussonic Watcher user interface.
Now let’s talk a little bit about the economic side. A few lines above we mentioned the fact that the equipment of the ACS for one door cost us 50 thousand Rubles. However, like we also mentioned at the beginning of this article, a couple of our employees were installing the system for one day. We also used one developer’s full day to write the integration module. Thus, the total cost of deploying the ACS integrated with face recognition was roughly 900 USD.
The good news for you, dear readers, is that you don’t have to spend all that time or the same amount of money. Our standard Flussonic Watcher license already includes facial recognition analytics. We want to make this service popular and cost effective for end users. Let’s work together!