Clouds significantly influence the Earth's climate. Our project aims to classify cloud organizations accurately to enhance understanding of their impact on future climates. We address the challenge of the complex nature and indistinct boundaries of cloud types by implementing and comparing two models: U-net and PSPNet. Our findings suggest that PSPNet slightly outperforms the U-net model.
Accurate classification of cloud types is crucial for enhancing our understanding of cloud mechanisms and improving climate projection models. Our project leverages satellite images labeled into four categories: Fish, Flower, Gravel, and Sugar, aiming to segment these regions accurately using machine learning models.
The dataset, provided by Max Planck Institute for Meteorology and hosted on Kaggle, includes 5546 images categorized into four types of cloud formations. The train.csv
file contains run-length encoded masks, and the train_images
folder holds the corresponding JPG images.
Key metrics for each cloud category were analyzed, including mask rate, mask size rate, and figure with object rate.
- Baseline Model (U-net): Initial model using a standard U-net architecture for segmentation.
- PSPNet: An advanced model employing a Pyramid Scene Parsing Network to potentially enhance segmentation performance through global contextual awareness.
Images are resized and normalized to feed into the models. The ground truth is derived from RLE-encoded masks.
Both models are trained on the dataset with specific augmentations like horizontal flips and rotations to improve robustness and generalization.
Model performance is evaluated using the Dice Coefficient during validation and testing phases.
PSPNet demonstrated superior performance over U-net, which aligns with our expectations given its advanced capabilities in handling global contextual information.
-
U-net
-
PSPNet
Model | Dice Score | Test Loss |
---|---|---|
U-net | 0.4676 | 0.9650 |
PSPNet | 0.4929 | 0.9044 |
To run this project, you will need Python 3.8+ and the following libraries:
- PyTorch
- torchvision
- OpenCV
- NumPy
- Matplotlib
- tqdm
- albumentations
Install the required packages using pip:
pip install torch torchvision numpy opencv-python matplotlib tqdm albumentations
To train and evaluate the model, use the following command:
python main.py
models/
: Contains the scripts for U-net and PSPNet models.utils.py
: Utility functions for data handling and augmentation.loss.py
: Implementation of loss functions used in training the models.optimizer.py
: Optimizer configurations.main.py
: Main script to run the training and evaluation of models.cloudSet.py
: Dataset preparation and augmentation scripts.README.md
: Documentation of the project.LICENSE
: Licensing information.
This project is licensed under the MIT License - see the LICENSE file for details.