If you run the script below, you'll see there is a noticeable difference between the confidence result for the last horse. Here are the results that I got:
And here's the result from running the same configuration via the command line:
./darknet detector test ./cfg/coco.data ./cfg/yolov3.cfg ./yolov3.weights data/horses.jpg
command line results:
horse: 87%
horse: 100%
horse: 91%
horse: 100%
What is causing detect_image to return different confidence results compared to the command line and detect? Detect_image is being used similary to how it's being called in darknet_video.py and detect is being used similarly to how it's called in darknet.py.
If you run the script below, you'll see there is a noticeable difference between the confidence result for the last horse. Here are the results that I got:
detect image results: ('horse', 0.9983882308006287) ('horse', 0.9966017007827759) ('horse', 0.9061697125434875) ('horse', 0.8582225441932678)
detect results: ('horse', 0.9983503818511963) ('horse', 0.996757447719574) ('horse', 0.9087362885475159) ('horse', 0.8728268146514893)
And here's the result from running the same configuration via the command line: ./darknet detector test ./cfg/coco.data ./cfg/yolov3.cfg ./yolov3.weights data/horses.jpg command line results: horse: 87% horse: 100% horse: 91% horse: 100%
What is causing detect_image to return different confidence results compared to the command line and detect? Detect_image is being used similary to how it's being called in darknet_video.py and detect is being used similarly to how it's called in darknet.py.
Feel free to test this out with other images. For example, the baseball bat in this image has a two percent difference: https://www.thecompleteuniversityguide.co.uk/media/4928283/istock-949190756.jpg