π§ A Hybrid Machine Learning Approach for Personalized Skincare Recommendations Using Questionnaire Data and Real-Time Skin Analysis
Student: Atharwa Vatsyayan
Register Number: 22BBS0103
Student: Rishi Anand
Register Number: 22BBS00227
Faculty Mentor: Dr. Santhi K
Semester: Fall 2025-26
This project presents a Hybrid Machine Learning Model that classifies human skin types (Dry, Normal, Oily, Combination) using ResNet-50 (CNN) and combines results with questionnaire-based data for personalized skincare recommendations.
The research work is currently under review for publication as:
βA Hybrid Machine Learning Approach for Personalized Skincare Recommendations Using Questionnaire Data and Real-Time Skin Analysis.β
To develop a personalized skincare system that:
- Classifies skin type from facial images using transfer learning.
- Integrates questionnaire data for accurate recommendations.
- Provides real-time AI-based skincare feedback.
β
Four skin types: Dry, Normal, Oily, Combination
β
ResNet50 transfer learning with 20-epoch fine-tuning
β
Real-time classification and probability visualization
β
Data augmentation for better generalization
β
Easy model saving and loading for reuse
The dataset consists of categorized facial skin images organized as:
final_self_skin_dataset/ βββ train/ β βββ dry/ β βββ normal/ β βββ oily/ β βββ combination/ βββ valid/ βββ test/
ruby Copy code
(You can use any dataset following this folder structure.)
| Component | Details |
|---|---|
| Base Model | ResNet50 (pretrained on ImageNet) |
| Final Layer | Linear (in_features, 4 outputs) |
| Loss Function | CrossEntropyLoss |
| Optimizer | Adam (lr=0.0001) |
| Scheduler | ReduceLROnPlateau |
| Epochs | 20 |
| Batch Size | 32 |
| Metric | Train | Validation |
|---|---|---|
| Accuracy | 100% | 95% |
| Loss | 0.015 | 0.208 |
Test Accuracy: 85%
Macro F1-Score: 0.85
- π Training & Validation Loss Curve
- π Training & Validation Accuracy Curve
- π· Confusion Matrix
- πΌοΈ Prediction Visualization on Test Images
Install dependencies with:
pip install torch torchvision numpy pandas matplotlib seaborn scikit-learn tqdm pillow
π How to Run
Clone this repository
bash
Copy code
git clone https://github.com/<your-username>/hybrid-skin-type-classification.git
cd hybrid-skin-type-classification
Run the main script
bash
Copy code
python Main.py
(Optional) Classify a custom image
python
Copy code
from Main import classify_custom_image, load_model
model, mapping = load_model("skin_classification_4_types_model.pth")
result = classify_custom_image(model, "sample.jpg", transform)
print(result)
πΎ Example Output
vbnet
Copy code
Predicted class: oily
Confidence: 0.9321
Probabilities:
dry: 0.0214
normal: 0.0133
oily: 0.9321
combination: 0.0332
π Evaluation Results
Skin Type Precision Recall F1-score
Dry 0.70 0.78 0.74
Normal 0.90 0.90 0.90
Oily 0.90 0.75 0.82
Combination 0.90 1.00 0.95
Weighted Average Accuracy: 85%
π§ Core Functions
Function Description
create_df(base) Loads dataset images and labels
CloudDS(Dataset) Custom PyTorch dataset class
train_model() Trains and validates the model
evaluate_model() Evaluates model performance
classify_custom_image() Predicts class for a custom image
save_model() / load_model() Save and reload model weights
π§© Repository Structure
bash
Copy code
βββ Main.py
βββ README.md
βββ skin_classification_4_types_model.pth
βββ /final_self_skin_dataset
β βββ train/
β βββ valid/
β βββ test/
βββ requirements.txt
π₯ Demonstration Video
πΉ Google Drive Link to Demo Video (Add your actual link here)
π§© Future Enhancements
Integrate questionnaire data for hybrid recommendation.
Develop a web-based interface using Flask or Streamlit.
Add live webcam input for real-time skin type detection.
Suggest personalized skincare products based on results.
π Conclusion
This project demonstrates a robust AI-powered skincare analysis tool that combines computer vision and machine learning for personalized skin type prediction. The system performs with high accuracy and serves as a foundation for next-generation skincare recommendation platforms.
β Author: Atharwa Vatsyayan
π§ Contact: [[email protected]]
π VIT Vellore
yaml
Copy code
---
Would you like me to also generate a **`requirements.txt`** file based on your imports (for GitHub upload)? Itβll make your repository setup fully complete.
You said:
give all of this In a single README Code
ChatGPT said:
Hereβs your complete README.md β ready to upload directly to GitHub as one single code block.
Just copy this and paste it into your repositoryβs README.md file π
markdown
Copy code
# π§ Hybrid Skin Type Classification Using Deep Learning




