/KSP-IPH-2019-Table25-Legion-FR

Facial Recognition problem submission by Team Legion (Table 25)

Primary LanguageJupyter Notebook

KSP-IPH-2019-Table25-Legion-FR

Facial Recognition problem submission by Team Legion (Table 25)

Test Results:

Here is the top predictions matched from missing folder to other folder: Table of image results. To search or view add this folder to your drive and search in drive or plot using

import pandas as pd
import numpy as p
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
def plot(images_array):
  fig, axs = plt.subplots(len(images_array),2, figsize = (8, len(images_array)*2.6))
  for i in range(len(images_array)):
    for j in range(2):
      axs[i,j].imshow(mpimg.imread(images_array[i][j]))
      axs[i,j].set_title(str(i)+' '+ str(j))
  plt.show()

Project synopsis:

The given task of finding a photo a missing person revolves around the around combined task of facial detection and recognition, which deals with extracting the facial features of a person face and lookup for the same in database, or surveillance cameras, or social media. When there is a match the system brings up the notification saying that the suspect is located with the demographic and related metadata. The oppurtunity is to bring these functionalities all under one real time working applicationin an optimal way.

Tools and Libraries used:

Code and Resources:

Process overview:

process

Output:

Live recognition from camera: screenshot video

How to run:

  • Install Python 3.6+
  • Install Pytorch, Opencv, facenet_pytorch, jupyter, scipy libraries
  • Download necessary images for testing from here
  • For live recognition first at least extract face encodings from one image and then run python live_face_recognition.py
  • For generating face encodings using any of pretrained models of facenet and measure similarity of faces by using cosine similarity or euclidean distance, it is best to train custom metric learner as both cosine similarity and L2 distance aren't efficient for higher dimensional data.