Weather phenomenon recognition notably affects many aspects of our daily lives, for example, weather forecast, road condition monitoring, transportation, agriculture, forestry management, and the detection of the natural environment. In contrast, few studies aim to classify actual weather phenomenon images, usually relying on visual observations from humans.
In this project we propose a study weather classification from images using Convolutional Neural Networks (CNNs) with Keras+Tensorflow. We present a dataset with 3348 images with six weather conditions (rain, shine, sunrise, fogsmog, snow, cloudy) obtaining a precision of 90% in the validation data and 87% in test data. Realizing the automatic and high-quality classification of weather phenomena images can provide a reference for future research on weather image classification and weather forecasting.
Required Libraries:
- Tensorflow
- Keras
- PIL
- Seaborn
- pandas
- numpy
- matplotlib
- os
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.
URL: https://www.kaggle.com/mauricioarancibia/weatherimgclass/download
Upload arhive.zip file to colab. Unzip archive.zip
In this section we will proceed to perform the exploration and analysis of the data.
Training Dataset Distribution
Validation Dataset Distribution
Test Dataset Distribution
Cloudy
Rain
Sunrise
At this stage we are going to generate images using Keras Generator, in this way we can see how the Data Augmentation strategy is working. We disable rescaling so that images can be easily viewed.
The strategy for this work is to make two models from scratch and one using transfer learning, in this way we can see the behavior and performance of each one.
https://urvog.medium.com/weather-image-classification-with-keras-4eee9468ff2f
This project is published in 2021 under MIT license.















