Skip to content

Commit

Permalink
[fix] fix imgaug wrapper for dev1.x (#2024)
Browse files Browse the repository at this point in the history
  • Loading branch information
cir7 authored Nov 1, 2022
1 parent 81340a7 commit 6e8c14b
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit 6e8c14b

Please sign in to comment.