Skip to content

Improved functionality for Oxford IIIT Pet data loader #8364

Open
@matlabninja

Description

@matlabninja

🚀 The feature

Add the following functionality to the Oxford IIIT Pet data loader

  1. Support binary classification of cat vs dog
  2. 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
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions