This driver provides the ability to take an image from any camera or URL (supports Basic AND Digest authentication) and detect who a person in the image! You can create a list of up to 1000 people and add up to 64 faces to each and the driver will match the image it takes to that person!
You can use the driver to automatically open your gate, for example, when a specific number plate comes up to it. You can also use the image taken and used by the driver as part of a Control4 Push Notification!
The driver stores the person name and the confidence (0-100) as variables. This means you can program based of the person! For example, if the person is not in your programming list then announce it over the speakers using our text to speech driver – “Unknown Person in the Hallway”!
View the documentation to get full details on how to use all of the available features.
If the camera you are integrating with has a Control4 driver click on the Control4 driver and go to the Camera Test Tab and then click the button Get Snapshot URL and copy that URL into the ANPR drivers Image URL property box. If you do not have a Control4 driver for the camera you are using you will most likely need to search online to find the URL for the snapshot image. This is not just the cameras IP but the IP combined with a complete URL structure that goes directly to the snapshot image.
For authorization, that is normally required. You can test whether it is by visiting the URL in an incognito browser window and seeing if you are prompted for a username and password. If you are then you need to carry on filling the next settings out. If you aren’t the following settings can be left blank or as their default values.
The authorization type can be either Basic or Digest. You should try both and see which one works for you. You can also check this if you have a driver for the camera installed on Control4. The camera driver properties will show you what is being used for your camera – Basic or Digest.
Username & Password
If you visit the URL in the incognito browser window and need to enter a username and password please enter the correct ones in these fields.
Testing The Image
To test whether the driver is working go to the actions tab in Composer and press Test Image Capture. Then go to the Lua tab and have a look at what is outputted. It will seem like gibberish but it is the Base64 representation of what the driver finds using the details you entered.
You should visit the above link and paste in the Base64 text. Once you press “Decode Base64 to File” you should see the image if you have entered everything correctly. If you don’t see the correct image then you should look at what is outputted and update the properties.
If issues persist please contact me at firstname.lastname@example.org
Microsoft Face API Sign Up
You now need to get the API key and endpoint for Microsoft Face API. This process is shown in the video opposite. You then need to enter the API key and Endpoint in the Driver Properties. The Microsoft Face API provides 30,000 free requests per month. Each identification takes between 1 and 3 requests. Requests are also used when adding people and their faces. Generally, the 30,000 is enough for most installs if the trigger for detecting faces is reasonable – i.e. whenever motion is detected may not be reasonable, but when a line is crossed (Hikvision cameras or active beam sensor) would be a better use of the limit.
Once the key and the endpoint are entered you can go to the driver actions and press Test Image Capture and Plate Detection. If you then look at the Lua output you will find the results of the detection. If you don’t see any output then set your Log Level to 3 – Info and Log Mode to Print.
Adding People & Faces
The driver provides you with a web interface to add people and their faces. Faces can be added via an image URL. You can upload an image to https://imgur.com if needed. The web service URL is shown in the driver properties. When you visit the web interface (which may take a couple of seconds to fully load) you will see a list of people added and you will be able to add new people by entering their name. You can add up to 1000 people and each person can have up to 64 faces stored for them.
When you have added the people, you will be able to add images. Use clear images where the face is clearly seen. It may also be worth capturing images from the camera that will be doing the detection. If you make a mistake, delete the person and re-add them. You can see how many faces have been added for each person in the web interface.
Once you have added all the people and their faces (we recommend at least 5 faces per person), you MUST press the blue link to train the faces. This can take a few minutes and you can check the status with the other blue link. If you do not do this then the driver WILL NOT WORK. You MUST re-train when updating people and faces.
The driver includes two variables: Person Name and Confidence Level. The Person Name will contain the name of the person detected. If an unknown face is detected then this will be blank. The Confidence Level will be a float number between 0 and 100 showing the confidence level of the recognition. If an unknown face is detected, this will be 0.
The driver itself has 2 programming events. One is called Known Face Detected. This will fire when a known face has been detected. At this point, you can use the variables to program something to happen. For example, if the Person Name is “John” then turn on their favourite music in their room and announce, “Hello John”.
The other event is called Unknown Face Detected. This event is fired when a face is detected but does not match any of the faces you added in the web interface.
The driver contains a programming action that must be used to trigger the fetching of an image and detection of a plate. The action is called Fetch Image And Detect Face. You would normally trigger this action when motion is detected on a sensor.
You can also use push notification images with this driver. In Agents --> Push Notifications you can choose an attachment and this driver has an option to send the last recorded image (which includes a face) as a push notification.
Not Getting Image
If you aren’t getting an image from the Test Image Capture action then the likely issue is the authentication type is wrong or your snapshot URL is wrong. By decoding the Base64 using https://base64.guru/converter/decode/file you will be able to see the exact response from the URL you have entered.
If you are 100% positive that all this information is correct then please email email@example.com who will debug the issue.
No Faces Detected
Check out the guidelines for getting an accurate detection by clicking here.
Face Detected But Not Recognized
Have you initiated the training via the web interface? This is the most common issue. If you have then please use the web interface testing text field and test an image you already uploaded for that person. If no match is returned then double check the training and contact firstname.lastname@example.org. If a match is returned, add more faces to the person and train again.
BlackWire Driver Manager
This driver requires BlackWire Driver Manager and OS 3+ to work.
- Added No Faces Detected event
- Added description to Endpoint property to help with incorrectly entered Endpoints.
- Show more detailed error message on web interface in the case of an error
- Full Release
- Initial Release