Caffe data format in either LEVELDB or Lmdb format
In this paper, the data for the calibrated color image, a total of 1000 training maps a total of 10 categories, 200 test Images 10 categories: Http://pan.baidu.com/s/1hsvz4g8.
First step: Data format conversion
1. Compile the Conver_imageset and generate the Convert_imageset.exe under \caffe-master\build\x64\release.
2. Create your own DataSet folder under the root data file (primarily for ease of collation, depending on the location you want)
Create the following folder under the new DataSet folder
Train and Val store the original data, TRAINLDB and VALLDB store format converted Leveldb data, mean store the mean file.
3. Use batch command to label the data, generate Train.txt to save the training data of the label, generate Val.txt to save the test data of the label.
4. Write a bat command, use Convert_imageset.exe to generate the corresponding LEVELDB format data, note the parameters and the path.
If the error is as follows, the new Valdb folder is not emptied and emptied:
Running successfully, the new DB file generates the following file, where the red arrow shows a file size of 0:
In this way, the data files required to meet the Caffe are produced (here the main description of the production of leveldb format files, other types need to be added later), train and test must follow the same procedure as described above.
Step Two: Data preprocessing
Generate a mean file
As above compile Compute_image_mean, generate Compute_image_mean.exe under \caffe-master\build\x64\release.
Write a bat command, using Compute_image_mean.exe to generate the corresponding mean file, train data and test data need to go through the same operation.
Generate the following files:
Step three: Define the network structure and train
Here the main verification of the production data is available, so the network directly using Caffe provided by the sample CIFAR10 network structure and configuration files, mainly for the following two
Change to your own naming method:
Major modifications to the path
Where 1 represents the path to the network file required for training, and 2 indicates the path to the resulting file. The Leveldb file path and the mean file path are primarily modified in the Mine_train_test file.
Write the bat file and start training:
The training results show:
Training initial recognition Rate:
Rate of recognition after training:
Reference:windows under Caffe to train their own data
Caffe goodbye to the training of their own data