This commit is contained in:
Glenn Jocher 2019-02-27 12:51:24 +01:00
parent 358f34afa8
commit 036e3b3253
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ python3 detect.py
# Test
sudo rm -rf yolov3 && git clone https://github.com/ultralytics/yolov3
sudo rm -rf cocoapi && git clone https://github.com/cocodataset/cocoapi && cd cocoapi/PythonAPI && make && cd ../.. && cp -r cocoapi/PythonAPI/pycocotools yolov3
cd yolov3 && python3 test.py --save-json
cd yolov3 && python3 test.py --save-json --conf-thres 0.005
# Test Darknet
python3 test.py --img_size 416 --weights ../darknet/backup/yolov3.backup

View File

@ -384,7 +384,7 @@ def non_max_suppression(prediction, conf_thres=0.5, nms_thres=0.4):
# Non-maximum suppression
det_max = []
if nms_style == 'OR': # default
if nms_style == 'MERGE': # default
while dc.shape[0]:
det_max.append(dc[:1]) # save highest conf detection
if len(dc) == 1: # Stop if we're at the last detection