BLEEP!
This simple Arduino-powered video camera obscures faces in real-time on-device with the FOMO object detection algorithm to protect privacy.
Privacy is harder to protect than ever before in today’s always-connected digital world. Even if you attempt to minimize your own digital footprint, you will still encounter cameras in public spaces — that you have no control over — almost everywhere you go. And the video streams from these cameras are commonly transmitted over public networks, leaving them at risk of being inappropriately accessed. That can put a bad taste in all of our mouths, but it is especially concerning for the owners of the cameras. HIPAA, GDPR, and a slew of local laws, put them at risk of winding up on the wrong side of the law for failing to protect the privacy of those in the videos.
Hardware hacker José Bagur has come up with an interesting solution to this problem — an Arduino-powered camera that obscures faces in real-time, entirely on-device. By removing faces from the video before they ever leave the video capture device, the possibility of anyone accessing the raw data is almost eliminated. And thanks to the low cost of the system, this is not just for commercial applications. Anyone could install some in their home as security cameras, or use them to record videos for social media.
The system is powered by an Arduino Portenta H7 development board with a Portenta Vision Shield. The Portenta H7 comes equipped with a dual-core Arm Cortex-M7+M4 CPU and 8 MB of memory, which is sufficient for running optimized computer vision algorithms on-device. The Portenta Vision Shield adds an image sensor and network connectivity to round out the hardware requirements for an internet-connected camera.
On the software side, the device will need to run an object detection algorithm that detects faces and reports their coordinates. Once the coordinates are known, those locations in the stream can be covered to hide the individuals’ identities. Bagur did this by overlaying a smiley face on top of the video.
This part of the process may sound hard, but in reality, most of the work has already been done, and you can freely reuse it. Bagur first loaded the Portenta H7 with OpenMV firmware. This firmware comes with a TensorFlow Lite face detection model that is powered by Edge Impulse’s powerful FOMO object detection algorithm, which was designed for working on resource-constrained platforms exactly like the Portenta H7.
With this model doing most of the work, one only needs to write a little bit of Python code to position an image at the locations of faces, as reported by FOMO. The video stream can then easily be served up via Wi-Fi or Ethernet (depending on the Portenta Vision Shield version one chooses to use) via a lightweight MJPEG streaming server.
Whether it is for compliance with laws or just to stay anonymous, Bagur’s solution is a quick and easy way to achieve your goal. The only downside is that the resolution of the video is quite low at 240×240 pixels. That is something that your applications might outgrow, but by building this project first, you will at least have some background knowledge to guide you in developing a higher-resolution system in the future.