Giving colors to old socialists
A couple of researchers from the University of California trained a Convolutional Neural Network to predict the colors in black and white images.
research paper
files
How do I use this?
First of all, this neural net runs on python with opencv and imutils so you'll have to start by installing those libraries first. You can just use pip for that:
pip install opencv-python
pip install imutils
install pip if you don't have it
How do I run the model?
Just type the following in a console, inside the folder containing the .py files:
python bw2color_image.py \
–prototxt model/colorization_deploy_v2.prototxt \
–model model/colorization_release_v2.caffemodel \
–points model/pts_in_hull.npy \
–image images/your_image.jpg
After that you'll be shown with two windows, one showing the original image and the second showing the colorized image, you just have to press any key to close both windows but remember to right click on the image if you wish to save it.
WARNING: Video files can be very heavy to process
But if you want to give it a go then you should just run:
python bw2color_video.py \
–prototxt model/colorization_deploy_v2.prototxt \
–model model/colorization_release_v2.caffemodel \
–points model/pts_in_hull.npy \
–input images/your_video.webm
This one should give you a look at the colorized frames, those frames will be stored in a folder called frames and you can join them to make a video with the "make_video.py" file, just remember to adjust the framerate.
LET'S GET TO COLOR
POST YOUR RESULTS