Anwarkh1/Skin_Cancer-Image_Classification
441k
1---2license: apache-2.03---4# Skin Cancer Image Classification Model5 6## Introduction7 8This model is designed for the classification of skin cancer images into various categories including benign keratosis-like lesions, basal cell carcinoma, actinic keratoses, vascular lesions, melanocytic nevi, melanoma, and dermatofibroma.9 10## Model Overview11 12- Model Architecture: Vision Transformer (ViT)13- Pre-trained Model: Google's ViT with 16x16 patch size and trained on ImageNet21k dataset14- Modified Classification Head: The classification head has been replaced to adapt the model to the skin cancer classification task.15 16## Dataset17 18- Dataset Name: Skin Cancer Dataset19- Source: [Marmal88's Skin Cancer Dataset on Hugging Face](https://huggingface.co/datasets/marmal88/skin_cancer)20- Classes: Benign keratosis-like lesions, Basal cell carcinoma, Actinic keratoses, Vascular lesions, Melanocytic nevi, Melanoma, Dermatofibroma21 22## Training23 24- Optimizer: Adam optimizer with a learning rate of 1e-425- Loss Function: Cross-Entropy Loss26- Batch Size: 3227- Number of Epochs: 528 29## Evaluation Metrics30 31- Train Loss: Average loss over the training dataset32- Train Accuracy: Accuracy over the training dataset33- Validation Loss: Average loss over the validation dataset34- Validation Accuracy: Accuracy over the validation dataset35 36## Results37 38- Epoch 1/5, Train Loss: 0.7168, Train Accuracy: 0.7586, Val Loss: 0.4994, Val Accuracy: 0.835539- Epoch 2/5, Train Loss: 0.4550, Train Accuracy: 0.8466, Val Loss: 0.3237, Val Accuracy: 0.897340- Epoch 3/5, Train Loss: 0.2959, Train Accuracy: 0.9028, Val Loss: 0.1790, Val Accuracy: 0.953041- Epoch 4/5, Train Loss: 0.1595, Train Accuracy: 0.9482, Val Loss: 0.1498, Val Accuracy: 0.955542- Epoch 5/5, Train Loss: 0.1208, Train Accuracy: 0.9614, Val Loss: 0.1000, Val Accuracy: 0.969543## Conclusion44 45The model demonstrates good performance in classifying skin cancer images into various categories. Further fine-tuning or experimentation may improve performance on this task.46 47 