/DataScienceBowl2018

This is the 39/3634 Solution for data science bowl 2018 challenge

Primary LanguageJupyter NotebookGNU General Public License v3.0GPL-3.0

DataScienceBowl2018-25th

This is the Solution for data science bowl 2018 challenge

the result for private LB is 0.557 at 39/3634(epoch 64) and 0.498 at 156/3634(epoch 65),

Because we have missed the merge deadline we have to make 2 different submit. the huge gap between two epoch may comes from inference bug

The code is based on mateerport's mask rcnn:https://github.com/matterport/Mask_RCNN

The main improvement comes from

  1. better roi align implementation which is modified from tensorpack faster rcnn
  2. large separable convolution from Light Head Rcnn Paper
  3. strong image augmentation especially random scale crop
  4. using clustering to select proper CV set
  5. divide large picture into small part during inference
  6. finetuning the trainging schedule and mask rcnn configuration

Dependencies

  • Python 3; TensorFlow >= 1.5.0;keras>=2.0.5
  • Pre-trained ResNet model from keras pretrain model .
  • data science bowl data. It assumes the following directory structure:
DIR/
  stage1_train/
    images/
    masks/
  stage1_test/
    images/
  stage2_test/
    images/

Usage

The Command line tool hasn't been test yet, if you encounter any bug, see main.ipynb as conference

Train a new model starting from ImageNet weights using train dataset (which is stage1_train minus validation set)

python3 nucleus.py train --dataset=/path/to/dataset --subset=train --weights=imagenet

Train a new model starting from specific weights file using the full stage1_train dataset

python3 nucleus.py train --dataset=/path/to/dataset --subset=stage1_train --weights=/path/to/weights.h5

Resume training a model that you had trained earlier

python3 nucleus.py train --dataset=/path/to/dataset --subset=train --weights=last

Generate submission file from stage1_test images

python3 nucleus.py detect --dataset=/path/to/dataset --subset=stage1_test --weights=<last or /path/to/weights.h5>