Weather image classifier (convnext-tiny-224 fine-tuned)

Classifies an outdoor photo into one of 4 weather classes: Cloudy, Rain, Shine, Sunrise.

Model details

  • Base model: facebook/convnext-tiny-224 (ImageNet pre-trained), fully fine-tuned.
  • Training data: Kaggle "Multi-class Weather Dataset" (1125 images), stratified split 787 train / 169 validation / 169 test (seed 42).
  • Training: 6 epochs, batch size 32, AdamW, cosine schedule, fp16, light augmentation (random resized crop, horizontal flip, color jitter). Best epoch chosen by validation accuracy.

Results (test set, 169 images)

  • Accuracy: 0.9882
  • Macro-F1: 0.9888
Class Precision Recall F1 Support
Cloudy 1.000 1.000 1.000 45
Rain 1.000 1.000 1.000 33
Shine 0.950 1.000 0.974 38
Sunrise 1.000 0.962 0.981 53

Confusion matrix and per-class table are in the eval/ folder of this repo.

Usage

from transformers import pipeline
clf = pipeline("image-classification", model="<this-repo-id>")
clf("photo.jpg", top_k=3)

Limitations

  • Small dataset (1125 images, 4 classes): not robust to night scenes, indoor photos, or unseen weather types.
  • Classes are visually overlapping (e.g. Cloudy vs. Rain, Shine vs. Sunrise); expect confusion there.
  • Educational project, not intended for safety-critical use.
Downloads last month
4,399
Safetensors
Model size
27.8M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for pawel-83748/weather-image-classifier

Finetuned
(60)
this model