Real-ESRGAN x4

Click a block to read its description, or select it with Tab and Enter.

Real-ESRGAN x4RGB super-resolution, native eval, 3 × 64 × 64 input. Shapes exclude batch.LibreYOLOReal-ESRGAN x4RGB super-resolution, native eval, 3 × 64 × 64 input. Shapes exclude batch.RRDBNet generatorInput image3 × 64 × 64Identity input3 × 64 × 64Conv2d 3×33 to 64; s=1, p=1RRDB, n=2364 × 64 × 64Conv2d 3×364 to 64; s=1, p=1+Nearest-neighbor resize ×264 × 128 × 128Conv2d 3×364 to 64; s=1, p=1LeakyReLUNegative slope 0.2Nearest-neighbor resize ×264 × 256 × 256Conv2d 3×364 to 64; s=1, p=1LeakyReLUNegative slope 0.2Conv2d 3×364 to 64; s=1, p=1LeakyReLUNegative slope 0.2Conv2d 3×364 to 3; s=1, p=1Restored RGB3 × 256 × 256All convolutions have bias; no normalization layers.RRDB: residual in residualInput64 channelsResidualDenseBlock64 channelsResidualDenseBlock64 channelsResidualDenseBlock64 channelsMultiply 0.2Residual scaling+Each inner dense block also scales its residual by 0.2.Input rearrangement and variantsPixelUnshuffle ×2 (x2 only)3 × 64 × 64 becomes 12 × 32 × 32Reshape and permute2×2 spatial positions become channelsx4: U=1, no unshuffle; trunk at 64×64.x2: U=2, pixel unshuffle; trunk at 32×32.Both use 23 RRDBs, width 64, growth width 32.Both execute two nearest-neighbor ×2 upsamplings.Net upscale = 4/U; output is 256/U pixels per side.x4t uses SRVGG, shown in a separate concrete view.Network output is not clamped by RRDBNet.forward.ResidualDenseBlockX is the 64-channel input. F1...F4 each have 32 channels.XIdentity X64 channelsConv2d 3×364 to 32; s=1, p=1LeakyReLU, slope 0.2F1XF1Concat channel inputs96 channelsConv2d 3×396 to 32; s=1, p=1LeakyReLU, slope 0.2F2XF1F2Concat channel inputs128 channelsConv2d 3×3128 to 32; s=1, p=1LeakyReLU, slope 0.2F3XF1F2F3Concat channel inputs160 channelsConv2d 3×3160 to 32; s=1, p=1LeakyReLU, slope 0.2F4XF1F2F3F4Concat channel inputs192 channelsConv2d 3×3192 to 64; s=1, p=1Multiply 0.264-channel dense residual+XNamed X/F connectors denote the same tensor at each use.Inference generator only. GAN discriminator, degradation synthesis and adversarial training are outside this graph.Source: libreyolo/models/realesrgan/nn.py and model.py. Revision a4d0ecc9e17f.libreyolo.com