Hey all,
I am doing image segmentation where the ground truth masks are JPG images, and the mask is red. I have only 2 classes. Loading this mask as-in gives me a CUDA error which google informs me is likely because the values in my tensor are larger than my number of classes (the tensor has a max of 85).
How can I process the mask to be only 0 or 1?
I am building my databunch like this:
src = (SegmentationItemList.from_folder(img_path)
.filter_by_func(filter_HE)
.split_by_folder(valid='test')
.label_from_func(get_y_fn, classes=codes)
)
data = (src.transform(get_transforms(), size=size, tfm_y=True)
.databunch(bs=bs)
.normalize(imagenet_stats))