Live Demo: https://acnemodel.streamlit.app
SkinAI is a real-time facial skin analysis tool that detects:
- Acne (pimples, blackheads, whiteheads)
- Skin tone & undertone
- Likely ancestral origin (continent genes)
- Skin type (Oily / Dry / Combo)
- Smoothness score (0–100)
It uses computer vision + color science to give instant dermatology-level insights from a selfie.
| Feature | Description |
|---|---|
| Face Detection | Auto-detects face using OpenCV Haar Cascade |
| Acne Detection | Finds red, white, blackheads with numbered red circles |
| Location Mapping | Labels acne as: Forehead, Left/Right Cheek, Chin, Jaw |
| Skin Tone Analysis | Classifies: Very Fair → Deep Brown |
| Undertone | Warm (Golden) vs Cool (Pink) |
| Genetic Origin (Approx) | Europe, Mediterranean, South Asia, Africa, East Asia |
| Skin Type | Oily / Combination / Dry based on brightness variance |
| Smoothness Score | Texture analysis (0–100) |
| Zoomable Acne Crops | Click each pimple to see close-up |
| Web App (Streamlit) | Upload selfie → Instant report |
| Layer | Technology | Version / Notes |
|---|---|---|
| Frontend / UI | Streamlit | 1.30+ – Interactive web app |
| Backend / Logic | Python | 3.11 |
| Computer Vision | OpenCV | opencv-python-headless (cloud-safe) |
| Image Processing | NumPy, PIL (Pillow) | Core array & image handling |
| Color Analysis | HSV & Lab color spaces | For tone, acne, texture |
| Face Detection | Haar Cascade (haarcascade_frontalface_default.xml) |
Auto-downloaded |
| Deployment | Streamlit Community Cloud | Free, auto-deploy from GitHub |
| Version Control | Git + GitHub | git |
| Package Management | requirements.txt |
Cloud dependency install |
| Local Dev | Conda (Miniconda) | skinai environment |
SkinAI/
│
├── app.py # Main Streamlit app (all logic)
├── requirements.txt # Cloud dependencies
├── haarcascade_frontalface_default.xml # Auto-downloaded
├── README.md # This file
└── .git/ # Git repo
- Upload Selfie → PIL → NumPy array → OpenCV (BGR)
- Face Detection → Haar Cascade → Crop face ROI
- Skin Mask → HSV range → Remove eyes/lips (anti-mask)
- Acne Detection:
- Red inflamed: High saturation + value
- Dark scars: Low value
- Shape filter: Circularity > 0.5
- Color Analysis → Mean HSV in skin mask
- Texture → Variance in grayscale → Smoothness score
- Output → Streamlit UI with images, metrics, zoomable crops
# 1. Clone repo
git clone https://github.com/yourusername/SkinAI.git
cd SkinAI
# 2. Create conda env
conda create -n skinai python=3.11 -y
conda activate skinai
# 3. Install deps
pip install -r requirements.txt
# 4. Run locally
streamlit run app.pyOpen http://localhost:8501 → Upload selfie → See results!
- Push to GitHub
- Go to share.streamlit.io
- New App → Link your repo →
app.py→ Deploy! - Done in 60 seconds!
| Screenshot | Description |
|---|---|
| Upload + Face + Acne Circles | |
| Color, Genes, Type, Smoothness |
| Current Limit | Future Upgrade |
|---|---|
| Lighting-sensitive | Add auto-light correction |
| Single face only | Multi-face support |
| No age/gender | Add CNN models (MediaPipe) |
| No history | Add user login + save reports |
| No PDF export | Add "Download Report" button |
Shubham
- GitHub:
"Turning selfies into skin science — one pimple at a time."
If you like it, give it a star on GitHub!
Help others find this AI dermatology tool.
SkinAI — Because your skin deserves AI.