Coder Social home page Coder Social logo

pfneumonia's Introduction

PFNeumonia

This repo contains the 6th place solution for RSNA Pneumonia Detection Challenge.

All trainings and predictions were done with eight Tesla P100s.

Preparation

  • Locate Kaggle RSNA Pneumonia datasets on ./RSNA. The names of subdirectories must be stage_2_train_images and stage_2_test_images. Labels for training dataset must be written in stage_2_train_labels.csv.
  • Download ResNet pretrained models from https://github.com/KaimingHe/deep-residual-networks and locate them on ~/.chainer/dataset/pfnet/chainer/models.
  • Install requirements by executing pip install -r requirements.txt

How to train

First, shuffle patient IDs by executing the command below. This process is required if you are going to train with a new dataset other than the official Stage2 train or test images.

PYTHONPATH=. python scripts/shuffle_patients.py

Our final submission is an ensemble of 10 models which derive from a 10-fold cross-validation. To run a 10-fold CV, run the command:

./run_cross_validation.sh

How to predict

Predict twice with even (02468) and odd (13579) five models.

./pred02468.sh even.csv
./pred13579.sh odd.csv

Merge these predictions to get the merged CSV.

PYTHONPATH=. python examples/segmentation/ensemble_submission.py even.csv odd.csv -t0.5 -o merged.csv

Finally, adjust threshold of confidence to get the final submission file.

PYTHONPATH=. python scripts/increase_threshold.py -i merged.csv -o final.csv -t 0.3

Links

pfneumonia's People

Contributors

mottodora avatar

Watchers

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