Shortcuts

PackClsInputs

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

将输入数据整理成为用于分类任务的数据格式。

Required Keys:

  • img

  • gt_label (optional)

  • *meta_keys (optional)

Deleted Keys:

All keys in the dict.

Added Keys:

参数

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)[源代码]

Method to pack the input data.

Read the Docs v: mmcls-1.x
Versions
latest
stable
mmcls-1.x
mmcls-0.x
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.