Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Training Issue likely from Version Conflicts #6

Open
mcever opened this issue Jan 7, 2019 · 6 comments
Open

Training Issue likely from Version Conflicts #6

mcever opened this issue Jan 7, 2019 · 6 comments

Comments

@mcever
Copy link

mcever commented Jan 7, 2019

Hi,

I am trying to use the DSRG code, and I am beginning by trying to train a model myself using the run script; however, I get the following error each time the code tries to import caffe:

$ bash run.sh
/media/ssd1/austin/DSRG/deeplab-public-ver2/python
Traceback (most recent call last):
File "../../tools/train.py", line 12, in
import caffe
File "/media/ssd1/austin/DSRG/deeplab-public-ver2/python/caffe/init.py", line 1, in
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver
, AdamSolver
File "/media/ssd1/austin/DSRG/deeplab-public-ver2/python/caffe/pycaffe.py", line 15, in
import caffe.io
File "/media/ssd1/austin/DSRG/deeplab-public-ver2/python/caffe/io.py", line 8, in
from caffe.proto import caffe_pb2
File "/media/ssd1/austin/DSRG/deeplab-public-ver2/python/caffe/proto/caffe_pb2.py", line 905, in
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\020\001')), file=DESCRIPTO$),
TypeError: new() got an unexpected keyword argument 'file'

I found a similar issue here (BVLC/caffe#6143), which suggests that I have the wrong version of something, but I'm trying to work out which dependency is causing the problem. I don't have much experience with caffe, but I expect it's an issue with Ubuntu packages (like libprotobuf or protoc) as I'm using a virtual environment for all my Python packages.

Any help is much appreciated.

@mcever
Copy link
Author

mcever commented Jan 7, 2019

I was able to move past this particular issue by upgrading my python protobuf to 3.6.1 over the 3.0.0 listed in python-requirements.txt.

@mcever
Copy link
Author

mcever commented Jan 7, 2019

Further, I had to pip install pyyaml and sklearn.

@speedinghzl
Copy link
Owner

speedinghzl commented Jan 8, 2019

@mcever Have you solved the problem? You throw much information which may be irrelevant to your question. Maybe you can check your caffe by running make runtest before running DSRG.

@mcever
Copy link
Author

mcever commented Jan 8, 2019

@speedinghzl thanks for the reply. Yes, the issue was that the python-requirements.txt has an old version of protobuf that is incompatible with the project, and the python-requirements.txt is missing a couple of other dependencies.

@mcever
Copy link
Author

mcever commented Jan 8, 2019

Another missing Python package: pydensecrf, referenced in the code but not in python-requirements.txt https://github.com/lucasb-eyer/pydensecrf

@mcever
Copy link
Author

mcever commented Jan 15, 2019

Just want to tag these on here as well:

  1. run.sh line 10 has a hardcoded path that should be PASCAL_DIR
  2. python-tk as a dependency, installed via apt-get

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants