Identification of elderly missing person using face recognition
Data science projects in pondicherry
Create New

Identification of elderly missing person using face recognition

Project period

06/12/2020 - 06/30/2020




Identification of elderly missing person using face recognition
Identification of elderly missing person using face recognition

An identity verification system uses biometry to map countenance from a photograph or video. It compares the data with information of illustrious faces to search out a match. Identity verification will facilitate the verification of identity, however it conjointly raises privacy problems. The identity verification technology can do 100% correct identification even once the highest, right 0.5 or three-quarters of a face is visible.The automatic identity verification System (AFRS), can facilitate to spot missing individuals at any age in an exceedingly scientific and speedy manner. it's projected for the identification of missing persons to reunite them with their families and identification of unidentified dead bodies to change dignified restoration of the body to their family. old individuals ordinarily within the world square measure stepping out from their homes thanks to family problems and a few senior voters square measure eager to separate their kids from the adulthood homes. The old persons World Health Organization square measure all starting off from the house by themselves square measure The new identity verification system that uses machine learning to spot similarities in faces seen on totally different footage. Amazon's new identity verification system, Rekognition, is being employed by police in urban center, Sunshine State to go looking through footage from the city’s several video police investigation cameras. Washington County, OR has designed a Rekognition-based mobile app that's being employed by its police. Officers will submit a picture to the county’s information of three hundred,000 faces, and also the system can rummage around for a match. 

Why: Problem statement

More than one,300 old individuals go missing in every country daily. Senior voters aged sixty five or over account for up to eightieth of missing old person cases. This is often clearly a large range and a social issue we have a tendency to cannot afford to ignore. In Dec 2017, an identity verification system was created. The system uses AI (AI) to discover gender and age in images. Machine square measure accustomed to teach alternative machines, coaching a neural network to acknowledge human faces, notwithstanding age, to associate accuracy of bigger than ninety six per a Huffington Post article, Rekognition will establish "all faces in cluster photos, jammed events, and public places like airports." it's conjointly capable of recognizing up to one hundred individuals in an exceedingly single image.

How: Solution description

Face recognition is that the manner of police investigation the face and recognizing specific|the actual} object and also the particular person or something during this world that ought to be trained before the package is supposed to be within the operating stage. Previous aged people square measure missing from home thanks to a discount of memory power that leads them to deviate from the trail of the house and forget the particular thanks to reach the destination. This face recognition package can facilitate the members of the family to search out the missing person with the utilization of technology.

This face recognition can train the photographs of the missing persons by the machine learning algorithmic program known as Deep Neural Networks. The deep neural network algorithmic program can train the photographs of the persons and realize the suitable missing person with email notification. This feature can facilitate the members of the family to spot and determine the old incomprehensible  ones.

The block diagram for this project is given below:

How is it different from competition

The face recognition for distinguishing the persons square measure within the developing stage round the world during this state of affairs. Here we have a tendency to square measure on a separate track. All face recognition packages detect the face and recognises the face by the trained models, additionally to it we have a tendency to square measure adding the email notification feature in it. This email notification feature won't want any manual power to search out and clarify the recognised person's face. If the actual person is known within the camera, Google's straightforward mail transfer protocol(SMTP) can send associate email notification to the recipient to whom the mail needs to be delivered. The e-mail notifications are often made-to-order to any user and recipients. the email notifies each and every single second whenever the person recognized within the camera.

Who are your customers

The customers during this project square measure the members of the family, friends, relatives and the other during this world World Health Organization square measure all looking for their missing persons or individual.

Project Phases and Schedule

Data collection
In this face recognition and identification of missing elderly people we took the real world data of friends, family, neighbors and colleagues for easier and accurate identification.
Tool installation
Here we use anaconda tool for the project. I attach the link of the tool.
Setup all the libraries
Making sure of all the specified libraries square measure put in and prepared to travel.
Get face encodings from pictures
For face recognition, the algorithmic program notes sure necessary measurements on the face, just like the color and size and slant of eyes, the gap between eyebrows, etc. of these places along outline the face secret writing the data obtained out of the image that's accustomed to establish the actual face.
Create AI model
Here, we created a deep neural network AI model to train the faces of persons.
Creating functions to search out a match
A operate is to be created to search out a match within the AI model.

Resources Required

Anaconda - Python version 3.7:
Anaconda could be a free and ASCII text file distribution of the Python and R programming languages for scientific computing (data science, machine learning applications, large-scale processing, prophetic  analytics, etc.), that aims to alter package management and readying. The distribution includes data-science packages appropriate for Windows, Linux, and macOS. it's developed and maintained by Eunectes murinus, Inc., that was based by Peter Wang and Travis Oliphant in 2012. As associate Eunectes murinus, Inc. product, it's conjointly called Eunectes murinus Distribution or Eunectes murinus Individual Edition, whereas alternative product from the corporate square measure Eunectes murinus Team Edition and Eunectes murinus Enterprise Edition, that square measure each not free. Here we have a tendency to use Python three.7 version.
NumPy could be a library for the Python artificial language, adding support for giant, multi-dimensional arrays and matrices, together with an outsized assortment of high-level mathematical functions to control on these arrays.
Computer vision:
Computer vision could be a field of AI that trains computers to interpret and perceive the visual world. victimisation digital pictures from cameras and videos and deep learning models, machines will accurately establish and classify objects then react to what they “see.”
Python provides smtplib module, that defines associate SMTP shopper session object which will be accustomed to send mail to associate web machine with an SMTP or ESMTP attender daemon. Here could be a straightforward syntax to form one SMTP object, which might later be accustomed to send associate email import smtplib smtpObj = smtplib.


