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?
(Option 1) A more descriptive name than ActionDataPreprocessor.format_shape, such as expected_shape_format or shape_format might better convey its purpose and reduce potential confusion.
(Option 2) Deprecating the Transform.FormatShape and making the ActionDataPreprocessor do the shape formatting job.
What is the problem this feature will solve?
The argument name
format_shape
inActionDataPreprocessor
can be misleading: https://github.com/open-mmlab/mmaction2/blob/4d6c93474730cad2f25e51109adcf96824efc7a3/mmaction/models/data_preprocessors/data_preprocessor.py#L30-L37This name is identical to
Transforms.FormatShape
: https://github.com/open-mmlab/mmaction2/blob/4d6c93474730cad2f25e51109adcf96824efc7a3/mmaction/datasets/transforms/formatting.py#L200-L204However, 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?
ActionDataPreprocessor.format_shape
, such asexpected_shape_format
orshape_format
might better convey its purpose and reduce potential confusion.Transform.FormatShape
and making theActionDataPreprocessor
do the shape formatting job.What alternatives have you considered?
No response