VITA-Group / EnlightenGAN

[IEEE TIP] "EnlightenGAN: Deep Light Enhancement without Paired Supervision" by Yifan Jiang, Xinyu Gong, Ding Liu, Yu Cheng, Chen Fang, Xiaohui Shen, Jianchao Yang, Pan Zhou, Zhangyang Wang
Other
890 stars 198 forks source link

Attention map calculation #59

Closed sadik1111 closed 4 years ago

sadik1111 commented 4 years ago

In the process of attention map calculation, why should all channel be added with 1 and divided with 2?Are these operation desinged to norm the value of pixel to [0,1]?Thanks for any help r,g,b = input_img[0]+1, input_img[1]+1, input_img[2]+1 A_gray = 1. - (0.299*r+0.587*g+0.114*b)/2.

yifanjiang19 commented 4 years ago

yes, [-1, 1] to [0,1]

sadik1111 commented 4 years ago

yes, [-1, 1] to [0,1]

thanks for your answer