GithubHelp home page GithubHelp logo

camera's Introduction

Face Recognition Project

This face recognition project involves collecting images, generating embeddings, performing clustering, and running a real-time face recognition application. Follow the steps below to set up and run the project.

Setup

Creating a Virtual Environment

Creating a virtual environment is recommended to manage dependencies.

python -m venv venv

Activating the Virtual Environment

Activate the virtual environment. The activation command varies depending on your operating system.

  • On Windows:

    .\venv\Scripts\activate
  • On Unix or MacOS:

    source venv/bin/activate

Installing Required Packages

Install all required Python packages.

pip install -r requirements.txt

Running the Application

Starting the Application

Run the main application script.

python main.py

Collecting Images

Use the application to collect images. When you run main.py, it starts a server that you can interact with through a web interface.

  • Navigate to the web interface and use the 'Save Image' button to collect images for the first person.
  • The images are saved in a specified directory.

Changing Directory for the Second Person

After collecting enough images for the first person, stop the application. Change the directory name in the code where images are being saved to start collecting images for the second person.

Restarting and Collecting More Images

Restart the application and collect images for the second person using the same 'Save Image' button.

Generating Embeddings

Once you have collected enough images for both individuals:

Running create_embeddings.py

This script will process the collected images and generate embeddings.

python create_embeddings.py

Performing Clustering

After generating embeddings:

Running k_means_clustering.py

This script applies K-means clustering to the embeddings.

python k_means_clustering.py

Final Steps

Finally, run main.py again.

python main.py

Now, the application should be able to recognize faces in real-time and display names next to the detected faces based on the clusters.

Notes

  • Ensure all scripts (main.py, create_embeddings.py, k_means_clustering.py) are in the project directory.
  • Adjust any file paths or configurations in the scripts as necessary for your setup.

camera's People

Contributors

cerre avatar

Watchers

 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.