laughtervv / DepthAwareCNN

Depth-aware CNN for RGB-D Segmentation, ECCV 2018
MIT License
302 stars 81 forks source link

import error #3

Open xuwh15 opened 6 years ago

xuwh15 commented 6 years ago

@laughtervv Hello, I am trying to run the DepthAwareCNN code, when I write run the following command on python train.py --name nyuv2_VGGdeeplab_depthconv --dataset_mode nyuv2 --flip --scale --crop --colorjitter --depthconv --list ./lists/train.lst --vallist ./lists/val.lst --continue_train yet the following error popped out: image I tried to search on the Internet yet nothing valuable were acquired. What is the meaning of the following line: from .Deeplab import Deeplab_Solver and why using . before Deeplab.

gesture-label commented 5 years ago

@xuwh15 Hello, I have the same problem,have you resolved it?thanks~

gaoxiaoninghit commented 5 years ago

do you solve the problem?I meet the same problem with you,dear

kakira9618 commented 5 years ago

Hi! I've found there is no __init__.py in /models/ops/ directory. Creating an empty __init__.py file in /models/ops/ makes the problem solved.

but I got another error:

Traceback (most recent call last):
  File "train.py", line 38, in <module>
    model = create_model(opt, dataset.dataset)
  File "/home/kakira/research/DepthAwareCNN/models/models.py", line 6, in create_model
    from .Deeplab import Deeplab_Solver
  File "/home/kakira/research/DepthAwareCNN/models/Deeplab.py", line 14, in <module>
    import VGG_Deeplab as VGG_Deeplab
  File "/home/kakira/research/DepthAwareCNN/models/VGG_Deeplab.py", line 5, in <module>
    from .ops.depthconv.modules import DepthConv
  File "/home/kakira/research/DepthAwareCNN/models/ops/depthconv/modules/__init__.py", line 1, in <module>
    from .depthconv import DepthConv
  File "/home/kakira/research/DepthAwareCNN/models/ops/depthconv/modules/depthconv.py", line 7, in <module>
    from ..functions import depth_conv
  File "/home/kakira/research/DepthAwareCNN/models/ops/depthconv/functions/__init__.py", line 1, in <module>
    from .depthconv import depth_conv
  File "/home/kakira/research/DepthAwareCNN/models/ops/depthconv/functions/depthconv.py", line 5, in <module>
    from .._ext import depthconv
  File "/home/kakira/research/DepthAwareCNN/models/ops/depthconv/_ext/depthconv/__init__.py", line 3, in <module>
    from ._depthconv import lib as _lib, ffi as _ffi
ImportError: /home/kakira/research/DepthAwareCNN/models/ops/depthconv/_ext/depthconv/_depthconv.so: undefined symbol: _Py_Dealloc

Is there any solutions?

gaoxiaoninghit commented 5 years ago

@kakira9618 ,hello,you can try to add ''import cffi" in models/ops/depthconv/functions/depthconv.py's before the "from .._ext import depthconv", this problem may cause by the new version pytorch cannot support the ffi function,I do this solve the similar problem,hope this help you,thank you。if it cannot help you ,add "import cffi" and run "sh make.sh" again,just try。

lichunlei111 commented 4 years ago

@gaoxiaoning hello!How did you deal with “from .._ext import depthconv”?“_ext.depthconv” cannot be found at run time。 How do you operate about “sh make.sh”?

Italy2006 commented 4 years ago

@gaoxiaoning hello!How did you deal with “from .._ext import depthconv”?“_ext.depthconv” cannot be found at run time。 How do you operate about “sh make.sh”?

I have the same problem as you.I don't know where is the 'depthconv.depthconv_forward_cuda'.Anybody knows?