A simple machine learning-powered web app to detect eczema from skin images.
Download here:
Google Drive Dataset Link
Contains labeled skin images organized into:
eczema/normal/
- We trained a Support Vector Machine (SVM) model using labeled images of eczema and normal skin.
- The model is deployed in a Streamlit web app for interactive image-based prediction.
- Users upload a skin image.
- The app preprocesses the image and predicts whether it's eczema or normal.
- The result is displayed clearly on screen.
eczema_project/
│
├── dataset/ # Training data (eczema / normal images)
│ ├── eczema/
│ └── normal/
│
├── model_train.py # Trains multiple ML models
├── eczema_model.pkl # Saved trained model (SVM)
├── app.py # Streamlit app for predictions
├── requirements.txt # Project dependencies
└── .gitignore # Version control exclusions
We trained and tested multiple models to identify the best performer:
| Model | Description |
|---|---|
| SVM | Best performance (~79.3% accuracy), used in deployed app |
| Random Forest | Robust ensemble model, good with imbalanced data |
| K-Nearest Neighbors | Simple baseline model, less effective for image data |
| MLP (Neural Net) | Basic neural network with 2 hidden layers, decent performance |
| CNN (Deep Learning) | Custom CNN model trained with TensorFlow; limited due to hardware constraints |
Only SVM is used in the current version of the app, but other models are available for experimentation.
- Clone the repository
git clone <your-repository-url>
cd eczema_project- (Optional) Create a virtual environment
python -m venv venv
# On Windows
.\venv\Scripts\activate
# On Mac/Linux
source venv/bin/activate- Install dependencies
pip install -r requirements.txt- (Optional) Train the model from scratch
python model_train.pyThis will retrain all models and generate eczema_model.pkl.
- Run the Streamlit web app
streamlit run app.py- Use the App Open the URL (e.g. http://localhost:8501) in your browser and:
- Upload a skin image
- Get instant prediction
- Try with different images for testing
- 📷 Upload skin images to classify as eczema or normal
- ⚙️ Trained on real image data
- 💾 Multiple models tested, best selected
- 🌐 Simple and responsive Streamlit web interface
- 🧠 Train deeper CNN models for better accuracy
- 📈 Add support for real-time camera input
- 🧬 Collect more diverse and larger dataset
- 🧪 Test with pre-trained models (e.g., ResNet, MobileNet)
- 🎨 Improve UI/UX of the web interface
- Python
- Scikit-learn
- Streamlit
- NumPy
- Pillow (PIL)
- TensorFlow (for CNN training)
Make sure you have the following installed (or use the provided requirements.txt):
numpy
pillow
scikit-learn
streamlit
joblib
tensorflow
imblearn
matplotlibSupervisor : Dr. Amit Kumar
Created by a team of students exploring AI in medical imaging with limited resources — proving that even low-end hardware can still deliver smart solutions