Tim M 57b5cefde5 Updated all `.md` files to contain newest image il y a 2 ans
..
LICENSE 559a0bc1c3 colorization code il y a 6 ans
README.md 57b5cefde5 Updated all `.md` files to contain newest image il y a 2 ans
colorizeImage.cpp 488723de0b added GPU usage il y a 4 ans
colorizeImage.py 488723de0b added GPU usage il y a 4 ans
colorizeVideo.cpp 488723de0b added GPU usage il y a 4 ans
colorizeVideo.py 488723de0b added GPU usage il y a 4 ans
getModels.sh 559a0bc1c3 colorization code il y a 6 ans
greyscaleImage.png d166ab2bc2 sample image name changes il y a 6 ans
greyscaleVideo.mp4 d166ab2bc2 sample image name changes il y a 6 ans

README.md

CNN based Image Colorization using OpenCV

This repository contains code for the blog post Convolutional Neural Network, CNN based Image Colorization using OpenCV.

CNN based Image Colorization

download

Usage

Run the getModels.sh file from command line to download the needed model files

sudo chmod a+x getModels.sh
./getModels.sh

Python: Commandline usage to colorize a single image:

python3 colorizeImage.py --input greyscaleImage.png

a video file:

python3 colorizeVideo.py --input greyscaleVideo.mp4

C++:

Compilation examples

g++ pkg-config --cflags --libs opencv4 colorizeImage.cpp -o colorizeImage.out -lopencv_core -lopencv_dnn -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -std=c++11 g++ pkg-config --cflags --libs opencv4 colorizeVideo.cpp -o colorizeVideo.out -lopencv_core -lopencv_dnn -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_videoio -std=c++11

Commandline usage to colorize

a single image:

./colorizeImage.out greyscaleImage.png

a video file:

./colorizeVideo.out greyscaleVideo.mp4

AI Courses by OpenCV

Want to become an expert in AI? AI Courses by OpenCV is a great place to start.