Coder Social home page Coder Social logo

junyanz / interactive-deep-colorization Goto Github PK

View Code? Open in Web Editor NEW
2.7K 123.0 446.0 11.84 MB

Deep learning software for colorizing black and white images with a few clicks.

Home Page: https://richzhang.github.io/ideepcolor/

License: MIT License

Python 98.33% Shell 1.48% Dockerfile 0.19%
colorization automatic-colorization deep-learning deep-learning-algorithms computer-vision caffe interactive

interactive-deep-colorization's People

Contributors

dbrant avatar junyanz avatar richzhang avatar sleepprogger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

interactive-deep-colorization's Issues

Fine-tune model

Hello,
I would like to fine-tune the model with new data. It would be great if you could share the train.prototxt.
Thanks

Install Help

I have windows...

Can I run it inside an ubuntu docker container using command line only?

Change image format (to 512x512?)

Hello,

Thanks for the colorization algo, it is great!

I guess the caffe model only accept 256x256 images.
Is there a pre-trained model that takes bigger images?

I have been playing with the "DemoInteractiveColorization" Notebook (I am using Docker and I couldn't get the GUI to work).

I made some cool colorization adding user inputs with output format is 256x256.
I tried to change the size to 512x512 with:
colorModel = CI.ColorizeImageCaffe(Xd=img_size)

But it crashes in the forward pass:
img_out = colorModel.net_forward(input_ab,mask)

Best

technical requirements

What are the technical requirements for running ideepcolor?
I try to run it on Intel i7-4471 CPU 3,5 GHz, 8Gb RAM, invidia geforce gtx 1050 ti 4gb, (CUDA 8.0 with CuDNN 6 or without) but get an error: cudaSuccess (2 vs. 0) out of memory.

Can deal with SAR Image ?

this method has good result to color digital image, how about SAR Image ? what work should we do ....

Thanks!

Save result default resolution

When I press SAVE RESULT button, the image saves with the resolution 1200x866, but default image was 4170x3008.
Is it bug or do I need to use some arguments?

DMG

Is it possible for you to put this software into one .dgm file? I'm not really good with programming and it's a little bit confusing to me how to install it. I started by installing Docker but it says it's incompatible with my configuration (I'm using VMware... don't have a real Mac)

model.caffemodel is missing

Traceback (most recent call last):
File "ideepcolor.py", line 53, in
colorModel.prep_net(args.gpu, args.color_prototxt, args.color_caffemodel)
File "/home/luciano-oc/ideepcolor/data/colorize_image.py", line 234, in prep_net
self.net = caffe.Net(prototxt_path, caffemodel_path, caffe.TEST)
RuntimeError: Could not open file ./models/reference_model/model.caffemodel

Output colorization doesn't seem to work

Interactive colorization in the result window doesn't work.
Output just stays grey.

I made a change to prototxt files lowering
input_param { shape { dim: 1 dim: 4 dim: 128 dim: 128 } }
and --load_size 128 (default 256) to be able to execute it because I've been running out of GPU memory and getting cudasuccess error. Previously, I ran it in cpu_mode but it was very laggy and output didn't work as well.

  • GeForce GT 635M 2GB
  • Ubuntu 16.04

force using qt4

I have both PyQt4 and PyQt5 libraries installed. matplotlib choses qt5 backend by default and the software fails with the following:

bash$ ideepcolor 
Traceback (most recent call last):
  File "/usr/share/ideepcolor/ideepcolor.py", line 12, in <module>
    from ui import gui_design
  File "/usr/share/ideepcolor/ui/gui_design.py", line 3, in <module>
    from . import gui_draw
  File "/usr/share/ideepcolor/ui/gui_draw.py", line 15, in <module>
    import matplotlib.pyplot as plt
  File "/usr/lib64/python2.7/site-packages/matplotlib/pyplot.py", line 109, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/usr/lib64/python2.7/site-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup
    globals(),locals(),[backend_name],0)
  File "/usr/lib64/python2.7/site-packages/matplotlib/backends/backend_qt5agg.py", line 18, in <module>
    from .backend_qt5 import QtCore
  File "/usr/lib64/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 27, in <module>
    import matplotlib.backends.qt_editor.figureoptions as figureoptions
  File "/usr/lib64/python2.7/site-packages/matplotlib/backends/qt_editor/figureoptions.py", line 17, in <module>
    import matplotlib.backends.qt_editor.formlayout as formlayout
  File "/usr/lib64/python2.7/site-packages/matplotlib/backends/qt_editor/formlayout.py", line 58, in <module>
    from matplotlib.backends.qt_compat import QtGui, QtWidgets, QtCore
  File "/usr/lib64/python2.7/site-packages/matplotlib/backends/qt_compat.py", line 111, in <module>
    from PyQt5 import QtCore, QtGui, QtWidgets
