Shortcuts

mmagic.datasets.transforms.get_masked_image

Module Contents

Classes

GetMaskedImage

Get masked image.

class mmagic.datasets.transforms.get_masked_image.GetMaskedImage(img_key='gt', mask_key='mask', out_key='img', zero_value=127.5)[source]

Bases: mmcv.transforms.base.BaseTransform

Get masked image.

Parameters
  • img_key (str) – Key for clean image. Default: ‘gt’.

  • mask_key (str) – Key for mask image. The mask shape should be (h, w, 1) while ‘1’ indicate holes and ‘0’ indicate valid regions. Default: ‘mask’.

  • img_key – Key for output image. Default: ‘img’.

  • zero_value (float) – Pixel value of masked area.

transform(results)[source]

transform function.

Parameters

results (dict) – A dict containing the necessary information and data for augmentation.

Returns

A dict containing the processed data and information.

Return type

dict

__repr__()[source]

Return repr(self).

Read the Docs v: latest
Versions
latest
stable
0.x
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.