Project Code Code copy
/* Your file Name :  */
/* Your coding Language :  */
/* Your code snippet start here */
 "cells": [
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import face_recognition\n",
    "import cv2\n",
    "import numpy as np\n",
    "# This is a demo of running face recognition on live video from your webcam. It's a little more complicated than the\n",
    "# other example, but it includes some basic performance tweaks to make things run a lot faster:\n",
    "#   1. Process each video frame at 1/4 resolution (though still display it at full resolution)\n",
    "#   2. Only detect faces in every other frame of video.\n",
    "# PLEASE NOTE: This example requires OpenCV (the `cv2` library) to be installed only to read from your webcam.\n",
    "# OpenCV is *not* required to use the face_recognition library. It's only required if you want to run this\n",
    "# specific demo. If you have trouble installing it, try any of the other demos that don't require it instead.\n",
    "                \n",
    "# Get a reference to webcam #0 (the default one)\n",
    "video_capture = cv2.VideoCapture(0)\n",
    "# Load a sample picture and learn how to recognize it.\n",
    "obama_image = face_recognition.load_image_file(\"photo1.jpg\")\n",
    "obama_face_encoding = face_recognition.face_encodings(obama_image)[0]\n",
    "# Load a second sample picture and learn how to recognize it.\n",
    "biden_image = face_recognition.load_image_file(\"photo2.jpg\")\n",
    "biden_face_encoding = face_recognition.face_encodings(biden_image)[0]\n",
    "# Create arrays of known face encodings and their names\n",
    "known_face_encodings = [\n",
    "    obama_face_encoding,\n",
    "    biden_face_encoding\n",
    "known_face_names = [\n",
    "    \"pd\",\n",
    "    \"kalai\"\n",
    "# Initialize some variables\n",
    "face_locations = []\n",
    "face_encodings = []\n",
    "face_names = []\n",
    "process_this_frame = True\n",
    "while True:\n",
    "    # Grab a single frame of video\n",
    "    ret, frame =\n",
    "    # Resize frame of video to 1/4 size for faster face recognition processing\n",
    "    small_frame = cv2.resize(frame, (0, 0), fx=0.25, fy=0.25)\n",
    "    # Convert the image from BGR color (which OpenCV uses) to RGB color (which face_recognition uses)\n",
    "    rgb_small_frame = small_frame[:, :, ::-1]\n",
    "    # Only process every other frame of video to save time\n",
    "    if process_this_frame:\n",
    "        # Find all the faces and face encodings in the current frame of video\n",
    "        face_locations = face_recognition.face_locations(rgb_small_frame)\n",
    "        face_encodings = face_recognition.face_encodings(rgb_small_frame, face_locations)\n",
    "        face_names = []\n",
    "        for face_encoding in face_encodings:\n",
    "            # See if the face is a match for the known face(s)\n",
    "            matches = face_recognition.compare_faces(known_face_encodings, face_encoding)\n",
    "            name = \"Unknown\"\n",
    "        \n",
    "            # # If a match was found in known_face_encodings, just use the first one.\n",
    "            # if True in matches:\n",
    "            #     first_match_index = matches.index(True)\n",
    "            #     name = known_face_names[first_match_index]\n",
    "            # Or instead, use the known face with the smallest distance to the new face\n",
    "            face_distances = face_recognition.face_distance(known_face_encodings, face_encoding)\n",
    "            best_match_index = np.argmin(face_distances)\n",
    "            if matches[best_match_index]:\n",
    "                name = known_face_names[best_match_index]\n",
    "                if name == \"kalai\":\n",
    "                    import smtplib \n",
    "                    s = smtplib.SMTP('', 587) \n",
    "                    s.starttls()\n",
    "                    s.login(\"\", \"Pavadharani@26\") \n",
    "                    message = \"Person detected in the camera\"\n",
    "                    s.sendmail(\"\", \"\", message) \n",
    "                    s.quit() \n",
    "                    face_names.append(name)\n",
    "            \n",
    "            \n",
    "    process_this_frame = not process_this_frame\n",
    "    # Display the results\n",
    "    for (top, right, bottom, left), name in zip(face_locations, face_names):\n",
    "        # Scale back up face locations since the frame we detected in was scaled to 1/4 size\n",
    "        top *= 4\n",
    "        right *= 4\n",
    "        bottom *= 4\n",
    "        left *= 4\n",
    "        # Draw a box around the face\n",
    "        cv2.rectangle(frame, (left, top), (right, bottom), (0, 0, 255), 2)\n",
    "        # Draw a label with a name below the face\n",
    "        cv2.rectangle(frame, (left, bottom - 35), (right, bottom), (0, 0, 255), cv2.FILLED)\n",
    "        font = cv2.FONT_HERSHEY_DUPLEX\n",
    "        cv2.putText(frame, name, (left + 6, bottom - 6), font, 1.0, (255, 255, 255), 1)\n",
    "    # Display the resulting image\n",
    "    cv2.imshow('Video', frame)\n",
    "    # Hit 'q' on the keyboard to quit!\n",
    "    if cv2.waitKey(1) & 0xFF == ord('q'):\n",
    "        break\n",
    "# Release handle to the webcam\n",
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
 "nbformat": 4,
 "nbformat_minor": 4


Leave a Comment

Post a Comment

Are you Interested in this project?

Do you need help with a similar project? We can guide you. Please Click the Contact Us button.

Contact Us

Social Sharing