Caffe goodbye to the training of their own data

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.