An open API service indexing awesome lists of open source software.

https://github.com/andreihar/plane-segmenter

Detection and Segmentation of Planes
https://github.com/andreihar/plane-segmenter

aerial-imagery detectron2 instance-segmentation object-detection resnet semantic-segmentation

Last synced: 7 months ago
JSON representation

Detection and Segmentation of Planes

Awesome Lists containing this project

README

          



Logo


# Plane Segmenter

[![Contributors][contributors-badge]][contributors]
[![Licence][licence-badge]][licence]
[![LinkedIn][linkedin-badge]][linkedin]

**Detection and Segmentation of Planes**

Models for detecting and segmenting planes in aerial images, using techniques like Faster R-CNN and Mask R-CNN for enhanced performance and accuracy.

---

Table of Contents



  1. About The Project


  2. Run


  3. Functional Areas


  4. Data

  5. Contributors

  6. Licence

## About The Project

Plane Segmenter is the assignment project created for the course in Computer Vision in the Spring semester of 2023. The project focuses on applying deep learning techniques to solve key tasks in computer vision: object detection, semantic segmentation, and instance segmentation.

The objective of this assignment was to design and train advanced deep convolutional neural networks with PyTorch and Detectron2 to accurately detect and segment planes in high-resolution aerial images. The model started with a baseline configuration and iteratively improved through hyperparameter tuning and architectural adjustments.

By addressing these challenges, Plane Segmenter demonstrates practical applications of state-of-the-art computer vision techniques and provides insights into the effectiveness of different deep learning methods and configurations.

### Built With

* [![Detectron2][detectron-badge]][detectron]

## Run

Open the notebook using your choice software in a terminal or command window by navigating to the top-level project directory, `plane-segmenter`. For example, if the software is Jupyter Notebook:

```bash
jupyter notebook segmenter.ipynb
```

## Functional Areas

### Object Detection

An object detection model is built to identify planes in high-resolution aerial images using the modified iSAID dataset. The Detectron2 framework is employed to implement and train a Faster R-CNN model with a ResNet-101 backbone. Key hyperparameters are adjusted to enhance performance, and the model's effectiveness is assessed using the Average Precision (AP) metric. This approach sets the stage for improving detection capabilities in the following stages of the project.


Object Detection

### Semantic Segmentation

A deep neural network is developed for semantic segmentation to identify planes in images. Segmentation masks are extracted and processed, with images and masks resized to a consistent size. The model uses an encoder-decoder architecture, where the encoder captures image features and the decoder generates the segmentation masks. Enhancements include adding layers to both the encoder and decoder, and incorporating skip connections to retain spatial information. The training employs Binary Cross-Entropy with logits as the loss function and Stochastic Gradient Descent (SGD) for optimisation. Performance is evaluated using the Intersection-over-Union (IoU) metric.


Semantic Segmentation Image
Semantic Segmentation Mask

### Instance Segmentation

Instance segmentation is implemented by integrating a trained object detection model with a segmentation module to generate detailed masks for each detected instance. The approach involves using the model's predictions in place of ground-truth bounding boxes from the previous stage and processing each instance to create accurate segmentation masks. The model relies on an encoder-decoder architecture for effective feature extraction and mask reconstruction. Performance is evaluated using the Intersection-over-Union (IoU) metric, focusing on optimising model performance through careful architectural design and hyperparameter tuning.


Instance Segmentation Image
Instance Segmentation Mask

### Mask R-CNN

In this part, we employ Mask R-CNN mode using a ResNet-50 backbone with a Feature Pyramid Network (FPN) to perform instance segmentation and compare its results with those obtained in the Instance Segmentation part. The model is fine-tuned with similar techniques to optimise performance. We visualise and evaluate the results, focusing on the advantages and drawbacks of the Mask R-CNN approach compared to the method used previously. Additionally, we compare the detection results with those from the Object Detection part to assess improvements and differences, providing insights into which method performs better and why.


Mask R-CNN

## Data

This dataset is a modified version of the [iSAID: A Large-scale Dataset for Instance Segmentation in Aerial Images](isaid), consisting of 198 training images and 72 test images, all from the Plane category.

## Contributors

- Andrei Harbachov ([Github][andrei-github] · [LinkedIn][andrei-linkedin])

## Licence

Because Plane Segmenter is MIT-licensed, any developer can essentially do whatever they want with it as long as they include the original copyright and licence notice in any copies of the source code.

[contributors-badge]: https://img.shields.io/badge/Contributors-1-44cc11?style=for-the-badge
[contributors]: #contributors
[licence-badge]: https://img.shields.io/github/license/andreihar/plane-segmenter.svg?color=000000&style=for-the-badge
[licence]: LICENSE
[linkedin-badge]: https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white
[linkedin]: https://www.linkedin.com/in/andreihar/
[detectron-badge]: https://img.shields.io/badge/Detectron2-5173F1?style=for-the-badge&logo=probot&logoColor=ffffff
[detectron]: https://ai.meta.com/tools/detectron2/

[isaid]: https://captain-whu.github.io/iSAID/

[andrei-linkedin]: https://www.linkedin.com/in/andreihar/
[andrei-github]: https://github.com/andreihar