Skip to content
imaged

4x super-resolution

Real-ESRGAN x4plus

Upscale a real-world photo by 4x with restored detail.

BSD-3-Clause
Explore model

About this model

Real-ESRGAN x4plus is a 4x super-resolution model from Wang et al. (2021). It was trained with a synthetic degradation pipeline that emulates JPEG noise, blur, and sensor artifacts, so it works on real low-quality photos rather than only clean bicubic downsamples.

About 67 MB on disk. On M1 Max, CoreML runs a 256x256 to 1024x1024 upscale in 322 ms warm, around 26 times faster than CPU.

What you can build

  • Upscale phone photos for printing without obvious blur.
  • Restore detail in compressed thumbnails for an archival pipeline.
  • Sharpen low-resolution stock images before reuse.
  • Generate a 4x crop preview for product photography.

Variants & downloads

Choose the build for your app

Model files are being prepared.

Explore the model’s examples, source links, and integration notes while download variants are added.

Example inference

Input
A 256x256 photograph of a butterfly used as the upscale fixture.
Output
Side-by-side: nearest-neighbour 4x baseline next to the Real-ESRGAN 4x result.

Performance

Results depend on the device, runtime, and test conditions. Each measurement keeps its own context.

M1 Max, macOS 15, ONNX Runtime 1.17 (256x256 to 1024x1024)

See original catalog hardware notes · CPU

8.54 s

Warm inference

Catalog reference · variant unspecifiedCold start (ms): 8693

Reference result from the existing catalog; conversion variant and measurement date were not recorded.

M1 Max, macOS 15, ONNX Runtime 1.17 (256x256 to 1024x1024)

See original catalog hardware notes · CoreML

322.0 ms

Warm inference

Catalog reference · variant unspecifiedCold start (ms): 501

Reference result from the existing catalog; conversion variant and measurement date were not recorded.

RTX 2060, Ubuntu 24.04, ONNX Runtime 1.24.3

See original catalog hardware notes · CUDA

627.8 ms

Warm inference

Catalog reference · variant unspecified

Reference result from the existing catalog; conversion variant and measurement date were not recorded.

Integration examples

Vision SDK integration

cpp

#include "imaged/sdk.hpp"
#include "imaged/families/upscale/upscale_family.hpp"

imaged::SDK::AI ai;
auto& config = ai.getOptions();
config.set("upscale.model", "weights/realesrgan_x4plus.onnx");
config.set("upscale.scale", 4);
config.set("upscale.inference.provider", "coreml");

imaged::SDK::UpscaleFamily family;
family.load(config);

imaged::SDK::Image image;
image.load("small.png");

auto result = family.run({&image});
auto& upscaled = std::get<imaged::SDK::ImageResult>(result).image;
upscaled.save("upscaled_4x.png");