mmagic.datasets.transforms.values
¶
Module Contents¶
Classes¶
Copy the value of source keys to destination keys. |
|
Set value to destination keys. |
- class mmagic.datasets.transforms.values.CopyValues(src_keys, dst_keys)[source]¶
Bases:
mmcv.transforms.BaseTransform
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.
- class mmagic.datasets.transforms.values.SetValues(dictionary)[source]¶
Bases:
mmcv.transforms.BaseTransform
Set value to destination keys.
It does the following: results[key] = value
Added keys are the keys in the dictionary.
Required Keys:
None
Added or Modified Keys:
keys in the dictionary
- Parameters
dictionary (dict) – The dictionary to update.