UNet for segmenting salt deposits from seismic images.
We, tugstugi and xuyuan, have participated in the Kaggle competition TGS Salt Identification Challenge and reached the 9-th place. This repository contains a simplified and cleaned up version of our team's code partially based on the ideas of Heng Cherkeng's discussion on the Kaggle discussion board.
We have used a single UNet model with a SENet154 encoder which has a single fold score of 0.882. With 10 folds using reflective padding and another 10 folds with resizing, we got 0.890. The final private LB score 0.892 was achieved by post processing on the model's output.
- Download the dataset and copy them into
datasets/train/
anddatasets/test/
- Train SENet154-Unet:
python train.py --vtf --pretrained imagenet --loss-on-center --batch-size 32 --optim adamw --learning-rate 5e-4 --lr-scheduler noam --basenet senet154 --max-epochs 250 --data-fold fold0 --log-dir runs/fold0 --resume runs/fold0/checkpoints/last-checkpoint-fold0.pth
- Do SWA on the best loss, accuracy and kaggle metrics models:
python swa.py --input runs/fold0/models
- Create Kaggle submission:
python test.py --tta swa_model.pth