Traceback (most recent call last):
File "/opt/xuben-project/caffe/data/VOC0712/../../scripts/create_annoset.py", line 105, in <module>
label_map = caffe_pb2.LabelMap()
AttributeError: 'module' object has no attribute 'LabelMap'
Traceback (most recent call last):
File "/opt/xuben-project/caffe/data/VOC0712/../../scripts/create_annoset.py", line 105, in <module>
label_map = caffe_pb2.LabelMap()
AttributeError: 'module' object has no attribute 'LabelMap'
錯誤原因:caffe-ssd的Python環境變量未設置
解決方法:在終端執行:vim ~./bashrc
編譯bashrc文件,在文件末尾添加環境變量
export PYTHONPATH=$CAFFE_ROOT/python:$PYTHONPATH
之后:source ~/.bashrc
使設置生效,若是不行,請重啟后執行source ~/.bashrc