-
Notifications
You must be signed in to change notification settings - Fork 43
Improved Multioutput UNet
Third solution is build on top of the previous one. We use Multi-output U-Net. Nevertheless, our focus was on pre- and post-processing.
We add more image augmentations, especially color augmentations. You can check the code: augmentations.py.
We have introduced better validation which can be parametrized in the neptune.yaml:L40. Here, we use pretrained VGG as feature extractor. On these features, we run k-means clustering with k=10
. Thanks to this we can manipulate the validation difficulty and validation split size (clusters does not have equal number of members). Check the code: preparations.py:L94
Finally, we do following segmentation that leads to final preds:
- Subtract contours from segmentation. As a result, you have "eroded mask", which is binary.
- The non-zero elements in the eroded mask are used as watershed markers. Check markers for watershed transform for intuition about it.
- Calculate distances in the eroded mask -> this transformation yields distances matrix that we take with negative sign. Since eroded mask just 2D array, we calculate minimal distance of the given non-zero entry to the nearest zero.
- Use markers and distances matrix to run watershed.
Parameters that are set as default will give you approximately 0.421
on the leaderboard (top 4% as of Feb 19th).
Run command:
$ neptune login
$ neptune send main.py --worker gcp-gpu-large --environment pytorch-0.2.0-gpu-py3 -- train_evaluate_predict_pipeline --pipeline_name unet_multitask
When training is completed, collect Kaggle submit from: /output/dsb/experiments/submission.csv
.
- Solution 1: U-Net
- Solution 2: Multi-output U-Net
- Solution 3: Improved Multi-output U-Net
- Solution 4: U-Net with weighted loss and morphological postprocessing
- Solution 5: U-Net specialists, faster processing, weighted loss function and improved validation