Skip to content

Repository files navigation

SkinSense AI

AI-powered skin analysis assistant that combines Computer Vision, Deep Learning, and Generative AI to analyze facial skin conditions and provide personalized skincare recommendations.


Overview

SkinSense AI allows users to:

  • Upload a facial image
  • Capture a photo using a webcam
  • Detect faces automatically
  • Predict skin conditions using a Deep Learning model
  • Generate AI-powered skincare recommendations
  • Download a PDF skin analysis report

Features

Computer Vision

  • Face Detection using MediaPipe
  • Automatic Face Cropping
  • Image Preprocessing
  • Webcam Support
  • Facial Image Analysis

Deep Learning

  • MobileNetV2 Transfer Learning Model
  • Skin Condition Classification
  • Confidence Score Generation
  • Top 3 Predictions
  • Severity Estimation

AI Recommendations

  • Powered by Google Gemini
  • Condition Explanation
  • Possible Causes
  • Recommended Skin Care
  • Ingredients to Look For
  • Things to Avoid
  • When to Visit a Dermatologist

PDF Reports

  • Downloadable Skin Analysis Report
  • Prediction Summary
  • Confidence Score
  • Severity Level
  • AI Recommendations

User Interface

  • Streamlit Web Application
  • Image Upload Support
  • Webcam Capture Support
  • Interactive Results Display

Supported Skin Conditions

The model can classify the following skin conditions:

  • Blackheads
  • Dark Spots
  • Inflammatory Acne
  • Pigmentation
  • Pores
  • Redness
  • Whiteheads
  • Wrinkles

AI Model

SkinSense AI uses a MobileNetV2-based Transfer Learning Model trained for skin condition classification.

Model Architecture

Input Image (224×224×3)
        ↓
MobileNetV2 (Pretrained on ImageNet)
        ↓
GlobalAveragePooling2D
        ↓
Dropout
        ↓
Dense (128)
        ↓
Dropout
        ↓
Dense (8 Classes)

Model Details

  • Base Model: MobileNetV2
  • Framework: TensorFlow / Keras
  • Input Size: 224 × 224
  • Number of Classes: 8
  • Transfer Learning: Yes

Tech Stack

Frontend

  • Streamlit

Computer Vision

  • OpenCV
  • MediaPipe
  • Pillow

Deep Learning

  • TensorFlow
  • Keras
  • MobileNetV2

AI Integration

  • Google Gemini API

Data Processing

  • NumPy

Report Generation

  • ReportLab

Project Structure

SkinSense-AI/
│
├── app.py
│
├── ai/
│   └── recommendation.py
│
├── models/
│   ├── predictor.py
│   └── model.keras
│
├── reports/
│   └── report_generator.py
│
├── utils/
│   └── face_detection.py
│
├── assets/
│
├── requirements.txt
├── README.md
└── .env

Installation

1. Clone Repository

git clone https://github.com/Diksha6524/SkinSense-AI.git

2. Navigate to Project Folder

cd SkinSense-AI

3. Create Virtual Environment

python -m venv venv

4. Activate Virtual Environment

Windows

venv\Scripts\activate

5. Install Dependencies

pip install -r requirements.txt

Gemini API Setup

Create a .env file in the root directory.

GEMINI_API_KEY=YOUR_API_KEY

Get your API key from Google AI Studio.


Run the Application

streamlit run app.py

Application Workflow

Upload Image / Webcam Capture
              ↓
        Face Detection
              ↓
         Face Cropping
              ↓
      Image Preprocessing
              ↓
     MobileNetV2 Prediction
              ↓
     Skin Condition Analysis
              ↓
     Gemini AI Recommendation
              ↓
      PDF Report Generation
              ↓
        Result Display

Screenshots

Home Page

image

Prediction Results

image image

PDF Report

image

Future Enhancements

  • Progress Tracking Dashboard
  • Before vs After Comparison
  • User Authentication
  • Skin Health History
  • Cloud Deployment
  • Mobile Application
  • Personalized Skincare Planner
  • Product Recommendation Engine
  • Dermatologist Consultation Integration

Learning Outcomes

Through this project, I learned:

  • Computer Vision using OpenCV
  • Face Detection using MediaPipe
  • Deep Learning with TensorFlow
  • Transfer Learning using MobileNetV2
  • Gemini API Integration
  • Streamlit Web Development
  • PDF Report Generation
  • End-to-End AI Project Development

Disclaimer

This project is intended for educational purposes only.

The predictions and skincare recommendations generated by SkinSense AI should not be considered medical advice and do not replace consultation with a qualified dermatologist.


Author

Diksha

Computer Engineering Student


Support

If you found this project useful, please consider giving it a ⭐ on GitHub.

About

AI-powered skin analysis assistant that uses Computer Vision and facial landmark detection to analyze skin conditions, generate reports, and provide personalized skincare recommendations.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages