【问题标题】:Classify image with pretrained caffemodel in pycaffe [duplicate]在pycaffe中使用预训练的caffemodel对图像进行分类[重复]
【发布时间】:2017-06-08 06:04:11
【问题描述】:

我想使用预训练模型对图像进行分类。我有 caffemodel 和 prototxt 文件,但是当我在 caffe for python 中加载模型时,使用

net = caffe.Net('/home/me/data/f1.prototxt',
                '/home/me/data/f1.caffemodel',
                caffe.TEST)

我收到了错误

Check failed: mdb_status == 0 (2 vs. 0) No such file or directory

有一个类似的问题here 但该示例用于训练模型,因此不适用于我的情况。我在这里错过了什么?

文件路径和权限正确。

【问题讨论】:

  • 这与您链接的答案相同。仔细查看 f1.prototxt 文件,确保没有意外留下“数据”层

标签: python caffe pycaffe


【解决方案1】:

向上滚动日志文件;应该有一条更早的消息告诉您它无法打开的确切文件。检查路径和权限。当我得到这个时,通常是因为我从错误的目录中调用了caffe

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-07-18
    • 2020-11-29
    • 2018-09-25
    • 2017-12-28
    • 2020-01-12
    • 1970-01-01
    • 2015-09-09
    • 2020-02-04
    相关资源
    最近更新 更多