Shortcuts

CopyValues

class mmedit.datasets.transforms.CopyValues(src_keys, dst_keys)[source]

Copy the value of source keys to destination keys.

# TODO Change to dict(dst=src)

It does the following: results[dst_key] = results[src_key] for (src_key, dst_key) in zip(src_keys, dst_keys).

Added keys are the keys in the attribute “dst_keys”.

Required Keys:

  • [SRC_KEYS]

Added Keys:

  • [DST_KEYS]

Parameters
  • src_keys (list[str]) – The source keys.

  • dst_keys (list[str]) – The destination keys.

transform(results)[source]

transform function.

Parameters

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

Returns

A dict with a key added/modified.

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.