Skip to content

Using the famous Airbus Ship Detection dataset from the corresponding Kaggle Competition, I have trained a model with MaskRCNN from matterport to perform image segmentation for ship detection.

Notifications You must be signed in to change notification settings

codelover96/Airbus-Ship-Detection-with-MaskRCNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Airbus-Ship-Detection-with-MaskRCNN

Using the famous Airbus Ship Detection dataset from the corresponding Kaggle Competition, trained a model with MaskRCNN from matterport to perform image segmentation for ship detection.

Info

This repository is part of my senior thesis 'Alcyone Object & Phenomenon Detection System'.

Saronic Gulf, Greece Agia Zoni II oil spill

Installation

  1. Clone Mask RCNN repository from Matterport
  2. Install it's dependencies
    pip3 install -r requirements.txt
  3. Run setup from the repository root directory
    python3 setup.py install
  4. Optionally Download pre-trained COCO weights (mask_rcnn_coco.h5) from the releases page.
  5. Clone this repo and place below files to Mask RCNN repo, inside folder Mask_RCNN-master
  6. Be sure to adjust config.py accordingly (number of classes, gpu count)
  7. Create an images folder inside Mask_RCNN-master folder and copy your images to run the model on.

Run

  1. In line 23 of ship_obj_detection.py point to your model h5 file.
  2. In line 25 of ship_obj_detection.py point to your test image.
  3. Same for run_ship_model.py file.
  4. run commands:
    • python3 ship_obj_detection.py
    • python3 run_ship_model.py

Details

Training on Your Own Dataset

Start by reading this blog post about the balloon color splash sample. It covers the process starting from annotating images to training to using the results in a sample application.

In summary, to train the model on your own dataset you'll need to extend two classes:

Config This class contains the default configuration. Subclass it and modify the attributes you need to change.

Dataset This class provides a consistent way to work with any dataset. It allows you to use new datasets for training without having to change the code of the model. It also supports loading multiple datasets at the same time, which is useful if the objects you want to detect are not all available in one dataset.

See examples in samples/shapes/train_shapes.ipynb, samples/coco/coco.py, samples/balloon/balloon.py, and samples/nucleus/nucleus.py of original Mask RCNN repo here

My model

My model trained on 2 epochs, on cpu. Just for testing purposes. No further tweaks were made.

Requirements

Python 3.4, TensorFlow 1.3, Keras 2.0.8 and other common packages listed in requirements.txt.

TODO

  • added source files for running segmentation and object detection
  • add trained model files
  • showcase results and model performance

References

For educational purposes, ~codelover96

About

Using the famous Airbus Ship Detection dataset from the corresponding Kaggle Competition, I have trained a model with MaskRCNN from matterport to perform image segmentation for ship detection.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages