Model Card for Model ID

A Vision Transformer (ViT) model fine-tuned for multi-class skin disease image classification.
It predicts 22 dermatological conditions, including acne, eczema, psoriasis, vitiligo, warts, and skin cancer.

This model is intended for research and educational purposes only and should not be used for real medical diagnosis.Provide a quick summary of what the model is/does. -->

Model Details

Model Description

  • Model type: Vision Transformer (ViT-Base, patch size 16)
  • Number of classes: 22
  • Image size: 224 × 224
  • Framework: PyTorch / Hugging Face Transformers
  • Parameters: ~86M
  • Developed by: Lauriane Mbagdjé Dorenan
  • Fine-tuned from: google/vit-base-patch16-224

This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.

  • Developed by: [More Information Needed]
  • Funded by [optional]: [More Information Needed]
  • Shared by [optional]: [More Information Needed]
  • Model type: [More Information Needed]
  • Language(s) (NLP): [More Information Needed]
  • License: [More Information Needed]
  • Finetuned from model [optional]: [More Information Needed]

Model Sources [optional]

Uses

Direct Use

  • Research in computer vision for dermatology
  • Educational use for ML students (classification, transfer learning, ViT)
  • Benchmarking ViT on multi-class medical datasets
  • Integration in multimodal pipelines (e.g., health chatbots, decision-support prototypes)

Downstream Use [optional]

  • Re-training or fine-tuning on clinical datasets
  • Transfer learning for fewer classes or specific diseases
  • Building explainability workflows (Grad-CAM, attention maps)

Out-of-Scope Use

This model must not be used:

  • For medical diagnosis or treatment
  • As a clinical decision-making tool
  • On patient images without proper consent
  • In high-stakes applications without domain-expert validation

Bias, Risks, and Limitations

  • Dataset contains varying image sources and qualities
  • Potential bias across skin tones, lighting, or acquisition devices
  • Some classes have limited examples, increasing risk of overfitting
  • No guarantee of generalization to real-world clinical data
  • Not validated by dermatologists or clinicians

Recommendations

Users should:

  • Avoid clinical deployment without proper validation
  • Re-train on demographically representative datasets
  • Interpret predictions cautiously

Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.

How to Get Started with the Model

Use the code below to get started with the model.

from transformers import AutoImageProcessor, AutoModelForImageClassification
from PIL import Image
import torch

processor = AutoImageProcessor.from_pretrained("LaurianeMD/vit-skin-disease")
model = AutoModelForImageClassification.from_pretrained("LaurianeMD/vit-skin-disease")

image = Image.open("your_image.jpg")
inputs = processor(images=image, return_tensors="pt")

with torch.no_grad():
    outputs = model(**inputs)
    logits = outputs.logits
    predicted_class_idx = logits.argmax(-1).item()

print("Predicted label:", model.config.id2label[predicted_class_idx])

[More Information Needed]

## Training Details

### Training Data


- Dataset used:
- Kaggle – pacificrm/skindiseasedataset
- Classes: 22 skin conditions
- Images were resized to 224 × 224 and normalized.


### Training Procedure

- Epochs: 5

- ptimizer: AdamW

- Loss: Cross-entropy

- Activation: GELU

- Precision: fp32

- Hardware: Google Colab (single T4 GPU)

#### Preprocessing [optional]
- Resize

- CenterCrop

- Normalize (ViT base mean/std)

Optional: RandomFlip, RandomRotation


#### Training Hyperparameters

- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->

#### Speeds, Sizes, Times [optional]

<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->

[More Information Needed]

## Evaluation

<!-- This section describes the evaluation protocols and provides the results. -->

### Testing Data, Factors & Metrics

#### Testing Data

<!-- This should link to a Dataset Card if possible. -->

[More Information Needed]

#### Factors

<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->

[More Information Needed]

#### Metrics

<!-- These are the evaluation metrics being used, ideally with a description of why. -->
| Epoch | Loss   | Accuracy   |
| ----- | ------ | ---------- |
| 1     | 1.4618 | 56.25%     |
| 2     | 0.5954 | 82.90%     |
| 3     | 0.1790 | 95.72%     |
| 4     | 0.0777 | 98.25%     |
| 5     | 0.0613 | **98.49%** |

Final validation accuracy: 98.49%

### Results

[More Information Needed]

#### Summary



## Model Examination [optional]

<!-- Relevant interpretability work for the model goes here -->

[More Information Needed]

## Environmental Impact

<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->

Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).

- **Hardware Type:** [More Information Needed]
- **Hours used:** [More Information Needed]
- **Cloud Provider:** [More Information Needed]
- **Compute Region:** [More Information Needed]
- **Carbon Emitted:** [More Information Needed]

## Technical Specifications [optional]

### Model Architecture and Objective

[More Information Needed]

### Compute Infrastructure

[More Information Needed]

#### Hardware

[More Information Needed]

#### Software

[More Information Needed]

## Citation [optional]

<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->

**BibTeX:**

[More Information Needed]

**APA:**

[More Information Needed]

## Glossary [optional]

<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->

[More Information Needed]

## More Information [optional]

[More Information Needed]

## Model Card Authors [optional]

Lauriane Mbagdjé Dorenan

## Model Card Contact

For questions or more informations : dmbagdjelauriane@gmail.com
Downloads last month
19
Safetensors
Model size
85.8M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support