Shortcuts

PILToNumpy

class mmpretrain.datasets.transforms.PILToNumpy(to_bgr=False, dtype=None)[source]

Convert img to numpy.ndarray.

Required Keys:

  • img

Modified Keys:

  • img

Parameters:
  • to_bgr (bool) – Whether to convert img to rgb. Defaults to True.

  • dtype (str, optional) – The dtype of the converted numpy array. Defaults to None.

transform(results)[source]

Method to convert img to numpy.ndarray.

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

Free document hosting provided by Read the Docs.