This is the project for RSNA Intracranial Hemorrhage Detection hosted on Kaggle in 2019.
Final Solution EfficientNet b7. 5-folds. Dice images + preprocessing. Final position 65th of 1345 teams. Check our models at conf directory.
Official baseline/ starter code from @Aappian42: https://github.com/appian42/kaggle-rsna-intracranial-hemorrhage
- Python 3.6.6
- Pytorch 1.1.0
- NVIDIA apex 0.1 (for mixed precision training)
Backbone | Image size | LB |
---|---|---|
se_resnext50_32x4d | 512x512 | 0.070 - 0.072 |
se_resnext50_32x4d | 1024x1025 | 0.070 - 0.071 |
se_resnext101_32x4d | 512x512 | 0.070 |
For this challenge, windowing is important to focus on the matter, in this case the brain and the blood. There are good kernels explaining how windowing works.
- See like a Radiologist with Systematic Windowing by David Tang
- RSNA IH Detection - EDA by Allunia
We used three types of windows to focus and assigned them to each of the chennel to construct images on the fly for training.
Channel | Matter | Window Center | Window Width |
---|---|---|---|
0 | Brain | 40 | 80 |
1 | Blood/Subdural | 80 | 200 |
2 | Soft tissues | 40 | 380 |
Please put ./input
directory in the root level and unzip the file downloaded from kaggle there. All other directories such as ./cache
, ./data
, ./model
will be created if needed when ./bin/preprocess.sh
is run.
Please make sure you run the script from parent directory of ./bin
.
$ sh ./bin/preprocess.sh
preprocess.sh does the following at once.
- dicom_to_dataframe.py reads dicom files and save its metadata into the dataframe.
- create_dataset.py creates a dataset for training.
- make_folds.py makes folds for cross validation.
$ sh ./bin/train001.sh
train.001.sh uses se_resnext50_32x4d from pretrained-models.pytorch for training. One epoch probably takes 20,000 seconds to train with a single 1080ti.
$ sh ./bin/predict001.sh
predict001.sh does the predictions and makes a submission file for scoring on Kaggle. Please uncomment the last line if you want to automatically submit it to kaggle through API.