Compare commits

..

No commits in common. 'ecaca976b1fe7e7e5ec86fae1b94273d6dbba276' and '8ac2acba856a0827eb57a6a0ac7f4156bebb48fc' have entirely different histories.

@ -1,5 +1,5 @@
# Stripformer (ECCV 2022) # Stripformer: Strip Transformer for Fast Image Deblurring (ECCV 2022 Oral)
Pytorch Implementation of "[Stripformer: Strip Transformer for Fast Image Deblurring](https://arxiv.org/abs/2204.04627)" (ECCV 2022 Oral) Pytorch Implementation of "[Stripformer: Strip Transformer for Fast Image Deblurring](https://arxiv.org/abs/2204.04627)"
<img src="./Figure/Intra_Inter.PNG" width = "800" height = "200" div align=center /> <img src="./Figure/Intra_Inter.PNG" width = "800" height = "200" div align=center />
@ -19,41 +19,41 @@ pip install albumentations==1.1.0
## Training ## Training
Download "[GoPro](https://drive.google.com/drive/folders/1BdV2l7A5MRXLWszGonMxR88eV27geb_n?usp=sharing)" dataset into './datasets' </br> Download "[GoPro](https://drive.google.com/drive/folders/1BdV2l7A5MRXLWszGonMxR88eV27geb_n?usp=sharing)" dataset into './datasets' </br>
For example: './datasets/GoPro' For example: './datasets/GoPro/train/blur/\*\*/\*.png'
**We train our Stripformer in two stages:** </br> **We train our Stripformer in two stages:** </br>
* We pre-train Stripformer for 3000 epochs with patch size 256x256 </br> * We pre-train Stripformer for 3000 epochs with patch size 256x256 </br>
* Run the following command * Run the following commands
``` ```
python train_Stripformer_pretrained.py python train_Stripformer_pretrained.py
``` ```
* After 3000 epochs, we keep training Stripformer for 1000 epochs with patch size 512x512 </br> * After 3000 epochs, we keep training Stripformer for 1000 epochs with patch size 512x512 </br>
* Run the following command * Run the following commands
``` ```
python train_Stripformer_gopro.py python train_Stripformer_gopro.py
``` ```
## Testing ## Testing
For reproducing our results on GoPro and HIDE datasets, download "[Stripformer_gopro.pth](https://drive.google.com/drive/folders/1YcIwqlgWQw_dhy_h0fqZlnKGptq1eVjZ?usp=sharing)" For reproducing our results on GoPro and HIDE dataset, download the "[Stripformer_gopro.pth](https://drive.google.com/drive/folders/1YcIwqlgWQw_dhy_h0fqZlnKGptq1eVjZ?usp=sharing)"
For reproducing our results on RealBlur dataset, download "[Stripformer_realblur_J.pth](https://drive.google.com/drive/folders/1YcIwqlgWQw_dhy_h0fqZlnKGptq1eVjZ?usp=sharing)" and "[Stripformer_realblur_R.pth](https://drive.google.com/drive/folders/1YcIwqlgWQw_dhy_h0fqZlnKGptq1eVjZ?usp=sharing)" For reproducing our results on RealBlur dataset, download "[Stripformer_realblur_J.pth](https://drive.google.com/drive/folders/1YcIwqlgWQw_dhy_h0fqZlnKGptq1eVjZ?usp=sharing)" and "[Stripformer_realblur_R.pth](https://drive.google.com/drive/folders/1YcIwqlgWQw_dhy_h0fqZlnKGptq1eVjZ?usp=sharing)"
**For testing on GoPro dataset** </br> **For testing on GoPro dataset** </br>
* Download "[GoPro](https://drive.google.com/drive/folders/1BdV2l7A5MRXLWszGonMxR88eV27geb_n?usp=sharing)" full dataset or test set into './datasets' (For example: './datasets/GoPro/test') </br> * Download "[GoPro](https://drive.google.com/drive/folders/1BdV2l7A5MRXLWszGonMxR88eV27geb_n?usp=sharing)" full dataset or test set into './datasets' (For example: './datasets/GoPro/test/blur/\*\*/\*.png') </br>
* Run the following command * Run the following commands
``` ```
python predict_GoPro_test_results.py --weights_path ./Stripformer_gopro.pth python predict_GoPro_test_results.py --weights_path ./Stripformer_gopro.pth
``` ```
**For testing on HIDE dataset** </br> **For testing on HIDE dataset** </br>
* Download "[HIDE](https://drive.google.com/drive/folders/1BdV2l7A5MRXLWszGonMxR88eV27geb_n?usp=sharing)" into './datasets' </br> * Download "[HIDE](https://drive.google.com/drive/folders/1BdV2l7A5MRXLWszGonMxR88eV27geb_n?usp=sharing)" into './datasets' </br>
* Run the following command * Run the following commands
``` ```
python predict_HIDE_results.py --weights_path ./Stripformer_gopro.pth python predict_HIDE_results.py --weights_path ./Stripformer_gopro.pth
``` ```
**For testing on RealBlur test sets** </br> **For testing on RealBlur test sets** </br>
* Download "[RealBlur_J](https://drive.google.com/drive/folders/1BdV2l7A5MRXLWszGonMxR88eV27geb_n?usp=sharing)" and "[RealBlur_R](https://drive.google.com/drive/folders/1BdV2l7A5MRXLWszGonMxR88eV27geb_n?usp=sharing)" into './datasets' </br> * Download "[RealBlur_J](https://drive.google.com/drive/folders/1BdV2l7A5MRXLWszGonMxR88eV27geb_n?usp=sharing)" and "[RealBlur_R](https://drive.google.com/drive/folders/1BdV2l7A5MRXLWszGonMxR88eV27geb_n?usp=sharing)" into './datasets' </br>
* Run the following command * Run the following commands
``` ```
python predict_RealBlur_J_test_results.py --weights_path ./Stripformer_realblur_J.pth python predict_RealBlur_J_test_results.py --weights_path ./Stripformer_realblur_J.pth
``` ```
@ -82,12 +82,3 @@ python evaluate_RealBlur_J.py
``` ```
python evaluate_RealBlur_R.py python evaluate_RealBlur_R.py
``` ```
## Citation
```
@inproceedings{Tsai2022Stripformer,
author = {Fu-Jen Tsai and Yan-Tsung Peng and Yen-Yu Lin and Chung-Chi Tsai and Chia-Wen Lin},
title = {Stripformer: Strip Transformer for Fast Image Deblurring},
booktitle = {ECCV},
year = {2022}
}
```

@ -1,37 +0,0 @@
Copyright (c) 2022 Fu-Jen Tsai
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software with non-commercial usage, including non-commercial usage
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
--------------------------- LICENSE FOR DeblurGANv2 --------------------------------
BSD License
For DeblurGANv2 software
Copyright (c) 2019, Orest Kupyn, Tetiana Martyniuk, Junru Wu and Zhangyang Wang
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
Loading…
Cancel
Save