Giter Site home page Giter Site logo

saurabh-kataria / face-detection-tracking-and-clustering Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ankuprk/face-detection-tracking-and-clustering

0.0 2.0 0.0 813 KB

We detect and track faces in video, then extract features from those face tracks and try to cluster them into given number of persons.

Python 13.97% C++ 86.03%

face-detection-tracking-and-clustering's Introduction

Face-Detection-Tracking-and-Clustering

We detect and track faces in video, then extract features from those face tracks and try to cluster them into given number of Clusters, each Cluster representing a unique person. To get a full idea of our project, refer to the file "ppt_explaining_the_project.pdf". Results were obtained on video: https://youtu.be/A1fVcj29xhk

Running the project on a video-file involves 4 steps:

  1. Shot Detection:

We need the information of shots from the video. The shot-detection is done using Python.

Application used is ShotDetect by John Mathe: https://github.com/johmathe/Shotdetect ReadMe on this GitHub page describes how to use the app via command line.

This app is available for Ubuntu: sudo apt-get install ShotDetect

After running app on your video, a folder will be generated. Paste the "xml_parser.py" file (available here) in that folder and run it.

A file by name "shot_info.txt" will be generated. This file contains shot information in a way understandable by our Face Tracking code. Copy this file and paste it at the location of "main_for_shots.cpp"

  1. Detection and Tracking:

You need to build an OpenCV project, with Dlib Library for Facial Landmark Points Detection, available at: https://sourceforge.net/projects/dclib/files/dlib/v18.10/dlib-18.10.tar.bz2/download

We need the DLib Detector to return the Landmark Points as vector of Points. For this, replace the "full_object_detection.h" file of Dlib Library with the one given here.

Now add the "main_for_shots.cpp" file in the OpenCV project with DLib. Add your video and its "shot_info.txt" generated in step-1 at the cpp file's location.

  1. Feature Extraction:

Copy the "data" folder created in Step-2, and paste it at the location of the Feature Extraction cpp files. Run the .cpp files then.

  1. Clustering:

Is done in Python. Copy the folders generated in step3 and paste them where the Python files are.

If features are generated using "avg_img_features.cpp", run "Clustering_basic_feats.py" results will be stored in "resultsAVG/".

If features are generated using "3D_track_features.cpp", run "Clustering_adv_feats.py" results will be stored in "results/".

face-detection-tracking-and-clustering's People

Contributors

ankuprk avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.