AlexeyAB / darknet

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

nms issue of yolov4 #5744

Open ZOUYIyi opened 4 years ago

ZOUYIyi commented 4 years ago

when I use the code and net of yolov4,I got good result ,but when I use this code and inference a image with yolov3.cfg and yolov3.weights, the nms seems don't work , it detected severe boxes aroud one object with same class id . I noticed it is use
nms_kind=greedynms beta_nms=0.6 in yolo layer in yolov4.cfg should I modify the yolov3.cfg by adding these two lines to it ,or I have made mistake there ?

AlexeyAB commented 4 years ago

Yolov2 / v3 / v4 use NMS, with the same greedynms with the same nms_thresh.

it detected severe boxes aroud one object with same class id

This is just a False Positive detection of Yolov3 due bad accuracy.

Yolov3 without nms looks like: predictions

Amore-HDU commented 4 years ago

In your paper, you said you used DIoU-NMS. But in your project,you just use greedynms not DIoU-NMS

ZOUYIyi commented 4 years ago

Yolov2 / v3 / v4 use NMS, with the same greedynms with the same nms_thresh.

it detected severe boxes aroud one object with same class id

This is just a False Positive detection of Yolov3 due bad accuracy. Yolov3 without nms looks like:

yes, yesterday I see exactly the picture you put out , I don't know why ,but I recompile all program,it works fine now.

AlexeyAB commented 4 years ago

@Amore-HDU Set for each yolo-layer

[yolo]
nms_kind=diounms
luckcodingdog commented 4 years ago

@AlexeyAB I have two question about nms: 1) You set greedynms in cfg, Does the result of greedynms is better than diounms ? 2) When i run the command: ./darknet detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights data/horses.jpg When i set nms_kind=diounms in cfg, i found that i got l.nms_kind = 0 = default (line 1628 in detector.c ) not l.nms_kind = 2 = diounms. how can i use diounms, could you give some help? thanks a lot!