Coder Social home page Coder Social logo

ehudbaumatz / ml_shipdetection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ka5par/ml_shipdetection

0.0 1.0 0.0 20.4 MB

Detectron2 and FastAI based ship segmentation for Kaggle dataset.

License: GNU General Public License v3.0

Dockerfile 2.93% Python 62.63% Jupyter Notebook 34.44%

ml_shipdetection's Introduction

Instance segmentation framework for kaggle ship detection1 using Pytorch based toolboxes Detectron2 and Fastai.

Final presentation 2

image of framework

Setup

  • Requirements:
    • Unix based OS (Linux/Mac OS).
    • Nvidia GPU with cuda 10.1 installed, and at least 10GB of vram.
    • Docker (version == 19.03) and docker-compose (version == 3.6)
    • 40GB of free space: ~10GB for docker image, ~30GB for data

*All other dependencies are taken care of by docker-compose.

Data

kaggle competitions download -c airbus-ship-detection

Use the Kaggle API to download the dataset 3

Put it in folder named input

Model preprocessing / training and Kaggle submittion

docker-compose up 
  • Training: In the container, open the notebook module_notebook and run all.
  • Metrics: tensorboard for metrics, use another jupiter notebook and !tensorboard --logdir=runs --host=0.0.0.0 and if run on a local machine use a browser to go to http://0.0.0.0:6006.

Quick overview:

  • Data Loader (module_preprocessing) 4
  • Classifier (FastAI) 5
    • Output probability of ship on image.
    • Resnet34
  • Instance Segmentation/Object Detection (Detectron2) 6
    • Output pixel mask of ships.
    • Augmentations 78
      • Flips (Vertical 50%, Horisontal 50%)
      • Rotation (-20/+20 random rotation)
      • Random lighting (0.1 standard deviations)
    • Mask RCNN 50 layer pretrained on Coco .
      • 3 stage training (256x256,512x512,756x756) 9
    • Validation every 5k iterations.
  • Predictions on validation (module_submit)
  • Kaggle submission (module_submit) 4

Project

  • Kaggle proptotype
  • Initial presentation
  • Data Loader module
  • Training module
  • Add data Augmentations
  • Submit module
  • Classification module
  • Dockerize project
  • Argumentize code
  • Train
  • Inference
  • Submit

Footnotes

  1. https://www.kaggle.com/c/airbus-ship-detection/overview

  2. https://docs.google.com/presentation/d/1O3DLAQ9SKukEivKACH7JCZqiKiia6ratmZuc1KuovQk/edit?usp=sharing

  3. https://github.com/Kaggle/kaggle-api

  4. https://github.com/pascal1129/kaggle_airbus_ship_detection 2

  5. https://www.fast.ai/

  6. https://github.com/facebookresearch/detectron2

  7. https://jss367.github.io/Data-Augmentation-with-Detectron2.html

  8. https://link.springer.com/chapter/10.1007/978-981-15-5558-9_9

  9. https://www.kaggle.com/iafoss/unet34-dice-0-87/notebook

ml_shipdetection's People

Contributors

ka5par avatar sinukaarel avatar

Watchers

 avatar

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.