- Notifications
You must be signed in to change notification settings - Fork7
A Web App to help find missing people using Face Recognition. Developed for the Microsoft Intern Engage 2022 Programme.
tinycoder2/FaceFind
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation

A Django Web Application to help find missing people using Face Recognition.
Now deployed on Heroku! Clickhere to check it out!
Table of Contents
The thought of a family member, a friend or someone else you care about going missing can be terrifying. This project aims to help find your loved ones using Face Recognition Technology. If someone you know is missing, then,
- Register the missing person with us.
- Once the background check is done and the missing person is verified, we generate a unique Face ID for the missing person using Azure's Face API.
- When volunteers report a suspected missing person, we verify and generate a Face ID the same way. We then use Azure's Find Similar API to identify a potential match with our database of missing person Face IDs.
- If a match is found we will contact you.
To achieve the goal of finding missing people, I made use of the following tools and languages,
Firstly you have to make sure you have python installed. If you don't have python, you can get ithere.
- Use this command to check if python is installed,
python --version
To access Azure Cognitive Services REST API for Face Analysis, you will need,
- An Azure account (you can create your account for freehere)
- A Computer Vision Resource in your Azure account
To create a Computer Vision Resource, you can navigate through the portal, create a new resource and go under the class of “AI+Machine Learning”. Then select the Face Cognitive Service and set the required information.
Under the Resource Management tab you will find “Keys and Endpoint”. From this section, copy one of the two Keys and the Endpoint and paste it somewhere safe. We will be using these in theconfig.json file.
For detailed instructions clickhere.
To get a local copy of the project and run it, follow these steps.
- Create a folder in which you want set up the project. Go into that folder and check if python is installed.
mkdir myFoldercd myFolderpython --version- Clone the repository:
git clone https://github.com/tinycoder2/FaceFind.git
- Create a virtual environment to install dependencies in and activate it:
python -m venv myEnvcd myEnv.\Scripts\activatecd ..
- Then install the dependencies:
cd FaceFindpip install -r requirements.txt- Enter your API KEY, ENDPOINT that we got fromGetting API credentials, EMAIL ID and EMAIL PASSWORD in
config.json
{"KEY":"Your Azure API KEY","ENDPOINT":"Your Azure Endpoint","EMAIL-ID":"Your Email ID from which the app will contact is missing person is found","EMAIL-PASSWORD":"Password for said Email ID"}To allow the app access your email account, go togoogle account setting , security tab and ensure that you haveLess secure app access turnedon.
- Go to
msengage\settings.pyand change line number 18 as,
# Change to False if cloning and running on local hostIS_DEPLOYED_ON_HEROKU=False
- Apply migrations:
python manage.py migrate
- Create admin account :
python manage.py createsuperuser
Follow the promt and enter the username, preferably"admin", desired email and password. Make note of the username and password as you will have to use these credentials to login.
- Run server:
python manage.py runserver
The app is now running athttp://127.0.0.1:8000/
- Landing page displaying hero section, about section, technology used and FAQ section.
home_screen.mp4
register_missing_person.mp4
report_suspected_missing_person.mp4
- Logging in as the admin and displaying site from admin POV.
admin_login_logout.mp4
- Viewing all missing people, ones that need to be approved, approving a missing person (background check), viewing missing people with status as Leads, status as Found, Deleting a missing person, Editing the details of a missing person.
missing_people_views.mp4
- Viewing all reported people, ones that need to be approved, approving a reported person (checking validity of report), viewing details of potential match, confirming the match, status of missing person changing from Leads to Found.
reported_people_views_confirmation.mp4
Face Detection
To detect the face in the image the person uploads, we use theDetect With Stream API.
In
people\views.pywe have a functiongenerate_face_idthat uses the Detect With Stream API to get the faceID, which is an identifier of the face feature and will be used inFace - Find Similar.
# function to generate face_id using Azure Face APIdefgenerate_face_id(image_path):face_client=FaceClient(config['ENDPOINT'],CognitiveServicesCredentials(config['KEY']))response_detected_face=face_client.face.detect_with_stream(image=open(image_path,'rb'),detection_model='detection_03',recognition_model='recognition_04',)returnresponse_detected_face
Face Recognition
Given query face's faceID, to search the similar-looking faces from a
faceID array, which is an array of faceIDs generated fromDetect With Stream API, we use theFace - Find Similar API.In
people\views.pywe have a functionfind_matchthat uses this API to find a match for the reported person from the list of missing people faceIDs.
# function to find a match for the reported person from the list of missing people using Azure Face APIdeffind_match(reported_face_id,missing_face_ids):face_client=FaceClient(config['ENDPOINT'],CognitiveServicesCredentials(config['KEY']))matched_faces=face_client.face.find_similar(face_id=reported_face_id,face_ids=missing_face_id)returnmatched_faces
Given the timeframe for this project and the fact that I was using a free account with limited number of API calls, I have built myMVP with these two APIs.
In the future I plan to make use of a
faceListIdinstead of thefaceID arrayfor theFace - Find Similar API.The major difference between these two is that
faceID arraycontains the faces created byFace - Detect With Url orFace - Detect With Stream, which will expire at the time specified by faceIdTimeToLive after creation, which is about 86400 seconds (24 hours) by default. AfaceListIdis created byFaceList - Create containing persistedFaceIds that will not expire.Furthermore, one could also usePersonGroup /LargePersonGroup andFace - Identify when the face number is large, theLargeFaceList can support up to 1,000,000 faces.
Future plans include,
SMS verification for registering a missing person
Geo location from IP address while reporting suspected missing person.
Using Azure'sPersonGroup /LargePersonGroup andFace - Identify for face detection and identification.
Sanitizing traffic to prevent API throttling.
About
A Web App to help find missing people using Face Recognition. Developed for the Microsoft Intern Engage 2022 Programme.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.




