Shortcuts

PackClsInputs

class mmcls.datasets.transforms.PackClsInputs(meta_keys=('sample_idx', 'img_path', 'ori_shape', 'img_shape', 'scale_factor', 'flip', 'flip_direction'))[source]

Pack the inputs data for the classification.

Required Keys:

  • img

  • gt_label (optional)

  • *meta_keys (optional)

Deleted Keys:

All keys in the dict.

Added Keys:

Parameters

meta_keys (Sequence[str]) –

The meta keys to be saved in the metainfo of the packed data_samples. Defaults to a tuple includes keys:

  • sample_idx: The id of the image sample.

  • img_path: The path to the image file.

  • ori_shape: The original shape of the image as a tuple (H, W).

  • img_shape: The shape of the image after the pipeline as a tuple (H, W).

  • scale_factor: The scale factor between the resized image and the original image.

  • flip: A boolean indicating if image flip transform was used.

  • flip_direction: The flipping direction.

transform(results)[source]

Method to pack the input data.

Read the Docs v: 1.x
Versions
master
latest
1.x
dev-1.x
Downloads
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.