Coder Social home page Coder Social logo

nothinglo / deep-photo-enhancer Goto Github PK

View Code? Open in Web Editor NEW
786.0 39.0 106.0 60.62 MB

TensorFlow implementation of the CVPR 2018 spotlight paper, Deep Photo Enhancer: Unpaired Learning for Image Enhancement from Photographs with GANs

License: MIT License

deep-photo-enhancer's Introduction

Deep Photo Enhancer: Unpaired Learning for Image Enhancement from Photographs with GANs

TensorFlow implementation of the CVPR 2018 spotlight paper, Deep Photo Enhancer: Unpaired Learning for Image Enhancement from Photographs with GANs. If you use any code or data from our work, please cite our paper.

[Update Jun. 05, 2019] Rename Model script

I add the rename_model.py to the download link below.

[Update Mar. 31, 2019] Inference Models (Supervsied and Unsupervised).

Download link: here. The code is exactly the same I used in my demo website. (Sorry, I do not have time to polish it...) Simplified tutorial: Using the function getInputPhoto and processImg in the TF.py

[Update Dec. 18, 2018] Data and Code (Supervsied and Unsupervised).

There are too many people asked me to release the code even the code is not polished and is ugly as me. Therefore, I put my ugly code and the data here. I also provide the supervised code. There are a lot of unnecessary parts in the code. I will refactor the code ASAP. Regarding the data, I put the name of the images we used on MIT-Adobe FiveK dataset. I directly used Lightroom to decode the images to TIF format and used Lightroom to resize the long side of the images to 512 resolution (The label images are from retoucher C). I am not sure whether I have right to release the HDR dataset we collected from Flickr so I put the ID of them. You can download the images according to the IDs. (The code was run on 0.12 version of TensorFlow. The A-WGAN part in the code did not implement decreasing the lambda since the initial lambda was relatively small in that case.)

Some useful issues: #6, #16, #18, #24, #27, #38, #39

Results

Method Description
Label Retouched by photographer from MIT-Adobe 5K dataset [1]
Our (HDR) Our model trained on our HDR dataset with unpaired data
Our (SL) Our model trained on MIT-Adobe 5K dataset with paired data (supervised learning)
Our (UL) Our model trained on MIT-Adobe 5K dataset with unpaired data
CycleGAN (HDR) CycleGAN's model [2] trained on our HDR dataset with unpaired data
DPED_device DPED's model [3] trained on a specified device with paired data (supervised learning)
CLHE Heuristic method from [4]
NPEA Heuristic method from [5]
FLLF Heuristic method from [6]

Input Label Our (HDR)
Our (SL) Our (UL) CycleGAN (HDR)
DPED_iPhone6 DPED_iPhone7 DPED_Nexus5x
CLHE NPEA FLLF
Input (MIT-Adobe) Our (HDR) DPED_iPhone7 CLHE
Input (Internet) Our (HDR) DPED_iPhone7 CLHE

User study

Preference Matrix
(20 participants and 20 images using pairwise comparisons)
CycleGAN DPED NPEA CLHE Ours Total
CycleGAN - 32 27 23 11 93
DPED 368 - 141 119 29 657
NPEA 373 259 - 142 50 824
CLHE 377 281 258 - 77 993
Ours 389 371 350 323 - 1433
Our model trained on HDR images ranked the first and CLHE was the runner-up. When comparing our model with CLHE, 81% of users (323 among 400) preferred our results.

Other applications of global U-Net, A-WGAN and iBN

This paper proposes three improvements: global U-Net, adaptive WGAN (A-WGAN) and individual batch normalization (iBN). They generally improve results; and for some applications, the improvement is sufficient for crossing the bar and leading to success. We have applied them to some other applications.

Input Ground truth global U-Net U-Net
For global U-Net, we applied it to trimap segmentation for pets using the Oxford-IIIT Pet dataset. The accuracies of U-Net and global U-Net are 0.8759 and 0.8905 respectively.
λ = 0.1 λ = 10 λ = 1000
WGAN-GP
A-WGAN
With different λ values, WGAN-GP could succeed or fail. The proposed A-WGAN is less dependent with λ and succeeded with all three λ values.
Male -> Female Female -> Male
Input with iBN w/o iBN Input with iBN w/o iBN
We applied the 2-way GAN to gender change of face images. As shown in the figure, the 2-way GAN failed on the task but succeeded after employing the proposed iBN.

