Instructions to use Pro-Coder/skin-lesion-vit-finetuned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Pro-Coder/skin-lesion-vit-finetuned with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="Pro-Coder/skin-lesion-vit-finetuned") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("Pro-Coder/skin-lesion-vit-finetuned") model = AutoModelForImageClassification.from_pretrained("Pro-Coder/skin-lesion-vit-finetuned", device_map="auto") - Notebooks
- Google Colab
- Kaggle
skin-lesion-vit-finetuned
This model is a fine-tuned version of google/vit-base-patch16-224-in21k on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 0.1761
- Accuracy: 0.9458
- F1 Macro: 0.9465
- Melanoma Recall: 0.9607
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 16
- eval_batch_size: 32
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 8
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Macro | Melanoma Recall |
|---|---|---|---|---|---|---|
| 0.7039 | 0.9983 | 299 | 0.7625 | 0.7335 | 0.6859 | 0.6 |
| 0.7119 | 2.0 | 599 | 0.4936 | 0.8327 | 0.7772 | 0.7536 |
| 0.4416 | 2.9983 | 898 | 0.4881 | 0.8287 | 0.8242 | 0.8036 |
| 0.3581 | 4.0 | 1198 | 0.4164 | 0.8616 | 0.8286 | 0.8929 |
| 0.2949 | 4.9983 | 1497 | 0.3000 | 0.9021 | 0.8916 | 0.8893 |
| 0.2687 | 6.0 | 1797 | 0.2685 | 0.9041 | 0.9206 | 0.95 |
| 0.1699 | 6.9983 | 2096 | 0.2058 | 0.9318 | 0.9346 | 0.9643 |
| 0.0908 | 7.9866 | 2392 | 0.1761 | 0.9458 | 0.9465 | 0.9607 |
Framework versions
- Transformers 4.44.2
- Pytorch 2.11.0+cu128
- Datasets 2.21.0
- Tokenizers 0.19.1
- Downloads last month
- -
Model tree for Pro-Coder/skin-lesion-vit-finetuned
Base model
google/vit-base-patch16-224-in21k