AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.75k stars 7.96k forks source link

Is it possible to output probabilities for each class, not the class that matches most? #8678

Open nithrous opened 2 years ago

nithrous commented 2 years ago

I have 2 classes: notouch and overpack - levels of tobacco in hookah bows. I have good accuracy, but the problem is that yolo displays most relevant class and it's probability. Is there any chance to display all available classes and their availabilities for the output?

stephanecharette commented 2 years ago

Are you using only the CLI? The CLI is only a "demo" of the most common features. Use the API instead. Then you can make it do whatever you want.

Also to consider: take a look at DarkHelp and see if it has options that work better for you. Like Darknet, DarkHelp is both a CLI and an API. It has finer control over some of the things it does, like how it draws the predictions. The JSON output may be of particular interest to you since I believe it includes all classes and their confidence level: https://www.ccoderun.ca/darkhelp/api/ShellScripting.html

nithrous commented 2 years ago

Thank you so much @stephanecharette non_maximal_suppression_threshold is the parameter what I need (from DarkHelp). Now I should just find the way how to use it from C# API