All Projects → lRomul → argus-tgs-salt

lRomul / argus-tgs-salt

Licence: MIT license
Kaggle | 14th place solution for TGS Salt Identification Challenge

Programming Languages

python
139335 projects - #7 most used programming language
Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to argus-tgs-salt

Segmentation
Tensorflow implementation : U-net and FCN with global convolution
Stars: ✭ 101 (+38.36%)
Mutual labels:  kaggle, kaggle-competition, segmentation
Kaggle Competitions
There are plenty of courses and tutorials that can help you learn machine learning from scratch but here in GitHub, I want to solve some Kaggle competitions as a comprehensive workflow with python packages. After reading, you can use this workflow to solve other real problems and use it as a template.
Stars: ✭ 86 (+17.81%)
Mutual labels:  kaggle, kaggle-competition
Kaggle Notebooks
Sample notebooks for Kaggle competitions
Stars: ✭ 77 (+5.48%)
Mutual labels:  kaggle, kaggle-competition
Kaggle Airbnb Recruiting New User Bookings
2nd Place Solution in Kaggle Airbnb New User Bookings competition
Stars: ✭ 118 (+61.64%)
Mutual labels:  kaggle, kaggle-competition
Ml competition platform
Kaggle-like machine learning competition platform
Stars: ✭ 42 (-42.47%)
Mutual labels:  kaggle, kaggle-competition
Data Science Bowl 2018
End-to-end one-class instance segmentation based on U-Net architecture for Data Science Bowl 2018 in Kaggle
Stars: ✭ 56 (-23.29%)
Mutual labels:  kaggle, segmentation
Deep Learning Boot Camp
A community run, 5-day PyTorch Deep Learning Bootcamp
Stars: ✭ 1,270 (+1639.73%)
Mutual labels:  kaggle, kaggle-competition
Kaggle Homedepot
3rd Place Solution for HomeDepot Product Search Results Relevance Competition on Kaggle.
Stars: ✭ 452 (+519.18%)
Mutual labels:  kaggle, kaggle-competition
Machine Learning Workflow With Python
This is a comprehensive ML techniques with python: Define the Problem- Specify Inputs & Outputs- Data Collection- Exploratory data analysis -Data Preprocessing- Model Design- Training- Evaluation
Stars: ✭ 157 (+115.07%)
Mutual labels:  kaggle, kaggle-competition
Open Solution Data Science Bowl 2018
Open solution to the Data Science Bowl 2018
Stars: ✭ 159 (+117.81%)
Mutual labels:  kaggle, segmentation
digit recognizer
CNN digit recognizer implemented in Keras Notebook, Kaggle/MNIST (0.995).
Stars: ✭ 27 (-63.01%)
Mutual labels:  kaggle, kaggle-competition
Kaggle Web Traffic Time Series Forecasting
Solution to Kaggle - Web Traffic Time Series Forecasting
Stars: ✭ 29 (-60.27%)
Mutual labels:  kaggle, kaggle-competition
Pytorch Toolbelt
PyTorch extensions for fast R&D prototyping and Kaggle farming
Stars: ✭ 942 (+1190.41%)
Mutual labels:  kaggle, segmentation
My Journey In The Data Science World
📢 Ready to learn or review your knowledge!
Stars: ✭ 1,175 (+1509.59%)
Mutual labels:  kaggle, kaggle-competition
Data Science Competitions
Goal of this repo is to provide the solutions of all Data Science Competitions(Kaggle, Data Hack, Machine Hack, Driven Data etc...).
Stars: ✭ 572 (+683.56%)
Mutual labels:  kaggle, kaggle-competition
Data-Science-Hackathon-And-Competition
Grandmaster in MachineHack (3rd Rank Best) | Top 70 in AnalyticsVidya & Zindi | Expert at Kaggle | Hack AI
Stars: ✭ 165 (+126.03%)
Mutual labels:  kaggle, kaggle-competition
Pytorch Kaggle Starter
Pytorch starter kit for Kaggle competitions
Stars: ✭ 268 (+267.12%)
Mutual labels:  kaggle, kaggle-competition
Amazon Forest Computer Vision
Amazon Forest Computer Vision: Satellite Image tagging code using PyTorch / Keras with lots of PyTorch tricks
Stars: ✭ 346 (+373.97%)
Mutual labels:  kaggle, kaggle-competition
Open Solution Toxic Comments
Open solution to the Toxic Comment Classification Challenge
Stars: ✭ 154 (+110.96%)
Mutual labels:  kaggle, kaggle-competition
Kaggle airbus ship detection
Kaggle airbus ship detection challenge 21st solution
Stars: ✭ 238 (+226.03%)
Mutual labels:  kaggle, segmentation

