--- license: bsd-3-clause library_name: libreyolo tags: - super-resolution - image-to-image - real-esrgan pipeline_tag: image-to-image --- # LibreRealESRGANx2-restore RRDBNet Real-ESRGAN super-resolution (2x upscaling), repackaged for LibreYOLO. ## Source Weights derived from [xinntao/Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN) release `RealESRGAN_x2plus.pth`. Copyright (c) 2021 Xintao Wang. Licensed under the BSD 3-Clause License. The RRDBNet architecture lineage is [XPixelGroup/BasicSR](https://github.com/XPixelGroup/BasicSR) (Apache-2.0, Copyright 2018-2022 BasicSR Authors). ## Modifications State-dict metadata-wrap only: keys and learned parameters are unchanged; the checkpoint is wrapped in the LibreYOLO v1.0 schema (`task=restore`, `scale=2`). Tensor-level parity vs the official model is exact (`max_abs_diff == 0`, fp32). See `weights/convert_realesrgan_weights.py` in the [LibreYOLO source repository](https://github.com/LibreYOLO/libreyolo). ## Usage ```python from libreyolo import LibreYOLO model = LibreYOLO("LibreRealESRGANx2-restore.pt") res = model.predict("small.jpg") # res[0].restored is 2x the input res[0].save("upscaled.png") # large images: model.predict("big.jpg", tile=512) # seam-free tiling ``` ## License BSD 3-Clause (weights) with Apache-2.0 architecture lineage. See the [`LICENSE`](./LICENSE) and [`NOTICE`](./NOTICE) files in this repository.