-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Bug] FormatShape bug for optical flow #2630
Comments
For the normalization of optical flow, I think we can implement it as follows: clip_len = 5
format_shape='NCHW_flow'
model = dict(
type='Recognizer2D',
backbone=dict(...),
cls_head=dict(...),
data_preprocessor=dict(
type='ActionDataPreprocessor',
mean=[128, 128] *clip_len,
std=[128, 128] * clip_len,
format_shape=format_shape))
train_pipeline = [
dict(type='SampleFrames', clip_len=clip_len, frame_interval=1, num_clips=3),
....
dict(type='FormatShape', input_format=format_shape),
...
] |
Since the |
of course, if you have any better ideas to process the optical flow, feel free to let me know. Thank u, bro! |
@Dai-Wenxun I am a little confused about the As for a better idea, I think my PR #2631 is simple and effective. To work with optical flows, we can just simply set the FormatShape as |
Branch
main branch (1.x version, such as
v1.0.0
, ordev-1.x
branch)Prerequisite
Environment
N/A
Describe the bug
As the Normalization operation now is moved from the pipeline to the data preprocessor. The necessary processing step for optical flows, which is originally in the
Normalize
pipeline in the older version, is missing:In older version, the
Normalize
pipeline stacks theflow_x
andflow_y
:mmaction2/mmaction/datasets/pipelines/augmentations.py
Lines 1207 to 1232 in 02d5d9b
In
1.x
version, the stacking operation is lost as theNormalize
pipeline is no longer used. Causing the dimension error inFormatShape
:Reproduces the problem - code sample
No response
Reproduces the problem - command or script
No response
Reproduces the problem - error message
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: