项目作者: PrimozGodec

项目描述 :
Image and video colorizer is package for automatic image and video colorization. Models are allready trained
高级语言: Python
项目地址: git://github.com/PrimozGodec/ImageColorization.git
创建时间: 2017-07-31T08:59:50Z
项目社区:https://github.com/PrimozGodec/ImageColorization

开源协议:

下载


Image and video colorizer

Image and video colorizer is package for automatic image and video colorization.
Models are already trained.

Instalation

Installation can be done in 5 easy steps

  1. Install all requirements for Tensorflow
    and tensorflow itself with:

    1. pip install tensorflow-gpu

    if you use GPU device for computation otherwise:

    1. pip install tensorflow
  2. Create virtual environment

    1. virtualenv -p python3 colorization_venv
  3. Activate virtual environment

    1. source colorization_venv/bin/activate
  4. Clone Image and video colorization package and move in it

    1. git clone https://github.com/PrimozGodec/ImageColorization.git
    2. cd ImageColorization
  5. Install requirements

    1. pip install -r requirements.txt
  6. You are done :)

In case you do not have a GPU device in your computer, please install Tensorflow
for a CPU. Instructions are at
the Tnesorflow website.

Image colorization

For automatic image colorizing follow those steps:

  1. Copy images into /data/image/original directory

  2. Run main.py script from src/image_colorization/ directory.

    1. python -m src.image_colorization.main --model <model name>

    Parameter --method is optional, if not present reg_full_model is default.
    It can be choose from this list:

    • reg_full_model (default)
    • reg_full_vgg_model
    • reg_part_model
    • class_weights_model
    • class_wo_weights_model
  3. You can find colored images in /data/image/colorized directory.

    on your GPU or CPU specifications.
    You will see progress bar that show you how far you are with colorization.

Video colorization

For automatic video colorizing follow those steps:

  1. Copy images into /data/video/original directory

  2. Run video_colorizer.py script from src/video_colorization/ directory.

    1. python -m src.video_colorization.video_colorizer

    Video colorizer is always using reg_full_model.

  3. You can find colored videos in /data/video/colorized directory.

Colorization take few hours since there is a lot of images to color in a video
and depends on your GPU or CPU specifications and length of a video.
You will see progress bar that show you how far you are with colorization.