CvTSkinCancer for Skin Cancer Classification

Model Details

  • Model Architecture: CvT (Convolutional Vision Transformer)
  • Framework: PyTorch
  • Input Shape: 224x224 RGB images
  • Number of Parameters: (Based on CvT-13 Model)
  • Output: Multi-class classification (9 classes)

Model Description

This model leverages the CvT (Convolutional Vision Transformer) from the microsoft/cvt-13 pretrained model for skin cancer classification. The model is fine-tuned by adding a custom fully connected layer that includes SiLU activations, Dropout, and Batch Normalization to improve generalization and reduce overfitting. Only the classifier layer is trainable, while the convolutional layers of the CvT model are frozen to retain pretrained features.

The final model performs multi-class classification with 9 output classes corresponding to different skin cancer types.

Training Details

Metrics (Validation Set)

Class Precision Recall F1-Score
0 0.78 0.44 0.56
1 0.50 0.56 0.53
2 0.67 0.38 0.48
3 0.50 0.25 0.33
4 0.44 0.88 0.58
5 0.81 0.81 0.81
6 0.43 1.00 0.60
7 0.40 0.38 0.39
8 0.50 0.67 0.57
  • Overall Accuracy: 0.54
  • Macro Average Precision: 0.56
  • Macro Average Recall: 0.59
  • Macro Average F1-Score: 0.54
  • Weighted Average Precision: 0.58
  • Weighted Average Recall: 0.54
  • Weighted Average F1-Score: 0.53

License

This model is released under the MIT License.


This model has been pushed to the Hub using the PytorchModelHubMixin integration:

  • Library: [More Information Needed]
  • Docs: [More Information Needed]
Downloads last month
8
Safetensors
Model size
20.4M params
Tensor type
F32
·
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no library tag.

Model tree for sebastiansarasti/CvTSkinCancer

Base model

microsoft/cvt-13
Finetuned
(9)
this model