# This is official Pytorch implementation of "DRMF: Degradation-Robust Multi-Modality Image Fusion via Composable Diffusion Prior"

# Fast Testing
1. Downloading the [pre-trained model]() and placing them in **./experiments** (Due to policy limitations we are unable to provide download links. We will update the links as they become available.)
2. Running **Eval_Fusion.py** for testing the fusion model. (One can edit **./configs/Fusion.yml** to adapt to various fusion tasks and degradation types.)
3. Running **Eval_Restoration.py** for testing the DRCDMs. (One can edit **./configs/Restoration.yml** to adapt to various degradation types.)

# Training
## Training DRCDMs
1. Constructing pairs of degraded images and their corresponding high-quality version. (For example, '.\data\LOL\train\high' and '.\data\LOL\train\low' for low-light image enhancement)
2. Editing **./configs/Restoration.yml** to specify the dataset path and data type.
3. Running **Train_Restoration.py** for training the DRCDMs. 

## Training DPCM
1. Editing **./configs/Restoration.yml** to specify the dataset path and fusion type for training the DPCM.
2. Running **Train_Fusion.py** for training the DPCM.
* More details can be found in our paper.