RuntimeError: the PyQt5.QtCore and PyQt4.QtCore modules both wrap the QObject class

The following patch fixes the problem (sorry, I'm too lazy for the proper pull request):

--- ui/gui_draw.py.orig    2017-05-19 12:52:25.000000000 +0800
+++ ui/gui_draw.py 2017-05-19 12:53:07.648466907 +0800
@@ -12,6 +12,9 @@
 import glob
 import sys
 from pdb import set_trace as st
+
+import matplotlib as mpl
+mpl.use("Qt4Agg")
 import matplotlib.pyplot as plt
 
 import skimage

Colorization not working

I am running ideepcolor on OSX with @sabrinawaller docker image. Everything looks pretty good, but nothing gets colorized. A screenshot is attached. Any ideas on what I am missing? Thank you.
screen shot 2017-11-28 at 9 58 15 pm

ICE default IO error handler doing an exit(), pid = 4698, errno = 32

Hello, I'm using icolor with cpu mode but it crashed after GUI come over in 6-7 min. Output is like this:

Setting upsampling layer kernel: pred_313_us /tmp/test.jpg scale = 2.000000 ICE default IO error handler doing an exit(), pid = 4698, errno = 32
I deleted my ~/.ICEauthority file and relogin but it didn't work. How should I do ?

Turkish language

I want to translate to Turkish. Please be glad if you help in this matter. Thank you.

unable to start in CPU mode

I do not have a nvidia hardware and unable to use GPU.
Caffe does support cpu only, using the CPU_ONLY := 1 flag.
However, ideepcolor is unable to start, the error message is below:

python2 ideepcolor.py
[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
F0519 12:22:16.921299 11148 common.cpp:66] Cannot use GPU in CPU-only Caffe: check mode.
*** Check failure stack trace: ***
Aborted

Could you implement --CPU flag please?

UnicodeDecodeError Using ideepcolor in CPU mode

Hi !

My issue is that whan i type the following command:
python ideepcolor.py --cpu_mode --image_file ~/Téléchargements/bw.jpg
I get the following error:
UnicodeDecodeError: "ascii" codec can't decode byte 0xc3 in position 14: ordinal not in range(128)
I can't try GPU mode since I only have an Intel integrated on my laptop.
I'm on Ubuntu 16.04, caffe imports well.
Note: Téléchargements is french for downloads.

Thanks a lot for reading, I hope there is a solution to this problem. Thanks.

Attempt to free invalid pointer

Running this command on OSX
python ideepcolor.py --cpu_mode

Output:
.......0802 22:28:50.943502 3958428608 upgrade_proto.cpp:77] Attempting to upgrade batch norm layers using deprecated params: ./models/reference_model/model.caffemodel
I0802 22:28:50.943539 3958428608 upgrade_proto.cpp:80] Successfully upgraded batch norm layers using deprecated params.
I0802 22:28:50.943545 3958428608 net.cpp:744] Ignoring source layer img
I0802 22:28:50.943550 3958428608 net.cpp:744] Ignoring source layer img_lab
I0802 22:28:50.943557 3958428608 net.cpp:744] Ignoring source layer img_slice
I0802 22:28:50.943560 3958428608 net.cpp:744] Ignoring source layer data_ab_img_slice_1_split
I0802 22:28:50.943564 3958428608 net.cpp:744] Ignoring source layer data_l_meansub
I0802 22:28:50.943568 3958428608 net.cpp:744] Ignoring source layer data_ab_mask
I0802 22:28:50.943599 3958428608 net.cpp:744] Ignoring source layer conv1_2norm_conv1_2norm_0_split
I0802 22:28:50.943734 3958428608 net.cpp:744] Ignoring source layer conv2_2norm_conv2_2norm_0_split
I0802 22:28:50.962493 3958428608 net.cpp:744] Ignoring source layer conv8_3norm_conv8_3norm_0_split
I0802 22:28:50.962527 3958428608 net.cpp:744] Ignoring source layer conv9_1
I0802 22:28:50.962535 3958428608 net.cpp:744] Ignoring source layer conv2_2_short
I0802 22:28:50.962541 3958428608 net.cpp:744] Ignoring source layer conv9_1_comb
I0802 22:28:50.962546 3958428608 net.cpp:744] Ignoring source layer relu9_1_comb
I0802 22:28:50.962553 3958428608 net.cpp:744] Ignoring source layer conv9_2
I0802 22:28:50.962560 3958428608 net.cpp:744] Ignoring source layer relu9_2
I0802 22:28:50.962568 3958428608 net.cpp:744] Ignoring source layer conv9_2norm
I0802 22:28:50.962574 3958428608 net.cpp:744] Ignoring source layer conv10_1
I0802 22:28:50.962579 3958428608 net.cpp:744] Ignoring source layer conv1_2_short
I0802 22:28:50.962586 3958428608 net.cpp:744] Ignoring source layer conv10_1_comb
I0802 22:28:50.962592 3958428608 net.cpp:744] Ignoring source layer relu10_1_comb
I0802 22:28:50.962599 3958428608 net.cpp:744] Ignoring source layer conv10_2
I0802 22:28:50.962605 3958428608 net.cpp:744] Ignoring source layer relu10_2
I0802 22:28:50.962612 3958428608 net.cpp:744] Ignoring source layer conv10_ab
I0802 22:28:50.962618 3958428608 net.cpp:744] Ignoring source layer pred_ab_1
I0802 22:28:50.962625 3958428608 net.cpp:744] Ignoring source layer pred_ab_2
I0802 22:28:50.962631 3958428608 net.cpp:744] Ignoring source layer loss_ab
I0802 22:28:50.962635 3958428608 net.cpp:744] Ignoring source layer loss_ab_loss_ab_0_split
I0802 22:28:50.962641 3958428608 net.cpp:744] Ignoring source layer data_ab_rs
I0802 22:28:50.962644 3958428608 net.cpp:744] Ignoring source layer gt_ab_313
I0802 22:28:50.971132 3958428608 net.cpp:744] Ignoring source layer SoftmaxLossPred
I0802 22:28:50.971160 3958428608 net.cpp:744] Ignoring source layer loss_class_SoftmaxLossPred_0_split
I0802 22:28:50.971166 3958428608 net.cpp:744] Ignoring source layer loss_log
Setting ab cluster centers in layer: pred_ab
Setting upsampling layer kernel: pred_313_us
src/tcmalloc.cc:284] Attempt to free invalid pointer 0x7fbce7f29f50
Abort trap: 6

