Giter Club home page Giter Club logo

online-face-clustering's Introduction

FOFC

This module contains code in support of the paper An online algorithm for constrained face clustering in videos. The experiment is implemented using the MXNet framework.

In this repository, I used the original implementation of this paper from here and face recognition from insightface

Dependencies

The code was successfully built and run with these versions:

mxnet-cu100
cudnn 7.6.5
cudatoolkit 10.0.130
opencv 3.4.2
scikit-learn 0.20.3

Note: You can also create the environment I've tested with by importing environment.yml in conda.

Testing

In this repo, I used the 512-D embedding feature from MobileFaceNe.

usage: run_COFC_on_video.py [-h] [-vp VID_PATH] [-sd SAVE_DIR]
                            [-ft FEAT_THRESH] [-ot OVERLAP_THRESH]
                            [-st SIM_THRESH] [--model MODEL_DIR]
                            [--gpu GPU_ID] 

optional arguments:
  -h, --help          show this help message and exit
  -vp VID_PATH        Path to the video file
  -sd SAVE_DIR        Directory path for saving the output
  -ft FEAT_THRESH     Threshold of distance bw features to belong to different
                      persons
  -ot OVERLAP_THRESH  Threshold of overlap above which two faces in
                      consecutive frames will belong to same track
  -st SIM_THRESH      Threshold of Similarity for facetracks to belong to a
                      cluster
  --model             Path to load model
  --gpu               The gpu id which you want to use

You can download the pretrained model here. There are more pretrained model in here

Hence, you can run the algorithm on a video file. The output directory will contain one folder corresponding to each cluster, and then in each folder it will have all the faces belonging to that cluster. The algorithm is highly sensitive to SIM_THRESH. Its value ranges between (0.0, 4.0). Increasing beyond 3.2 will create a lot of clusters, each person will be split into multiple clusters. On the other hand, keeping it below say 2.8 will create less clusters but each cluster will have faces of multiple characters.

References

If you found this repo useful give me a star!

@inproceedings{kulshreshtha2018online,
  title={An Online Algorithm for Constrained Face Clustering in Videos},
  author={Kulshreshtha, Prakhar and Guha, Tanaya},
  booktitle={2018 25th IEEE International Conference on Image Processing (ICIP)},
  pages={2670--2674},
  year={2018},
  organization={IEEE}
}

online-face-clustering's People

Contributors

amirsh15 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.