Coder Social home page Coder Social logo

kaggle_rsna2019_4th_solution's Introduction

Hello!

Below you can find a outline of how to reproduce my solution for the RSNA Intracranial Hemorrhage Detection competition.

Visit kaggle forum for solution overview: Kaggle RSNA Intracranial Hemorrhage Detection: 4th Place Solution

Our code is based on Appian's repo: https://github.com/appian42/kaggle-rsna-intracranial-hemorrhage

HARDWARE

  • Ubuntu 16.04
  • NVIDIA 2080Ti

SOFTWARE

(python packages are detailed separately in requirements.txt)

  • Python 3.6.7
  • CUDA 10.1
  • CUDNN 7501
  • NVIDIA Drivers 418.67

START

  1. Setup environment
  2. Place the raw data into ./IFE_1/input folder.
    1. The test data correspond to the test data provided in the Stage 2 of competition.
    2. Use stage 2 training data to train the model.
  3. cd IFE_1, run ./bin/preprocess.py to preprocess the training and test images and split the training data into five folds.
  4. To train:
    1. Train feature extraction models
      • Go to IFE_1, IFE_2, IFE_3, run ./bin/train.sh to train five fold models. Models are saved in /model/. Best models are saved as foldx_best.pt.
      • It will take about 24 ~ 48 hours to train each model for one fold.
    2. Extract features
      • Go to IFE_1, IFE_2, IFE_3, run ./bin/gen_feat_train.sh and ./bin/gen_feat_test.sh to generate 1D (and 3D features). Use the best models generated from step 4.1.1.
      • It will take around 5 hours to extract one feature set (train/test TTA5).
    3. Train classification models.
      • Go to folder cls_1, cls_2, cls_3, run ./bin/train.sh, train five fold models for each folder.
      • It will take around 3 hours to train 1D+3D model (single model), and around 1.5 hours to train 1D model (single model).
  5. To infer:
    1. Extract test features.
      • Go to folder IFE_1, IFE_2, IFE_3, run ./bin/gen_feat_test.sh to extract test features.
    2. Predict classification probabilities
      • Go to folder cls_1, cls_2, cls_3, run ./bin/predict.sh to predict result using extracted features.
    3. Ensemble
      • run ./libs/ensemble.sh to ensemble all the predictions.
  6. Models and features are generated in sequence. If one follows the above mentioned steps in order, all the softlinks should be valid by the time they are referred.

kaggle_rsna2019_4th_solution's People

Contributors

xuxusss avatar

Watchers

James Cloos 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.