SSD trains its own data set

Source: Internet
Author: User
Tags mkdir stack trace

FASTER-RCNN trained his own data set, feeling the effect is OK, for their own data set accuracy rate of about 89%, but faster-rcnn speed is a pit. So, start thinking about using SSDs to try.


Since the FASTER-RCNN dataset is already available, the steps for making all datasets can be omitted. The next step is the modification of SSD training.

Here, set the SSD root directory to CAFFE-SSD:

1, in Caffe-ssd/data/vocdevkit mkdir myDataSet (own data set name)

2, CD to myDataSet, mkdir 3 folders annotations, Imagesets, jpegimages

3, in examples mkdir mydataset (mainly used to store create_data.sh generated data connection)

3. Put the. xml file in annotations, imagesets the main folder, put Train.txt trainval.txt test.txt val.txt into the main folder, Jpegimages put the picture you want to train

4, in the Caffe-ssd/data mkdir myDataSet, caffe-data/data/voc0712 create_*.sh, LABELMAP_VOC copy to caffe-data/data/ In myDataSet

Modify Create_list.sh Line 13th

For name in VOC2007 VOC2012:

Modify to

For name in myDataSet:


Modifying create_data.sh is primarily a path problem


Modify LABELMAP_VOC:

Each item represents your label, background must have

5.

Modify the problem with some paths in examples/ssd/ssd_pascal.py, num_classes = number of your categories +1,num_test_image = number of test when you are training



6. Run sudo python ssd_pascal.py for training

Note that training may occur when

F0209 00:33:31.934646 21257 annotated_data_layer.cpp:205] Check failed:std::equal (Top_shape.begin () + 1, top_shape.begin () + 4, Shape.begin () + 1)

Check failure Stack Trace: * * *
@ 0X7FC2C7D7E5CD Google::logmessage::fail ()
@ 0x7fc2c7d80433 Google::logmessage::sendtolog ()
@ 0x7fc2c7d7e15b Google::logmessage::flush ()
@ 0x7fc2c7d80e1e Google::logmessagefatal::~logmessagefatal ()
@ 0x7fc2c84ff180 Caffe::annotateddatalayer<>::load_batch ()
@ 0x7fc2c860c77f Caffe::baseprefetchingdatalayer<>::internalthreadentry ()
@ 0x7fc2c84492b5 Caffe::internalthread::entry ()
@ 0x7fc2bb6a55d5 (unknown)
@ 0x7fc2b617f6ba Start_thread
@ 0x7fc2c65fb82d Clone
@ (nil) (unknown)
Aborted (core dumped)

The workaround is to ssd_pascal.py in 183 rows:

Resize_mode:p.resize.warp changed to P.resize.fit_small_size,

341 row batch_size = 1

364 row test_batch_size = 1

You can run ssd_pascal.py for training.



3. Testing

Using Ssd_detect for testing





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.