Closed cccusername closed 6 years ago
I rebuild the caffe,but new error appear as fellow:
**_ColorizeImageCaffe instantiated
gpu_id = 0, net_path = ./models/global_model/deploy_nodist.prototxt, model_path = ./models/global_model/global_model.caffemodel
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
ImportError: No module named caffe_traininglayers
---------------------------------------------------------------------------
SystemError Traceback (most recent call last)
<ipython-input-29-29cd1cf45678> in <module>()
4 # Colorization network
5 cid = CI.ColorizeImageCaffeGlobDist(Xd)
----> 6 cid.prep_net(gpu_id,prototxt_path='./models/global_model/deploy_nodist.prototxt', caffemodel_path='./models/global_model/global_model.caffemodel')
7
8 # Global distribution network - extracts global color statistics from an image
/home/choi/HandsomeCHAN/interactive-deep-colorization-master/data/colorize_image.py in prep_net(self, gpu_id, prototxt_path, caffemodel_path)
233 if gpu_id == -1:
234 caffe.set_mode_cpu()
--> 235 else:
236 caffe.set_device(gpu_id)
237 caffe.set_mode_gpu()
SystemError: NULL result without error in PyObject_Call_**
I will very appreciate that if you can tell me how to fix this error,thank you!
Are you able to run standard caffe test (make runtest
)? @richzhang
Did you add the ./caffe_files to your PYTHONPATH?
I did, but it doesn`t work. Now i have solve my problem by install the lastest caffe. Thank you!
I rebuild the caffe,but new error appear as fellow:
**_ColorizeImageCaffe instantiated gpu_id = 0, net_path = ./models/global_model/deploy_nodist.prototxt, model_path = ./models/global_model/global_model.caffemodel --------------------------------------------------------------------------- ImportError Traceback (most recent call last) ImportError: No module named caffe_traininglayers --------------------------------------------------------------------------- SystemError Traceback (most recent call last) <ipython-input-29-29cd1cf45678> in <module>() 4 # Colorization network 5 cid = CI.ColorizeImageCaffeGlobDist(Xd) ----> 6 cid.prep_net(gpu_id,prototxt_path='./models/global_model/deploy_nodist.prototxt', caffemodel_path='./models/global_model/global_model.caffemodel') 7 8 # Global distribution network - extracts global color statistics from an image /home/choi/HandsomeCHAN/interactive-deep-colorization-master/data/colorize_image.py in prep_net(self, gpu_id, prototxt_path, caffemodel_path) 233 if gpu_id == -1: 234 caffe.set_mode_cpu() --> 235 else: 236 caffe.set_device(gpu_id) 237 caffe.set_mode_gpu() SystemError: NULL result without error in PyObject_Call_**
I will very appreciate that if you can tell me how to fix this error,thank you!
I am facing the same issue even with latest caffe version. Can you suggest any solution?
@kaustubholpadkar My caffe version is 1.0.0, maybe you could try it.If it still does`t work, you could try this work of the pytorch version. https://github.com/richzhang/colorization-pytorch
@cccusername I am using the same caffe version. I want to do Global Histogram Style Transfer and I could not find PyTorch repo has that support right now. I made my code work by commenting out lines 407, 408, 409 from data/colorize_image.py
407, 408, 409 from data/colorize_image.py
@kaustubholpadkar were you referring to a different commit than the latest master
?
407, 408, 409 from data/colorize_image.py
@kaustubholpadkar were you referring to a different commit than the latest
master
?
Nope. I am using the latest master only.
I run DemoGlobalHistogramTransfer.ipynb by jupyter.My jupyter keral dead, so i copy all of them to a PY file and error appear as fellow:
[libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing text-format caffe.NetParameter: 5:15: Message type "caffe.LayerParameter" has no field named "input_param".
i think my caffe version and the .prototxt of the demo do not match.would you tell me the version of your caffe and prototxt?thank you!