Comments (17)
Hi @xinntao could I ask the license of ESRGAN_SRx4_DF2KOST_official-ff704c30.pth model?
Thank you!
from real-esrgan.
@cs20162004 Don't forget resize all images to 400x400 manually
from real-esrgan.
Train with this instead, it has tons of advanced options, auto-cropping, etc:
https://github.com/victorca25/traiNNer
from real-esrgan.
@tg-bomze why do I need to resize images to 400x400 manually?
from real-esrgan.
-
It takes about 6-7 days for training RealESRNet; and 4-5 days for RealESRGAN.
-
You can directly finetune from the pretrained RealESRGAN with fewer iterations (I think 100k ~200k, you can see the difference). There is no need to train from scratch.
-
Including more face images will improve its ability to restore faces. For now, I recommend using together with GFPGAN, here is the script: https://github.com/TencentARC/GFPGAN/blob/master/inference_gfpgan.py I will also integrate GFPGAN to Real-ESRGAN.
-
@tg-bomze I think there is no need to resize all images to 400x400
-
@n00mkrad Thanks for the information. I will also improve Real-ESRGAN for easier use.
If you still have training issues, please let me know.
I will later improve the repo for more handy training and fine-tuning. 😄
from real-esrgan.
@xinntao
Thank you for your detailed answer!
Could you please explain what do you exactly mean by integrating with GFPGAN? Do you mean: run the input image on both networks (first on Real_ESRGAN and then on GFPGAN or vice versa)?
from real-esrgan.
GFPGAN network by default uses Real-ESRGAN on regions that don't contain human face (using detection algorithm maybe). But for some images containing face, the generated face image looks unnatural. Like the following:
@xinntao do you have any other idea to improve Real_ESRGAN for human face?
from real-esrgan.
@xinntao
Thank you for your detailed answer!
Could you please explain what do you exactly mean by integrating with GFPGAN? Do you mean: run the input image on both networks (first on Real_ESRGAN and then on GFPGAN or vice versa)?
Yes, your understanding is right~
from real-esrgan.
GFPGAN network by default uses Real-ESRGAN on regions that don't contain human face (using detection algorithm maybe). But for some images containing face, the generated face image looks unnatural. Like the following:
@xinntao do you have any other idea to improve Real_ESRGAN for human face?
These failures are limitations of GFPGAN.
Training with human faces will improve Real-ESRGAN performance on faces.
Another way is to improve the GFPGAN performance.
We also want to improve Real-ESRGAN's performance on human faces by utilizing more face data.
I think you can also contribute to Real-ESRGAN, if you want or obtain better results 😄
BTW, could you please share with me the original faces that GFPGAN failed in your examples? (Email: [email protected])
from real-esrgan.
Sure.
The pretrained model you shared (RealESRGAN_x4plus.pth) contains only the Generator's weights I guess. If I want to use your pretraining I will also need the Discriminator's weights.
Could you please share it if you have?
from real-esrgan.
@cs20162004
Sure, I will release the Discriminator.
from real-esrgan.
@xinntao Thanks a lot for this repository!
I've been trying to train the RealESRGAN with my own image dataset for a very specific application. Is there any way for me to check if iterations are progressing? I ran it and it threw out a bunch of text and here's the last few lines :
2021-12-01 07:02:47,942 INFO: Loading UNetDiscriminatorSN model from experiments/pretrained_models/RealESRGAN_x4plus_netD.pth, with param key: [params].
2021-12-01 07:02:47,964 INFO: Loss [L1Loss] is created.
2021-12-01 07:02:49,612 INFO: Loss [PerceptualLoss] is created.
2021-12-01 07:02:49,648 INFO: Loss [GANLoss] is created.
2021-12-01 07:02:49,678 INFO: Model [RealESRGANModel] is created.
2021-12-01 07:02:50,093 INFO: Start training from epoch: 0, iter: 0
It has just been like this for the past 5-6 hours. Will the text on the screen progress further?
I checked the directory in "experiments" that it created and it has a log file that has exactly the above (which it returned to stdout). This directory also has three sub-directories (models, training_states, visualization), all of which are completely empty.
I am using the "finetune_realesrgan_x4plus.yml" file , making modifications to point to my data directory. I'm running it with 4 GPUs (Tesla P100-SXM2).
Please let me know if there's anything I might be doing wrong.
Thank you.
from real-esrgan.
@Nidish96 Hey I met the same problem, please tell me how it goes if you get any solution
from real-esrgan.
@Doris1887 I haven't solved it, but I found something. In "train.py" in basicsr, the iterations start in line 154, where the training data (in variable "train_data") is invoked through "prefetcher.next()". This always seems to be "None" and I don't understand why. I've checked the path of the dataset, etc..
from real-esrgan.
lower your GPU batch size
then restart your environment
from real-esrgan.
from real-esrgan.
Meaning?
from real-esrgan.
Related Issues (20)
- ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor' HOT 2
- 一些评价及建议 HOT 1
- inference_realesrgan.py how work on multi-gpu?
- how to add my custom model ? HOT 1
- Free up GPU memory after finishing the image enhance
- finetuning RealESRGAN_x4plus.pth input size issue
- custom dataset size for fine tuning
- Allocate more ram
- Image is too clean
- vulkan-1.dll not found HOT 1
- gt_size: 128
- 怎样将训练过程中的loss函数可视化
- Fail to install basicsr
- How to modified the proposed SR to train with y_only input ?
- Mac M3 using only CPU HOT 1
- Does "use_shuffle" actualy works? [spoiler] NOPE! [/spoiler] HOT 5
- Saving models and training states
- Error trying to run in Interference on Colab HOT 1
- Non-square dataset
- 学习率一直不变吗 HOT 1
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 real-esrgan.