Build dataset with multiple class masks for EndoCV 2020

I want to build a dataset for segmentation for EndoCV 2020 dataset. In this dataset, for example, image = abc.jpg, with 2 classes in this image. The corresponding masks are mask_1 = abc_class1.tif and ‘mask_2 = abc_class2.tif’. How can I build a dataset that PyTorch can train?

This tutorial might be a good starter which explains how to write a custom Dataset.

1 Like