- Notifications
You must be signed in to change notification settings - Fork46
Transform black and white images (or your webcam) into beautifully colored images using Deep Learning. Uses OpenCV and Numpy to Colorize your photo or webcam video. GUI provided by PySimpleGUI.
PySimpleGUI/PySimpleGUI-Photo-Colorizer
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
In order to run the demo, you will first need to download the pre-trained data from this location. At 125 MB it's too large to put into the GitHub. Place the file in the model folder.
https://www.dropbox.com/s/dx0qvhhp5hbcx7z/colorization_release_v2.caffemodel?dl=1
The colorization algorithm was developed by Zhang, et al, and is detailed here:
http://richzhang.github.io/colorization/
The code implementing the algorithm is explained in a well-written tutorial by the fine folks at PyImageSearch:
To use the GUI you'll need to install PySimpleGUI (http://www.PySimpleGUI.org for instructions)
One of these will install it for you.
pip install PySimpleGUIpip3 install PySimpleGUIThen you run the demo program using eitherpython orpython3 dependind on your system:
python PySimpleGUI_Colorizer.pypython3 PySimpleGUI_Colorizer.pyIf you choose a folder in the left column, then a list of files will be shown. Clicking on a file will "Preview" the image on the right side. Either copy and paste a path into the input box in the upper left corner, or use theBrowse button to browse for a folder
You can also choose an individual file using the input box in the upper right. Either paste a filename into the box or use thebrowse button to choose one.
Press theStart Webcam button to see yourself colorized in realtime. It's not super fast, but it does function.
Press theStop Webcam button to stop.
To save your image simply press theSave File button and enter your filename.
Here is more eye-candy courtesy of Deep Learning
In July 2020 a new demo was added that uses the new (released to GitHub only at this point) multi-window support. This demo shows 3 video windows:
- Your webcam's raw video stream
- Grayscale version of the video
- Fully colorized colored of the grayscale video
Here's a screenshot to give you a rough idea of what to expect from the demo. The colors likely didn't do so well in this specific shot as there was a lot of background lighting.
You will need to use the PySimpleGUI.py file from the project's GitHubhttp://www.PySimpleGUI.com. Minimum version is 4.26.0.13.
About
Transform black and white images (or your webcam) into beautifully colored images using Deep Learning. Uses OpenCV and Numpy to Colorize your photo or webcam video. GUI provided by PySimpleGUI.
Resources
Contributing
Uh oh!
There was an error while loading.Please reload this page.







