Maluuba / GeNeVA

Code to train and evaluate the GeNeVA-GAN model for the GeNeVA task proposed in our ICCV 2019 paper "Tell, Draw, and Repeat: Generating and modifying images based on continual linguistic instruction"

Home Page:https://www.microsoft.com/en-us/research/project/generative-neural-visual-artist-geneva/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

data preprocessing, Convert BGR and RGB

terarachang opened this issue · comments

Hi,

This is a very minor issue.
(If I understand correctly, the background images are only used at the very first time step.)

Why not converting BGR to RGB in
https://github.com/Maluuba/GeNeVA/blob/master/geneva/data/codraw_dataset.py#L19 ,
as you have done in
https://github.com/Maluuba/GeNeVA/blob/master/geneva/data/codraw_dataset.py#L72 ?

Thanks!

the first link is doing HWC -> CHW (channel, height, width) format conversion
while the second one is doing inversion within the last dimension (channels) so that one does BGR <-> RGB conversion

Yes, I understand that.
I'm asking why not also applying BGR <-> RGB conversion to the background image (L19), like:

f['background'].value[..., ::-1].transpose(2, 0, 1)

I've run the code and it seems that when the background image is forwarded to the model, it's still in BGR.
Thanks!

ah so I will have to verify that when I get time but yes if that is the case this is a bug in the code and needs to be fixed. thanks for finding this out!