metadata
tags:
- pytorch
ViT Leukemia Classifier
Model Description
This Vision Transformer (ViT) model is designed for the classification of leukemia images into one of four classes. It uses the pre-trained Swin Transformer model as the base and adds fully connected layers for classification. The model supports training, validation, and evaluation, and can upload the best performing model to the Hugging Face Hub. This model was developed by Sebastian Sarasti for the Quito AI Day event.
Model Architecture
The model consists of the following layers:
- Base Model: Swin Transformer (
microsoft/swin-base-patch4-window7-224
) - Fully Connected Layer: 49 * 1024 input features, 100 output features
- ReLU Activation
- Fully Connected Layer: 100 input features, 4 output features
The base model's parameters are frozen during training.
Dataset
The model was trained on the Leukemia dataset from Kaggle, which consists of images labeled into different leukemia types.
Usage
To use this model, you can load it from the Hugging Face Hub as follows:
from transformers import AutoModel
model = AutoModel.from_pretrained("path/to/your/model")