Giter Club home page Giter Club logo

rsna2019_intracranial-hemorrhage-detection's Introduction

RSNA Intracranial Hemorrhage Detection

This is the source code for the first place solution to the RSNA2019 Intracranial Hemorrhage Detection Challenge.

Solution write up: Link.

Solutuoin Overview

image

Dependencies

  • opencv-python==3.4.2
  • scikit-image==0.14.0
  • scikit-learn==0.19.1
  • scipy==1.1.0
  • torch==1.1.0
  • torchvision==0.2.1

CODE

  • 2DNet
  • 3DNet
  • SequenceModel

2D CNN Classifier

Pretrained models

Preprocessing

image

Prepare csv file:

download data.zip: https://drive.google.com/open?id=1buISR_b3HQDU4KeNc_DmvKTYJ1gvj5-3

  1. convert dcm to png
python3 prepare_data.py -dcm_path stage_1_train_images -png_path train_png
python3 prepare_data.py -dcm_path stage_1_test_images -png_path train_png
python3 prepare_data.py -dcm_path stage_2_test_images -png_path test_png
  1. train
python3 train_model.py -backbone DenseNet121_change_avg -img_size 256 -tbs 256 -vbs 128 -save_path DenseNet121_change_avg_256
python3 train_model.py -backbone DenseNet169_change_avg -img_size 256 -tbs 256 -vbs 128 -save_path DenseNet169_change_avg_256
python3 train_model.py -backbone se_resnext101_32x4d -img_size 256 -tbs 80 -vbs 40 -save_path se_resnext101_32x4d_256
  1. predict
python3 predict.py -backbone DenseNet121_change_avg -img_size 256 -tbs 4 -vbs 4 -spth DenseNet121_change_avg_256
python3 predict.py -backbone DenseNet169_change_avg -img_size 256 -tbs 4 -vbs 4 -spth DenseNet169_change_avg_256
python3 predict.py -backbone se_resnext101_32x4d -img_size 256 -tbs 4 -vbs 4 -spth se_resnext101_32x4d_256

After single models training, the oof files will be saved in ./SingleModelOutput(three folders for three pipelines).

After training the sequence model, the final submission will be ./FinalSubmission/final_version/submission_tta.csv

Sequence Models

Sequence Model 1

image

Sequence Model 2

image

Path Setup

Set data path in ./setting.py

download

download [csv.zip]

download [feature samples]

Sequence Model Training

CUDA_VISIBLE_DEVICES=0 python main.py

The final submissions are in the folder ../FinalSubmission/version2/submission_tta.csv

Final Submission

Private Leaderboard:

  • 0.04383

TODO

  • Pre-trained models
  • 2DCNN + SeqModel end-to-end training
  • 3DCNN training

rsna2019_intracranial-hemorrhage-detection's People

Contributors

seutao 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.