Instructions to use mahnoor-2722/skin-lesion-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use mahnoor-2722/skin-lesion-classifier with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://mahnoor-2722/skin-lesion-classifier") - Notebooks
- Google Colab
- Kaggle
π¬ Skin Lesion Classification Model
An AI-powered deep learning model for classifying 8 different skin conditions using EfficientNetB0, achieving 81.75% test accuracy on 14,711 dermatoscopic images.
π Model Overview
- Architecture: EfficientNetB0 (Transfer Learning)
- Framework: TensorFlow / Keras
- Input Size: 224x224x3
- Classes: 8 skin conditions
- Model Size: 25.63 MB
π― Skin Conditions Detected
- Acne
- Basal Cell Carcinoma
- Benign Keratosis
- Eczema
- Fungal Infection
- Melanocytic Nevi
- Melanoma
- Normal Skin
π Performance
| Metric | Value |
|---|---|
| Test Accuracy | 81.75% |
| Validation Accuracy | 83.60% |
| Weighted F1-Score | 0.82 |
Per-Class Accuracy
| Class | Accuracy |
|---|---|
| Normal Skin | 100.00% |
| Acne | 93.82% |
| Basal Cell Carcinoma | 86.00% |
| Melanoma | 84.67% |
| Eczema | 82.94% |
| Melanocytic Nevi | 75.00% |
| Fungal Infection | 69.14% |
| Benign Keratosis | 66.33% |
π How to Use
Install requirements and load the model:
pip install tensorflow huggingface_hub pillow
Load the model in Python:
from huggingface_hub import hf_hub_download
from tensorflow.keras.models import load_model
model_path = hf_hub_download(
repo_id="mahnoor-2722/skin-lesion-classifier",
filename="efficientnetb0_8class_best.h5"
)
model = load_model(model_path)
π Training Details
- Dataset: 14,711 dermatoscopic images
- Split: 70% train / 15% validation / 15% test
- Base Model: EfficientNetB0 (ImageNet pretrained)
- Optimizer: Adam (lr=1e-4)
- Batch Size: 32
- Epochs: 50 with early stopping
π Live Application
- GitHub Repository: https://github.com/mahnoor-2722/skin-lesion-classification
- Includes Streamlit web interface with Grad-CAM visualization
β οΈ Medical Disclaimer
This model is for educational and research purposes only. It should NOT be used as a substitute for professional medical diagnosis. Always consult a qualified dermatologist for accurate assessment.
π License
Released under MIT License. Free to use with attribution.
π€ Author
Mahnoor
- GitHub: @mahnoor-2722
- Hugging Face: @mahnoor-2722
Built with β€οΈ for advancing medical AI research
- Downloads last month
- -