waldo-seg / waldo

image-segmentation and text-localization
Apache License 2.0
13 stars 13 forks source link

enable segmentation on test data and generate image masks and submiss… #58

Closed YiwenShaoStephen closed 6 years ago

YiwenShaoStephen commented 6 years ago

changes including: (1) use kaggle instead of wget to download data. Previously I downloaded the data and uploaded it to amazon s3 for wget downloading. But it seems not obey the license since only kaggle users can download this data. In addition, we will need "kaggle" api for submitting results. So I changed it to kaggle here. kaggle can be easily installed by pip install kaggle. But we need to put our account info in ~/.kaggle as https://github.com/Kaggle/kaggle-api instructs. I haven't updated dependency-related stuff. I think we can finish it later. (2) now we can run segmentation on all test data (stage1_test) and get a run-length encoding file as the result. The segmentation results for each image is also stored on the disk thus we can better get an intuition on the quality of the segmentation.

TODO: There are actually three data splits in total for this competition: train, stage1_test, stage2_test. Previously we only download train (further split into train and val) and stage1_test. Both of these two parts are provided with a ground truth in a csv file format (same way as I store). Stage2_test is the final test data without ground truth accessible yet. We need to write our segmentation result in csv file format and submit it to their official competition website https://www.kaggle.com/c/data-science-bowl-2018/data or via kaggle competitions submit -c data-science-bowl-2018 -f submission.csv -m "Message". Stage2_test (3019) is also much larger compared to stage1_test (65). So for now I think we'd better use stage1_test to tune the segmenter or network stuff. In conclusion, if you want to see our final results and compare it with other submission on leadboard, just change --test-data data/stage1_test to --test-data data/stage2_test_final in run.sh, but it will take a quite long time (haven't done parallelization yet). Otherwise, if you want to tune the setup and do a quick test, you can use the default stage1_test. But for now, the scoring code is not finished yet, you can only see the encoded results and the visualized masks.

YiwenShaoStephen commented 6 years ago

@aarora8 @ChunChiehChang Now you can use WaldoDataset to get ground truth mask with mask=True option when you initialize it.

danpovey commented 6 years ago

merging this, if there outstanding issues you can merge them later.