Tim M 57b5cefde5 Updated all `.md` files to contain newest image 2 роки тому
..
LICENSE 559a0bc1c3 colorization code 6 роки тому
README.md 57b5cefde5 Updated all `.md` files to contain newest image 2 роки тому
colorizeImage.cpp 488723de0b added GPU usage 4 роки тому
colorizeImage.py 488723de0b added GPU usage 4 роки тому
colorizeVideo.cpp 488723de0b added GPU usage 4 роки тому
colorizeVideo.py 488723de0b added GPU usage 4 роки тому
getModels.sh 559a0bc1c3 colorization code 6 роки тому
greyscaleImage.png d166ab2bc2 sample image name changes 6 роки тому
greyscaleVideo.mp4 d166ab2bc2 sample image name changes 6 роки тому

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.