在運行create_list.sh時候報錯: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'
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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM