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

double concatenation of input image? #49

Closed
mhashas opened this issue Feb 2, 2022 · 2 comments
Closed

double concatenation of input image? #49

mhashas opened this issue Feb 2, 2022 · 2 comments

Comments

@mhashas
Copy link

mhashas commented Feb 2, 2022

https://github.com/MarcoForte/FBA_Matting/blob/master/networks/models.py#L208, here conv_out[-6] is conv_out[0], which is https://github.com/MarcoForte/FBA_Matting/blob/master/networks/models.py#L99 the actual image, so we're concatenating the image twice basically

am i correct or am i missing something?

@99991
Copy link

99991 commented Feb 2, 2022

One of the images is centered and normalized by ImageNet standard deviation and mean while the other image is in original [0, 1] RGB space. Since the encoder network has been pretrained on standardized images, the input image should be standardized, but it is not necessary for the decoder.

Not sure if image standardization actually makes a difference or if it is just cargo cult, but we are stuck with it now. My guess is that you could use any of those two images and it would work almost the same.

image_transformed_torch = normalise_image(

comparison

@mhashas
Copy link
Author

mhashas commented Feb 2, 2022

Thanks a lot for the clear response!

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