Shortcuts

mmedit.utils.get_irregular_mask

mmedit.utils.get_irregular_mask(img_shape, area_ratio_range=(0.15, 0.5), **kwargs)[source]

Get irregular mask with the constraints in mask ratio.

Parameters
  • img_shape (tuple[int]) – Size of the image.

  • area_ratio_range (tuple(float)) – Contain the minimum and maximum area

  • Default (ratio.) – (0.15, 0.5).

Returns

Mask in the shape of (h, w, 1).

Return type

mask (np.ndarray)

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.