interactive-deep-colorization
                                
                                 interactive-deep-colorization copied to clipboard
                                
                                    interactive-deep-colorization copied to clipboard
                            
                            
                            
                        What is the exact cause of the crash?
$ python ideepcolor.py 
objc[10305]: Class CVWindow is implemented in both /Users/sansan/anaconda/lib/libopencv_highgui.3.2.0.dylib and /usr/local/opt/opencv/lib/libopencv_highgui.2.4.dylib. One of the two will be used. Which one is undefined.
objc[10305]: Class CVView is implemented in both /Users/sansan/anaconda/lib/libopencv_highgui.3.2.0.dylib and /usr/local/opt/opencv/lib/libopencv_highgui.2.4.dylib. One of the two will be used. Which one is undefined.
objc[10305]: Class CVSlider is implemented in both /Users/sansan/anaconda/lib/libopencv_highgui.3.2.0.dylib and /usr/local/opt/opencv/lib/libopencv_highgui.2.4.dylib. One of the two will be used. Which one is undefined.
objc[10305]: Class CaptureDelegate is implemented in both /Users/sansan/anaconda/lib/libopencv_videoio.3.2.0.dylib and /usr/local/opt/opencv/lib/libopencv_highgui.2.4.dylib. One of the two will be used. Which one is undefined.
[user_study] = False
[dist_caffemodel] = ./models/reference_model/model.caffemodel
[ui_time] = 60
[load_size] = 256
[color_prototxt] = ./models/reference_model/deploy_nodist.prototxt
[color_caffemodel] = ./models/reference_model/model.caffemodel
[dist_prototxt] = ./models/reference_model/deploy_nopred.prototxt
[no_dist] = False
[gpu] = 0
[image_file] = test_imgs/mortar_pestle.jpg
[win_size] = 512
ColorizeImageCaffe instantiated
gpu_id = 0, net_path = ./models/reference_model/deploy_nodist.prototxt, model_path = ./models/reference_model/model.caffemodel
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0521 17:42:31.874128 2128352000 common.cpp:66] Cannot use GPU in CPU-only Caffe: check mode.
*** Check failure stack trace: ***
Abort trap: 6
Why does it crashes? Is it two different OpenCV installations? Or CPU/GPU problem? Can this code run in CPU-only mode?
It looks like you used the caffe-cpu packages. You can only have caffe-cpu OR caffe-gpu installed at the same time. This error will occur if you try to use the GPU mode with caffe-cpu.
But ideepcolor.py uses caffe-gpu by default. Is there a way to run it with caffe-cpu?
Use the parameter --cpu_mode for that.
That was added 2 days ago so you might need to update.
But it will be pretty slow.
@SleepProgger Use the parameter --cpu_mode for that.But still crashes,it show the message:
I0526 16:03:39.424075 5657 net.cpp:744] Ignoring source layer loss_class_SoftmaxLossPred_0_split I0526 16:03:39.424103 5657 net.cpp:744] Ignoring source layer loss_log Setting ab cluster centers in layer: pred_ab Setting upsampling layer kernel: pred_313_us test_imgs/mortar_pestle.jpg scale = 2.000000 Has been killed
How can i solve this problem?
--cpu_mode option worked for me
@mrlzc Have you tried to compile the Caffe with the python layer support? See this post for more details.
same as @mrlzc , also I have compiled the caffe with the python layer support
I have solved this problem by changing the configuration of the virtual machine,can not compiled before because the virtual machine memory is too small,you can try it. good luck for you.
Thanks for your tip! How much memory does it need? And how long does it need to process until the qt window shows up?
I can run the program on a GTX 1080 with 8 GB memory. The program consumes 4.5 GB GPU memory for the default test image mortar_pestle.jpg.
The beginning of the virtual machine is the use of 4G memory,and then appeared above the kind of problem,then changed the memory from 4G to 8G,wait for a few minutes to complete all the operations.