Architecture

Generator
Discriminator
1-way GAN 2-way GAN

Publication

Yu-Sheng Chen, Yu-Ching Wang, Man-Hsin Kao and Yung-Yu Chuang.

National Taiwan University

Deep Photo Enhancer: Unpaired Learning for Image Enhancement from Photographs with GANs. Proceedings of IEEE International Conference on Computer Vision and Pattern Recognition 2018 (CVPR 2018), to appear, June 2018, Salt Lake City, USA.

Citation

@INPROCEEDINGS{Chen:2018:DPE,
	AUTHOR    = {Yu-Sheng Chen and Yu-Ching Wang and Man-Hsin Kao and Yung-Yu Chuang},
	TITLE     = {Deep Photo Enhancer: Unpaired Learning for Image Enhancement from Photographs with GANs},
	YEAR      = {2018},
	MONTH     = {June},
	BOOKTITLE = {Proceedings of IEEE International Conference on Computer Vision and Pattern Recognition (CVPR 2018)},
	PAGES     = {6306--6314},
	LOCATION  = {Salt Lake City},
}

Reference

  1. Bychkovsky, V., Paris, S., Chan, E., Durand, F.: Learning photographic global tonal adjustment with a database of input/output image pairs. In: Proceedings of the 2011 IEEE Conference on Computer Vision and Pattern Recognition. pp. 97-104. CVPR'11 (2011)
  2. Zhu, J. Y., Park, T., Isola, P., Efros, A. A.: Unpaired image-to-image translation using cycle-consistent adversarial networks. In: Proceedings of the 2017 IEEE International Conference on Computer Vision. pp. 2242-2251. ICCV'17 (2017)
  3. Ignatov, A., Kobyshev, N., Vanhoey, K., Timofte, R., Van Gool, L.: DSLR-quality photos on mobile devices with deep convolutional networks. In: Proceedings of the 2017 IEEE International Conference on Computer Vision. pp. 3277-3285. ICCV'17 (2017)
  4. Wang, S., Cho, W., Jang, J., Abidi, M. A., Paik, J.: Contrast-dependent saturation adjustment for outdoor image enhancement. JOSA A. pp. 2532-2542. (2017)
  5. Wang, S., Zheng, J., Hu, H. M., Li, B.: Naturalness preserved enhancement algorithm for non-uniform illumination images. IEEE Transactions on Image Processing. pp. 3538-3548. TIP'13 (2013)
  6. Aubry, M., Paris, S., Hasinoff, S. W., Kautz, J., Durand, F.: Fast local laplacian filters: Theory and applications. ACM Transactions on Graphics. Article 167. TOG'14 (2014)

Contact

Feel free to contact me if there is any questions (Yu-Sheng Chen [email protected]).

deep-photo-enhancer's People

Contributors

nothinglo 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  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

deep-photo-enhancer's Issues

about train on MIT sets,I have some question

I had trained your the set with your code ,the test loss was decreas the bottom the increasing, but the psnr is always increasing ,should I stop it?
the information as follow:
image
image

code request

Hi, @nothinglo
I see the result is pretty awesome! Looking forward to the code. Is there a timeline to release the code?

About use my own data.

Hi,
I want to use your work to do some work about face, so i should use my own dataset. There are too many problem. And the code is not clear. Shall you help me? So thanks!!!!

What is iBN

can you explain the iBN and how it work?

Are you using Data Agumentation?

Hi a question, is it true that you augment your dataset by flipping the angles etc? In your code you have a flag that say, you use 8* the original data size...you don't mention this anywhere in your paper. But I believe that it might have a big influence on the results.

Could you maybe elaborate?

is there a bug in netG_train_loss

Hi nothinglo,
Thanks for your great work!
in the TF.py file. the netG_train_loss is like
netG_train_loss = tf.reduce_mean(netD_netG_train_output1_1) - tf.reduce_mean(netD_netG_train_output2_2) netG_test_loss = tf.reduce_mean(netD_test_output1_1) - tf.reduce_mean(netD_test_output2_2) netG_batch_list_train_loss = netD_netG_train_output1_1 - netD_netG_train_output2_2

Does it should be
netG_train_loss = tf.reduce_mean(netD_netG_train_output1_1) - tf.reduce_mean(netD_netG_train_output2_1)
just like the negative to the netD?

