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

about the third channel of flow #22

Closed
XiaoyuShi97 opened this issue Dec 4, 2021 · 2 comments
Closed

about the third channel of flow #22

XiaoyuShi97 opened this issue Dec 4, 2021 · 2 comments

Comments

@XiaoyuShi97
Copy link

Hi, to my understanding, flowl0 if of shape [H, W, 3], where the third channel indicates whether the flow at that position is valid. Specifically, mask_0 is used to track valid pixels after spatial transformation augmentation. However, I find that the target variable is always of two channels. So every time you use target[..., 2:3], you only get a numpy array of shape [H,W,0], which seems to be erroneous?

mask_0 = target[:,:,2:3].copy(); mask_0[mask_0==0]=np.nan

@gengshan-y
Copy link
Owner

Hi, ideally the target variable should be always 3-channel.

The spatial augmentation is called here, where the flowl0 variable is passed in as target. You may want to check whether flowl0 variable is 3-channel. If it's not can you report which dataset are you using?

@XiaoyuShi97
Copy link
Author

data[:,:,2] = 1

Sorry. I see that you add the third channel with all 1 when reading flow in. This should avoid the issue. Thx for your reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants