Giter VIP home page Giter VIP logo

souvikmajumder26 / any-face-clustering Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 2.0 32.94 MB

📸 Face Clustering Engine developed using OpenCV & DBSCAN, deployed as a Streamlit Web App to deliver uploaded images grouped according to the individual unique faces in them.

License: MIT License

Jupyter Notebook 99.64% Python 0.36%
python python3 face-recognition face-detection clustering face-clustering unsupervised-learning opencv dbscan dbscan-clustering

any-face-clustering's Introduction

Any Face Clustering:
Automatically Group your Images by Faces with an
end-to-end Artificial Intelligence App

                    Jupyter Python Dependencies GitHub Issues Contributions welcome License


Overview

A Face Clustering Engine has been developed utilizing OpenCV, Face Recognition & DBSCAN (scikit-learn) python libraries. The project has been deployed as a Streamlit Web App which provides users the facility to upload their own images (or images they want to test with) and be delivered with the images grouped according to the individual unique faces contained in them.

A Face Clustering Engine in essence performs grouping of user-provided images according to the unique faces contained in them. Unsupervised Learning being at the core of this Face Clustering Engine enables it to cluster/group images by faces which it hasn't even seen (trained on) yet. Thus it is applicable to Any Face.


Table of Contents

  1. Usage / User Interaction with the Project (follow any one)
  2. Demo video of the Streamlit Web App
  3. Motivation and Use Cases
  4. Detailed Project Code with Explanation
  5. Citing
  6. Dependencies
  7. Acknowledgement

1. Usage / User Interaction with the Project (follow any one)

💡 To launch the "Any Face Clustering" Streamlit Web App...

a) Follow these steps to open the Project in Google Colab Notebook:

  • Open the file "Any_Face_Clustering_Streamlit_app.ipnyb" and click "Open in Colab" OR just click here :D

    💡 A notebook will open in Google Colab.

    💡 This app can be deployed directly on cloud for end-users, but as it requires a lot of memory (RAM) for its computation, it could not be deployed successfully to a free-tier cloud service (eg: Streamlit Share Cloud, Heroku, AWS, Azure, GCP etc.), thus Google Colab was chosen to work as the free server for this project prototype.

  • Follow the next steps mentioned inside the notebook to launch the Streamlit Web App.

b) Follow these steps to open the Project Locally:

  • Download/clone the repository onto desktop
  • setup.cfg, setup.py run python setup.py
  • Launch the Streamlit Web App by opening the file "app.py" - streamlit run myfile.py

2. [Demo] Follow this video on how to interact with the Streamlit App after launching it:

Feel free to interact with the Streamlit Web App...

💡 Upload images of several faces (make sure to upload atleast 3 images containing the same face)... or you can choose to use the Unlabelled_test_images by downloading the folder and then uploading the images to the Web App to experience how the project works.

Any-Face-Clustering-Streamlit-WebApp-Demo.mp4

3. Motivation and Use Cases

  • Long before I knew anything about Artificial Intelligence, I discovered a feature in my mobile phone which grouped all images according to the faces contained in them. I was always intruiged by this feature and wondered how this had been achieved. After a few years, fortunately I was exposed to the field of Data Science and Artificial Intelligence, and now I have been able to fulfill my old curiosity by building the same feature in the form of a Web App prototype to be used by anyone.

  • Other than Web & Mobile application integrations of this project making lives easier by enabling people to search photos by a particular face, another crucial use case of this project can be Law Enforcement. In case of a crime scene, suppose there are active security cameras in the neighbourhood that recorded the people present at the crime scene and in the nearby areas. So, even if the law enforcement/police officers arrive after the criminal(s) has/have fled, this can help the law enforcement in tracking the routes and activities of the people present there and in the neighbourhood areas by comparing unique faces/identities from several video feeds to check for suspicious activities which will further aid in the investigation.


4. Detailed Project Code with Explanation

  • Open the file "Detailed_Project_Explanation.ipnyb" and click "Open in Colab" OR just click here to open the notebook with detailed and explained project code.

5. Citing

@misc{Souvik2022,
  Author = {Souvik Majumder},
  Title = {Any Face Clustering},
  Year = {2022},
  Publisher = {GitHub},
  Journal = {GitHub repository},
  Howpublished = {\url{https://github.com/souvikmajumder26/Any-Face-Clustering}}
}

6. Dependencies

  • OpenCV (cv2)
  • Face-Recognition
  • scikit-learn
  • Numpy
  • Streamlit
  • imutils
  • os
  • time
  • shutil
  • tempfile

7. Acknowledgement

any-face-clustering's People

Contributors

souvikmajumder26 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

varun3009

any-face-clustering's Issues

Dependencies issue setup.py install command on python3.10

Firstly thank you for such a great project, i tired running it locally on my system, following the guide i ran py setup.py install but it resulted into an error i.e. dependencies seem to be deprecated, could u please look into it.

I downgraded my python version now i get Removing .\any-face-clustering-main\venv\lib\site-packages\Any_Face_Clustering-1.0.1-py3.10.egg
error: [WinError 32] The process cannot access the file because it is being used by another process: '.\any-face-clus
tering-main\venv\lib\site-packages\Any_Face_Clustering-1.0.1-py3.10.egg'

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.