🌌 SADIK Vision Multiverse Classifier

A ResNet18 image classifier fine-tuned on the SADIK Vision Multiverse Dataset, created by Sadik Nawaz (Age 11).

The model classifies images into 4 categories:

ID Class Meaning
0 anime_digital_art Anime, manga & digital art
1 cyberpunk_tech Cyberpunk, neon cities, robots, cyborgs
2 game_assets_3d 3D renders, low-poly game assets
3 photorealistic_portraits Real photo portraits

Note: class order is alphabetical, matching torchvision.datasets.ImageFolder.


πŸ“Š Results (honest 5-fold cross-validation)

Metric Score
Out-of-fold accuracy 83.1%
5-fold CV accuracy 83.3% Β± 6.3%
Out-of-fold macro F1 77.8%
Class Precision Recall F1 Support
anime_digital_art 0.73 0.73 0.73 11
cyberpunk_tech 0.71 0.83 0.77 24
game_assets_3d 0.75 0.55 0.63 11
photorealistic_portraits 1.00 0.97 0.98 31

The dataset has only 77 hand-cleaned images, so these numbers are noisy. The confusion matrix and training curves are in this repo.


πŸš€ Usage

import torch
from PIL import Image
from torchvision import transforms
from torchvision.models import resnet18

ckpt = torch.load("model.pt", map_location="cpu")
model = resnet18(weights=None)
model.fc = torch.nn.Linear(model.fc.in_features, len(ckpt["class_names"]))
model.load_state_dict(ckpt["state_dict"])
model.eval()

tf = transforms.Compose([
    transforms.Resize(256),
    transforms.CenterCrop(224),
    transforms.ToTensor(),
    transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]),
])

image = Image.open("your_image.jpg").convert("RGB")
with torch.no_grad():
    probs = model(tf(image).unsqueeze(0)).softmax(1)[0]

for cls, p in sorted(zip(ckpt["class_names"], probs.tolist()), key=lambda x: -x[1]):
    print(f"{cls:28s} {p:.1%}")

Or use the included CLI:

python predict.py path/to/image1.jpg path/to/image2.jpg

πŸ‹οΈ Training Details

  • Backbone: ResNet18 (ImageNet pretrained)
  • Input: 224Γ—224, ImageNet normalization
  • Augmentation: RandomResizedCrop, horizontal flip, rotation, color jitter, RandAugment, random erasing
  • Loss: CrossEntropy with class weights + label smoothing 0.1
  • Optimizer: AdamW (lr 3e-4, weight decay 1e-4), cosine schedule
  • Validation: stratified 5-fold cross-validation
  • Final model: trained on all 77 images for 8 epochs
  • Hardware: CPU only

Reproduce with:

python train.py --model resnet18 --data-dir ./data --out-dir ./artifacts

⚠️ Limitations

  • Trained on a very small educational dataset (77 images).
  • Not suitable for safety-critical or production use.
  • Performance may be lower on images that look different from the training set.
  • Some classes are visually similar (cyberpunk_tech vs game_assets_3d), which causes most mistakes.

πŸ‘¨β€πŸ’» Author

Sadik Nawaz β€” 11-year-old AI developer from Pakistan πŸ‡΅πŸ‡°

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train SadikNawazAI/sadik-vision-multiverse-classifier

Evaluation results

  • Out-of-fold accuracy (5-fold CV) on SADIK Vision Multiverse Dataset
    self-reported
    0.831
  • Macro F1 (5-fold CV) on SADIK Vision Multiverse Dataset
    self-reported
    0.778