Argus solution TGS Salt Identification Challenge

Source code of 14th place solution for TGS Salt Identification Challenge by Argus team (Ruslan Baikulov, Nikolay Falaleev).

Solution

We used PyTorch 0.4.1 with framework Argus simplifies the experiments with different architectures and allows to focus on deep learning trials rather than coding neural networks training and testing scripts.

Data preprocessing

The original images with size 101x101 px padded to 148x148 px with biharmonic inpaint from skimage package. This “padding” performed better for us than reflection or zero padding. Random crop to the input size 128x128 px, flip in the left-right direction and random linear color augmentation (for brightness and contrast adjustment) were applied.

Model design:

General scheme of the neural networks architectures

After a series of experiments, we ended with a U-Net like architecture with an SE-ResNeXt50 encoder. Standard decoder blocks enriched with custom-built FPN-style layers. In addition to the segmentation task, an additional classification branch (empty/contains salt tile) added into basic network architecture.

Models Training

Loss: Lovasz hinge loss with elu + 1
Optimizer: SGD with LR 0.01, momentum 0.9, weight_decay 0.0001
Train stages:

  1. EarlyStopping with patience 100; ReduceLROnPlateau with patience=30, factor=0.64, min_lr=1e-8; Lovasz * 0.75 + BCE empty * 0.25.
  2. Cosine annealing learning rate 300 epochs, 50 per cycle; Lovasz * 0.5 + BCE empty * 0.5.

Post-processing

Averaged results of two training used in the final submission: SE-ResNeXt50 on 5 random folds. SE-ResNeXt50 on 6 mosaic based folds (similar mosaics tiles placed in the same fold) without the second training stage.

Mosaics-based post-processing. We used the Vicens Gaitan’s Kernel but not on a raw input dataset, but on images after histogram matching to an average histogram, which helps us to assembly more tiles into mosaics. In addition to extrapolating tiles with vertical masks from train subset on neighbouring tiles, we performed an automatic detection of small missed corners and inpaint them by a polygon with a smooth-curve boundary. Holes in masks were also filled with OpenCV.

Results

Sample results image

Example of the whole mosaic post-processing. Green/blue - salt/empty regions from the train dataset; red - predicted mask; yellow - inpainted by the post-processing (used in the final submission).

The results are based on a step-by-step improvement of the pipeline, postprocessing, and fair cross-validation. Finally, results were achieved by carefully selected architectures without heavy ensembles of neural nets and second order models. Reasonable cross-validation with the evaluation metric prevented us from overfitting on the public leaderboard.

For more details on data pre- and post-processing, as well as conducted experiments with neural nets, check out a blog post.

Quick setup and start

Requirements

The provided dockerfile is supplied to build image with cuda support and cudnn.

Preparations

  • Clone the repo, build docker image.

    git clone https://github.com/lRomul/argus-tgs-salt.git
    cd argus-tgs-salt
    make build
  • Download and extract dataset

    • extract train images and masks into data/train/
    • extract test images into data/test/
  • The folder structure should be:

    argus-tgs-salt
    ├── data
    │   ├── mosaic
    │   ├── test
    │   └── train
    ├── docker
    ├── mosaic
    ├── notebooks
    ├── pipeline
    ├── src
    └── unused
    

Run

  • Run docker container
make run
  • Start full pipeline with postprocessing
./run_pipeline.sh

The final submission file will be at:

data/predictions/mean-005-0.4/submission.csv
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].