can't connect to certain IP address 192.168.1.13:0

I went to this youtube link and followed the installation instructions there. It involves docker and xquartz:

https://youtu.be/IORcb4lQlxQ

So, I follow all the instructions and this is the message I get in my terminal window instead of a GUI showing up:

Setting upsampling layer kernel: pred_313_us
ideepcolor.py: cannot connect to X server 192.168.1.13:0
wills-iMac:~ homevideostation$

I know that it should say mortar and pestle in the line where is says it can't connect me. Help is appreciated. I didn't bother with caffe or ubuntu or anything, I don't know if that is my problem.
All I did was to just follow what was in the video including running docker and xquartz.

Add compatibility with python 3

First of all: thanks for this project, it works really nice.

Python3 support would be nice. Especially because the debian repos only have the python3-caffe package but not the one for python 2.

I got it running under py3 (and could send an PR if requested).

The main problems are:

  • Some missing brackets at print statements.
  • PyQt4 under python 3 doesn't have QString (or it least it looks like it), but that can be replaced by simply using strings with something like:
try:
    from PyQt4.QtCore import QString
except ImportError:
    QString = str

should work.

  • Python 3 always returns a float as a result of divisions by / (not //) which lead to some problems with sklearn/numpy. Downgrading numpy to version 1.11.0 ike described here solved that problem.

CPU-only

The requirement said" CPU or NVIDIA GPU + CUDA CuDNN."

I have everything installed, but upon launching ideepcolor.py, i got this error:
[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
F1128 09:34:40.174459 44277 common.cpp:66] Cannot use GPU in CPU-only Caffe: check mode.

Does it really need caffe with CUDA? If not how do I get around this?

out of memory

I try to run:
python ideepcolor.py --gpu 0
But I get the error:
Setting ab cluster centers in layer: pred_ab
Setting upsampling layer kernel: pred_313_us
test_imgs/mortar_pestle.jpg
scale = 2.000000
F0805 19:15:20.179786 3421 syncedmem.cpp:71] Check failed: error == cudaSuccess (2 vs. 0) out of memory
*** Check failure stack trace: ***
Aborted

