Paper: https://arxiv.org/pdf/1603.08511.pdf
Special made for a bare Raspberry Pi 4, see Q-engineering deep learning examples
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
- The Tencent ncnn framework installed. Install ncnn
- OpenCV 64 bit installed. Install OpenCV 4.5
- Code::Blocks installed. (
$ sudo apt-get install codeblocks
)
To extract and run the network in Code::Blocks
$ mkdir MyDir
$ cd MyDir
$ wget https://github.com/Qengineering/ncnn-Colorization_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:
15.jpg
17.jpg
Julia.jpg
Colorization.cpb
main.cpp
Sig17Slice.h
siggraph17_color_sim.param
Before you can run the app, you have to download the model weights. The file is too large (125 MB) to be stored on GitHub (limited to 100 MB). Download location of siggraph17_color_sim.bin
at GDrive.
To run the application load the project file Colorization.cbp in Code::Blocks.
The app takes the b/w input file and the output file name as command line arguments.
You may find the hint at Hands-On handy.
Do note the application takes about 10 Sec to process a single picture.
A more than special thanks to magicse, who adapted the ncnn framework for this colorization app.
Colorful Image Colorization magicse
Colorful Image Colorization richzhang/colorization
Colorful Image Colorization Project Page by Richard Zhang, Phillip Isola, Alexei A. Efros.