Giter Site home page Giter Site logo

keep-passion / sesf-fuse Goto Github PK

View Code? Open in Web Editor NEW
70.0 3.0 24.0 94.6 MB

SESF-Fuse: An Unsupervised Deep Model for Multi-Focus Image Fusion

License: GNU Lesser General Public License v2.1

Python 100.00%
multi-focus-image-fusion image-fusion multi-focus deep-learning unsupervised-learning autoencoder

sesf-fuse's Introduction

SESF-Fuse

SESF-Fuse: An Unsupervised Deep Model for Multi-Focus Image Fusion

Abstract

In this work, we propose an unsupervised deep learning model to address multi-focus image fusion problem. First, we train an encoder-decoder architecture in unsupervised manner to acquire deep feature of input images. And then we utilized those features and spatial frequency to measure activity level, which plays crucial role in multi-focus fusion task. The key point behind of proposed method is that only the objects within the depth-of-field (DOF) have sharp appearance in the photograph while other objects are likely to be blurred. In contrast to previous works, our method analysis sharp appearance in deep feature instead of original image. Experimental results demonstrate that the proposed method achieve the state-of-art fusion performance compared to existing 16 fusion methods in objective and subjective assessment.

Visualization

We show the visualization of fused result in next figure. The first row is near focused source image and the second row is far focused source image. The third row is decision map of our method and the final row is fused result. image

Branches Introduction

We provide the training and testing method of SESF-Fuse in this branch.
We provide a general image fusion framework in experiment branch, which include all the experiments in our paper. Besides, one can easily modify it for new experiment.

Requirements

Pytorch, Python3.6

Citation

If you use it successfully for your research please be so kind to cite the paper.

Ma, B., Zhu, Y., Yin, X. et al. SESF-Fuse: an unsupervised deep model for multi-focus image fusion. Neural Comput & Applic (2020). https://doi.org/10.1007/s00521-020-05358-9

Acknowledgement

The authors acknowledge the financial support from the National Key Research and Development Program of China (No. 2016YFB0700500).

Recommendation

Our new work GACN can be found at the paper and the code.

sesf-fuse's People

Contributors

keep-passion avatar mryyyyyyyyyyy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sesf-fuse's Issues

CUDA out of memory问题

安装依赖环境,也跑通了main.py,自带的图片也能融合。
但用自有的图片做融合时会出现下面的问题,自有图片大小为10几M,我认为是正常大小,但会出现以下问题。比如改用CPU,比如换更大显存的12G的GPU,试了几个方法都没有成功,有没有什么好的方法可以解决这个问题?
Traceback (most recent call last):
File "F:/github/SESF-Fuse/main.py", line 28, in
main(input_dir, output_dir)
File "F:/github/SESF-Fuse/main.py", line 21, in main
fused = sesf.fuse(img1, img2)
File "F:\github\SESF-Fuse\nets\sesf_net.py", line 55, in fuse
dm = self.model.forward("fuse", img1_tensor, img2_tensor, kernel_radius=self.kernel_radius)
File "F:\github\SESF-Fuse\nets\sesf_net.py", line 244, in forward
features_2 = self.features(img2)
File "D:\Anaconda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "D:\Anaconda\envs\pytorch\lib\site-packages\torch\nn\modules\container.py", line 92, in forward
input = module(input)
File "D:\Anaconda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "D:\Anaconda\envs\pytorch\lib\site-packages\torch\nn\modules\batchnorm.py", line 81, in forward
exponential_average_factor, self.eps)
File "D:\Anaconda\envs\pytorch\lib\site-packages\torch\nn\functional.py", line 1656, in batch_norm
training, momentum, eps, torch.backends.cudnn.enabled
RuntimeError: CUDA out of memory. Tried to allocate 1.19 GiB (GPU 0; 8.00 GiB total capacity; 6.10 GiB already allocated; 142.15 MiB free; 13.52 MiB cached)

另外如果是融合自己的数据集,是不是需要用自已的数据集替换COCO重新训练。

How to run this project ?

Hello , can you please tell us the requirement's needed to test our local set of images ?

what should be we do to run and test this project ? for further,research ideas , how can as a university student we can contribute ?
it would be really be very helpful , if you tell us about this ??

Thank you

自己数据融合的效果

image
你好,我直接用你的权重用到我的数据上,发现基本没有效果,那我应该重新训练吧,是不是一定要用coco数据集,用自己的数据集训练也可以吧,,另外我用densefuse还有点效果
image

我主要是用那张灰度图弥补rgb图像光线暗和阴影的地方

更多图片的融合

多谢你的论文和代码~
我想请您研发更多图片的multi-focus image fusion(MFIF), 类似与基恩士VHX系列, 希望您感兴趣!

关于代码的问题

你好,我用你们的程序训练了一下,不知道为什么最后得出的loss曲线很乱,也没有收敛,而且lssim_loss一直是0,求助

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.