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
- Python 3.5+
numpy==1.16.1
opencv-python==3.4.5.20
pandas==0.23.4
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])
Usage:
python score_submission.py --submission_csv_path submission.csv --ground_truth_csv_path ./ground_truth.csv
from utils improt rle_encode, rle_to_string
rle_runs = rle_encode(mask)
rle_string = rle_to_string(rle_runs)
from utils improt rle_encode, rle_to_string
size = (720, 1280)
mask = rle_decode(rle_string, (720, 1280))
from utils import dice_score
score = dice_score(grount_truth, prediction)
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
.