[[Solution]](./kaggle solution 설명.pdf)
Please see the attached pdf file named '파이프라인 설명서.pdf'
- AlbuNet (resnet34) from [ternausnets]
- Resnet50 from [selim_sef SpaceNet 4]
- SCSEUnet (seresnext50) from [selim_sef SpaceNet 4]
https://github.com/sneddy/pneumothorax-segmentation
Video with short explanation: https://youtu.be/Wuf0wE3Mrxg
Presentation with short explanation: https://yadi.sk/i/oDYnpvMhqi8a7w
Competition: https://kaggle.com/c/siim-acr-pneumothorax-segmentation
Used [combo loss] combinations of BCE, dice and focal. In the best experiments the weights of (BCE, dice, focal), that I used were:
- (3,1,4) for albunet_valid and seunet;
- (1,1,1) for albunet_public;
- (2,1,2) for resnet50.
Why exactly these weights?
In the beginning, I trained using only 1-1-1 scheme and this way I get my best public score.
I noticed that in older epochs, Dice loss is higher than the rest about 10 times.
For balancing them I decide to use a 3-1-4 scheme and it got me the best validation score.
As a compromise I chose 2-1-2 scheme for resnet50)
Top3 checkpoints averaging from each fold from each pipeline on inference
├── unet_pipeline
│ ├── experiments
│ │ ├── some_experiment
│ │ │ ├── train_config.yaml
│ │ │ ├── inference_config.yaml
│ │ │ ├── submit_config.yaml
│ │ │ ├── checkpoints
│ │ │ │ ├── fold_i
│ │ │ │ │ ├──topk_checkpoint_from_fold_i_epoch_k.pth
│ │ │ │ │ ├──summary.csv
│ │ │ │ ├──best_checkpoint_from_fold_i.pth
│ │ │ ├── log
├── input
│ ├── dicom_train
│ │ ├── some_folder
│ │ │ ├── some_folder
│ │ │ │ ├── some_train_file.dcm
│ ├── dicom_test
│ │ ├── some_folder
│ │ │ ├── some_folder
│ │ │ │ ├── some_test_file.dcm
| ├── new_sample_submission.csv
│ └── new_train_rle.csv
└── requirements.txt
pip install -r requirements.txtkaggle competitions download -c body-~~~Training:
cd unet_pipeline
python Train.py experiments/albunet512/train_config_part0.yaml
python Train.py experiments/albunet512/train_config_part1.yamlAs an output, we get a checkpoints in corresponding folder.
Inference:
cd unet_pipeline
python Inference.py experiments/albunet512/inference_config.yamlAs an output, we get a pickle-file with mapping the file name into a mask with pneumothorax probabilities.
Submit:
cd unet_pipeline
python TripletSubmit.py experiments/albunet512/submit.yamlAs an output, we get submission file with rle.
