This is the code for kaggle 2018 data science bowl nuclei segmentation (https://www.kaggle.com/c/data-science-bowl-2018). We will use UNet to perform the segmentation task.
- numpy
- scipy
- tqdm
- pillow
- scikit-image
- pytorch
- pandas
-
Download the dataset from Kaggle (https://www.kaggle.com/c/data-science-bowl-2018/data).
-
Create two folders called combined and testing_data. Run script utils.py to prepare training image and testing image, the prepared image will be inside combined and testing_data folder.
-
In class Option under script utils.py, set is_train = True and adjust three dirs and other parameters.
-
Run script train.py. The model will be saved under folder checkpoint.
-
When making prediction using testing data, set train=False in utils.py, and run script train.py again. The prediction masks will be saved to the folder specified in Option class under utils.py, and the run-length-encoding csv file will be saved in current folder.