Shortcuts

mmagic.datasets.transforms.aug_frames

Module Contents

Classes

MirrorSequence

Extend short sequences (e.g. Vimeo-90K) by mirroring the sequences.

TemporalReverse

Reverse frame lists for temporal augmentation.

class mmagic.datasets.transforms.aug_frames.MirrorSequence(keys)[源代码]

Bases: mmcv.transforms.BaseTransform

Extend short sequences (e.g. Vimeo-90K) by mirroring the sequences.

Given a sequence with N frames (x1, …, xN), extend the sequence to (x1, …, xN, xN, …, x1).

Required Keys:

  • [KEYS]

Modified Keys:

  • [KEYS]

参数

keys (list[str]) – The frame lists to be extended.

transform(results)[源代码]

transform function.

参数

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

返回

A dict containing the processed data and information.

返回类型

dict

__repr__()[源代码]

Return repr(self).

class mmagic.datasets.transforms.aug_frames.TemporalReverse(keys, reverse_ratio=0.5)[源代码]

Bases: mmcv.transforms.BaseTransform

Reverse frame lists for temporal augmentation.

Required keys are the keys in attributes “lq” and “gt”, added or modified keys are “lq”, “gt” and “reverse”.

参数
  • keys (list[str]) – The frame lists to be reversed.

  • reverse_ratio (float) – The probability to reverse the frame lists. Default: 0.5.

transform(results)[源代码]

transform function.

参数

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

返回

A dict containing the processed data and information.

返回类型

dict

__repr__()[源代码]

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.