An open API service indexing awesome lists of open source software.

https://github.com/qengineering/real-esrgan-ncnn-raspberry-pi-4

ESRGAN super resolution with ncnn on Raspberry Pi
https://github.com/qengineering/real-esrgan-ncnn-raspberry-pi-4

cpp deep-learning esrgan image-reconstruction image-restoration ncnn ncnn-framework ncnn-model raspberry-pi raspberry-pi-4 raspberry-pi-64-os super-resolution

Last synced: 3 days ago
JSON representation

ESRGAN super resolution with ncnn on Raspberry Pi

Awesome Lists containing this project

README

          

# Real ESRGAN Raspberry Pi 4
![output image]( https://qengineering.eu/github/ESRGAN_flat.webp )
## Super-resolution with the ncnn framework.

[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)


Paper: https://arxiv.org/pdf/2107.10833.pdf


Special made for a bare Raspberry Pi 4, see [Q-engineering deep learning examples](https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html)

------------

## Dependencies.
To run the application, you have to:
- A raspberry Pi 4 with a 32 or 64-bit operating system. It can be the Raspberry 64-bit OS, or Ubuntu 18.04 / 20.04. [Install 64-bit OS](https://qengineering.eu/install-raspberry-64-os.html)

- The Tencent ncnn framework installed. [Install ncnn](https://qengineering.eu/install-ncnn-on-raspberry-pi-4.html)

- OpenCV 64 bit installed. [Install OpenCV 4.5](https://qengineering.eu/install-opencv-4.5-on-raspberry-64-os.html)

- Code::Blocks installed. (```$ sudo apt-get install codeblocks```)

------------

## Installing the app.
To extract and run the network in Code::Blocks

$ mkdir *MyDir*

$ cd *MyDir*

$ wget https://github.com/Qengineering/Real-ESRGAN-ncnn-Raspberry-Pi-4/archive/refs/heads/main.zip

$ unzip -j master.zip

Remove master.zip, LICENSE and README.md as they are no longer needed.

$ rm master.zip

$ rm LICENSE

$ rm README.md


Your *MyDir* folder must now look like this:

0.png

flat.png

garden.png

ESRGAN.cpb

main.cpp

realesrgan.cpp

realesrgan.h

real_esrgan.bin

real_esrgan.param

------------

## Running the app.
To run the application, load the ESRGAN.cbp project file into Code::Blocks. More information? Follow the instructions at [Hands-On](https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html#HandsOn).


Large images can take a VERY long time to process. The photos of the flat and garden took more than 10 minutes on an overclocked Pi.


For best results, do not use jpeg compressed images. Strong jpeg compression generates typical artefacts to which the super-resolution algorithm does not respond well.


![output image]( https://qengineering.eu/github/ESRGAN_garden.webp )

------------

[![paypal](https://qengineering.eu/images/TipJarSmall4.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CPZTM5BB3FCYL)