YoloV3 "Num classes mismatch" when using custom yolov3.cfg file


I’ve been using the deepstream-app for object detection using YoloV3. When I use the regular darknet YoloV3 config file everything is fine, but recently I’ve been trying to make some customisations and I’m getting an error saying: “WARNING: Num classes mismatch. Configured:4, detected by network: 80”, followed by a segmentation fault.

The change I made to the yolov3.cfg file were the following:

Would this kind of change require creation of a custom plugin(s)?

I’m not sure why the classes mismatch is occurring. All the [yolo] layers in the config have the correct number of classes. I’ve also edited the config_infer_primary_yoloV3.txt to have the same number of classes, and the labels file as well.

Followed the “Custom YOLO Model in the DeepStream YOLO App” guide. Forgot to follow some of the steps. This can be closed.

change number of classes in line 32 of nvdsparsebbox_Yolo.cpp