File size: 3,490 Bytes
8124c93 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | ---
language: en
license: mit
library_name: pytorch
tags:
- image-classification
- computer-vision
- transfer-learning
- pokemon
- resnet18
metrics:
- accuracy
model-index:
- name: pokemon-resnet18-transfer-learning
results:
- task:
type: image-classification
name: Image Classification
dataset:
name: Custom Pokemon Dataset (course week 8 style)
type: imagefolder
metrics:
- type: accuracy
value: 0.80
name: test_accuracy
---
# Pokemon ResNet18 Transfer Learning Classifier
## Model Description
This model is a transfer-learning image classifier based on ResNet18, fine-tuned on a custom Pokemon image dataset with 6 classes:
- charizard
- charmander
- charmeleon
- ditto
- eevee
- ekans
The model was trained for the mandatory exercise "Computer Vision Classification & Model Comparison" and is intended to be compared against:
- an open-source zero-shot model (CLIP)
- a closed-source vision model (OpenAI)
## Model Details
- Architecture: ResNet18 (`torchvision.models.resnet18`)
- Framework: PyTorch
- Input size: 224 x 224 RGB
- Output classes: 6
- Checkpoint format: `.pth` (`state_dict` + metadata)
## Training Data
Dataset structure:
- `data/pokemon/train/`
- `data/pokemon/test/`
Classes:
- `charizard`, `charmander`, `charmeleon`, `ditto`, `eevee`, `ekans`
## Preprocessing
Training transforms:
- `RandomResizedCrop(224)`
- `RandomHorizontalFlip()`
- `ColorJitter(brightness=0.2, contrast=0.2, saturation=0.2)`
- `Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])`
Evaluation transforms:
- `Resize(256)`
- `CenterCrop(224)`
- `Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])`
## Training Procedure
- Loss: CrossEntropyLoss
- Optimizer: Adam
- Learning rate: `1e-4`
- Weight decay: `1e-4`
- Batch size: `16`
- Epochs: `4`
- Device: CPU
## Evaluation Results
Final performance from project reports:
- Best validation accuracy: `0.83784`
- Test accuracy: `0.80`
Class-level behavior (high-level):
- Strong performance on `ditto`, `charmander`, `ekans`
- Main confusion observed between `charizard`, `charmeleon`, and `eevee` on some samples
## Intended Use
This model is intended for:
- educational experiments in transfer learning
- small-scale Pokemon image classification demos
- model-comparison workflows against CLIP/OpenAI vision systems
It is not intended for production or safety-critical applications.
## Limitations
- Small custom dataset
- Limited class coverage (only 6 classes)
- Sensitivity to style/domain shift (sprites vs photos, color variants, edited images)
## Ethical Considerations
This is a toy educational classifier trained on non-sensitive image categories. No personal or biometric data is used.
## How to Use
Load checkpoint contents:
- `state_dict`: model weights
- `labels`: class names
- `image_size`: expected size
- `architecture`: model family
For complete inference logic and app integration, see the project source implementation.
## Reproducibility Artifacts
- Model checkpoint: `custom_resnet18.pth`
- Project metrics files:
- `custom_model_metrics.json`
- `model_comparison.json`
## Links
- Hugging Face Space: `https://huggingface.co/spaces/kukalend/computer-Vision-classification`
- Hugging Face model repo: `https://huggingface.co/kukalend/pokemon-transfer-resnet18`
|