Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
geopi1 committed Aug 23, 2020
1 parent 34aa317 commit 07e6cfe
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 10 deletions.
50 changes: 41 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Statistical Image Processing
# BLIND USRNET

A project in Statistical Image Processing.
Extension of [Deep unfolding network for image super-resolution](https://arxiv.org/pdf/2003.10428.pdf)
for Blind Super Resolution via [Kernel Estimation](https://arxiv.org/abs/1909.06581)

This code borrows heavily from [1] & [2], see the papers and code in the Acknowledgment section.

## Getting Started

Expand All @@ -15,30 +16,61 @@ git clone https://github.com/geopi1/Improved_USRNet.git
### Datasets
Download the Datasets (a bicubically downscaled version of DIV2K):

[link to mridata](https://drive.google.com/drive/folders/1wITaNr7KNg_keUnK4myKjUoKA4HGeONA?usp=sharing)
[Download DIV2K](https://drive.google.com/drive/folders/1wITaNr7KNg_keUnK4myKjUoKA4HGeONA?usp=sharing)
This link will download 2 folders:
* DIV2K_LR - the low resolution input
* DIV2K_HR_ds2 - Ground truth high resolution images

### Prerequisites
Tested and run on UBUNTU 18.04
Tested and run on:
* UBUNTU 18.04
* RTX 2080
* Nvidia driver 440.95.10
* cuda 10.1.243
* cudnn 7.6.5
* pytorch 1.5
* TF 1.14


1. Setup conda
```bash
conda env create -f env.yml
```
This will create a working environment named Blind_USRNet
2. Setup can also be performed with pip (virtual env) via the requirements.txt file
```bash
python3 -m venv Blind_USRNet
python -m venv Blind_USRNet
pip install -r requirements.txt
```
3. put images in right place

## Running Tests
## Testing
### Code
HOW TO RUN
```bash
python main.py
```
This will output 4 types of images to ./results:
* Default USRNet settings
* Default USRNet settings + Noise STD estimation
* Kernel estimated USRNet
* Kernel estimated USRNet + Noise STD estimation

Additionally, for each estimated image a side-by-side image with the LR version is saved with the degredation kernel (default or estimated)

### Numerical Evaluation
To calculate the numeric results on the whole dataset run:
```bash
python utils/get_results.py
```
This will calculate the mean PSNR and SSIM on the SR<->HR on all the results

### Logs
RESULTS
## Numerical Results
| Metric | Default | Default + Noise Est. | Kernel Est. | Kernel Est. + Noise Est. |
| ------------- | ------- | -------------------- | ----------- | ------------------------ |
| PSNR | | $1600 | | | |
| SSIM | | $12 | | | |

## Results
## Visual Results
![Default](./results/0002_x4_usrnetdefaultdefault_noise_LE.png)

![Ours](./results/0002_x4_usrnetKernelGANdefault_noise_LE.png)
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


# 'usrgan' | 'usrnet' | 'usrgan_tiny' | 'usrnet_tiny'
config = {'net': 'usrnet'}
config = {'net': 'usrgan'}
# list all images
ext = ['.png', '.jpg', 'jpeg']

Expand Down

0 comments on commit 07e6cfe

Please sign in to comment.