All Projects → louis-she → dsb

louis-she / dsb

Licence: other
kaggle 2018 data science bowl competition

Programming Languages

python
139335 projects - #7 most used programming language

Mask RCNN in pytorch solution for Kaggle's 2018 Data Science Bowl

This is a solution of 2018 Data Science Bowl rely on a forked version of multimodallearning's pytorch-mask-rcnn.

Requirements

  • Python 3.6
  • Pytorch 0.3
  • 8GB memory or better GPU

How to use

  1. Clone this repo.
git clone https://github.com/louis-she/dsb.git --recursive
  1. Download data by kaggle command.
kaggle competitions download -c data-science-bowl-2018
  1. Two more repositories that need to be build with the right --arch option for cuda support. The two functions are Non-Maximum Suppression from ruotianluo's pytorch-faster-rcnn repository and longcw's RoiAlign.
GPU arch
TitanX sm_52
GTX 960M sm_50
GTX 1070 sm_61
GTX 1080 (Ti) sm_61
cd nms/src/cuda/
nvcc -c -o nms_kernel.cu.o nms_kernel.cu -x cu -Xcompiler -fPIC -arch=[arch]
cd ../../
python build.py
cp -R _ext dsb/pytorch-mask-rcnn/nms/_ext

cd roialign/roi_align/src/cuda/
nvcc -c -o crop_and_resize_kernel.cu.o crop_and_resize_kernel.cu -x cu -Xcompiler -fPIC -arch=[arch]
cd ../../
python build.py
cp -R _ext dsb/pytorch-mask-rcnn/roialign/roi_align/_ext
  1. Download pretrained weights on COCO dataset mask_rcnn_coco.pth at https://drive.google.com/drive/folders/1LXUgC2IZUYNEoXr05tdqyKFZY0pZyPDc

  2. Using the following command to train the model

python dsb_train.py
  1. Tweak the configures in dsb_config.py, the learning rate and training strategy can be modified directly in dsb_train.py.

Result

I don't have enough GPU resources to train this. I train this 2 epoch with coco pretrained model and I got 0.421 LB.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].