Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facial Landmark Detection Using Python's MediaPipe Library #643

Merged
merged 8 commits into from
Jun 15, 2024

Conversation

Anshg07
Copy link
Contributor

@Anshg07 Anshg07 commented Jun 8, 2024

Pull Request for ML-Crate 💡

Issue Title: Add Facial Landmark Detection Using Python's MediaPipe Library

  • Info about the related issue (Aim of the project) : The aim is to integrate facial landmark detection functionality using Python's MediaPipe library into the existing application to enhance feature offerings.
  • Name: Ansh Gupta
  • Email ID for further communication: anshgupta072003@gmail.com
  • GitHub ID: Anshg07
  • Identify yourself: Contributor

Closes: #550

Describe the add-ons or changes you've made 📃

Added facial landmark detection capability using MediaPipe. This feature allows the application to detect and visualize facial landmarks in real-time using both photos and live video feeds.

Project Documentation:

Overview

This application utilizes MediaPipe and Streamlit to perform real-time facial landmark detection. Users can see their facial landmarks overlaid on their video feed in real-time.

How to Install and Run the Application
  1. Install Required Libraries: You need to have Python installed on your system. Install the required Python libraries using pip:
    pip install streamlit cv2 numpy Pillow mediapipe streamlit_webrtc

markdown
Copy code
2. Run the Application: Navigate to the directory containing the app.py file and run the following command:
streamlit run app.py

less
Copy code
3. Access the Application: Open your web browser and go to http://localhost:8501. The application should be running and ready to use.

How It Works
  • Video Streaming: Once the application is running, it will access your webcam. Make sure you permit the browser to use your webcam.
  • Facial Landmark Detection: The application processes each video frame to detect facial landmarks using MediaPipe's FaceMesh model. Detected landmarks are then drawn directly on the video feed, providing a visual representation of the face structure in real-time.
Use Cases

This tool can be used for various purposes, including:

  • Augmented reality development.
  • Facial recognition projects.
  • Studies and applications in human-computer interaction.

Type of change ☑️

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested? ⚙️

The functionality was tested by integrating it into the existing app framework and running various tests with different types of facial images and live video to ensure accuracy and robustness under various conditions.

Checklist: ☑️

  • My code follows the guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • Any dependent changes have been merged and published in downstream modules.

Copy link

github-actions bot commented Jun 8, 2024

Our team will soon review your PR. Thanks @Anshg07 :)

Copy link
Owner

@abhisheks008 abhisheks008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Project folder name should be Facial Landmark Detection.
  2. README file should be renamed as README.md.
  3. Add Dataset folder.

@abhisheks008 abhisheks008 changed the title Pull Request for Issue#550 Title: Add Facial Landmark Detection Using Python's MediaPipe Library Facial Landmark Detection Using Python's MediaPipe Library Jun 11, 2024
@abhisheks008 abhisheks008 added Requested Changes ⚙️ Some changes have been requested in this PR. SSOC labels Jun 11, 2024
@abhisheks008
Copy link
Owner

I understood that dataset is not required. Can you create a sub folder as Web App and put the app.py inside that with a README. Also add a demonstration video of the web app inside the Web App folder.

Follow this README template, https://github.com/abhisheks008/ML-Crate/blob/main/.github/web-app-readme-template.md

@Anshg07
Copy link
Contributor Author

Anshg07 commented Jun 13, 2024

added Web App subfolder

Copy link
Owner

@abhisheks008 abhisheks008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved @Anshg07

@abhisheks008 abhisheks008 added Intermediate Points 30 - SSOC 2024 Approved ✅ This PR is approved by the PR or, Mentors. and removed Requested Changes ⚙️ Some changes have been requested in this PR. labels Jun 15, 2024
@abhisheks008 abhisheks008 merged commit 740beae into abhisheks008:main Jun 15, 2024
@abhisheks008 abhisheks008 added the Points Added 🎉 This issue's points has been added to the leaderboard. label Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved ✅ This PR is approved by the PR or, Mentors. Intermediate Points 30 - SSOC 2024 Points Added 🎉 This issue's points has been added to the leaderboard. SSOC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Project Addition]: Facial Landmark Detection using Python's Mediapipe library
2 participants