---
### π Course: Technical Answers for Real World Problems (CBS1901)
**Student:** Atharwa Vatsyayan
**Register Number:** 22BBS0103
**Faculty Mentor:** Dr. Santhi K
**Semester:** Fall 2025-26
---
## π©Ί Project Overview
This project presents a **Hybrid Machine Learning Model** that classifies human **skin types** (Dry, Normal, Oily, Combination) using **ResNet-50 (CNN)** and combines results with questionnaire-based data for **personalized skincare recommendations**.
The research work is currently **under review** for publication as:
> **βA Hybrid Machine Learning Approach for Personalized Skincare Recommendations Using Questionnaire Data and Real-Time Skin Analysis.β**
---
## π― Objective
To develop a personalized skincare system that:
1. Classifies skin type from facial images using **transfer learning**.
2. Integrates **questionnaire data** for accurate recommendations.
3. Provides **real-time AI-based skincare feedback**.
---
## βοΈ Features
β
Four skin types: Dry, Normal, Oily, Combination
β
ResNet50 transfer learning with 20-epoch fine-tuning
β
Real-time classification and probability visualization
β
Data augmentation for better generalization
β
Easy model saving and loading for reuse
---
## π§© Dataset
The dataset consists of categorized facial skin images organized as:
final_self_skin_dataset/
βββ train/
β βββ dry/
β βββ normal/
β βββ oily/
β βββ combination/
βββ valid/
βββ test/
ruby
Copy code
*(You can use any dataset following this folder structure.)*
---
## π§ Model Architecture
| Component | Details |
|:-----------|:---------|
| Base Model | ResNet50 (pretrained on ImageNet) |
| Final Layer | Linear (in_features, 4 outputs) |
| Loss Function | CrossEntropyLoss |
| Optimizer | Adam (lr=0.0001) |
| Scheduler | ReduceLROnPlateau |
| Epochs | 20 |
| Batch Size | 32 |
---
## π§ͺ Training Performance
| Metric | Train | Validation |
|:------:|:------:|:-----------:|
| Accuracy | 100% | 95% |
| Loss | 0.015 | 0.208 |
**Test Accuracy:** 85%
**Macro F1-Score:** 0.85
---
## π Visualizations
- π Training & Validation Loss Curve
- π Training & Validation Accuracy Curve
- π· Confusion Matrix
- πΌοΈ Prediction Visualization on Test Images
---
## π₯οΈ Requirements
Install dependencies with:
```bash
pip install torch torchvision numpy pandas matplotlib seaborn scikit-learn tqdm pillow
π How to Run
Clone this repository
bash
Copy code
git clone https://github.com/<your-username>/hybrid-skin-type-classification.git
cd hybrid-skin-type-classification
Run the main script
bash
Copy code
python Main.py
(Optional) Classify a custom image
python
Copy code
from Main import classify_custom_image, load_model
model, mapping = load_model("skin_classification_4_types_model.pth")
result = classify_custom_image(model, "sample.jpg", transform)
print(result)
πΎ Example Output
vbnet
Copy code
Predicted class: oily
Confidence: 0.9321
Probabilities:
dry: 0.0214
normal: 0.0133
oily: 0.9321
combination: 0.0332
π Evaluation Results
Skin Type Precision Recall F1-score
Dry 0.70 0.78 0.74
Normal 0.90 0.90 0.90
Oily 0.90 0.75 0.82
Combination 0.90 1.00 0.95
Weighted Average Accuracy: 85%
π§ Core Functions
Function Description
create_df(base) Loads dataset images and labels
CloudDS(Dataset) Custom PyTorch dataset class
train_model() Trains and validates the model
evaluate_model() Evaluates model performance
classify_custom_image() Predicts class for a custom image
save_model() / load_model() Save and reload model weights
π§© Repository Structure
bash
Copy code
βββ Main.py
βββ README.md
βββ skin_classification_4_types_model.pth
βββ /final_self_skin_dataset
β βββ train/
β βββ valid/
β βββ test/
βββ requirements.txt
π₯ Demonstration Video
πΉ Google Drive Link to Demo Video (Add your actual link here)
π§© Future Enhancements
Integrate questionnaire data for hybrid recommendation.
Develop a web-based interface using Flask or Streamlit.
Add live webcam input for real-time skin type detection.
Suggest personalized skincare products based on results.
π Conclusion
This project demonstrates a robust AI-powered skincare analysis tool that combines computer vision and machine learning for personalized skin type prediction. The system performs with high accuracy and serves as a foundation for next-generation skincare recommendation platforms.