Windows IoT: Facial Recognition Door

Build an automated door that unlocks itself using facial recognition.Home security systems are a growing field of projects for Makers. A self-built system is not only less expensive than a bulky professional installation, but it also allows for total control and customization to suit your needs.

Facial Recognition Door

With the introduction of Microsoft's Project Oxford, facial recognition applications are now more accessible to makers than ever before. This project utilizes a Raspberry Pi, basic Webcam, and an internet connection to create a door that unlocks itself via facial recognition. If the visitor at the door is recognized, the door will unlock!

A brief demo of the Windows IoT Facial Recognition D

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 or 3, or MBM according to theseinstructions.
  • Next, wire up the doorbell and power relay as shown below. The power relay will be used to lock and unlock the door.
  • Now wire up the same power relay to the lock, or electric door strike, as shown below.
  • Plug in your USB webcam, keyboard, and mouse into your Raspberry Pi 2 or MBM.

Software Setup

  • Use Command Prompt to navigate to the folder where you want the project:

cd <your folder path>

  • Run the git clone command to download the project:

git clone

  • Open the FacialRecognitionDoor.sln solution file, in the FacialRecognitionDoor folder you just downloaded, using Visual Studio 2015.
  • On the right panel, under the “FacialRecognitionDoor” project, navigate to the Constants.cs file. You should see a section at the top entitled “General Constants”. The first thing you need to do here is enter your Oxford API key. Follow the instructions here to acquire your key.
  • Replace OXFORD_KEY_HERE with your new key:


  • ONLY FOR MINNOWBOARD MAX: Switch the DisableLiveCameraFeed variable from true to false:
  • On the top menu of Visual Studio, select Debug and ARM if you are using a Raspberry Pi. If you're using an MBM, select Debug and x86.

MBM configuration

  • Press Remote Machine. In the “Remote Connections” dialog you will have to enter your Remote Machine IP address and use “Universal (Unencrypted Protocol)” for Authentication Mode.

Use WindowsIoTCoreWatcher to find your IP address.

For more information on how to deploy your application on a Windows IoT device, please see this documentation.

  • You can now run the code! Press the Remote Machine button with the green “play” arrow.

Software Use

The following screenshots were taken on a PC that was set up to act as a Raspberry Pi would.

When you first run the project, this is the screen you should see. On an MBM you would have set the DisableLiveCameraFeed variable to false in step 6 of Software Setup and instead of seeing the camera icon, you would see a live feed of what the camera is seeing.

Click the plus icon

There are three buttons located on the bottom app bar. The first is a “plus” icon. This is used to add a new user to your “whitelist.” Any user on the whitelist is essentially marked as a “friend” and allowed to unlock the door using their face. Try pressing the “plus” button now. You should see this screen:

Position yourself or a friend in front of the webcam and press the Capture ID Photo button. You should see this screen with your newly captured selfie:

If you're happy with the photo, enter the name of the person in the photo and press Confirm. If not, just press Cancel and take another photo.

After pressing Confirm, you will be sent back to the main page, but you will now see a user under the Whitelisted Visitors section:

Click on that user's image in the upper-left corner of the page to navigate to that user's profile page:

Read More Detail  :Windows IoT: Facial Recognition Door

About The Author

Muhammad Bilal

I am highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.

Scroll to Top