Description
🚀 The feature
Add the following functionality to the Oxford IIIT Pet data loader
- Support binary classification of cat vs dog
- With the segmentation target type, produce trimaps with class/background/don't care regions instead of target/background/don't care when the output is a tensor
- Support detection as a target type
Motivation, pitch
The Oxford IIIT Pet dataset is a fun dataset for trying out new things and for new practitioners to use to learn. These capabilities allow users to more easily use this dataset with detection and segmentation target types and to use the existing annotation for animal species (rather than breed) as a simpler problem to get started. I have created these capabilities on my local copy of torchvision, and I'm up for creating a PR if the community likes the enhancements. The individual proposed enhancements can be found in the links:
Binary cat v dog
Class labeled segmentation
Detection target type
All 3 enhancements
Alternatives
I thought a lot about the ability to write transforms to use with a dataset loader to accomplish this, but it was unclear to me how I could access some of the class members of the dataset loaders that were necessary.
Additional context
Demonstration of the new features can be found in the following notebooks:
Class-labeled segmentation maps and binary species classification training Deeplab V3
Detection target type training resnet 50 faster RCNN