Define dataset class for Fully Convolutional Networks


I have a custom segmentation dataset. How do i define the dataset class for torchvision.models.segmentation.fcn_resnet50

I learned how to define the dataset class for Faster-RCNN from TorchVision Object Detection Finetuning Tutorial — PyTorch Tutorials 1.9.0+cu102 documentation

It would be helpful if someone could help me get started with defining dataset class and loading the data for torchvision.models.segmentation.fcn_resnet50

Thanks You.