Giter Site home page Giter Site logo

codelover96 / airbus-ship-detection-with-maskrcnn Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 2.25 MB

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.

Python 100.00%
detection deep-learning object-detection mask-rcnn

airbus-ship-detection-with-maskrcnn's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.