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
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
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".
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".
If you have any questions, please feel free to contact me. (wd97@stu.kust.edu.cn).