Condition Analysis & Data Generation
GlowAI is a computer vision project designed to address the scarcity of medical skin datasets. Standard datasets are hard to obtain due to privacy concerns. This project introduces a Synthetic Skin Simulator that uses classic Computer Vision (OpenCV) to generate medically relevant training data, creating realistic Acne and Erythema lesions on clean faces to train robust classification models.
- Ron Noiman
- Reut Sasson
- Lin Schneider
Our workflow consists of three main stages:
- Acne Simulation: We use OpenCV to draw randomized circles with specific Gaussian blur and opacity to mimic the texture and inflammation of pimples.
- Erythema Simulation: We apply irregular noise masks and red-channel blending to simulate skin redness patches naturally.
- Output: A labeled dataset of synthetic skin conditions generated from clean facial images.
- Architecture: We use an EfficientNet-B2 backbone pretrained on ImageNet.
- Training Strategy: A two-phase approach (Linear Probing followed by Fine-Tuning) to adapt the model to skin features.
- Loss Function: Cross Entropy Loss with Adam optimizer.
We evaluate the model on two distinct sets:
- Synthetic Validation Set: To measure learning on generated patterns.
- Manual Real-World Test Set: To prove the model generalizes to real images (Held-out data).
bash git clone https://github.com/ReutSasson/GlowAIProj.git cd GlowAIProj/
pip install -r requirements.txt
GlowAIProj/
│
├── code/
│ ├── simulate_skin_no_mediapipe.py # The Simulator (OpenCV)
│ ├── train_skin_cls.py # Main Training Script
│ └── experiment_logger.py # Metrics logging
│
├── data/
│ ├── train/ # Training set (Synthetic + Real)
│ ├── val/ # Validation set
│ └── feedback/ # Hard examples for retraining
│
├── results/ # Visualizations & Metrics (Best Run)
│ ├── accuracy_curve.png
│ ├── confusion_matrix.png
│ ├── loss_curve.png
│ └── visual_abstract.png
│
├── slides/ # Project Presentations (PDF/PPTX)
├── checkpoints/ # Saved model weights
└── README.md
Step 1: Generate Data Run the simulator to create synthetic acne/erythema on clean faces:
python code/simulate_skin_no_mediapipe.py --input data/none --out_dir out/simulated_skin
Train the EfficientNet-B2 classifier on the dataset:
python code/train_skin_cls.py --data dataset --epochs 15 --out checkpoints/run_final
Below are the results from our best experiment (Run 9), comparing performance on synthetic vs. real data.
The dataset is included in the dataset/ folder.
Submitted as a final project for the GenAI course at HIT.