Anything wrong with my understanding?

Another question is about the weights for the loss components. Is the term weight for adversarial part too small (which is 1.0) ? Comparing to the term_weight for source_loss and consistency_loss (which are 1e4 1e3 etc)? Since I observe that the test images for the first a few epochs stay the same.

What‘s input of the model when training?

        FLAGS['path_data'] = '/dataset/LPGAN'
        FLAGS['path_result_root'] = '/dataset/LPGAN-Result/%03d-DGX-LPGAN'

What does LPGAN point to? How to modify it according to self environment?

Are there any other places that we should modify to make the code running?

Test in my own dataset got 'blue' result.

Hello @nothinglo , I've trained the model with unsupervised hdr dataset for about 100 epochs, if I use the test image from fivek dataset, I got pretty good result: (GT/Predicted)
5k1
5k2

But when I test it with my own dataset, the result looks like this:
my_result

Some regions in those test images are changed to blue, I suspected that there're so many blue sky in the training dataset (both in input and label_HDR).

And I tested these images in the demo website, they look like this:
demo_result

Here're ground truth images:
gt

The next step I want to improve the result will be adding more own dataset to finetune the model. Anyone has any idea about why it become so blue and how to solve it? Thanks in advanced.

By the way, here's my loss curve: #40

Loss curve comparison

qq 20190102091303

qq 20190102091312

qq 20190102091321

Hello nothinglo, here're my generator training loss, test loss and discriminator loss, trn and test loss drops at the beginning, but increasing after 200 iterations. Are these loss curves looks fine to you? @nothinglo In my mind, the training and test loss should keep decreasing and the discriminator loss should keep increasing, correct me if i'm wrong. Can you please provide your loss curve? I'm training with unsupervised dataset - fivek and hdr.

Performance of Supervised model

Dear nothinglo,
do you have per chance the working code of your supervised training model?
I have spend a considerable amount of time and have tried to reimplement everything, except for your model itself. I have then also just taken the code you have and made the least amount of changes to them to reproduce the supervised training case.
Unfortunately I have not been able to achieve a PSNR of 23.8 BY FAR.
The best I got was about 21.4 and note that I spent about the last two months to work on this full time, so I don't think it is because of lack of trying. I would appreciate if you could comment or provide some sort of working code to reproduce your results.

cheers
Jérémy

Noisy result.

The model was trained for 134 epochs, unpaired learning -- fivek and hdr dataset, I check the test_img for every epoch, almost like these noisy image:

qq 20181221100756

All the hyperparams remain the same as the origin, can anyone give any insight about this situation? @nothinglo

How can i run inference prediction?

I successfully trained hdr model and currently, I want to create inference procedure for this model. I mean not simply add extra testset in the process of training. Can you give me advice?

MemoryError

`
Process Process-2:
Traceback (most recent call last):
File "C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\multiprocessin
g\process.py", line 252, in _bootstrap
self.run()
File "C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\multiprocessin
g\process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\admin\Downloads\expimage\DATA.py", line 499, in enqueue_train_b
atch
input_img, , rect1 = data_augmentation(input_img, rot1, FLAGS['data_augment
ation_size'], FLAGS['data_image_size'], True, FLAGS['data_use_random_pad'])
File "C:\Users\admin\Downloads\expimage\FUNCTION.py", line 188, in data_augmen
tation
output, mask, rect = random_pad_to_size(output, size, mask, pad_for_enhancer
, use_random)
File "C:\Users\admin\Downloads\expimage\FUNCTION.py", line 226, in random_pad

to_size
mask = np.pad(mask, ((b0, a0), (b1, a1), (0, 0)), 'constant')
File "C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\site-packages
numpy\lib\arraypad.py", line 1247, in pad
newmat = _append_const(newmat, pad_after, after_val, axis)
File "C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\site-packages
numpy\lib\arraypad.py", line 162, in _append_const
return _do_append(arr, np.full(padshape, val, dtype=arr.dtype), axis)
File "C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\site-packages
numpy\lib\arraypad.py", line 104, in _do_append
(arr, pad_chunk.astype(arr.dtype, copy=False)), axis=axis)
MemoryError

`

  • i use p100 gpu, have 16G gpu memory,why always show this error?
  • how many gpu memory will use this project ?
  • thanks