I have GTX 660 with 2GB of vram. Is it not enough? What graphic card do I need to run ideepcolor?

Missing dependency pts_on_hull.py

There is still a link to a personal file pts_on_hull.py in /home/eecs/rich.zhang/src/projects/cross_domain/save/ab_grid_10

Can you please integrate this necessary file in the project, so when we pull it from git it will work without pulling this file separate

Unicode String and Integer Division related crashes (python2 vs. python3)

My attempted command is python3 ideepcolor.py --cpu_mode
All dependencies seem to have installed correctly.
I am obtaining the following crash on Intel i3 w/ Debian 9 Codename Stretch:

b'test_imgs/mortar_pestle.jpg'
Traceback (most recent call last):
  File "ideepcolor.py", line 60, in <module>
    window = gui_design.GUIDesign(color_model=colorModel, dist_model=distModel, img_file=args.image_file, load_size=args.load_size, win_size=args.win_size)
  File "/home/bb/ideepcolor/ui/gui_design.py", line 112, in __init__
    self.drawWidget.init_result(img_file)
  File "/home/bb/ideepcolor/ui/gui_draw.py", line 54, in init_result
    self.read_image(image_file.encode('utf-8'))  # read an image
  File "/home/bb/ideepcolor/ui/gui_draw.py", line 79, in read_image
    im_bgr = cv2.imread(image_file)
TypeError: bad argument type for built-in operation

Thanks for your help.

The PyTorch model won't load in PyTorch 0.4.*

Hi,
It is quite a small details, though useful to know. The pre-trained model won't work in PyTorch 0.4.* because normalization layers now track the number of batches with the tensor num_batches_tracked [see code]. When loading a state_dict, it then expects these tensors and crashes on a KeyError. Maybe just adding the pytorch version in requirements could help future users.
Thanks

Keep the original width & height of image

Is there anyway to have same width & height with original for the output picture?
It always output picture with fixed width 1200px no matter what size of image that I loaded.

Thanks

Size of palette

Hello!
Can you please tell me that can we increase the size of palette or suggested colors using this code? If so then which command lines will be require to make changes in the code?

Thanks in advance

Regards
Aroosh Fatima

Pixmap is null ; Crashed when running ideepcolor

When I run the python ideepcolor.py --cpu_mode,it crashed like below:

Setting ab cluster centers in layer: pred_ab
Setting upsampling layer kernel: pred_313_us
test_imgs/mortar_pestle.jpg
scale = 2.000000
QPixmap::scaled: Pixmap is a null pixmap
QWidget: Must construct a QApplication before a QPaintDevice
Abort trap: 6

could anyone help?
best wishes!

Incomplete installation instructions

It's an extremely interesting project, thank you much for sharing it!

Unfortunately, instructions on the installation are not particularly clear and require a significant amount of trial and error, even for people with Python experience.

I personally gave up before having anything working, but I'm sure a step-by-step guide would be definitely much appreciated by many users.

Does color input keep the same after colorization?

Hi,
I have not installed the code successfully.
Could you tell me, is the color at input point will not be changed after colorization or it will be changed little bit? I would like the input color is not be changed after colorization.

Thank you.

Python crash when running

I think I have everything installed ok on my OSX box using Homebrew Python. However when I run the app, it crashes.

MBP:ideepcolor2 vb$ python ideepcolor.py --cpu_mode
/usr/local/lib/python2.7/site-packages/matplotlib/init.py:1405: UserWarning:
This call to matplotlib.use() has no effect because the backend has already
been chosen; matplotlib.use() must be called before pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.

warnings.warn(_use_error_msg)
Segmentation fault: 11

Unsure what to do here. Thanks.

Dump:
Process: Python [8869]
Path: /usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier: org.python.python
Version: 2.7.13 (2.7.13)
Code Type: X86-64 (Native)
Parent Process: bash [2734]
Responsible: Python [8869]
User ID: 501

Date/Time: 2017-08-02 21:59:36.346 -0400
OS Version: Mac OS X 10.12.4 (16E195)
Report Version: 12
Anonymous UUID: 4F56180F-9C60-E508-2D95-DD3E9AFDCA1F

Time Awake Since Boot: 2800 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]

