Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] fix imgaug wrapper for dev1.x #2024

Merged
merged 1 commit into from
Nov 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions mmaction/datasets/transforms/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,11 @@ def imgaug_builder(self, cfg):
raise TypeError(
f'type must be a str or valid type, but got {type(obj_type)}')

if 'children' in args:
args['children'] = [
self.imgaug_builder(child) for child in args['children']
]
for aug_list_key in ['children', 'then_list', 'else_list']:
if aug_list_key in args:
args[aug_list_key] = [
self.imgaug_builder(child) for child in args[aug_list_key]
]

return obj_cls(**args)

Expand Down