问题
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
my questions:
Can I use hex instead of int at the end of each line?
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
回答1:
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.
来源:https://stackoverflow.com/questions/41586449/how-to-make-train-txt-file-in-caffe