Cannot fine tune yolo3

I am trying to fine tune a YOLO network by following the SSD fine tuning example on the Gluon tutorial, by simply changing all the SSD functions to the equivalent Yolo functions, however I get the following error:

RuntimeError: Parameter ‘yolov319_yolooutputv30_conv0_weight’ has not been initialized. Note that you should initialize parameters and create Trainer with Block.collect_params() instead of Block.params because the later does not include Parameters of nested child Blocks

This error arises from the line: _, _, anchors = net(mx.nd.zeros((1, 3, height, width))) in the get_dataloader function.

What else do I need to change to make the SSD script work for YOLO?

Thank you

I guess the error indicates, that you may have done a mistake when changing SSD functions to the equivalent Yolo functions e.g. name mismatching. The tutorial also provides an example how to finetune a Yolo model https://gluon-cv.mxnet.io/_downloads/78f68c07d47484972ab1bea681ff4f97/train_yolo3.py

Thank you for your reply.

I believe I have changed most of the SSD functions to the corresponding YOLO ones.

I have looked at that training code but it seems to want to load existing training set. For example the get_dataset module wants to load the COCO or VOC datasets (and gives an error if different). I want to use my own dataset so why does it want to load these? And there are no comments in there, so it’s really hard to follow what it is doing.

The example of fine tuning YOLO above does use VOC or COCO. To use your data you need to create Dataset class which will know how to load the data. For example, here they use Pickachu dataset in RecordIO format.

You can do pretty much the same by converting your data to .rec using this tutorial: https://gluon-cv.mxnet.io/build/examples_datasets/detection_custom.html