0

I know the first step is to create two file lists with the corresponding labels, one for the training and one for the test set. Suppose the former is called train.txt and the latter val.txt. The paths in these file lists should be relative. The labels should start at 0 and look similar to this:

relative/path/img1.jpg 0
relative/path/img2.jpg 0
relative/path/img3.jpg 1
relative/path/img4.jpg 1
relative/path/img5.jpg 2

For each of these two sets, we will create a separate LevelDB. Is this formatted as a text file? I thought I would create a directory with several subdirectories for each of my classes. Do I manually have to create a text file?

Shai
  • 111,146
  • 38
  • 238
  • 371
Tyrion Lannister
  • 270
  • 2
  • 7
  • 20

1 Answers1

1

Please see this tutorial on how to use convert_imageset to build levelDb or lmdb datasets for caffe's training.

As you can see from these instruction it does not matter how you arrange the image files on your disk (same folder/different folders...) as long as you have the correct paths in your 'train.txt'/'val.txt' files relative to '/path/to/jpegs/' argument. But if you want to use convert_imageset tool, you'll have to create a text file listing all the images you want to use.

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