Closed cheshire2445 closed 3 years ago
I really need help. Thanks @hhk7734
in Model? or after prediction?
в модели? или после предсказания?
The model has already been trained to recognize multiple classes. I need to somehow "disable" some classes before predicting, if possible. I thought it might be possible to modify the .weights file, but I cannot open it with any editor. help (YOLOv4) also gave nothing. Is it possible to run a model trained on 10, for example, so that it recognizes 1 of them and ignores another 9?
Now it has already been trained to detect 2 classes: yologun = YOLOv4() yologun.classes = {0: "gun", 1: "knife"} yologun.input_size = (416, 416)
I need something like this to detect only one class (but it doesn't work since the sizes of the models do not match): yologun = YOLOv4() yologun.classes = {0: "gun"} yologun.input_size = (416, 416)
After the model is trained, there is no way to selectively predict. If you want to disable some classes, remove unnecessary classes from the result after inference.
Let's say my model trained to detect 10 different classes. I am making an application where, depending on the enabled checkbox, certain objects in the images must be recognized. How can I disable some classes on recognition