videogan icon indicating copy to clipboard operation
videogan copied to clipboard

About image normalization

Open 17Skye17 opened this issue 7 years ago • 2 comments

Hello,I read the original paper for VGAN, it says the authors normalize the images to [-1,1]. While I find in your tensorflow implement version, in founction:read_and_process_video,the normalization is:image batch * 2 - 1. So I wonder if this is specifically for the dataset you use?Or this is a common choice for various datasets. Thank you in advance!

17Skye17 avatar May 14 '18 07:05 17Skye17

Hey. So if you are talking about line 36, the images are initially in range [0,255.0]. When divided by 127.5, the range becomes [0,2] and then I subtract by 1 to make it [-1,1]. Hope this helps!

GV1028 avatar May 18 '18 00:05 GV1028

Thank you for reply. @GV1028 I got what you mean, I just think line 35 is werid, I guess the original video frames are in range [0,1],so they should be multiplied by 255 as to be range [0,255.0]. Is it true? : )

17Skye17 avatar May 18 '18 05:05 17Skye17