Git Product home page Git Product logo

dpa-net's Introduction

DPA-Net:Dual-path attention network for compressed sensing image reconstruction

@article{sun2020dual,
  title={Dual-path attention network for compressed sensing image reconstruction},
  author={Sun, Yubao and Chen, Jiwei and Liu, Qingshan and Liu, Bo and Guo, Guodong},
  journal={IEEE Transactions on Image Processing},
  volume={29},
  pages={9482--9495},
  year={2020},
  publisher={IEEE}
}

Dataset

You can use crop.m to generate training data.

Use trained model

You can download the trained model from Google Drive. Then put them in the file folder--checkpoint.

"g_GRAY_1.npz" is only the model of structure-path in the network after first step training. If you want to test the whole network including dual-path, "g_GRAY_2.npz" should be in the checkpoint folder.

Dependencise

  • Python 3.6
  • Tensorflow 1.10.0
  • Tensorlayer 1.11.1
  • numpy
  • skiamge

Training

$ python DPA-Net.py

Testing

$ puthon eval_DPA.py

Others

First:

You can change the setting in config.py, such as MR(measurement ratio) and so on. The files of trained model parameter and train data will be uploaded soon.

Second:

Maybe, some warnings or errors will arise when you run the code because of my careless. If you can not cover it, just give me feedback. I will solve it as soon as possible.

New

If you want to simplify the generation of y from the image, you can modify the code:

Firstly, reshape the measurement matrix:

phi = np.reshape(A, (block_size, block_size, 1, size_y))

Secondly, use the function "tf.nn.conv2d" to realize the samling(measurement), for example:

y_meas = tf.nn.conv2d(t_target_image, A, (1, block_size, block_size, 1), padding='SAME')

This can be modified in "train.py" and "model.py" where use the "for" to generate the y. It is time-consuming to use the "for". So if you use the new code, it will be faster. Because it will be processed in GPU instead of CPU.

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.