Caffe SSD AttributeError: 'module' object has no attribute 'LabelMap'
caffe ssd 错误描述:
AttributeError: 'module' object has no attribute 'LabelMap'
SSD from caffe.proto import caffe_pb2 ImportError: No module named caffe.proto 解决方法
在用voc2007和voc2012的数据训练基于caffe的SSD模型的时候,我们需要将图片数据转换成lmdb格式,用到的脚本文件是SSD源码里面提供的create_data.sh(具体位置在$CAFFE_ROOT/data/VOC0712/create_data.sh)。
修改完,在执行命令 sh create_data.sh的时候,有可能会出现以下error:

因为这个问题在晚上弄了一个下午,尝试过例如:https://blog.csdn.net/lanyuelvyun/article/details/73628152 等博客所说的方法,就是把把caffe中的和python相关的内容的路径添加到python的编译路径中。然而这样的方法并没有用,所以纠结了一个下午。
解决方法:
1.打开 ~/caffe-ssd/scripts/create_annoset.py 文件。
2.在import sys和from caffe.proto import caffe_pb2这两段代码中间插入sys.path.insert(0,’/home/xxx/caffe_ssd/python’)这句代码,xxx为你们自己的用户名,/home/xxx/caffe_ssd就是caffe-ssd的根目录。

然后保存文件。在执行命令 sudo ./data/VOC0712/create_data.sh 的时候就顺利通过了。
---------------------
作者:curious999
来源:CSDN
原文:https://blog.csdn.net/curious999/article/details/81225624
版权声明:本文为博主原创文章,转载请附上博文链接!
Caffe SSD AttributeError: 'module' object has no attribute 'LabelMap'的更多相关文章
- 在运行create_list.sh时候报错:AttributeError: 'module' object has no attribute 'LabelMap'
Traceback (most recent call last):File "/opt/xuben-project/caffe/data/VOC0712/../../scripts/cre ...
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...
- attributeError:'module' object has no attribute ** 解决办法
写了一个小脚本,执行的时候报错: Traceback (most recent call last): File "F:/test/qrcode.py", line 109, in ...
- AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'
/*************************************************************************** * AttributeError: 'modu ...
- AttributeError: 'module' object has no attribute 'Thread'
$ python thread.py starting at: 2015-08-05 00:24:24Traceback (most recent call last): File "th ...
- 安装pandas报错(AttributeError: 'module' object has no attribute 'main')
在pycharm中安装pandas出现报错:AttributeError: 'module' object has no attribute 'main', 刚开始以为是pip的版本太旧了,于是乎将其 ...
- AttributeError: 'module' object has no attribute 'enableTrace'
Traceback (most recent call last): File "Long-lived-connection.py", line 29, in <module ...
- python问题:AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
AttributeError: 'module' object has no attribute 'SSL_ST_INIT' 问题背景: 下载工具wydomain,安装依赖包以后,出现下图问题. 几经 ...
- AttributeError: 'module' object has no attribute 'main'
本机环境:ubuntu16.04, ros-kinetic $ roscore 报错 Traceback (most recent call last): File , in <module& ...
随机推荐
- ionic获取ios唯一设备id的解决方案
经常有朋友来问这个问题. 每次都去解释这个问题也浪费不少时间, 所以还是开一篇文章, 把这个问题说清楚吧. 先纠正一个误区吧: 有同学可以通过ionic natvie的device插件获取. 我们在文 ...
- 多线程编程中的EventWaitHandler
首先如果读者是.Net多线程编程的老手,就不用看这篇文章了,这篇文章主要是阐述EventWaitHandler的一些基本原理和用法. 在.NET的System.Threading命名空间中有一个名叫W ...
- java集合类TreeMap和TreeSet
看这篇博客前,可以先看下下列这几篇博客 Red-Black Trees(红黑树) (TreeMap底层的实现就是用的红黑 ...
- android touch事件分发流程
韩梦飞沙 韩亚飞 313134555@qq.com yue31313 han_meng_fei_sha 三个方法:分发触摸事件dispatchTouchEvent.在触摸事件的时候onTouc ...
- Codeforces.1041F.Ray in the tube(思路)
题目链接 \(Description\) 有两条平行于\(x\)轴的直线\(A,B\),每条直线上的某些位置有传感器.你需要确定\(A,B\)轴上任意两个整点位置\(x_A,x_B\),使得一条光线沿 ...
- BZOJ.2938.[POI2000]病毒(AC自动机)
题目链接 \(Description\) 给n个模式串,问是否存在长度无限的主串,使得任何一个模式串都没有在主串中出现. \(Solution\) 先建AC自动机. 假设我们有了一个无限长的安全代码, ...
- UOJ.179.线性规划(单纯形)
题目链接 这写得还不错:http://www.cnblogs.com/zzqsblog/p/5457091.html 引入基变量\(x_{i+n}\),将约束\(\sum_{i=1}^m a_{ij} ...
- RelativeSource的用法
绑定自身的数据 <Style TargetType="Button"> <Setter Property="Width" Value=&quo ...
- 关于dubbo服务的xml配置文件报错的问题
在配置dubbo服务的过程中,经常会遇到虽然程序能够跑起来,但是配置文件一堆红叉,虽然不影响功能,但是确实很让人恶心. 报错信息如下: Multiple annotations found at th ...
- MyBatis3与Spring3无缝集成-从iBatis平滑过渡
从2010开始接触iBatis到现在,一直到现在把iBatis作为数据访问层ORM.为了演示一个Web应用,今天又搭了个SpringMVC应用,由于应用比较简单,Spring版本直接用最新版本3.2. ...