# python3 train_ssd.py --finetune ssd_300_vgg16_atrous_coco --dataset customxx
import gluoncv as gcv
# download pretrained from coco
net = gcv.model_zoo.get_model('ssd_300_vgg16_atrous_coco', pretrained=True)
# modify network to fit the new classes, say ['a', 'b', 'c']
net.reset_class(['a', 'b', 'c'])
# modify training scripts in https://github.com/dmlc/gluon-cv/tree/master/scripts/detection to load custom dataset, described in https://gluon-cv.mxnet.io/build/examples_datasets/detection_custom.html#sphx-glr-build-examples-datasets-detection-custom-py
# if dataset == customxx: load dataset, init dataloader
# and we are good to start fine-tuning
# similarly for Faster-RCNN and YOLO3
net = gcv.model_zoo.get_model('faster_rcnn_resnet50_v1b_coco', pretrained=True)
net.reset_class(['d', 'e'])
net = gcv.model_zoo.get_model('yolo3_darknet53_coco', pretrained=True)
net.reset_class(['f'])
val.rec : https://apache-mxnet.s3-accelerate.amazonaws.com/gluon/dataset/pikachu/val.rec