VM Regions Near 0:
-->
__TEXT 000000010a365000-000000010a367000 [ 8K] r-x/rwx SM=COW /usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 org.python.python 0x00000001137d8e6f PyInt_FromLong + 33
1 caffe.so 0x00000001128055b8 boost::python::detail::keywords<1ul>& boost::python::detail::keywords<1ul>::operator=(int const&) + 24
2 caffe.so 0x0000000112801890 caffe::init_module__caffe() + 592
3 libboost_python.dylib 0x000000011375adbe boost::python::handle_exception_impl(boost::function0) + 78
4 libboost_python.dylib 0x000000011375bd19 boost::python::detail::init_module(char const*, void (*)()) + 121
5 org.python.python 0x000000010a405e0c PyImport_LoadDynamicModule + 150
6 org.python.python 0x000000010a404ba6 import_submodule + 273
7 org.python.python 0x000000010a404768 load_next + 272
8 org.python.python 0x000000010a403783 PyImport_ImportModuleLevel + 575
9 org.python.python 0x000000010a3e743f builtin___import
+ 124
10 org.python.python 0x000000010a374cda PyObject_Call + 97
11 org.python.python 0x000000010a3f4528 PyEval_CallObjectWithKeywords + 159
12 org.python.python 0x000000010a3f007a PyEval_EvalFrameEx + 16564
13 org.python.python 0x000000010a3ebde5 PyEval_EvalCodeEx + 1579
14 org.python.python 0x000000010a3eb7b4 PyEval_EvalCode + 32
15 org.python.python 0x000000010a402389 PyImport_ExecCodeModuleEx + 212
16 org.python.python 0x000000010a4050de load_source_module + 1049
17 org.python.python 0x000000010a404ba6 import_submodule + 273
18 org.python.python 0x000000010a404768 load_next + 272
19 org.python.python 0x000000010a403783 PyImport_ImportModuleLevel + 575
20 org.python.python 0x000000010a3e743f builtin___import
_ + 124
21 org.python.python 0x000000010a374cda PyObject_Call + 97
22 org.python.python 0x000000010a3f4528 PyEval_CallObjectWithKeywords + 159
23 org.python.python 0x000000010a3f007a PyEval_EvalFrameEx + 16564
24 org.python.python 0x000000010a3ebde5 PyEval_EvalCodeEx + 1579
25 org.python.python 0x000000010a3eb7b4 PyEval_EvalCode + 32
26 org.python.python 0x000000010a402389 PyImport_ExecCodeModuleEx + 212
27 org.python.python 0x000000010a4050de load_source_module + 1049
28 org.python.python 0x000000010a405372 load_package + 328
29 org.python.python 0x000000010a404ba6 import_submodule + 273
30 org.python.python 0x000000010a4047a6 load_next + 334
31 org.python.python 0x000000010a403783 PyImport_ImportModuleLevel + 575
32 org.python.python 0x000000010a3e743f builtin___import__ + 124
33 org.python.python 0x000000010a374cda PyObject_Call + 97
34 org.python.python 0x000000010a3f4528 PyEval_CallObjectWithKeywords + 159
35 org.python.python 0x000000010a3f007a PyEval_EvalFrameEx + 16564
36 org.python.python 0x000000010a3ebde5 PyEval_EvalCodeEx + 1579
37 org.python.python 0x000000010a3eb7b4 PyEval_EvalCode + 32
38 org.python.python 0x000000010a402389 PyImport_ExecCodeModuleEx + 212
39 org.python.python 0x000000010a4050de load_source_module + 1049
40 org.python.python 0x000000010a404ba6 import_submodule + 273
41 org.python.python 0x000000010a4049c1 ensure_fromlist + 331
42 org.python.python 0x000000010a403862 PyImport_ImportModuleLevel + 798
43 org.python.python 0x000000010a3e743f builtin___import__ + 124
44 org.python.python 0x000000010a374cda PyObject_Call + 97
45 org.python.python 0x000000010a3f4528 PyEval_CallObjectWithKeywords + 159
46 org.python.python 0x000000010a3f007a PyEval_EvalFrameEx + 16564
47 org.python.python 0x000000010a3ebde5 PyEval_EvalCodeEx + 1579
48 org.python.python 0x000000010a3eb7b4 PyEval_EvalCode + 32
49 org.python.python 0x000000010a40cfdf run_mod + 49
50 org.python.python 0x000000010a40d086 PyRun_FileExFlags + 130
51 org.python.python 0x000000010a40cc03 PyRun_SimpleFileExFlags + 697
52 org.python.python 0x000000010a41dee5 Py_Main + 3013
53 libdyld.dylib 0x00007fffe2ffb235 start + 1

