0

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:

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

  2. 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
Shai
  • 111,146
  • 38
  • 238
  • 371
xhsoldier
  • 575
  • 6
  • 31

1 Answers1

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.

Community
  • 1
  • 1
Shai
  • 111,146
  • 38
  • 238
  • 371