Comments (11)
Hello.
I tested MDSR-GAN and got satisfying results.
You have to change some codes for this experiment.
These two lines should be replaced to
tp = patch_size
if you want to train MDSR-GAN.
Also, I used a script below:
python main.py --template GAN --model MDSR --scale 2+3+4 --save MDSR_GAN --reset --patch_size 96 --loss 5*VGG54+0.15*GAN --pre_train ../experiment/model/MDSR_baseline.pt --ext bin --save_results --data_test Set14
Also, my WGAN-GP implementation is valid.
However, I do not think that it is appropriate to directly use WGAN-GP formulation to super-resolution.
If I found nice approach, I will let you know.
Thank you!
from edsr-pytorch.
You can train MDSR_baseline with adversarial loss.
However, there is one thing to be changed from the code.
Currently, MDSR is designed to take 48x48 input patches for all scales, and returns 96x96, 144x144, and 192x192 output patches.
Because GAN discriminator should take 96x96 patches as its input, it is better to change the input patch-size for different scales (ex. 48x48 for scale 2, 32x32 for scale 3, and 24x24 for scale 4.)
Another approach is to use global-average pooling at the end of the discriminator to make scale-independent model.
If you are not in hurry, I will test and upload the script.
Thank you!
from edsr-pytorch.
You can download it from here.
I think x4 output is not that satisfying with my default hyper-parameters.
Maybe they can be better if you use smaller weight to adversarial loss (--loss 5*VGG54+0.1*GAN
seems to be appropriate.), or changing other parameters.
Thank you!
from edsr-pytorch.
Hello.
I think answers below can help you.
-
I think batch-normalization 'can' be removed, but that is not a mandatory.
-
These lines control the hyperparameters of the generator (SR network) optimizer. You can change them with input arguments. (ex.
python main.py --lr 5e-5
) You can modify the discriminator optimizer's hyperparameters by fixing these lines, if you are using WGAP-GP configuration. They are hard-coded. In case of using GAN and WGAN loss, both generator and discriminator share their optimizer's hyperparameters. -
Use
--gan_k [n]
argument to modify it. -
You can refer to this line, to check how you set the loss function.
Although I implemented WGAN loss and checked it working, there are several things to consider.
-
In the original WGAN-GP paper, authors set
--gan_k
to 5, but it takes so much time as the outputpatch_size
is 192x192 or 96x96 in my default setting. -
If
gan_k
is larger than 1, you require multiple output batches to update the discriminator several times. This is not a big problem in the traditional generative model(like DCGAN) because they generate images from multi-dimensional uniform or normal distributions, which can be generated any time you want. However, super-resolution network have to take low-resolution patches as input, and they should be sampled from dataset. Until now, the adversarial loss function class do not access to the dataset, and I use a single batch to update the discriminatorgan_k
times. I am not sure on this approach. -
Code can be executed, but it does not seem to converge.
For these reasons, I recommend you to use naive GAN as SRGAN did. You can do this by running this line.
Thank you!
from edsr-pytorch.
Thank you for detail and clear answers.
In addition, I would also like to ask if MDSR_baseline can be trained with naive GAN? If the answer is yes, how should I do it?
Thank you!
from edsr-pytorch.
Thank you for your reply. I am looking forward to your test results.
In addition,for EDSR_baseline_x4, I'm curious whether using WGAN-GP will get better performance than naive GAN? I don't have enough ability to implement WGAN-GP correctly now,can you take some time to test WGAN-GP?
Thank you very much!
from edsr-pytorch.
Can you send me a copy of the trained MDSR-GAN model? I want to see its super-resolution results.
My email address is: [email protected]
Thank you!
from edsr-pytorch.
Thank you!
from edsr-pytorch.
https://github.com/JustinhoCHN/SRGAN_Wasserstein
이후에 이런 레포가 생겼네요. 참고할 수 있을거 같습니다.
from edsr-pytorch.
And what about wgan-hinge https://arxiv.org/abs/1803.01541
Is it a waste of time? I'm curious about the result.
from edsr-pytorch.
I think every experiment is worth trying.
However, I do not have enough time for implement advanced WGANs, so it will very nice if someone make a pull request.
Thank you for letting me know those ideas!
from edsr-pytorch.
Related Issues (20)
- About test HOT 3
- train和test中的指标不同
- PSNR is nan when test DIV2K data HOT 2
- Why does EDSR enlarge the image twice and only low pixel images work well? HOT 3
- Mean Shift Function for Gray Image dataset
- TypeError:list indices must be integers or slices, not tuple
- transfer learning / finetune HOT 1
- Why not use torchvision.transforms HOT 1
- where's baseline models? HOT 1
- PSNR and SSIM
- It is not working Correctly!
- ValueError: num_samples should be a positive integer value, but got num_samples=0 HOT 4
- ValueError: x and y must have same first dimension, but have shapes (0,) and (1,)
- Denoising model in "Residual Dense Network for Image Restoration"
- Not changing the speed by changing the amount of data
- 环境配置 HOT 4
- AttributeError: module 'torch.backends' has no attribute 'mps' HOT 1
- 训练数据集
- 怎么使用自定义的数据集训练? HOT 10
- AttributeError: '_MSDataLoaderIter' object has no attribute '_put_indices'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edsr-pytorch.