Confusion: is the network stochastic?

Hi. I am rather confused by the first figure of the paper (migrant woman) where you show the greyscale image + user input and to the right you show 3 generated images. Is the network deterministic or stochastic? Thanks.

Can we get a working Docker image or Dockerfile to aid installation?

I've been trying to install the dependencies for this project about a half dozen times, and still haven't been able to create a working image. If someone who has been able to get this working could write up a Dockerfile (and better yet, build an image to Docker hub) it would certainly make installation much easier.

Short of that, if I could get answers to the following questions, it would really help me out:

  • Should I install caffe against the most modern versions of CUDA and CuDNN? Or are there older versions that are preferred?
  • I keep getting told (by Ubuntu 16.04) that IPython is deprecated, and that I should install Jupyter. Is that necessary? Will this work with Jupyter? Or should I just find a way to plow through?
  • When installing python dependencies (and messing with Caffe's Makefile.config) should I be trying to target Python 2 or 3?
  • Is there a preferred way of installing OpenCV? Should it be installed before Caffe? And should I use the version from pip or apt?

Thanks!

missed required dependencies

I had to install the following two dependencies before I was able to start the software:

sci-libs/scikits_learn
dev-python/jsonschema

The list might not be comprehensive since I have a fully loaded system. Please double check "import" lines.

Windows Support?

As I see, the majority of users who actually will prefer to use a GUI are on the Windows platform. Does this code repo work with Windows?
I have an active installation of most of what is mentioned here, so I'm contemplating a test run.
Eager to hear from you guys!

Color data out of range

I'm not sure if this is an real issue, it's just warning, but it can be a sign of some bigger problem.
I get this very often:

('mouse press', PyQt4.QtCore.QPoint(338, 265))
/home/tranvick/.local/lib/python2.7/site-packages/skimage/color/colorconv.py:985: UserWarning: Color data out of range: Z < 0 in 22149 pixels
warn('Color data out of range: Z < 0 in %s pixels' % invalid[0].size)

Limited color choices and what is the method to colorize surroundings

Though it give us some choices, there are limited choices in the palette.
Does it means that we cannot colorize it to any color? And I'm confused that when colorizing after deciding the (a,b) for a point, how is each pixel around colorized by the network, I mean, does it colorized the around area according to the lightness and segmentation?
Hope that somebody can help.
greetings!

out of VRAM

I get this error:

test_imgs/mortar_pestle.jpg scale = 2.000000 F0520 22:52:34.222404 2410 syncedmem.cpp:71] Check failed: error == cudaSuccess (2 vs. 0) out of memory *** Check failure stack trace: *** Aborted (core dumped)

Trying to run the full GUI demo on a GeForce 970M with 3GB VRAM. Is that not enough? How can I change a configuration to make it use less?

Where do I find the stack trace?

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?

Hardware requirements

I'm not sure is this the right place for asking this question, but I was wondering what are the minimum, and what are the recommended hardware requirements for running this software? It's running very sluggish on my computer

some wrong when run to globalmodel

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!

Windows Installation - Models

I am new to most parts of this project (Anaconda/Python, Caffe, Visual Studio etc.) so please understand my question may be very basic or even obvious.

What I have done
After a longer phase of trial & error I have managed to

  • build Caffe under Windows
  • Install Anaconda/Python
  • Install missing packages and update/downgrade any parts that will lead to error messages (scikit-image, scikit-learn, opencv, Qt4, QDarkStyle etc.)
  • Run ideepcolor.py and find workarounds for all error messages, like:
    • no module named skimage
    • dll load failed (PIL)
    • module object has no attribute bool_
    • dll load failed (from . import _imaging as core / image.py)
    • The specified module could not be found (DLL missing)
      and some others

Status/Problem

  • ideepcolor.py will not do anything:
  • I can run ideepcolor.py without any error messages and without crashing
  • but the terminal window will not change except for the blinking cursor, and the memory usage will not change (memory usage around 45,5 to 50,8 MB, depending on command; processor usage moving around 16%; HDD usage is ZERO).

Question

  • Does that mean the program has hung up? Or do I just have to wait VERY long time until processing will move on (I have already waited for several hours without any change)?
  • As I do not get error messages any more, what can I possibly do to find the source of error?

Any help would be highly appreciated!
Kind regards,

K
grafik
grafik

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.