Yolact: Could u please give the training steps on my own datasets?

Created on 11 Apr 2019  路  4Comments  路  Source: dbolya/yolact

Dear sir:
I'm really interested in your fantastic work,
Could u please give the training steps on my own datasets?
Thanks a lot!~

Most helpful comment

I'll be adding custom dataset support soon. I'm currently travelling so I can't do it right now, but I'll follow up when I can.

All 4 comments

I'll be adding custom dataset support soon. I'm currently travelling so I can't do it right now, but I'll follow up when I can.

Need the training steps on my own datasets too.

I also need the training steps on my own datasets.

So uh that turned out to be a lot longer than "soon", but I finally added support for custom datasets (latest commit). I've updated the readme with directions, but I'll paste them here for convenience:

  • Create a COCO-style Object Detection JSON annotation file for your dataset. The specification for this can be found here. Note that we don't use some fields, so the following may be omitted:

    • info

    • liscense

    • Under image: license, flickr_url, coco_url, date_captured

    • categories (we use our own format for categories, see below)

  • Create a definition for your dataset under dataset_base in data/config.py (see the comments in dataset_base for an explanation of each field):
my_custom_dataset = dataset_base.copy({
    'name': 'My Dataset',

    'train_images': 'path_to_training_images',
    'train_info':   'path_to_training_annotation',

    'valid_images': 'path_to_validation_images',
    'valid_info':   'path_to_validation_annotation',

    'has_gt': True,
    'class_names': ('my_class_id_1', 'my_class_id_2', 'my_class_id_3', ...)
})
  • A couple things to note:

    • Class IDs in the annotation file should start at 1 and increase sequentially on the order of class_names. If this isn't the case for your annotation file (like in COCO), see the field label_map in dataset_base.

    • If you do not want to create a validation split, use the same image path and annotations file for validation. By default (see python train.py --help), train.py will output validation mAP for the first 5000 images in the dataset every 2 epochs.

  • Finally, in yolact_base_config in the same file, change the value for 'dataset' to 'my_custom_dataset' or whatever you named the config object above. Then you can use any of the training commands in the previous section.

Note that I haven't done a lot of testing with this, so I might have broken some things. Let me know if you have any issues with this and I'll get back to you within my stellar, industry-leading 19 day response window.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JSharp4273 picture JSharp4273  路  7Comments

Zhang-O picture Zhang-O  路  6Comments

abhigoku10 picture abhigoku10  路  6Comments

sree3333 picture sree3333  路  10Comments

serhatiscan picture serhatiscan  路  5Comments