|
--- |
|
title: Acne Detection AI π₯ |
|
emoji: π₯ |
|
colorFrom: indigo |
|
colorTo: yellow |
|
sdk: gradio |
|
sdk_version: 5.25.2 |
|
app_file: app.py |
|
pinned: true |
|
license: apache-2.0 |
|
short_description: Advanced AI for Acne Segmentation & Severity Classification |
|
--- |
|
|
|
# π§ Acne Detection & Classification with Deep Learning |
|
|
|
 <!-- You can upload a real image here --> |
|
|
|
This application demonstrates a powerful **AI-driven pipeline** for **acne detection, segmentation**, and **severity classification**, combining: |
|
|
|
- A **UNet-based CNN** for precise acne lesion segmentation (pixel-wise accuracy β **96β98%**) |
|
- A **transformer-based classifier** (fine-tuned Vision Transformer) for grading severity based on dermatological standards |
|
|
|
Try it by uploading a face image. |
|
It will return: |
|
β
a **visual overlay** showing detected acne regions |
|
β
a **severity label** (from clear skin to very severe acne) |
|
|
|
--- |
|
|
|
## π§ͺ Model Architecture |
|
|
|
### πΉ Segmentation Model |
|
- Architecture: `UNet` with `ResNet34` backbone (from [smp](https://github.com/qubvel/segmentation_models.pytorch)) |
|
- Optimized for: Binary mask prediction of acne regions |
|
- Trained on: Annotated dermatological datasets |
|
- Accuracy: **Pixel Accuracy β 98%**, **IoU β 91%** |
|
|
|
### πΉ Classification Model |
|
- Architecture: Vision Transformer (ViT) |
|
- Source: [`imfarzanansari/skintelligent-acne`](https://huggingface.co/imfarzanansari/skintelligent-acne) |
|
- Labels: From `Level -1 (Clear)` to `Level 4 (Very Severe Acne)` |
|
- Input: Facial image |
|
- Output: Severity level + confidence score |
|
|
|
--- |
|
|
|
## π Example Output |
|
|
|
| Input Image | Segmentation Overlay | Acne Level | |
|
|-------------|----------------------|------------| |
|
|  |  | Level 2: Moderate Acne | |
|
|
|
--- |
|
|
|
## π‘ Use Cases |
|
- Dermatology research and screening |
|
- Skincare and cosmetic product testing |
|
- Automated health monitoring platforms |
|
|
|
--- |
|
|
|
## π§© Tech Stack |
|
- `PyTorch`, `Segmentation Models PyTorch` |
|
- `Transformers` by Hugging Face |
|
- `Albumentations` for fast preprocessing |
|
- `OpenCV`, `Gradio` for live interface |
|
|
|
|
|
|
|
|
|
## π€ Try it now! |
|
|
|
Click below and upload a photo to get real-time predictions: |
|
|
|
Check out the configuration reference at [https://huggingface.co/docs/hub/spaces-config-reference](https://huggingface.co/docs/hub/spaces-config-reference) |
|
|