Classifies gastrointestinal endoscopy images from the Kvasir dataset into 8 classes (anatomical landmarks, pathological findings and polyp-removal procedures) using PyTorch.
What the notebook does:
- Builds a Vision Transformer (ViT-Base/16) from scratch (patch embedding, transformer encoder blocks) and trains it
- Fine-tunes pretrained ViT-B/16, ResNeXt-101, RegNetY-8GF/32GF and EfficientNetV2-S (torchvision) with frozen-backbone and full fine-tuning stages
- Compares models with confusion matrices and training curves
Run it on Kaggle (GPU): https://www.kaggle.com/code/anmol124/kvasir-classification, or locally with torch, torchvision, torchinfo, matplotlib and seaborn and the Kvasir v2 images.