Skip to content

Provide ability to override map_items=True set by default for Dataset #7646

Closed
@surajpaib

Description

@surajpaib

Is your feature request related to a problem? Please describe.

return apply_transform(self.transform, data_i) if self.transform is not None else data_i

In the Dataset class, for any transform applied, map_items=True is the default behavior in the apply_transform helper function.

I'm trying to use some other datasets in MONAI which have an (input, target) tuple as the return from _getitem_. When I superclass this with the MONAI dataset, the tuple is unpacked, and the input and target are operated on as different items in the dataset.

Describe the solution you'd like
Ability to provide kwargs to Dataset that propagates to the apply_transform function, allowing disabling this mapping behavior.

Describe alternatives you've considered
Not using the Dataset class.

Additional context
A lot of datasets have the (input, target) behavior, and it would be useful to be able to wrap these in MONAI dataset classes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions