(Detectron's source interpretation)/detectron/lib/datasets/

Source: Internet
Author: User
Tags json

1. dataset_catalog.py

When we need to train our own data (for reference: http://blog.csdn.net/meccaendless/article/details/79457330), we need to modify the contents of the file, when I use my own data for training, I'm using the VOC2007 data structure, so I modified the following part of the file:

' Voc_2007_trainval ': {

Im_dir:

_data_dir + '/voc2007/jpegimages ',

ANN_FN:

_data_dir + '/voc2007/annotations/voc_2007_trainval.json ',

Devkit_dir:

_data_dir + '/voc2007/vocdevkit2007 '

},

' Voc_2007_test ': {

Im_dir:

_data_dir + '/voc2007/jpegimages ',

ANN_FN:

_data_dir + '/voc2007/annotations/voc_2007_test.json ',

Devkit_dir:

_data_dir + '/voc2007/vocdevkit2007 '

},

Modify to the following form:

' Voc_2007_trainval ': {

Im_dir:

_data_dir + '/voc2007/jpegimages ',

ANN_FN:

_data_dir + '/voc2007/annotations/pascal_trainval2007.json ',

Devkit_dir:

_data_dir + '/voc2007/vocdevkit2007 '

},

' Voc_2007_test ': {

Im_dir:

_data_dir + '/voc2007/jpegimages ',

ANN_FN:

_data_dir + '/voc2007/annotations/pascal_test2007.json ',

Devkit_dir:

_data_dir + '/voc2007/vocdevkit2007 '

},

2. dummy_datasets.py

When we train our own data, the file is not necessarily to be modified, but when we finally test the model with infer_simple.py, we need to modify the contents of the classes inside, otherwise the label on the image is the Coco Data set label. PS: Don't forget ' __background__ '



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.