Face Detection device
Project overview
Face Detection Device is an IoT project that uses Computer Vision to recognise human faces and sends messages in Telegram messenger with the information provided about people whom it just saw. It contains a combination of embedded devices.
Business Value
There are various fields where such a device could be applied with great success:
Security. Due to the tiny size of a device, it could be used as a security feature that notifies if any person comes into a room or a house. It could be used as a trigger for a home alarm.
Tracking people. It could be used to keep track of the number of people passing the area. For example, to quantify how many people visit a restaurant or a shop per given period. The advantages over the casual camera are price and easy mounting.
Traffic management. The Computer Vision model could be easily changed from recognising faces to recognising car registration plate numbers. That could be added into a stationary radar system to record the speed of the car to the corresponding registration number.
Technical details
Technically, the project consists of the hardware and software parts.
Hardware
The core part is a coin-size microcomputer JeVois A33 with an embedded camera and a big enough SD slot to store Computer Vision YOLO v4 model. The microcomputer uses the Machine Learning model to recognise entities from the camera. It sends all the data about a recognised person to a microcontroller ESP8266 using UART protocol. Then, the microcontroller uses its embedded antenna to send data through the internet to the server. Finally, the server transmits the message to Telegram messenger.
Software
Microcomputer has 32GB of flash memory and 256MB of RAM. The code was written in Python using a lightweight version of YOLO v4 to be kept inside the RAM. Code-wise, it just applies the model, gets features of objects it recognised and sends it through UART protocol.
Microcontroller ESP8266 has only around 50kB RAM, more than 5,000 times less than in JeVois A33. However, the program is simple. It was written in C++. Basically, the code implemented a protocol bridge from UART to 802.11b WiFi protocol. In that way, a microcomputer with no embedded antenna gets an API to the server.
The server was written in Python using webhooks to operate with messenger bots. It used the Telegram chatbot as a temporal solution and for the sake of demonstration
Challenges
There were several hardware and software challenges:
JeVois needs 900mA. Microcomputer JeVois needs a lot of power: 5V and at least 900mA. However, it has a Mini-USB port that supports only 500mA by the standard. That resulted in the microcomputer not having enough power to turn on.
Telegram messenger didn’t work. Initially, I designed a pipeline where ESP8266 handles Telegram messenger itself, but it didn’t work.
Results
As a result, I created a tiny device with an embedded camera and WiFi PCB antenna. It enables detecting people on camera and notifying a user about a person through a Telegram chat. In picture below you can see a JeVois A33 recognising a mouth and sending the videoframes to a PC
Future Works (64 words)
Generally, the project is very flexible:
Any lightweight Computer Vision model could be applied to recognise any entity.
Any destination point could be used instead of Telegram messenger. After data comes to the server, it is easy to add another integration.
Therefore, many use cases could be applied, as discussed in the Business section: security projects, people or vehicle tracking, automated crime recording, etc.