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'的更多相关文章

  1. 在运行create_list.sh时候报错:AttributeError: 'module' object has no attribute 'LabelMap'

    Traceback (most recent call last):File "/opt/xuben-project/caffe/data/VOC0712/../../scripts/cre ...

  2. Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法

    最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...

  3. attributeError:'module' object has no attribute ** 解决办法

    写了一个小脚本,执行的时候报错: Traceback (most recent call last): File "F:/test/qrcode.py", line 109, in ...

  4. AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'

    /*************************************************************************** * AttributeError: 'modu ...

  5. AttributeError: 'module' object has no attribute 'Thread'

    $ python thread.py starting at: 2015-08-05 00:24:24Traceback (most recent call last):  File "th ...

  6. 安装pandas报错(AttributeError: 'module' object has no attribute 'main')

    在pycharm中安装pandas出现报错:AttributeError: 'module' object has no attribute 'main', 刚开始以为是pip的版本太旧了,于是乎将其 ...

  7. AttributeError: 'module' object has no attribute 'enableTrace'

    Traceback (most recent call last): File "Long-lived-connection.py", line 29, in <module ...

  8. python问题:AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

    AttributeError: 'module' object has no attribute 'SSL_ST_INIT' 问题背景: 下载工具wydomain,安装依赖包以后,出现下图问题. 几经 ...

  9. AttributeError: 'module' object has no attribute 'main'

    本机环境:ubuntu16.04,  ros-kinetic $ roscore 报错 Traceback (most recent call last): File , in <module& ...

随机推荐

  1. Python PyCharm编译器

    PyCharm编译器有很强大的代码提示功能,业界都说很好用,所以我尝试着安装并使用,以下是过程. 下载地址:http://www.jetbrains.com/pycharm/download/#sec ...

  2. Python3安装turtle提示错误:Command "python setup.py egg_info" failed with error code 1

    Python3安装turtle提示错误:Command "python setup.py egg_info" failed with error code 1 Python3.5安 ...

  3. WIN10下 VS2017+OpenCv 3.4.1 配置

    写篇博客来记录一下opencv在VS中的配置. 一.下载OpenCv安装包 下载的途径有三种: 1.官网下载 但是官网下载真的是贼头大,首先下载好好的突然说下载中断,而且无法恢复,此外,还慢,毕竟外网 ...

  4. 运行程序,解读this指向---case6

    function Parent() { this.a = 1; this.b = [1, 2, this.a]; this.c = { ckey: 5 }; this.show = function ...

  5. 【BZOJ 1211】 1211: [HNOI2004]树的计数 (prufer序列、计数)

    1211: [HNOI2004]树的计数 Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 2468  Solved: 868 Description 一 ...

  6. luogu P1401 城市

    题目链接 luogu P1401 城市 题解 二分最小边权,dinic检验 代码 // luogu-judger-enable-o2 /* 二分最小边权,dinic检验 */ #include< ...

  7. BZOJ4065 : [Cerc2012]Graphic Madness

    因为两棵树中间只有k条边,所以这些边一定要用到. 对于每棵树分别考虑: 如果一个点往下连着两个点,那么这个点往上的那条边一定不能用到. 如果一个点往下连着一个点,那么这个点往上的那条边一定不能用到. ...

  8. hadoop 视频教程3之实战教程

    一,视频内容: 海量数据处理平台框架 hadoop介绍 hadoop 生态系统介绍 hdfs 设计原则 hdfs 系统架构 namenode datanode secondarynamenode hd ...

  9. VC6微软正则表达式greta使用案例

    #include <string> #include "regexpr2.h" using namespace std; using namespace regex;/ ...

  10. 如何快速将Linux文件系统迁移到Azure存储

    概述 前一段时间一直在给一个客户将原先搭载在Linux(客户使用的是CentOS 7.0)上的NFS快速迁移到Azure存储上,并且为了保证数据完整性还需要另开一个存储做冷备,架构图如下: 通过Cli ...