- Python
- Scipy
- Pandas
- OS
- math
- opencv
Clone this project to your machine.
git clone https://github.com/lsmlovefm/GAMD-Net.git
cd Image_blur
Download blurred image metadata from dataset inside Imageblur/data
. Then place the image that needs to be blurred into imageblur/image
. It should be noted that the default image pixels are 740*580. You can use this method to combine clear images in Realblur and GoPro into blurry images.
Imageblur
├─ Imageblur
│ ├─ blur % blurred image
│ │ ├─ xxxx.jpg
│ │ ├─ ......
│ │
│ ├─ image % raw image
│ │ ├─ xxxx.jpg
│ │ ├─ ......
│
│ ├─ data % download from [this](https://drive.google.com/file/d/10inB3MHqycfK1awgBy13lNNyj1L8amvY/view?usp=drive_link)
python imageblur/imageblur.py
- Python
- Pytorch (1.4)
- scikit-image
- opencv-python
- Tensorboard
Clone this project to your machine.
git clone https://github.com/lsmlovefm/GAMD-Net.git
cd GAMD
Download blurred image metadata from IMU-blur inside GAMD/
.
GAMD
├─ trainingset
│ ├─ train
│ │ ├─ blur % 6680 image pairs
│ │ │ ├─ xxxx.png
│ │ │ ├─ ......
│ │ │
│ │ ├─ sharp
│ │ │ ├─ xxxx.png
│ │ │ ├─ ......
│ │
│ │ ├─ cp % control point heatmap
│ │ │ ├─ xxxx.png
│ │ │ ├─ ......
│ │
│ │ ├─ ep % endpoint heatmap
│ │ │ ├─ xxxx.png
│ │ │ ├─ ......
│ │
│ ├─ test % 1670 image pairs
│ │ ├─ ...... (same as train)
Train GAMD, run the command below:
python main.py --mode "train" --data_dir "training_set"
Model weights will be saved in results/model_name/weights
folder.
Test GAMD , run the command below:
python main.py --mode "test" --data dir "training_set" --test_model "best.pkl"
Model link: https://drive.google.com/file/d/1Z-Af3qCtzJZAoOyfDItCYDPssVs_Wx8S/view?usp=drive_link