Skip to content

Train SSD on custom dataset

Wei Liu edited this page Feb 9, 2017 · 1 revision

Please refer to the README.md for more details on how to train a SSD model from VOC dataset. You can essentially follow similar steps. You can refer to data/coco and data/ILSVRC2016 on how to train SSD model on COCO and ILSVRC DET dataset.

  1. Create a file list which contains the image_path and annotation_path, as was illustrated at here for VOC or here for COCO.

  2. Create a labelmap file, such as this. You can refer to this code on how to create one for your own dataset. name should correspond to the class name specified in your annotation file.

  3. Create a lmdb file to store the images and annotations. You can refer to this script.

  4. After this step, I would encourage you use this to make sure your dataset is created correctly. Make sure changing model file and labelmap file to your own model and data.

  5. Then you can refer to various scripts at here on how to define the SSD model structure.

  6. The training procedure should be similar to training a classification model as you can monitor the mAP (i.e. search detection_eval in the .log file) as you brew the model.

Then the rest is on your owns about how to change the model architecture and parameters to suit for your own dataset and problem.

Clone this wiki locally