Coder Social home page Coder Social logo

infrontofme / uwgan_uie Goto Github PK

View Code? Open in Web Editor NEW
181.0 5.0 34.0 24.81 MB

Source code for UWGAN: Underwater GAN for Real-world Underwater Color Restoration and Dehazing

Home Page: https://arxiv.org/abs/1912.10269

License: MIT License

Python 100.00%
underwater-images image-enhancement image-restoration

uwgan_uie's Introduction

Network Structure

UWGAN for generating realistic underwater images

UWGAN takes color image and its depth map as input, then it synthesizes underwater realistic images based on underwater optical imaging model by learning parameters through generative adversarial training. You can find more details in the paper.

UWGAN structure

Synthetic underwater-style images through UWGAN. (a) are in-air sample images, (b)-(d) are synthetic underwater-style sample images of different water types.

Synthetic underwater-style images

Underwater image restoration based on UNet

Proposed U-net Architecture for underwater image restoration and enhancement. The effects of different loss functions in U-net are compared, the most suitable loss function for underwater image restoration is suggested based on the comparison, you can find more details about loss function in paper.

UNet structure

Dataset

Download data:

  1. In-air RGBD data: NYU Depth Dataset V1, NYU Depth Dataset V2

  2. Underwater images: [Baidu Cloud Link] [Google Drive]

  3. UIEB Dataset for verification: [github link]

  4. The NYU datasets we used to train UWGAN: [Baidu Cloud Link] [Google Drive]

  5. fake water images generated from UWGAN: [Google Drive]

  6. pretrained model:[Google Drive]

Data directory structure in UWGAN

.
├── ...
├── data                    
│   ├── air_images
│   │   └── *.png
│   ├── air_depth  
│   │   └── *.mat
│   └── water_images 
│       └── *.jpg
└── ...

Usage

  • Train a UWGAN model - Firstly, change directory to UWGAN folder, then run python uwgan_mian.py, you can adjust learning parameters in uwgan_main.py.
  • Train a UNet restoration model - Firstly, change directory to UNetRestoration folder, then run python train.py, you can adjust learning parameters and change loss functions in train.py. Run python test.py after training has been completed.

Results and Discussion

public dataset enhancement our dataset enhancement

  • High-level computer vision task: underwater target detection on underwater images before and after processing with our method.

underwater target detection

  • The effects of different loss functions in restoration network (UNet)

    different loss functions

Citations

If you find this work useful for your research, please cite this article in your publications.

@misc{wang2019uwgan,
    title={UWGAN: Underwater GAN for Real-world Underwater Color Restoration and Dehazing},
    author={Nan Wang and Yabin Zhou and Fenglei Han and Haitao Zhu and Yaojing Zheng},
    year={2019},
    eprint={1912.10269},
    archivePrefix={arXiv},
    primaryClass={eess.IV}
}

uwgan_uie's People

Contributors

infrontofme 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  avatar  avatar

uwgan_uie's Issues

为什么不能复现论文中的结果呢?

我使用了作者提供的训练模型,但是复现出的结果还是很差,想知道在test_one_image.py中的gt_image_path是什么?在测试的时候不是应该输入测试图片,然后加载模型就可以了吗?
谢谢啦

train loss nan, cost 0.000

大佬好,有个问题请教,当我train uNet的时候,出现train loss nan, cost 0.000的情况,trainA和trainB是利用UWGAN生成的图像数据,超参采用的都是默认值,希望能够帮助解答,谢谢

Trained model?

Hello, I am interested in trying your method on my own underwater images.
However, downloading full NYU image sets requires for V1 90GB (Raw images) and for v2 it's 428GB for V2. I simply don't have enough space or time to wait to download all this.
So, I was wondering if you could upload pre-trained UWGAN/U-Net models instead that one could simply download and try on real life underwater images? It would be a great help.

fsdet编译不过

哥们留个联系方式吗?我fsdet一直编译不过,一定要装cuda92的吗?清华原里面找不到了

Valueerror cannot feed the value of shape (32,480,640,3) for tensor’air_image:0’,which has shape ‘(32,256,256,3)’

I’m a new programmer on the deep learning,and I trained the UWGAN followed the usage,but when I test UWGAN,it worked error.I have no idea what happened on it.
819B0307-EA7A-40EE-82AA-7D15327A36A0
Looking forward to your reply
您好,我是一个刚学习深度学习的新手,最近在做水下图像处理这方面的问题,有幸能够拜读到大佬您的作品。但在按着您设置的参数和方法进行训练后,在测试UWGAN 的时候出现了如下的错误。希望大佬能够提供解答,谢谢

tensorflow版本&python版本

你好,我在执行源代码上会出现版本不相容的状况。
想请教可以使用的环境版本是多少,谢谢
cuda跟cuDNN也拜託了。

为什么不能复现UNet的结果?

我使用了作者提供的数据集训练UNet,参数的设定和论文提供的参数设定完全相同,为什么复现不了UNet的修复和去雾结果?生成的图片基本什么也看不到,这是什么原因?求大佬帮助

Underwater images Type 1 and Type2

Thx for uploading to GDrive.
I have unpacked everything and before I can try training there is one more issue left: There are 2 subfolders for water_images (Type1 and type2) while there is only one for air_images.
Should Type1 and Type2 water images be combined into one folder and Type1 files renamed somehow to get correct pairing with air images?

Question about trained model

Hi, thank you for sharing the project. Can you share the link of trained model?Because of the limit of space of disk, I can't train the model.

UNet help (seems to work only on fake images)?

It seems that UWGAN generated properly fake water images, it also seems that UNet trained properly on those images as I can get back original image from fake when I run test. However, if I try to feed test with actual water image I get out garbage. I am including sample fake image generated by UWGAN. The same image reconstructed by UNet (seems properly) and what I get when I try to feed Unet one of Type1 water images.
fake_000052_010 (fake water image generated by UWGAN)
fake_000052_010_gen (the same image fed through test loop of UNet (after training it of course))
YDXJ0001_4199_gen (sample Type1 water image after going through UNet)

Any idea, what might be going wrong?
Any help would be appreciated.

The publish

hello,i want to see what's journal published your paper?

thank you!

雾化参数未训练?

大佬好,非常感谢你的工作分享,确实很赞(大拇哥)!
我自己跑了一下code,发现模拟雾化的3个参数(对应r, g, b三个通道)并未参与到训练中(一直保持0.75),请问这样的话当遇到有雾化效果的水下图像的时候,会影响增强效果吧?

Example test data

It will be helpful if it contains a sample test image and it's usage.So it will help to quickly run and test the model weather is working or not before testing it with custom data also it will be helpful to understand the basic working

About checkpoint

Hello, Can you please share the checkpoint folder with us? which could save lots of time for people. It will be greatly appreciated.
Thanks.

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.