MhLiao / TextBoxes

TextBoxes: A Fast Text Detector with a Single Deep Neural Network
https://github.com/MhLiao/TextBoxes
Other
633 stars 154 forks source link

error in create_data.sh when creating lmdb #80

Closed 19931991 closed 6 years ago

19931991 commented 6 years ago

my error is:

neu@neu-H81MDV5:~/gzl/TextBoxes-TextBoxes$ ./data/VOC_gzl/create_data.sh Traceback (most recent call last): File "/home/neu/gzl/TextBoxes-TextBoxes/data/VOC_gzl/../../scripts/create_annoset.py", line 103, in label_map = caffe_pb2.LabelMap() AttributeError: 'module' object has no attribute 'LabelMap' Traceback (most recent call last): File "/home/neu/gzl/TextBoxes-TextBoxes/data/VOC_gzl/../../scripts/create_annoset.py", line 103, in label_map = caffe_pb2.LabelMap() AttributeError: 'module' object has no attribute 'LabelMap'

and I reference the code of ssd , and add
export PYTHONPATH=/home/neu/gzl/TextBoxes-TextBoxes/python into the .bashrc , and my part of bashrc is :

added by tzf

export PYTHONPATH=/home/neu/mxnet/python

export PYTHONPATH=/home/neu/tzf/FCIS/mxnet/python

added by Anaconda2 installer

export PATH="/home/neu/anaconda2/bin:$PATH"

added by Anaconda3 installer

export PATH="/home/neu/anaconda3/bin:$PATH"

wtx ssd

export PYTHONPATH=/home/neu/work/ssd/python

gzl ssd

export PYTHONPATH=/home/neu/gzl/TextBoxes-TextBoxes/python

wtx caffe

export PYTHONPATH=/home/neu/caffe-master/python export PATH=$PATH:/usr/local/MATLAB/R2016b/bin
how can I solve the problem ???

19931991 commented 6 years ago

@MhLiao

MhLiao commented 6 years ago

You can try to add: caffe_root = '/home/neu/gzl/TextBoxes-TextBoxes/' import os os.chdir(caffe_root) import sys sys.path.insert(0, 'python') import caffe in the scripts/create_annoset.py

19931991 commented 6 years ago

Thanks for your guide, this is my create_annoset.py . image

but it does not matter,

neu@neu-H81MDV5:~/gzl/TextBoxes-TextBoxes$ ./data/VOC_gzl/create_data.sh Traceback (most recent call last): File "/home/neu/gzl/TextBoxes-TextBoxes/data/VOC_gzl/../../scripts/create_annoset.py", line 110, in label_map = caffe_pb2.LabelMap() AttributeError: 'module' object has no attribute 'LabelMap' Traceback (most recent call last): File "/home/neu/gzl/TextBoxes-TextBoxes/data/VOC_gzl/../../scripts/create_annoset.py", line 110, in label_map = caffe_pb2.LabelMap() AttributeError: 'module' object has no attribute 'LabelMap' neu@neu-H81MDV5:~/gzl/TextBoxes-TextBoxes$

Are there any other ways? Thank you very much ! @MhLiao

19931991 commented 6 years ago

I have solved the prolem by add export PYTHONPATH=/home/neu/gzl/TextBoxes-TextBoxes/python behind the path of caffe . Thank you very much!

tahriribraq commented 4 years ago

I have solved the prolem by add export PYTHONPATH=/home/neu/gzl/TextBoxes-TextBoxes/python behind the path of caffe . Thank you very much!

Hello! I'm having the same problem trying to run create_annoset.py from this repo: https://github.com/weiliu89/caffe/tree/ssd As you can see in the 1st screenshot, I don't have caffe root path at the top like you do, instead it's below all the parsers. I have tried to add the export pythonpath line above the caffe_root but still got syntax error. Could you please tell me what you meant by saying you added it "behind" the path of caffe? I'm stuck so your help will be much appreciated! 1 2