What are the original images?

Dear nothinglo, sorry for bothering you again...
I've had a more closer look at the datasets that you used. On one hand the rendition of expertC is clear to me. But I am wondering, what was the image you used that you called the "original" image. Please have a look at the following image:
bildschirmfoto 2018-12-18 um 22 48 48

You can see on the left I have downloaded the image 212 from here https://data.csail.mit.edu/graphics/fivek/, its the image called original.

I have then looked at the image the you have on your readme and that you call "original". On the other hand I have opened the lightroom .lrcat file. You can see that for image 212 I have selected inputAsShotZeroed. I can see that the lightroom image looks much more like the image you have on your readme. Now one should take into account that different compression algorithms probabily render them differently, but still.

My question is, for the original images. Did you use the images that one can download on the 5K website and are called "original"? Or do you export some other version of the images of lightroom, for example IinputAsShotZeroed?
Thanks a lot for your help. I just want to make sure that I have all the data the same way to get the same results.

Export Your Images to SRGB

Okay so it took me another few hours to figure that one out. I know that in a previous issue #38 we talked about exporting your images from Lightroom in ProPhotoRGB. This comes from the fact that the on the website of the Adobe 5K dataset (https://data.csail.mit.edu/graphics/fivek/) they say that they provide the images in ProPhotoRGB format.

BUT...when I use pro photo RGB my images look like this:
bildschirmfoto 2018-12-27 um 21 47 52

And the original label looks like this:
bildschirmfoto 2018-12-27 um 21 48 33

So after training the supervised model I get a very nice PSNR, but unfortunately the images look very strange...So even though Adobe says they use ProPhotoRGB images, in my case this does not work. I don't know if this is general or if this is specific to my case(as another user from #38 says he uses ProPhotoRGB). After googling around one also finds that sRGB is a format which makes the image independent of the screen...so that doesn't sound too bad an intuition why one should use it. Maybe try both.

arbitrary resolutions input

paper said: Although the model was trained on 512x512 inputs, we have extended it so that it can handle arbitrary resolutions1.
how to extend it ?

Some questions about demo.

Hi, thank you for your good job. I have two tiny question about demo website and video.

  1. As the size of output image is 512, how to get an original size output image.
  2. For video demo,if enhance frame by frame respectively, it may cause color shaking. How do you solve this case.

Thank you very much!

Pretrained model

Do you still wish to share the pretrained model? I will appreciate this - I'm trying to reproduce your result and it will help me a lot.

about the HDR version model

very excellent work!I have noticed that "627 images were selected as the training set" in the paper. Do you mean the HDR version model ONLY use these 627 images in training period? I was wondering if you could tell me how to define source domain and target domain only using 627 images? And could you release the pre-trained model or inference demo? Thks !

continue from ckpt error

2019-01-23 03:12:04, Model loading...: C:\LPGAN\736-DGX-LPGAN\model\6.000.ckpt I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library cublas64_80.dll locally I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library cudnn64_5.dll locally I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library cufft64_80.dll locally I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library nvcuda.dll locally I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library curand64_80.dll locally I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library cublas64_80.dll locally I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library cudnn64_5.dll locally I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library cufft64_80.dll locally I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library nvcuda.dll locally I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library curand64_80.dll locally I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library cublas64_80.dll locally I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library cudnn64_5.dll locally I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library cufft64_80.dll locally I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library nvcuda.dll locally I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library curand64_80.dll locally W c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:975] Out of range: Read fewer bytes than requested W c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:975] Out of range: Read fewer bytes than requested W c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:975] Out of range: Read fewer bytes than requested W c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:975] Out of range: Read fewer bytes than requested W c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:975] Out of range: Read fewer bytes than requested W c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:975] Out of range: Read fewer bytes than requested

  • how does this work?
  • i want to continue from check point, but It obviously didn't execute correctly

Supervised Performance

Dear nothinglo,
I have taken the code you proposed for training the supervised model. Currently it has trained for about 25 epochs...I was just wondering...Did you also experience this kind of behaviour on the validation set?
bildschirmfoto 2018-12-20 um 00 31 33

I mean, when you look at it, it is training very nicely!!
bildschirmfoto 2018-12-20 um 00 31 39

It's just the validation behaviour that is very starnge and I was wondering if you had that too? And also if this means that by "luck" sometimes it is at 23.8?
Because to me it is very strange that in one epoch the validation is around 16.0 and in the next it is at around 22. This seems like a very large jump.

Note that I took the code that you provided.
Kind regards and thanks
jérémy

how to process tiff image?

你好,没看到你怎么处理tiff图片的代码,请问是怎么理的呢?也就是你网络的输入是什么形式的图片呢?

PSNR Calculation

Hi, a quick question about the calculation of PSNR for the supervised generator Network. I saw in the code that you casted the input from the image range of(0-255) to the range of 0-1 and then back again to the image range.

But is it correct that for the calculation of the PSNR you used 255 as the maximum possible pixel value of the image? So that your PSNR is calculated as 20(log10(255)) -10*log10(MSE(X,Y)?

usage

Hello,
can you tell me about the specific steps of this project?
What is the format of the data set's storage path?

Improvements of global U-net not obvious

Hi ,

I tried to implement the global U-net but I found the there is limited improvement or sometimes even worse. Is there any trick for implementing the global U-net?

questions about training of wgan-gp

Hi
Thank you for your exciting work!I have questions about your paper.
According to your paper, D_network / G_network iteration is 50. Normaly, iteration is 5! I want to know whether the bigger the iteration is, the more stable the network is?

Train Data Size & Inference Data Size

Hi,
first of all great work!
Could you maybe explain what you used as an image data size for training your Unpaired GAN and for testing it? I mean even if you train on images of size 512x512, how are you able to then get the images that you present in your paper which are obviously not square images?

Here a few points:

  1. In your paper under the section "4. Generator" you write: "The size of input images is fixed at 512×512."
  2. But then in the Results section you write: "Although the model was trained on 512×512 inputs, we have extended it so that it can handle arbitrary resolutions".
    What does that mean? You train it on an input of size 512 but then for inference you allow any kind of input? How does that work? I cannot find that part in your code.
  3. In your Github description you write:" I directly used Lightroom to decode the images to TIF format and used Lightroom to resize the long side of the images to 512 resolution"
    But that is not a 512x512 image then, only the longer length of it will be set to 512 right?

To me, these 3 points are kind of confusing, could you elaborate on them?

Loading supervised data, Bug

I had the following problem. I exported images form Lightroom and resized the long axis to be 512. I think that this does something with the format...because when I import the image with cv2.imread("file_name", -1) and I then print the array I have values that are in the 20-thousand range such as 23435. I think these are hex values for RGB(but no sure). What then happens is that cv2 has no problem reading the file or writing to it. But if you then try to multiply your output which is in the range of 0-1 times 255 you will just get a trash image.

So in case you get an image which is just rubish noise, you are most likely experiencing this. It took me several hours to find that out. The solution is simple.

Just change cv2.imread("filename", -1) to cv2.imread("filename",1).
This will then assume the image is colored and will directly cast the values into the rgb(0-255) range.

2048 image size input

Hi, thinks for your great work,

  1. I trained for 55 epochs, most photos have a nice result, but the saturation of some yellow photos is over saturability reference at #41
  2. I want train the model which input image size is 2048, how to modify the code? Is 16G GPU memory enough?

resize layer for upsampling

May I know why you manual upsampling via

conv_layer( 3, 1, 128, "SYMMETRIC", initializer), resize_layer(2, NEAREST_NEIGHBOR), concat_layer(10), act, \

instead of
tf.layers.conv2d_transpose

Thanks in advance!

input data format

Hello, I downloaded HDR dataset, as you described (from flickr), now I want to train the model, but encouraged with the problem: I cannot properly create metafiles for it (test.txt, train_input.txt, train_label.txt). Could you share them and describe the hierarchical structure of data folder?

Question about netG_train_loss in code

Hello,
I have read the code. Some questions confuse me.
First, In TF.py line 194, "netG_train_loss = tf.reduce_mean(netD_netG_train_output1_1) - tf.reduce_mean(netD_netG_train_output2_2)". It seems different from the calculation of netG_train_loss in paper Page 6 Eq.(9), which is sum of two netD results rather than minus.
Besides, In TF.py line 247, "netG_tr_psnr2 = tf.constant(0, dtype=FLAGS['data_compute_dtype'])". I don't know why netG_tr_psnr2 is set to 0.
Thank you!

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.