Variable convolution deforable convnet migration Training your own datasets Mxnet framework GPU version

Source: Internet
Author: User
Tags mxnet

"Introduction" recently trained its own datasets using the RFCN model of variable convolution, MSRA the official mxnet framework

Environment Construction and configuration: http://www.cnblogs.com/andre-ma/p/8867031.html

One parameter modification:

Two parameters modified in 1.1 ~/deformable-convnets/experiments/rfcn/cfgs/resnet_v1_101_voc0712_rfcn_dcn_end2end_ohem.yaml file (Yaml file contains all configuration information and hyper-parameters corresponding to the training script)

One uses the number of GPUs :

GPUs: ' 0,1 ' means training with two GPUs

The other is the number of sample categories :

Num_classes:5 number of sample categories required + 1 because of the background

There are also data sets that you want to modify:

Image_set:2007_trainval using VOC2007 if image_set:2007_trainval+2012_trainval use VOC2007 and VOC2012 two datasets

1.2 Modifying the sample label category in the ~/deformable-convnets/lib/dataset/pascal_voc.py file

self.classes = [' __background__ ', ' tiger_beetle ', ' Scarab ', ' stinkbug ', ' moth '] corresponding to the above, plus a background of altogether 5 classes

Preparation and production of two data sets

2.1 Get the data, this own preparation, you can crawl on the internet with crawlers, or in other ways to collect, recommend a few pictures crawler: Baidu image crawler Bing image crawler

2.2 Labeling picture information, need Coco DataSet or VOC data set when doing target detection, can mark picture with labelimg and other image labeling tools: labelimg Link: https://github.com/tzutalin/labelImg

"Here's a brief introduction to the VOC Data format" reference: 78330752

The organization structure of VOC datasets is as follows:

  • The directory structure of the VOC2007 is:

├──annotations XML file
├──imagesets TXT file
└──jpegimages Pictures

  • The directory structure of the imagesets is:

├──layout
├──main
└──segmentation

LABELIMG can be configured under multiple platforms, but be aware of the version numbers that each software relies on: typically python=3.5 pyqt=4 dependent lxml

Ubuntu16.04 Configuration labelimg Tutorial: 78944941 (The Ubuntu system is really not in Chinese, the results found in Windows above the method can take Chinese)

2.3 Troubleshooting and removing all error JPG formats

Using the suffix name to determine the JPG format file is simple, but sometimes error, especially from the Internet to obtain the picture, its quality is more difficult to guarantee.

Python's PiL tool provides a way to determine the JPG format file: 77943578

(PS: Delete the unqualified jpg, remember to delete the XML file information Oh ~)

2.3 Generate 4 txt

Train.txt val.txt trainval.txt test.txt four txt: Generation and introduction: 76595884

Train:val:test = 1:1: 2 Trainval is the train and Val of the Federation, that is Train:val:trainval = 1:1:2 "training, validation, test process detailed"

How to make your own VOC2007 dataset: Https://www.jianshu.com/p/b498a8a5a4f4

Three-migration training

Familiar with the variable convolution deformable-convnets of the old iron, you know under the Experiments folder is a different model of project

If this experiment uses RFCN model migration training, CD Deformable-convnets directory, execute the following code, start training!

Python experiments/rfcn/rfcn_end2end_train_test.py--cfg Experiments/rfcn/cfgs/resnet_v1_101_voc0712_rfcn_dcn_ End2end_ohem.yaml

Summary

1. Training a variable RFCN model with its own data set migration, the main core problem is the data set, the data set to have quantity and quality

2. Use the variable RFCN migration training, the key to be familiar with the process, and the need to modify the files and parameters

3. Don't panic when you are in trouble, sometimes it is easy to complicate the problem, or you are about to find the right way to solve the problem, but because of another small problem to cover up the real problem to solve

Anyway: the rest is king ~:)

This article references: 67634584

Variable convolution deforable convnet migration Training your own datasets Mxnet framework GPU version

Related Article

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.