当前位置:网站首页>Deep learning series 47: Super sub model real esrgan
Deep learning series 47: Super sub model real esrgan
2022-06-23 07:11:00 【IE06】
1. Model is introduced
1.1 Degenerate model
First, the training data uses 2 individual first-order:
In the last step, ringing and overshoot are added :
1.2 SRCNN
take CNN The first article in the field of hyperfractionation :
The experimental setup of convolution kernel and channel number in this paper is :
1.3 SRGAN
SRGAN take GAN Introduction of hyperdomain , Used to solve the following problems :
1) High frequency details (high-frequency details) The loss of , The overall image is too smooth / Fuzzy ;
2) Inconsistent with human visual perception , The accuracy of the hyperspectral image does not match people's expectations ( People may be more concerned about the future , And the requirement for background clarity is not high ).
Propose the following improvements :
- new backbone:SRResNet;
- GAN-based network And New loss function :
- adversarial loss: Enhance the sense of reality (photo-realistic natural images);
- content loss: obtain HR image And the perceptual similarity of the generated image (perceptual similarity), Not just pixel level similarity (pixel similarity); In other words, the similarity of feature space is not the similarity of pixel space .
- Use subjective assessment , More emphasis on human perception .
The model structure is as follows ,Generator Network is SRResNet, The paper uses 16 individual residual blocks;Discriminator The Internet is 8 Sub convolution operation (4 The next step is 2)+2 Sub full connection layer VGG The Internet .
1.4 ESRGAN
enhanced SRGAN, It mainly solves the problems of blurred details and artifacts .
- SRResNet Improvement of network structure :
1) remove BN, It is helpful to remove artifacts , Improve the generalization ability ;
2) Use Residual-in-Residual Dense Block (RRDB) As a basic building block , Stronger and easier to train ; - GAN-based Network The improvement of the loss function : Use RaGAN (Relativistic average GAN) Relative loss function in , Improve the relative authenticity of the image to restore more texture details ;
- Improvement of perceptual loss function : Use VGG The reconstruction loss is calculated by the eigenvalue before the activation layer , Improved brightness consistency and texture recovery .

2. Quick start
2.1 Various resources
The green version of exe See... For documentation github, Support windows,linux,mac and NCNN
Online version :https://huggingface.co/spaces/akhaliq/Real-ESRGAN
Usage method :./realesrgan-ncnn-vulkan.exe -i Second dimensional picture .jpg -o Picture of two spiny newts .png -n realesrgan-x4plus-anime
The parameters are as follows :
Usage: realesrgan-ncnn-vulkan.exe -i infile -o outfile [options]...
-h show this help
-i input-path input image path (jpg/png/webp) or directory
-o output-path output image path (jpg/png/webp) or directory
-s scale upscale ratio (can be 2, 3, 4. default=4)
-t tile-size tile size (>=32/0=auto, default=0) can be 0,0,0 for multi-gpu
-m model-path folder path to the pre-trained models. default=models
-n model-name model name (default=realesr-animevideov3, can be realesr-animevideov3 | realesrgan-x4plus | realesrgan-x4plus-anime | realesrnet-x4plus)
-g gpu-id gpu device to use (default=auto) can be 0,1,2 for multi-gpu
-j load:proc:save thread count for load/proc/save (default=1:2:2) can be 1:2,2,2:2 for multi-gpu
-x enable tta mode"
-f format output image format (jpg/png/webp, default=ext/png)
-v verbose output
Existing models :
realesrgan-x4plus( Default ) Clear effect , Prefer brain tonic ;
reaesrnet-x4plus( The effect is vague , Prefer to smear )
realesrgan-x4plus-anime( For animation illustration image optimization , There's a smaller volume )
realesr-animevideov3 ( For animation video )
This is the plan for the future :
2.2 github Previous source code
git clone https://github.com/xinntao/Real-ESRGAN.git
cd Real-ESRGAN
# install basicsr - https://github.com/xinntao/BasicSR
# We use BasicSR To train and infer
pip install basicsr
# facexlib and gfpgan Is used to enhance the face
pip install facexlib
pip install gfpgan
pip install -r requirements.txt
python setup.py develop
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P experiments/pretrained_models
And then execute :
python inference_realesrgan.py -n RealESRGAN_x4plus -i inputs --face_enhance
2.3 Training and fine tuning
Reference resources https://github.com/xinntao/Real-ESRGAN/blob/master/docs/Training_CN.md
Fine tuning , You can use the degradation model that comes with the program , You can also provide your own data pairs .
边栏推荐
- 316. remove duplicate letters
- MySQL redo log redo log
- [system] right click the desktop icon. After turning around, the Explorer will crash and the desktop will be refreshed
- Project_ Filter to solve Chinese garbled code
- Idea installing the cloudtoolkit plug-in
- Detailed explanation of callback function
- Quartz调度框架的学习使用
- [STL] summary of stack and queue usage of container adapter
- 406 double pointer (27. remove elements, 977. square of ordered array, 15. sum of three numbers, 18. sum of four numbers)
- Lombok的使用
猜你喜欢

Xxl-sso enables SSO single sign on

Xiaobai must see in investment and wealth management: illustrated fund buying and selling rules

PSP代码实现
![[project training] change of linear arrow](/img/a4/7554522c13684d7590d247f28a6965.png)
[project training] change of linear arrow

【日常训练】513. 找树左下角的值

Analysis of personalized learning progress in maker Education

MySQL Redo log Redo log
![[bull Chinese document] queue package used to process distributed jobs and messages in nodejs](/img/f9/1bd79d3754c1b4d1b114d02283f95e.png)
[bull Chinese document] queue package used to process distributed jobs and messages in nodejs

产品-Axure9(英文版),原型设计后台动态二级菜单显示内容
![[project training] multi segment line expanded to parallel line](/img/f2/ee4985fd2454bf00d600e34a818f2d.png)
[project training] multi segment line expanded to parallel line
随机推荐
899. ordered queue
301. 删除无效的括号
Traversal of binary tree and related knowledge
Don't look for [12 super easy-to-use Google plug-ins are here] (are you sure you want to take a look?)
Why can't the index of JS array use negative numbers
OSI分层模型对工作的具体帮助
MySQL MVCC多版本并发控制
为什么TCP协议是三次握手而不是两次?
宝塔忘记密码
Database principle experiment test questions, about book classification table
【STL】pair用法总结
Learning and using quartz scheduling framework
MySQL重做日志 redo log
100 GIS practical application cases (79) - key points of making multi plan integrated base map
Eureka
Eureka
聚焦行业,赋能客户 | 博云容器云产品族五大行业解决方案发布
C DPI adaptation problem
TP6 安装拓展
WPF command directive and inotifypropertychanged