Shortcuts

PairedRandomCrop

class mmedit.datasets.transforms.PairedRandomCrop(gt_patch_size, lq_key='img', gt_key='gt')[source]

Paried random crop.

It crops a pair of img and gt images with corresponding locations. It also supports accepting img list and gt list. Required keys are “scale”, “lq_key”, and “gt_key”, added or modified keys are “lq_key” and “gt_key”.

Parameters
  • gt_patch_size (int) – cropped gt patch size.

  • lq_key (str) – Key of LQ img. Default: ‘img’.

  • gt_key (str) – Key of GT img. Default: ‘gt’.

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.