Skip to content
Starter Project for https://challengedata.ens.fr/
Jupyter Notebook Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
benchmark.ipynb
losses.py
make_rle_submission.py
sample_submission.csv
score_submission.py
utils.py

README.md

starter-challenge-data-2020

Info

This starter contains:

  • helper functions to convert to RLE (Run-length encoding) and back
  • a scoring function for Dice Score
  • a starter project using Keras to generate predictions

Requirements

  • Python 3.5+
  • numpy==1.16.1
  • opencv-python==3.4.5.20
  • pandas==0.23.4

Helpers

make_rle_submission.py

Usage:

python make_rle_submission.py --mask_folder ../data_challenge/output --output_path submission.csv --sample_csv_path sample_submission.csv

Note that the mask_folder must only contain .png files with binary masks (values in [0, 1] or [0, 255])

score_submission.py

Usage:

python score_submission.py --submission_csv_path submission.csv --ground_truth_csv_path ./ground_truth.csv

Util functions

RLE decode

from utils improt rle_encode, rle_to_string

rle_runs = rle_encode(mask)
rle_string = rle_to_string(rle_runs)

RLE encode

from utils improt rle_encode, rle_to_string

size = (720, 1280)
mask = rle_decode(rle_string, (720, 1280))

Dice score

from utils import dice_score

score = dice_score(grount_truth, prediction)

Starter project

Heavily inspired from the Kaggle Carvana's third place solution, it is a simple Keras sample allowing competitors to get started. Get started with benchmark.ipynb.

You can’t perform that action at this time.