Colorization

自動色付けのサンプル.親切にソースコード内に必要な情報が既に記述されているので,こちらを参照することで すぐに実行環境作れます.

ソースコードの説明箇所
int main(int argc, char **argv)
{
    const string about =
        "This sample demonstrates recoloring grayscale images with dnn.\n"
        "This program is based on:\n"
        "  http://richzhang.github.io/colorization\n"
        "  https://github.com/richzhang/colorization\n"
        "Download caffemodel and prototxt files:\n"
        "  http://eecs.berkeley.edu/~rich.zhang/projects/2016_colorization/files/demo_v2/colorization_release_v2.caffemodel\n"
        "  https://raw.githubusercontent.com/richzhang/colorization/master/colorization/models/colorization_deploy_v2.prototxt\n";
    const string keys =
        "{ h help |                                    | print this help message }"
        "{ proto  | colorization_deploy_v2.prototxt    | model configuration }"
        "{ model  | colorization_release_v2.caffemodel | model weights }"
        "{ image  | space_shuttle.jpg                  | path to image file }"
        "{ opencl |                                    | enable OpenCL }";
$  ./example_dnn_colorization --proto=colorization_deploy_v2.prototxt --model=colorization_release_v2.caffemodel --image=monochrome.jpg 
  • 実行結果
  • opencv_dnn/samples/colorization.txt
  • 最終更新: 2019/07/30 09:54
  • by baba