Code Monkey home page Code Monkey logo

rcan-tensorflow's Introduction

rcan-tensorflow

Image Super-Resolution Using Very Deep Residual Channel Attention Networks Implementation in Tensorflow

ECCV 2018 paper

Orig PyTorch Implementation

License: MIT Total alerts Language grade: Python

Introduction

This repo contains my implementation of RCAN (Residual Channel Attention Networks).

Here're the proposed architectures in the paper.

  • Channel Attention (CA) CA

  • Residual Channel Attention Block (RCAB) RCAB

  • Residual Channel Attention Network (RCAN), Residual Group (GP) RG

All images got from the paper

Dependencies

  • Python
  • Tensorflow 1.x
  • tqdm
  • h5py
  • scipy
  • cv2

DataSet

DataSet LR HR
DIV2K 800 (192x192) 800 (768x768)

Usage

training

# hyper-paramters in config.py, you can edit them!
$ python3 train.py --data_from [img or h5]

testing

$ python3 test.py --src_image sample.png --dst_image sample-upscaled.png

Results

  • OOM on my machine :(... I can't test my code, but maybe code runs fine.
Example\Resolution 192x192x3 image (sample) 768x768x3 image (generated)
Example1 (X4 scaled) img img

To-Do

  1. None

Author

HyeongChan Kim / @kozistr

rcan-tensorflow's People

Contributors

kozistr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rcan-tensorflow's Issues

training failed

Hello, I use your code to train the model using DIV2K, but can not get the training result, the output of the network is black image, my training loss is like:

[+] 28 epochs 23000 steps loss : 148.37326050 PSNR : -43.0488 SSIM : -0.0124
[+] 28 epochs 23100 steps loss : 157.56805420 PSNR : -44.0248 SSIM : -0.0029
[+] 29 epochs 23200 steps loss : 150.22140503 PSNR : -43.8336 SSIM : -0.0069
[+] 29 epochs 23300 steps loss : 131.76765442 PSNR : -42.0612 SSIM : 0.0020
[+] 29 epochs 23400 steps loss : 137.01979065 PSNR : -42.6417 SSIM : -0.0033
[+] 29 epochs 23500 steps loss : 139.48718262 PSNR : -42.9347 SSIM : -0.0040
[+] 29 epochs 23600 steps loss : 140.33860779 PSNR : -43.1099 SSIM : -0.0073
[+] 29 epochs 23700 steps loss : 137.87838745 PSNR : -43.3312 SSIM : -0.0022
[+] 29 epochs 23800 steps loss : 145.82002258 PSNR : -43.3227 SSIM : -0.0037
[+] 29 epochs 23900 steps loss : 154.25614929 PSNR : -44.0416 SSIM : -0.0016
[+] 30 epochs 24000 steps loss : 149.05319214 PSNR : -43.9319 SSIM : -0.0016
[+] 30 epochs 24100 steps loss : 154.17941284 PSNR : -44.0751 SSIM : -0.0096
[+] 30 epochs 24200 steps loss : 137.07835388 PSNR : -43.2535 SSIM : -0.0014
[+] 30 epochs 24300 steps loss : 156.63449097 PSNR : -44.3344 SSIM : 0.0001
[+] 30 epochs 24400 steps loss : 135.80091858 PSNR : -42.8577 SSIM : -0.0162
[+] 30 epochs 24500 steps loss : 138.67384338 PSNR : -43.0114 SSIM : 0.0011
[+] 30 epochs 24600 steps loss : 151.06549072 PSNR : -43.6310 SSIM : -0.0081
[+] 30 epochs 24700 steps loss : 158.61445618 PSNR : -44.2536 SSIM : -0.0010
[+] 31 epochs 24800 steps loss : 144.03248596 PSNR : -43.3128 SSIM : 0.0001

[image] generation failed

some kind of problems, model? or sth don't work at all...

I tried some tries for image scaling like scaling to [0,1], subtracting div2k_mean, etc.... (paper way, my way)

but all failed :( so it needs to be fixed in some way.

[image] augmentation

In the paper, 90, 180, 270 degree rotations are used for image augmentation.

  • rotation

[model] implements RCAN model

There're lots of modules like CA, etc... So, I'm gonna implement them one by one :)

  • CA (Channel Attention)
  • RCAB (Residual Channel Attention Block)
  • RG (Residual Group)
  • RCAN (Residual Channel Attention Network, final)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.