'Add new class to YOLOv3-tiny/v4-tiny in darknet

I'd like to ask you if it's possible to extend/add new class to pre-trained yolov3/v4-tiny model. I need to add shoe. Let's say it would be 81st object. My expectation was to add new class to coco.names. Txt files should have the first number 81 as 81-st class and plus coordinates of tag. Also cfg file I would edit for 1 class. But this idea have weak-points 1 class in cfg... 81 classes in coco.names.... I simply can't imagine how to do it, or is it even possible?



Solution 1:[1]

You can use pretrained backbone like this (e.g., yolov4-tiny.conv.29), edit filters and classes number in *.cfg file according to this. More links to pretrained models are in "Releases".

And than run the training process:

./darknet detector train ~/*.data ~/*.cfg ~/yolov4-tiny.conv.29

where "yolov4-tiny.conv.29" are weights of pretrained model up to 29th layer

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Maxim Lyuzin