Skip to content

TheXirex/Airbus-Ship-Segmentation

Repository files navigation

Airbus-Ship-Segmentation

Main Goal

The main goal of this project is to build a semantic segmentation model for ship detection in satellite images.

Technologies

The created model for ship segmentation has Unet architecture (the code of which you can find in unet.py file).

To train the model I used Focalloss loss function and dice_score binary similarity method (code for the methods can be found in losses.py).

EDA

Analysis of the dataset and model metrics can be found behind the files: eda.ipynb and model_metrics.

Installation

  1. The Python version for this project is 3.11.5.
  2. Select the directory where the project is to be loaded.
  3. Go to this directory in the console and clone the repository:
git clone https://github.com/TheXirex/Airbus-Ship-Segmentation.git
  1. Browse to the repository folder:
cd Airbus-Ship-Segmentation
  1. Install the required libraries:
pip install -r requirements.txt
  1. There are 2 ways to demonstrate how the model works:
  • web application built on streamlit.
    streamlit run inference.py
    
  • demonstration of results in .ipynb notepad test.ipynb.
  1. If you want to retrain a model with your parameters:
  • Create a 'data' folder in the root of the project.
  • Download the image archive from Kaggle and upload its contents to the 'data' folder.
  • Change the required parmeters in the config file and run the training file.

Results:

A trained model for semantic segmentation of ships in satellite images.

The model does a good job of segmenting explicit ships in images, but sometimes gets confused with shore/land areas in images.

Example images: photo_2023-11-20_15-02-38 изображение изображение

About

U-Net model for ship semantic segmentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages