This repository contains a project for performing aerial image segmentation using PyTorch. The notebook demonstrates how to preprocess data, build and train a U-Net segmentation model, and evaluate its performance.
Aerial image segmentation is a crucial task in various applications such as urban planning, agriculture, and disaster management. This project uses a Convolutional Neural Network (CNN), specifically a U-Net architecture, implemented in PyTorch to segment aerial images.
The dataset used in this project is available in the Road_seg_dataset
repository. It includes aerial images and their corresponding segmentation masks. You can clone the dataset using the following command:
git clone https://github.com/parth1620/Road_seg_dataset.git
U-Net is a convolutional neural network architecture designed for biomedical image segmentation but has been widely adopted for various segmentation tasks. It consists of a contracting path to capture context and a symmetric expanding path that enables precise localization. The U-Net architecture ensures that the model can learn from a limited amount of data and produce high-quality segmentation results.
- Contracting Path: A series of convolutional and max-pooling layers to capture features and reduce spatial dimensions.
- Bottleneck: The deepest layer of the network which captures the most abstract representation of the input.
- Expanding Path: A series of up-convolutions and concatenations with high-resolution features from the contracting path to improve localization accuracy.
To set up the project, follow these steps:
-
Clone this repository:
git clone https://github.com/SubekSharma/ariel-image-segmentation.git
-
Navigate to the project directory:
cd ariel-image-segmentation
-
Install the required packages:
pip install -r requirements.txt
-
Clone the dataset repository:
git clone https://github.com/parth1620/Road_seg_dataset.git
-
Open the Jupyter notebook:
jupyter notebook Aerial_Image_Segmentation_with_PyTorch.ipynb
-
Follow the instructions in the notebook to preprocess the data, build and train the model, and evaluate its performance.
The notebook includes various visualizations to show the segmentation results. Below are some sample outputs from the model:
Contributions are welcome! If you have any suggestions, bug reports, or improvements, please create an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.