hli1221 / imagefusion_densefuse

DenseFuse (IEEE TIP 2019, Highly Cited Paper) - Python 3.6, TensorFlow 1.8.0
244 stars 62 forks source link

Some interest about imsave in your code #4

Closed Keep-Passion closed 4 years ago

Keep-Passion commented 5 years ago

I found an interesting thing about your code. That is the add fusion is not fully adding. In the utils.save_images, the output method is scipy.misc.imsave. This function's output will rescale images to use the full (0,255) range. (Which can be seen in https://docs.scipy.org/doc/scipy-1.1.0/scipy-ref-1.1.0.pdf). That is, the fused result of 'lytro-2-A.jpg' and 'lytro-2-B.jpg' have the range of [-4, 516], and scipy.misc.imsave will rescale to [0,255], which make "add" strategy is not really add operation. Indeed, I have tried divided by 2 for image before send to densefuse net, the output is ok. And i have not tried average operation in your Strategy function. May be it will also work too. In my work, i always use skimage.io.imsave or cv2.imwrite which could ensure that the output value is really what i want, however, those could not simply handle your data output. What do you think about that?

swjtulinxi commented 4 years ago

original_imgs_path = list_images('D:/Database/Image_fusion_MSCOCO/original/'),, 你好请问,请问你这个训练文件夹怎么没有区分可将光和红外两个图片的文件夹啊,难道只用可见光训练??