如何在caffe中制作train.txt文件 [英] how to make train.txt file in caffe

查看:59
本文介绍了如何在caffe中制作train.txt文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将caffe net与python一起使用.我有这样的train.txt文件:

I am using caffe net with python. I have train.txt file like this:

   train/1175-c/b0a1.bmp b0a1
   train/1175-c/b0a2.bmp b0a2
   train/1175-c/b0a3.bmp b0a3
   train/1175-c/b0a4.bmp b0a4
   train/1175-c/b0a5.bmp b0a5
   train/1175-c/b0a6.bmp b0a6
   train/1175-c/b0a7.bmp b0a7
   train/1175-c/b0a8.bmp b0a8
   train/1175-c/b0a9.bmp b0a9
   train/1175-c/b0aa.bmp b0aa

我的问题:

  1. 我可以在每行末尾使用十六进制代替int吗?

  1. Can I use hex instead of int at the end of each line?

关于标签,它是否需要从0开始

About the label, does it need to start from 0

或者我应该将以上内容更改为:

Or Should I change the above to:

train/1175-c/b0a1.bmp 45217
train/1175-c/b0a2.bmp 45218
train/1175-c/b0a3.bmp 45219
train/1175-c/b0a4.bmp 45220
train/1175-c/b0a5.bmp 45221
train/1175-c/b0a6.bmp 45222
train/1175-c/b0a7.bmp 45223
train/1175-c/b0a8.bmp 45224
train/1175-c/b0a9.bmp 45225
train/1175-c/b0aa.bmp 45226

推荐答案

如果您使用此 train.txt 列表作为,然后每行的第二部分必须>成为数字标签.
标签必须以0开头,因为它们在计算损失和准确性时用作预测的概率向量的索引.有关更多信息,请参见此线程.

If you are using this train.txt list as input for convert_imageset or as source for "ImageData" layer then the second part of each line must be a numeric label.
The labels must start with 0 since they are used as indices into the predicted probability vectors when computing loss and accuracy. See this thread for more information.

这篇关于如何在caffe中制作train.txt文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