AlexeyAB / darknet

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

darknet predicts a million objects #7629

Closed Krogsager closed 3 years ago

Krogsager commented 3 years ago

Update

Darknet stops responding for a few minutes, then my console is flooded with thousands of hits:

aeroplane: 100%
bus: 100%
truck: 100%
boat: 100%
traffic light: 100%
stop sign: 100%
parking meter: 100%
cat: 100%
dog: 100%
sheep: 100%
elephant: 100%
giraffe: 100%
umbrella: 100%
skis: 100%
snowboard: 100%
sports ball: 100%
kite: 100%
baseball glove: 100%
surfboard: 100%
tennis racket: 100%
bottle: 100%
wine glass: 100%
fork: 100%
spoon: 100%
bowl: 100%
banana: 100%
apple: 100%
donut: 100%
chair: 100%
sofa: 100%
bed: 100%
diningtable: 100%

The output is this mess: prediction

and the original input dogs.jpeg looks like this: dogs

I am amused and confused. Is the dog both a sofa and a motorcycle? Most likely I made some horrible setup mistake.

Original post

I run darknet, enter image path and want a prediction. Then darknet stops responding and I have to exit it with ctrl+c.

./darknet detector test cfg/coco.data cfg/yolov4.cfg ~/Downloads/yolov4.conv.137 ~/Downloads/dogs.jpeg

 CUDA-version: 10000 (11020), cuDNN: 8.1.1, GPU count: 1  
 OpenCV version: 3.2.0
 0 : compute_capability = 610, cudnn_half = 0, GPU: Quadro P6000 
net.optimized_memory = 0 
mini_batch = 1, batch = 8, time_steps = 1, train = 0 
   layer   filters  size/strd(dil)      input                output
   0 conv     32       3 x 3/ 1    608 x 608 x   3 ->  608 x 608 x  32 0.639 BF

[...] skip to bottom

[yolo] params: iou loss: ciou (4), iou_norm: 0.07, obj_norm: 1.00, cls_norm: 1.00, delta_norm: 1.00, scale_x_y: 1.05
nms_kind: greedynms (1), beta = 0.600000 
Total BFLOPS 128.459 
avg_outputs = 1068395 
 Allocate additional workspace_size = 52.44 MB 
Loading weights from /home/paperspace/Downloads/yolov4.conv.137...
 seen 64, trained: 0 K-images (0 Kilo-batches_64) 
Done! Loaded 137 layers from weights-file 
 Detection layer: 139 - type = 28 
 Detection layer: 150 - type = 28 
 Detection layer: 161 - type = 28 
/home/paperspace/Downloads/dogs.jpeg: Predicted in 281.917000 milli-seconds.

^C
paperspace@:~/darknet$ 

I was expecting to get the predictions and bounding boxes as this point. Instead darknet just stops. My system is Ubuntu 18.04.5 LST

~$ nvidia-smi
Wed Apr 21 10:47:01 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.56       Driver Version: 460.56       CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Quadro P6000        Off  | 00000000:00:05.0  On |                  Off |
| 26%   29C    P8    15W / 250W |    149MiB / 24449MiB |      1%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1429      G   /usr/lib/xorg/Xorg                104MiB |
|    0   N/A  N/A      1875      G   /usr/bin/gnome-shell               40MiB |
+-----------------------------------------------------------------------------+
paperspace:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Jan_28_19:32:09_PST_2021
Cuda compilation tools, release 11.2, V11.2.142
Build cuda_11.2.r11.2/compiler.29558016_0

My Makefile:

GPU=1
CUDNN=1
CUDNN_HALF=0
OPENCV=1
AVX=1
OPENMP=1
LIBSO=0
ZED_CAMERA=0
ZED_CAMERA_v2_8=0

USE_CPP=0
DEBUG=0

OS := $(shell uname)
ARCH= -gencode arch=compute_61,code=sm_61 -gencode arch=compute_61,code=compute_61
Krogsager commented 3 years ago

@stephanecharette have you ever seen this behavior before?

AlexeyAB commented 3 years ago

./darknet detector test cfg/coco.data cfg/yolov4.cfg ~/Downloads/yolov4.conv.137 ~/Downloads/dogs.jpeg

This is the wrong command.

Read

Download https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights

And use this command: ./darknet detector test cfg/coco.data cfg/yolov4.cfg ~/Downloads/yolov4.weights ~/Downloads/dogs.jpeg

Krogsager commented 3 years ago

Spasiba!