An application for colorizing and recovering old black&white photos and videos
python3 main.py --image_file test-image.jpg --output_file recovered-image.jpg
Full options list is as follows:
usage: main.py [-h] -i IMAGE_FILE (-o OUTPUT_FILE | -s) [-d DEVICE] [-v] [-S]
optional arguments:
-h, --help show this help message and exit
-i IMAGE_FILE, --image_file IMAGE_FILE
an input image file
-o OUTPUT_FILE, --output_file OUTPUT_FILE
an output image file
-s, --show display an output image on the screen instead of
saving into file
-d DEVICE, --device DEVICE
target device for infer: CPU, GPU, FPGA, HDDL or
MYRIAD; defaults to CPU
-v, --verbose enable display of processing logs
-S, --smoothing use smoothing filter
For the first run one needs to:
- Install Intel OpenVINO with Python3
- Run
(OPEN_VINO INSTALL PATH)/bin/setupvars.sh
- Run
init.sh
shell script (for Linux/MacOS), which does:- Setup a python virtualenv
- Install requirements.txt
- Create ./data/models folder
- Download necessary models
source ./init.sh
Formerly recommend to work within local virtualenv
main.py
-- main project filehelper/
colorization.py
-- colorization network invocationsuperres.py
-- super-resolution network invocationcv_tools.py
-- helper functions on OpenCVcommon.py
-- global variable definitions
data/
-- generated after the init script is being executedmodels/
-- expected to contain models automatically downloaded by Intel OpenVINO ModelDownloader and processed by ModelOptimizer down to the IR format
requirements.txt
-- pip virtualenv requirementsLICENSE
-- license information
- Create an init shell script for Windows (?)
- Command line args parsing + help output
- Colorization network execution
- Super-resolution network execution
- cv_tools implementation