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

how to get bounding box value in results.txt #1356

Open hahazhky opened 6 years ago

hahazhky commented 6 years ago

when I run ./darknet detector test cfg/voc.data cfg/yolov3-voc-test.cfg backup/yolov3-voc_12000.weights -dont_show < voc/2007_train.txt > result.txt I get prediction confidence in result.txt rather than bounding box value, what should I do to get what I want Thanks a lot

ritwikdubey commented 6 years ago

you need -save_labels

AlexeyAB commented 6 years ago

Add flag -ext_output nea with flag -dont_show

hahazhky commented 6 years ago

@AlexeyAB Thanks, another question, when you test yolo preformance, for example, to calculate mAP on PASCAL VOC, do you set threshold(confidence) to a certain value to control the outputs in the result file, like 0.2 or 0.25

AlexeyAB commented 6 years ago

@hahazhky It is not necessary to set -thresh for mAP. -thresh doesn't affect on mAP, it only affects on Precision/Recall/IoU/TP/FP/FN.

hahazhky commented 6 years ago

@AlexeyAB but Precision/Recall have affect on mAP, will -thresh affect on mAP through Precision/Recall?

AlexeyAB commented 6 years ago

@hahazhky No, Precision/Recall will be taken from 11 points on Precision/Recall-curve with Recall=[0.0;1.0]@0.5 for different 11 thresh's regardless of -thresh param.

hahazhky commented 6 years ago

@AlexeyAB Thanks your patience a lot. And If I want to finetune for my own datasets from pretrained yolov3 weights, I want to fix some layers and train the others, what should I do, setting layer's parameter learning rate = 0(to set the learning rate scale), or there is something better to do?

AlexeyAB commented 6 years ago

@hahazhky

Add parameter stopbackward=1 for correspond layer: https://github.com/AlexeyAB/darknet#how-to-improve-object-detection

to speedup training (with decreasing detection accuracy) do Fine-Tuning instead of Transfer-Learning, set param stopbackward=1

hahazhky commented 6 years ago

@AlexeyAB Thanks. And if I increase the width and height in the .cfg file and set random = 1, what's the meaning of increasing width and height, the image will be resize to {320, .. ,608}, and if I set random = 1, the anchors' size will be resized in the training phrase or not

jaelim commented 6 years ago

@AlexeyAB I also tried to validate my trained model on a different test dataset, but I got an error as

image

I checked all file paths, but nothing I can find wrong.

AlexeyAB commented 6 years ago

@jaelim Use this repository.

AlexeyAB commented 6 years ago

@hahazhky Anchors will not be resized. Only neural network will be resized if you use random=1.