lhf12278 / GRFusion

The code of "Generation and Reconmbination for Multifocus Image Fusion with Free Number of Inputs".

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generation and Reconmbination for Multifocus Image Fusion with Free Number of Inputs


Pipeline

Abstract

Recommended Environment

We strongly recommend that you use Conda as a package manager.

# create virtual environment
conda create -n GRFusion python=3.10
conda activate GRFusion
pip install -r requirements.txt

Prepare Datasets

Download the Lytro dataset from here, MFI-WHU dataset from here and MFFW dataset form here

Organize them in your dataset root dir folder as follows:

|-- your dataset root dir/
|   |-- <Train>/
|       |-- 001.png
|       |-- 002.png
|       |-- 003.png
|
|   |-- <Test>/
|       |-- Lytro
|            |-- lytro-01-A.jpg
|            |-- lytro-01-B.jpg
|            |-- Triple Series
|                |-- lytro-01-A.jpg
|                |-- lytro-01-B.jpg
|                |-- lytro-01-C.jpg
|       |-- MFI-WHU
|            |-- MFI-WHU_01_A.jpg
|            |-- MFI-WHU_01_B.jpg
|       |-- MFFW
|            |-- MFFW2
|                |-- MFFW2_01_A.jpg
|                |-- MFFW2_01_B.jpg
|            |-- MFFW3
|                |-- MFFW3_01_A.jpg
|                |-- MFFW3_01_B.jpg
|                |-- MFFW3_01_C.jpg

To Train

The training code for both the focus detection and fusion parts is provided here.

If you want to train the focus detection network : Run "CUDA_VISIBLE_DEVICES=0 python train_fd.py".

If you want to train the fusion network : Run "CUDA_VISIBLE_DEVICES=0 python train_fusion.py".

To Test

The test code for both the focus detection and fusion parts is also provided here.

If you want to test the focus detection network : Run "CUDA_VISIBLE_DEVICES=0 python test_fd.py".

If you want to test the fusion network : Run "CUDA_VISIBLE_DEVICES=0 python test_fusion.py".

Our results

Abstract

Contact

If you have any questions, please feel free to contact me. (wd97@stu.kust.edu.cn).

About

The code of "Generation and Reconmbination for Multifocus Image Fusion with Free Number of Inputs".


Languages

Language:Python 100.0%