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

Grayscale Attention Map Calculation #54

Closed DomhnallBoyle closed 4 years ago

DomhnallBoyle commented 4 years ago

Is this the code used to generate the grayscale attention map?

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.

Where was this formula derived from? It looks like some weighted/luminance based method

Thanks

yifanjiang19 commented 4 years ago

Yes and you can refer to this link: https://en.wikipedia.org/wiki/Grayscale