Build a Secure Facial Recognition Door with Windows IoT and Raspberry Pi
Create a cost‑effective, smart home entry system that unlocks automatically when a registered face is detected. DIY security solutions give you full control and customization while keeping installation costs low.
Thanks to Microsoft’s Azure Face API (formerly Project Oxford), makers can now build reliable facial‑recognition applications with minimal effort. This guide shows how to combine a Raspberry Pi, a USB webcam, and a Windows IoT Core device to unlock a door whenever a whitelisted visitor appears in front of the camera.
A brief demo of the Windows IoT Facial Recognition Door
How will you expand the project? What features will you add? Let us know in the comments section below!
Initial Setup
- Set up your PC and Raspberry Pi 2, 3, or MinnowBoard Max (MBM) following the official Windows IoT Core quick‑start guide.
- Wire the doorbell and power relay as illustrated below. The relay will control the lock mechanism.
- Connect the same power relay to the electric door strike or lock, following the schematic below.
- Plug in your USB webcam, keyboard, and mouse into the Raspberry Pi or MBM.
Software Setup
- Open Command Prompt and navigate to the folder where you want to clone the project:
cd <your folder path>
- Clone the repository:
git clone https://github.com/ms-iot/Facial-Recognition-Door.git
- Open FacialRecognitionDoor.sln in the
FacialRecognitionDoorfolder with Visual Studio 2015.
- In the Solution Explorer, locate
Constants.csunder theFacialRecognitionDoorproject. ReplaceOXFORD_KEY_HEREwith your Azure Face API key, which you can obtain from the Azure Face API portal.
- Only for MinnowBoard Max: Set
DisableLiveCameraFeedfrom true to false.
- Choose the correct build configuration: select Debug & ARM for Raspberry Pi or Debug & x86 for MBM.
The MBM configuration is shown below. Raspberry Pi users should select ARM instead of x86.
- Click Remote Machine and enter the IP address of your IoT device. Use “Universal (Unencrypted Protocol)” for Authentication Mode.
Use WindowsIoTCoreWatcher to locate your device’s IP address.
For more details on deploying apps to Windows IoT Core, see the official documentation.
- Press the Remote Machine button (green play arrow) to launch the application on your device.
Software Use
The following screenshots were taken on a PC configured to emulate a Raspberry Pi.
On first launch, you’ll see the main screen. On an MBM, with DisableLiveCameraFeed set to false, the camera preview will appear instead of the camera icon.
Click the “plus” icon.
The bottom app bar contains three buttons: the “plus” icon adds a new user to your whitelist. Any whitelisted face is authorized to unlock the door.
Position yourself or a friend in front of the webcam and press Capture ID Photo. You’ll be prompted to review the captured selfie.
If satisfied, enter the person’s name and press Confirm. The new user will appear in the Whitelisted Visitors section.
Click a user’s image in the upper‑left corner to view that visitor’s profile.
Read More Detail : Windows IoT: Facial Recognition Door
Manufacturing process
- Fundamentals of Facial Recognition: How AI Identifies Faces
- Connect Raspberry Pi 3 to DHT11 Sensor and Upload Data to ThingsIo.ai Cloud
- Real‑Time Face Recognition on Raspberry Pi – End‑to‑End Guide
- Accurate Temperature & Humidity Monitoring with SHT15 on Windows 10 IoT Core
- Installing Windows 10 IoT Core on Raspberry Pi 3 Model B+: A Step‑by‑Step Guide
- Build a Speech‑Controlled Robot with Windows 10 IoT Core on Raspberry Pi 2
- Extending GoPiGo v2 on Windows 10 IoT Core for Raspberry Pi 3
- Smart Windows 10 IoT Plant Monitoring System
- IoT Integration: Remote Arduino Control via Windows 10 UWP Apps
- Create a Reliable Voice Recognition System with Raspberry Pi – A Beginner’s Guide