open-mmlab / mmaction2

OpenMMLab's Next Generation Video Understanding Toolbox and Benchmark
https://mmaction2.readthedocs.io
Apache License 2.0
4.06k stars 1.2k forks source link

[Feature] Rename the confusing argument 'format_shape' in ActionDataPreprocessor #2773

Open makecent opened 6 months ago

makecent commented 6 months ago

What is the problem this feature will solve?

The argument name format_shape in ActionDataPreprocessor can be misleading: https://github.com/open-mmlab/mmaction2/blob/4d6c93474730cad2f25e51109adcf96824efc7a3/mmaction/models/data_preprocessors/data_preprocessor.py#L30-L37

This name is identical to Transforms.FormatShape: https://github.com/open-mmlab/mmaction2/blob/4d6c93474730cad2f25e51109adcf96824efc7a3/mmaction/datasets/transforms/formatting.py#L200-L204

However, the context and function of these two are distinctly different. The Transforms.FormatShape is aptly named as it actively formats the shape of data. In contrast, ActionDataPreprocessor.format_shape is essentially a descriptor indicating the required shape format (i.e., 'NCHW') for the data to be correctly processed by the preprocessor.

What is the feature?

What alternatives have you considered?

No response