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

Segmentation fault (core dumped) after running detector #3344

Open Alzheimancer opened 5 years ago

Alzheimancer commented 5 years ago

Total BFLOPS 262.526 Allocate additional workspace_size = 52.43 MB Loading weights from ./backup/yolo-obj_last.weights... seen 64 Done! plate3.jpg: Predicted in 38.836000 milli-seconds. 6: 100% ก: 99% province: 95% ฬ: 98% 3: 100% 5: 100% 5: 100% Segmentation fault (core dumped)

All detection looks fine and correct but the last step for showing the predicted image with bounding box failed. Any idea? OS: Ubuntu 18.04 GPU: GTX1080Ti OPENCV 3.4.6 CUDA: 10.1

gcc (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0 Copyright (C) 2017 Free Software Foundation, Inc.

nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2019 NVIDIA Corporation Built on Wed_Apr_24_19:10:27_PDT_2019 Cuda compilation tools, release 10.1, V10.1.168

+-----------------------------------------------------------------------------+ | NVIDIA-SMI 418.67 Driver Version: 418.67 CUDA Version: 10.1 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce GTX 108... Off | 00000000:01:00.0 On | N/A | | 0% 41C P5 19W / 250W | 339MiB / 11175MiB | 0% Default | +-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 1234 G /usr/lib/xorg/Xorg 18MiB | | 0 1265 G /usr/bin/gnome-shell 70MiB | | 0 2468 G /usr/lib/xorg/Xorg 118MiB | | 0 2581 G /usr/bin/gnome-shell 129MiB | +-----------------------------------------------------------------------------+

yuyifan1991 commented 5 years ago

hi, Have you solved this problem? I have the same trouble. Can you tell me how to deal with if you finished.

Alzheimancer commented 5 years ago

hi, Have you solved this problem? I have the same trouble. Can you tell me how to deal with if you finished.

This problem is still not solved. I don't know whether it came from the lack of training set or other problem. I have tested the trained model by using the other images (not its training set) it works sometime but not always.

primepake commented 5 years ago

I have some problem :(

primepake commented 5 years ago

Hi, Alexey. I tried to use detector but something was wrong. sometime I got Segmentation fault and sometime not. I debugged and have known : image in case : if(selected_detections[i].det.mask) is run, then something will wrong. but I don't know how can fix it ? darknet/src/image.c in line 421 I use lastest version darknet

primepake commented 5 years ago

sorry I wrong, in my case : name label is wrong tend to wrong in char on draw_detections_v3 fixed

rod-hendricks commented 5 years ago

I usually get segmentation faults when the details in my cfg do not match with that of the .data file specifically with regards to the classes and the .names file. Once that is sorted out the error is gone when running inference on the models.

yiningzeng commented 5 years ago

I solved it. you should rebuild darknet set opencv=0. Different versions of OpenCV can cause this problem.