Giter Club home page Giter Club logo

open-solution-salt-identification's Introduction

TGS Salt Identification Challenge

license

This is an open solution to the TGS Salt Identification Challenge. Check Kaggle forum and participate in the discussions!

Our goals

We are building entirely open solution to this competition. Specifically:

  1. Learning from the process - updates about new ideas, code and experiments is the best way to learn data science. Our activity is especially useful for people who wants to enter the competition, but lack appropriate experience.
  2. Encourage more Kagglers to start working on this competition.
  3. Deliver open source solution with no strings attached. Code is available on our GitHub repository ๐Ÿ’ป. This solution should establish solid benchmark, as well as provide good base for your custom ideas and experiments. We care about clean code ๐Ÿ˜ƒ
  4. We are opening our experiments as well: everybody can have live preview on our experiments, parameters, code, etc. Check: TGS Salt Identification Challenge ๐Ÿ“ˆ or screen below.
Train and validation monitor ๐Ÿ“Š
training monitor

Our solutions so far

link to code CV LB
solution 1 0.413 0.745
solution 2 0.794 0.798
solution 3 0.807 0.801
solution 4 0.802 0.809
solution 5 0.804 0.813
solution 6 0.812 0.820

Disclaimer

In this open source solution you will find references to the neptune.ml. It is free platform for community Users, which we use daily to keep track of our experiments. Please note that using neptune.ml is not necessary to proceed with this solution. You may run it as plain Python script ๐Ÿ.

How to start?

You can jump start your participation in the competition by using our starter pack. Installation instruction below will guide you through the setup.

Installation

  1. Clone repository and install requirements (use Python3.5) pip3 install -r requirements.txt
  2. Register to the neptune.ml (if you wish to use it)
  3. Run experiment based on U-Net. See instrution below:

Start experiment in the cloud

neptune account login

Create project say Salt-Detection (SAL)

Go to neptune.yaml and change:

project: USERNAME/PROJECT_NAME

to your username and project name

Prepare metadata. Change the execution function in the main.py:

if __name__ == '__main__':
    prepare_metadata()

It only needs to be done once

neptune send --worker m-p100 \
--environment pytorch-0.3.1-gpu-py3 \
--config neptune.yaml \
main.py

They will be saved in the

  metadata_filepath: /output/metadata.csv

From now on we will load the metadata by changing the neptune.yaml

  metadata_filepath: /input/metadata.csv

and adding the path to the experiment that generated metadata say SAL-1 to every command --input/metadata.csv

Let's train the model by changing the command in the main.py to:

if __name__ == '__main__':
    train()
    evaluate()
    predict()

and running

neptune send --worker m-p100 \
--environment pytorch-0.3.1-gpu-py3 \
--config neptune.yaml \
--input /input/metadata.csv \
main.py 

You could have run it easily with both of those functions executed in the main.py :

if __name__ == '__main__':
    prepare_metadata()
    train()
    evaluate()
    predict()

but recalculating metadata every time you run your pipeline doesn't seem like a good idea :).

The model will be saved in the:

  experiment_dir: /output/experiment

and the submission.csv will be saved in /output/experiment/submission.csv

You can easily use models trained during one experiment in other experiments. For example when running evaluation we need to use the previous model folder in our experiment. We do that by:

changing main.py

  CLONE_EXPERIMENT_DIR_FROM = '/SAL-2/output/experiment'

and

if __name__ == '__main__':
    evaluate()
    predict()

and running the following command:

neptune send --worker m-p100 \
--environment pytorch-0.3.1-gpu-py3 \
--config neptune.yaml \
--input /input/metadata.csv \
--input /SAL-2 \
main.py

Start experiment on your local machine

Login to neptune if you want to use it

neptune account login

Prepare metadata Change `main.py':

if __name__ == '__main__':
    prepare_metadata()

run

neptune run --config neptune.yaml main.py prepare_metadata

Training and inference Change `main.py':

if __name__ == '__main__':
    train()
    evaluate()
    predict()
neptune run --config neptune.yaml main.py

You can always run it with pure python ๐Ÿ

python main.py 

Get involved

You are welcome to contribute your code and ideas to this open solution. To get started:

  1. Check competition project on GitHub to see what we are working on right now.
  2. Express your interest in paticular task by writing comment in this task, or by creating new one with your fresh idea.
  3. We will get back to you quickly in order to start working together.
  4. Check CONTRIBUTING for some more information.

User support

There are several ways to seek help:

  1. Kaggle discussion is our primary way of communication.
  2. Submit an issue directly in this repo.

open-solution-salt-identification's People

Contributors

jakubczakon avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.