Skip to content

Add 'channels_first' attribute to ImagePathField #1970

@leoll2

Description

@leoll2

The class ImageField, being a TensorField, exposes an attribute channels_first to indicate whether the tensor uses channels-first format (C, H, W), as opposed to channels-last (H, W, C).

However, ImagePathField does not have a similar parameter. It is in fact necessary to ensure that the image data gets loaded and returned with the correct layout to the user.

Example:

class ExSample(Sample):
    image: str = image_path_field(channels_first=True)

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions