1

I'm writing code for machine learning program using Caffe-windows. I want to load the image file. but, I don't know that convert image to leveldb. Can not load the image? I mean, I want the image load. not leveldb data.

I'm using caffe-windows and visual studio 2013.

Thank you.

  • do you want to load a single image to test the net, or do you want to load many images to train it? – Shai Jun 02 '16 at 05:11
  • have you looked into the python interface for caffe [`caffe.io.load_image`](https://github.com/BVLC/caffe/blob/master/python/caffe/io.py#L279)? – Shai Jun 02 '16 at 05:12
  • Hi Shai. I'm using cpp. And, I want to load many images to train. – Min Beom Lee Jun 02 '16 at 05:54
  • So why don't you use [`convert_imageset`](http://stackoverflow.com/questions/31427094/guide-to-use-convert-imageset-cpp) to prepare a dataset for training? – Shai Jun 02 '16 at 05:57

1 Answers1

3

Converting images to db(leveldb/lmdb) files can speed up your training because it can reduce the time needed by the network to read images from your disk.

If you still not want to, you can use layer with type "ImageData" instead of "Data" in your prototxt and set its' param by

image_data_param { source: "path/to/your/images/list.txt" }

Every line in list.txt provides the path of your image and its' label.

Dale
  • 1,608
  • 1
  • 9
  • 26