Skip to content

DIKY:DoIKnowYou? is an implementation of a Face Recognition framework using Haar Cascade classifiers inspired from the CVPR 2001 paper by Viola-Jones that can handle multiple client verification requests on a server using Multithreading and Synchronisation Policies.

License

Notifications You must be signed in to change notification settings

DefUs3r/DoIKnowYou

Repository files navigation

DoIKnowYou

DoIKnowYou (DIKY) is an implementation of a Face Recognition framework using Haar Cascade classifiers inspired from the CVPR 2001 paper by Viola-Jones that can handle multiple client verification requests on a server using Multithreading and Synchronisation Policies.

Dependencies

The following libraries are needed:

  • OpenCV 4.4.0

On Ubuntu 20.04, you can install with: pip install opencv-contrib-python

Please check dependencies and proceed. For maximal performance you can build from source with CUDA support.

  • Python 3.8.3

  • Python packages (newer packages will likely work, though these are the exact versions that we used):

      numpy>=1.17.3
      socket
      tqdm
      threading

Setting up a virtual environment like virtualenv will help keep your Python environment safe. We recommend installing all dependencies using this.

Running

Basic usage:

There are two important files, Client.py and Thread_Server.py and their dependency files. Fork and clone this repository in your local machine. Open one terminal to run the Thread_Server.py and open multiple terminals for each instance of Client.py using:

python3 client.py
python3 server.py

In the client side, a Enter your name prompt will come and upon entering, a virtual terminal will be created. The server side will bind to localhost:5000 after launching. If the port is busy, please change the port address in both client and server side.

  • If a log comes, [RDY] Socket is now Deployed, we are now ready to listen for client requests. Else restart the program.
Commands on server

To listen for client requests, use

listen

To register a new user using a video, use

trainVideo

A prompt will appear asking for video location, enter the absolute/relative address of the video. A consequent prompt will appear, asking to annotate the video with the name of the person.

To register a new user using a webcam, use

trainWebc

A prompt will appear, asking to annotate the video with the name of the person.

To quit, use

quit
Commands on client

To send a verification request using a video, use

video

A prompt will appear asking for video location, enter the absolute/relative address of the video. A consequent prompt will appear, asking to annotate the video with the name of the person. After this a window will open up, showing the video and the detected person.

To register a new user using a webcam, use

webcam

To quit, use

quit

To avoid unexpected killed threads and orphaned processes, do not use this command in between client requests. System may experience a lag and you might have to hard-reboot. You have been warned.

Some flex 😉

After login on Server: Server Login

After login on a Client: Client Login

A 4 client request session to showcase Multithreading: multi_thread_req

Dataset

We have trained face recognition on two videos of actors Will Smith and Emma Watson, because we are in The Pursuit of Happyness and Hermione Granger is 💕 The videos are provided in the videos folder for retraining. Feel free to add more and go wild.

References

Note: You need IEEE Access for accessing these papers. We strongly discourage pirated websites. Please support the research community.

About

DIKY:DoIKnowYou? is an implementation of a Face Recognition framework using Haar Cascade classifiers inspired from the CVPR 2001 paper by Viola-Jones that can handle multiple client verification requests on a server using Multithreading and Synchronisation Policies.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages