Shortcuts

GetMaskedImage

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

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

Read the Docs v: zyh/doc-notfound-extend
Versions
master
latest
stable
zyh-doc-notfound-extend
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.