Giter Site home page Giter Site logo

li-chongyi / water-net_code Goto Github PK

View Code? Open in Web Editor NEW
194.0 3.0 53.0 25.06 MB

Code repository for our paper Chongyi Li, Chunle Guo, Wenqi Ren, Runmin Cong, Junhui Hou, Sam Kwong, Dacheng Tao , "An Underwater Image Enhancement Benchmark Dataset and Beyond" IEEE TIP 2019.

Python 88.20% MATLAB 11.80%

water-net_code's Introduction

TensorFlow-Water-Net

This is the code of the implementation of the underwater image enhancement network (Water-Net) described in "Chongyi Li, Chunle Guo, Wenqi Ren, Runmin Cong, Junhui Hou, Sam Kwong, Dacheng Tao , IEEE TIP 2019". If you use our code or dataset for academic purposes, please consider citing our paper. Thanks.

Requirement

TensorFlow 1.x, Cuda 8.0, and Matlab. The missed vgg.py has been added. The requirement.txt has been added.

Usage

Testing

  1. Clone the repo
  2. Download the checkpoint from Dropbox: https://www.dropbox.com/s/fkoox0t3jwrf92q/checkpoint.rar?dl=0 or Baidu Cloud: https://pan.baidu.com/s/1aWckT66dWbB0-h1DJxIUsg
  3. Generate the preprocessing data by using the "generate_test_data.m" in folder named generate_test_data (Also, there is a modified code that includes WB, HE and GC in Python code without a need for preprocessing by MATLAB. Thanks a lot, Branimir Ambrekovic [email protected]. Branimir also upgraded it to work with TF2.0. You can find the modified code in folder named testing_code_by_Branimir Ambrekovic. More details can be found in B's codes.)
  4. Put the inputs to corresponding folders (raw images to "test_real", WB images to "wb_real", GC images to "gc_real", HE images to "ce_real")
  5. Python main_test.py
  6. Find the result in "test_real"

Training

  1. Clone the repo
  2. Download the VGG-pretrained model from Dropbox: https://drive.google.com/open?id=1asWe_rCduu6f09uiAz_aEP4KAiuoVSRS or Baidu Cloud: https://pan.baidu.com/s/1seDVBooFkmaJ6qF5kuAIsQ (Password: c0nj) (It's preparing for perception loss.)
  3. Set the network parameters, including learning rate, batch, weights of losses, etc., according to the paper
  4. Generate the preprocessing training data by using the "generate_training_data.m" in folder named generate_test_data
  5. Put the training data to corresponding folders (raw images to "input_train", WB images to "input_wb_train", GC images to "input_gc_train", HE images to "input_ce_train", Ground Truth images to "gt_train"); We randomly select the training data from our released dataset. The performance of different training data is almost same
  6. In this code, you can add validation data by preprocessing your validation data (with GT) by the "generate_validation_data.m" in folder named generate_test_data, then put them to the corresponding folders (raw images to "input_test", WB images to "input_wb_test", GC images to "input_gc_test", HE images to "input_ce_test", Ground Truth images to "gt_test")
  7. For your convenience, we provide a set of training and testing data. You can find them by unziping "a set of training and testing data". However, the training data and testing data are diffrent from those used in our paper.
  8. Python main_.py
  9. Find checkpoint in the ./checkpoint/coarse_112

Contact Us

If you have any questions, please contact us ([email protected] or [email protected]).

water-net_code's People

Contributors

li-chongyi 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  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

water-net_code's Issues

Metrics

If convenient, can you share the metric code (UCIQE UICM) to calculate the figs.

metrics code

When I tried your work on my own computer, I got a value like 22.3476 as a PSNR value. I wonder if there is a problem with the metric code I have. Could you please share the metric code you are using?

Error while training the data

Hi All,

I am getting error while training the data. The error says "Loading Failed".
In the current code of model_train, I am trying not to use VGG as background.

Can it be the reason for getting the error?

Please help me to resolve the issue.

The model is not getting trained

Hi All,

The model is not getting trained. Everytime an error is raised :Loading Failed.

Can you please help me to point out the error in the training file?

Is there any specific folder in which the training images needs to be kept. Please let me know its urgent

How can I trian and test with the original image size?

原始代码给出的一组预处理后的图像用于训练,预处理的图像大小是112×112的,
我使用原始大小的尺寸的图片进行训练,结果报错:ValueError: setting an array element with a sequence.
我该怎样修改代码,使得可以对原始图像大小进行训练和测试?

Exception error

[2019-04-25 13:50:06,274] DEBUG: b'tIME' 41 7 (unknown)
[2019-04-25 13:50:06,274] DEBUG: STREAM b'IDAT' 60 8192
[2019-04-25 13:50:06,493] DEBUG: STREAM b'IHDR' 16 13
[2019-04-25 13:50:06,493] DEBUG: STREAM b'IDAT' 41 65536
[2019-04-25 13:50:06,553] DEBUG: STREAM b'IHDR' 16 13
[2019-04-25 13:50:06,553] DEBUG: STREAM b'tIME' 41 7
[2019-04-25 13:50:06,553] DEBUG: b'tIME' 41 7 (unknown)
[2019-04-25 13:50:06,553] DEBUG: STREAM b'IDAT' 60 8192
[2019-04-25 13:50:06,615] DEBUG: STREAM b'IHDR' 16 13
[2019-04-25 13:50:06,615] DEBUG: STREAM b'tIME' 41 7
[2019-04-25 13:50:06,615] DEBUG: b'tIME' 41 7 (unknown)
[2019-04-25 13:50:06,615] DEBUG: STREAM b'IDAT' 60 8192
[2019-04-25 13:50:06,678] DEBUG: STREAM b'IHDR' 16 13
[2019-04-25 13:50:06,678] DEBUG: STREAM b'tIME' 41 7
[2019-04-25 13:50:06,678] DEBUG: b'tIME' 41 7 (unknown)
[2019-04-25 13:50:06,678] DEBUG: STREAM b'IDAT' 60 8192
[] Reading checkpoints...
INFO:tensorflow:Restoring parameters from checkpoint\coarse_112\coarse.model-1500
[2019-04-25 13:50:06,897] INFO: Restoring parameters from checkpoint\coarse_112\coarse.model-1500
[
] Load SUCCESS
42.309471130371094
An exception has occurred, use %tb to see the full traceback.

SystemExit

Data transforms.

The paper said,"Flipping and rotation are used to obtain 7 additional augmented versions of original training data.",but I not find the part in the code.

UIQM UCIQE

UIQM and UCIQE
If convenient, can you share the code to how to calculate them

No module named vgg

I try to run "Python main_test.py". It provides me this error. Could you upload your vgg.py file?
Thanks

李师兄,这句话的意思我理解的对吗?

For your convenience, we provide a set of training and testing data. You can find them by unziping "a set of training and testing data". However, the training data and testing data are diffrent from those used in our paper.

图片(RAW,ce,gc,wb)的名字与论文种的是对应的但是提供的是小尺寸的,为了方便跑起来代码

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.