--- 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. ``` ---