Sign In
Learn practical skills, build real-world projects, and advance your career

Learn to classify weather images using PyTorch CNN. Use the Multi-class Weather Dataset and explore the dataset structure, classes, and images.

Final project: - Weather Image Classification using CNN in PyTorch.

import os
import torch
import torchvision
import tarfile
from torchvision.datasets.utils import download_url
from import random_split

DataSet Used

For this assignmente the folowing dataset was used:

Multi-class Weather Dataset for Image Classification Published: 13-09-2018 | Version 1 | DOI: 10.17632/4drtyfjtfy.1 Contributor: Gbeminiyi Ajayi. Description. Multi-class weather dataset(MWD) for image classification is a valuable dataset used in the research paper entitled “Multi-class weather recognition from still image using heterogeneous ensemble method”. The dataset provides a platform for outdoor weather analysis by extracting various features for recognizing different weather conditions.

The original dataset was modified for having a set of 32x32 images, and the same number of samples for each of four classes considered (cloudy, rain, shune and sunrise). This modified dataset can be downloaded from:

from google.colab import drive
Drive already mounted at /content/gdrive; to attempt to forcibly remount, call drive.mount("/content/gdrive", force_remount=True).