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& ...
随机推荐
- Redux 和 ngrx 创建更佳的 Angular 2
Redux 和 ngrx 创建更佳的 Angular 2 翻译:使用 Redux 和 ngrx 创建更佳的 Angular 2 原文地址:http://onehungrymind.com/build- ...
- Storm常用操作命令及WordCount
Storm常用操作命令 1.任务提交命令:storm jar [jar路径] [拓扑包名.拓扑类名] [拓扑名称] storm jar /export/servers/storm/examples/s ...
- hadoop2.6.4的HA集群搭建超详细步骤
hadoop2.0已经发布了稳定版本了,增加了很多特性,比如HDFS HA.YARN等.最新的hadoop-2.6.4又增加了YARN HA 注意:apache提供的hadoop-2.6.4的安装包是 ...
- nginx no input file specified
今天在lnmp上调试php项目,之前已经在上面测试过tp5框架,可以正常访问.但是新项目由于项目中有些路径是写固定路径的.为了不去修改代码.配置新项目的时候,为新项目设置新的目录.问题就出现了,网页提 ...
- 图片视频访问servlet(支持苹果视频断点续传)
package com.sm.common.servlet; import java.io.File; import java.io.FileInputStream; import java.io.F ...
- java 生成随机数字
for(int i=0;i<size1;i++){ int n = (int)(java.lang.Math.random()*99); LinkNode newLink = new LinkN ...
- Android- SharedPreferences 使用详解
Android-SharedPreferences 使用详解 参考 https://developer.android.google.cn/reference/android/content/Shar ...
- 【转】让你彻底搞懂websocket
一.websocket与http WebSocket是HTML5出的东西(协议),也就是说HTTP协议没有变化,或者说没关系,但HTTP是不支持持久连接的(长连接,循环连接的不算) 首先HTTP有 1 ...
- BZOJ.2142.礼物(扩展Lucas)
题目链接 答案就是C(n,m1) * C(n-m1,m2) * C(n-m1-m2,m3)...(mod p) 使用扩展Lucas求解. 一个很简单的优化就是把pi,pi^ki次方存下来,因为每次分解 ...
- BZOJ.1143.[CTSC2008]祭祀(Dilworth定理 最大流ISAP)
题目链接 题目是求最长反链,反链指点集内任意两点不能互相到达. 根据Dilworth定理,在DAG中,\[最长反链 = 最小路径覆盖 = V - 最大匹配数\] 用Floyd求一遍传递闭包后,在所有可 ...