Image Classification
Keras
LiteRT
TF-Keras
skin-disease
medical
efficientnet
dermatology
computer-vision
healthcare
Instructions to use ddddddfffwadeqfd/skin-condition-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use ddddddfffwadeqfd/skin-condition-classifier with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://ddddddfffwadeqfd/skin-condition-classifier") - Notebooks
- Google Colab
- Kaggle
File size: 2,344 Bytes
0ec49f7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | ---
license: mit
tags:
- skin-disease
- medical
- image-classification
- keras
- efficientnet
- dermatology
- computer-vision
- healthcare
datasets:
- custom
widget:
- src: https://huggingface.co/spaces/Tanishq77/skin-condition-classifier
example_title: Try it live with Streamlit!
---
# π§ Skin Condition Classifier (EfficientNetV2B0)
This model classifies **facial skin images** into **6 common dermatological conditions** using a fine-tuned [EfficientNetV2B0](https://keras.io/api/applications/efficientnet/#efficientnetv2b0-function) architecture.
## π Supported Skin Conditions
- Acne
- Carcinoma
- Eczema
- Keratosis
- Milia
- Rosacea
## π§ͺ Model Performance
- **Final Test Accuracy**: `95.60%`
- Evaluated on a balanced, augmented custom dataset of real-world dermatological images.
- **Confusion Matrix** indicates strong separation for all classes, with minor overlap in visually similar conditions.
## ποΈ Model Architecture
- β
**Backbone**: EfficientNetV2B0 (pretrained on ImageNet)
- π Global Average Pooling + Dense(512, ReLU) + Dropout(0.4) + Dense(6, Softmax)
- π **Loss Function**: `sparse_categorical_crossentropy`
- βοΈ **Class Weights**: Applied to handle minor variations
- π§ Fine-tuned with learning rate scheduling and layer unfreezing
## π§ Usage
### π Load the model (Keras format)
```python
from tensorflow.keras.models import load_model
model = load_model("path/to/saved_skin_model")
````
### πΌοΈ Input Format
* Image size: **224x224**
* Input dtype: `float32`
* Preprocessing: Use `preprocess_input` from `tensorflow.keras.applications.efficientnet_v2`
```python
from tensorflow.keras.applications.efficientnet_v2 import preprocess_input
import numpy as np
img = preprocess_input(img) # Ensure shape is (1, 224, 224, 3)
pred = model.predict(img)
```
### π Output Format
* Softmax probabilities for 6 classes.
* `argmax(pred)` gives class index from 0β5.
---
## π§Ύ License
[MIT License](LICENSE)
---
## π¨βπ» Author
**Tanishq Shinde**
B.E. Computer Engineering, PICT
π [GitHub](https://github.com/Tanishq-789) | [LinkedIn](https://linkedin.com/in/tanishqshinde) | [Hugging Face](https://huggingface.co/Tanishq77)
---
> π¬ For educational and non-diagnostic purposes only. Always consult a medical professional.
```
--- |