- This is the PyTorch implementation of Attention-guided Network for Ghost-free High Dynamic Range Imaging (CVPR 2019).
- The official code is at AHDRNet. However, there exists some problems in training and testing within the official implementation which are not solved.
- Python >= 3.7
- PyTorch >= 1.4.0
- opencv-python = 4.5.1
- imageio = 2.13.3
3. Quick Demo (Only for tiff format 48-depth images (same with the Kalantari Dataset) now, others in progress)
- Clone this repository:
git clone https://github.com/ytZhang99/AHDRNet-PyTorch.git
- Place the test image folders in
Test └── test_data ├── Name_A | ├── 1.tif | ├── 2.tif | ├── 3.tif | ├── exposure.txt | └── HDRImg.hdr (optional) └── Name_B
- Run the following command to test:
python main.py --test_only
The output images are placed in
- Place the training image folders in
Train └── train_data ├── Name_A | ├── 1.tif | ├── 2.tif | ├── 3.tif | ├── exposure.txt | └── HDRImg.hdr └── Name_B
- Modify the
main.shfile and run the following command to train:
Notice that the default setting of this program is implementing validation on the test dataset after training, you can modify
main.shto close the validation progress.
- The trained model is saved in
./ckp/, then you can test your own model:
python main.py --test_only --model latest.pth python main.py --test_only --model best_checkpoint.pth (This model is accessible with validation)