Skip to content

nguyenit67/AI-FaceSkinCare-Analysis-Project

Repository files navigation

BeautiQ – AI Face Skincare Analysis

📸 "Take a photo of your skin - BeautiQ takes care of everything!"

BeautiQ is a pioneering beauty application in Vietnam, integrating AI/Machine Learning technology to deliver accurate skin analysis and personalized skincare solutions.

🌐 Website: https://wearebeautiq.vercel.app/ 📲 Play Store: BeautiQ on Google Play


About BeautiQ

BeautiQ combines cutting-edge AI/ML with a user-friendly interface to bring professional skincare analysis to everyone. Take a photo of your face — the app analyzes your skin conditions and recommends the most suitable beauty products for your skin type.

Beyond its core AI skin analysis, BeautiQ also supports professional Spa and Clinic management, providing a versatile solution for beauty businesses across Vietnam.


Key Features

  • 📱 Accurate Skin Analysis with Just One Shot — Capture a selfie and instantly receive a detailed analysis of your skin conditions (acne, dark circles, oily skin, etc.).
  • 🎯 Personalized Product Recommendations — Get product suggestions tailored specifically to your skin type and detected conditions.
  • 💼 Spa/Clinic Management Support — Professional tools to help Spas and Clinics manage employee and commission (see Spa/Clinic backend repo).
  • 📊 Condition Probability Display — Visual progress bars show the probability of each detected skin condition.

Repository Structure

This project is split across multiple repositories and branches:

Component Location Description
Skin Analysis & Recommendations Backend master branch (this repo) Flask API for ML-based skin analysis and product recommendations
Mobile App (Flutter) app branch Flutter mobile application, published on Google Play
Spa/Clinic Management Backend Nagimaki/sever_exe201 Backend service for Spa and Clinic management features

Screenshots

One-shot Skin Analysis Spa/Clinic Management

Setup (Backend)

Follow the instructions below to set up the backend locally.

  1. Clone the repository:

    git clone https://github.com/nguyenit67/AI-FaceSkinCare-Analysis-Project.git
    cd AI-FaceSkinCare-Analysis-Project/
  2. Navigate to the backend directory and set up the Python environment:

    cd mlmodel_flask
    python3 -m venv venv
    source venv/bin/activate  # For Linux or Mac
    .\venv\Scripts\activate  # For Windows
  3. Install backend dependencies:

    pip install -r requirements.txt
  4. Start the Flask backend:

    python app.py
    # OR, for production:
    gunicorn -w 4 -b 0.0.0.0:5000 app:app

For the Flutter mobile app setup, see the app branch.


Frontend (Mobile App)

  • Flutter Application: The mobile frontend is built with Flutter and available on the app branch.
  • Published on Google Play: BeautiQ on Google Play
  • Selfie Capture: Users can take a selfie directly within the app for instant skin analysis.
  • POST Request to Backend: Sends images to the Flask backend for skin analysis and recommendations.

Backend

  • Flask API: A Flask server handles image prediction and provides product recommendations based on skin analysis.
  • Deployed on AWS Lightsail: The Flask server is hosted on AWS Lightsail for reliable backend performance.

AI Model

1. Setup and Initialization

  • Environment: Installed necessary packages, including fastbook and fastai, to build a machine learning model for skin analysis.
  • Library Imports: Imported modules for image processing, data augmentation, and model training from fastai.vision.

2. Data Collection

  • Skin Problem Categories: Defined various skin conditions (e.g., acne, dark circles, oily skin) to categorize the images.
  • Image Downloading: Used DuckDuckGo's image search API to download images related to these skin conditions.

3. Data Preparation

  • Image Verification: Verified the downloaded images to ensure there are no corrupted files.
  • DataBlock Setup: Used DataBlock to handle the data pipeline, including loading images, splitting data into training and validation sets, and applying transformations.
  • DataLoaders: Created dls (DataLoaders) to efficiently load the data during model training.

4. Model Training

  • Data Augmentation: Applied image transformations (e.g., random resized cropping) to make the model more robust.
  • Model Definition: Used cnn_learner to define a convolutional neural network (CNN) model with a pre-trained ResNet50 architecture. Fine-tuned the model on the skin condition dataset.

5. Model Export

  • Export Model: After training, exported the model using learn.export(), generating an export.pkl file to be used for inference in the Flask server.

Integration

  • Flutter App to Backend: The Flutter mobile app sends a POST request with the captured image to the Flask backend for analysis.
  • Result Display: The app dynamically displays the analysis result and recommended products received from the Flask server.

Future Improvements

  • Real Product Integration: Replace dummy product recommendations with real beauty products and dynamic pricing.
  • User Authentication: Implement user accounts to save skin analysis history and personalized recommendations.
  • Multilingual Support: Add support for multiple languages to cater to a broader user base.
  • Spa/Clinic Dashboard: Expand the management tools for beauty professionals with client history and reporting features.

About

Beauty mobile application integrating Computer Vision for accurate one-shot skin analysis and personalized skincare product recommendations

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages