YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

🌀️ Weather Classification Model (ResNet50)

A high-performance deep learning system for classifying 11 different weather conditions from images, built using ResNet50 and modern transfer learning techniques.
This project provides production-ready accuracy, robust preprocessing, and scalable architecture suitable for research, cloud deployment, and real-time applications.


πŸ“˜ Overview

This repository contains a weather classification model using a ResNet50 backbone fine-tuned on a curated dataset.
With extensive augmentation and careful layer freezing, the model achieves strong generalization and performance across diverse atmospheric conditions.


🧠 Model Architecture

Base Network

  • ResNet50 pre-trained on ImageNet
  • Early convolutional layers (conv1 β†’ layer3) frozen
  • Final block (layer4) and custom classifier trainable

Input Specification

  • 224 Γ— 224 RGB images

Output

  • 11 weather condition classes

Custom Classifier Head

  • Dropout (0.5)
  • Linear 2048 β†’ 512, BatchNorm, ReLU
  • Dropout (0.3)
  • Linear 512 β†’ 256, BatchNorm, ReLU
  • Dropout (0.2)
  • Final Linear 256 β†’ 11

βš™οΈ Training Configuration

  • Dataset Split: 80% train / 10% validation / 10% test
  • Batch Size: 32
  • Epochs: 30 (with early stopping)
  • Optimizer: Adam (layer-wise learning rates)
  • Loss: CrossEntropyLoss
  • LR Scheduler: ReduceLROnPlateau
  • Regularization: weight decay + dropout

πŸ–ΌοΈ Data Preprocessing Pipeline

Training Augmentations

  • Random horizontal flip (p = 0.5)
  • Random rotation (Β±10Β°)
  • Color jitter (brightness, contrast, saturation, hue)
  • Random affine transforms
  • ImageNet normalization

Validation & Test Transforms

  • Resize β†’ 224Γ—224
  • Convert to Tensor
  • ImageNet standardization

πŸ“Š Model Performance (Expected)

  • Training Accuracy: ~90–95%
  • Validation Accuracy: ~85–90%
  • Test Accuracy: ~85–90%
  • Per-class precision/recall depends on dataset balance

Evaluation Outputs

  • Classification report
  • Confusion matrix heatmap
  • Accuracy/Loss training curves
  • Class-wise accuracy breakdown
  • Probability distribution plots

πŸ”‘ Key Features

1. Transfer Learning Approach

  • Pre-trained ResNet50 weights
  • Frozen early layers β†’ stable feature extraction
  • Fine-tuning of later layers β†’ domain adaptation

2. Advanced Training Techniques

  • Stratified train/val/test split
  • Learning rate scheduling
  • Automatic checkpointing
  • Full GPU acceleration
  • Progress visualization

3. Robust Data Handling

  • Auto-detection of classes via directory structure
  • Efficient memory usage
  • Real-time augmentation
  • Support for JPG/PNG formats

πŸ—οΈ Implementation Details

Training Process

  1. Load ImageNet pre-trained ResNet50
  2. Freeze early layers
  3. Train only classifier head
  4. Gradually unfreeze layer4
  5. Validate after each epoch
  6. Save best checkpoint
  7. Adjust LR when validation performance plateaus

🌐 Usage Scenarios

Weather & Environment Monitoring

  • Automated weather station image analysis
  • Meteorological and climate research
  • Environmental change detection

Integration Possibilities

  • Real-time classification APIs
  • Mobile/IoT deployment
  • Autonomous monitoring systems
  • Research platforms

πŸ–₯️ Technical Requirements

Hardware

  • GPU: NVIDIA (8GB+ recommended)
  • RAM: 16GB minimum (32GB optimal)
  • SSD for high-speed data loading

Software Dependencies

  • PyTorch 1.12+
  • Torchvision
  • NumPy
  • Pillow
  • Scikit-learn
  • Matplotlib / Seaborn

πŸ“€ Model Output

The model returns:

  • Predicted Class (one of 11 weather types)
  • Class Probabilities (softmax scores)
  • Performance Metrics (precision, recall, F1)
  • Visualizations (learning curves, confusion matrix)

⭐ Advantages

  • High accuracy through ResNet50 feature extraction
  • Efficient: minimal training time with transfer learning
  • Robust generalization via heavy augmentation
  • Easily adaptable to new datasets or categories
  • Production-ready preprocessing and error handling

πŸ“Œ Summary

This project delivers a state-of-the-art weather image classification system by combining:

  • powerful ResNet50 architecture,
  • modern training strategies,
  • careful data preprocessing, and
  • comprehensive evaluation tools.

It provides a strong foundation for both academic research and real-world atmospheric monitoring applications.


Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support