ChenYingpeng / caffe-yolov3

A real-time object detection framework of Yolov3/v4 based on caffe
473 stars 231 forks source link

Segmentation fault (core dumped) #14

Open IsLouie opened 5 years ago

IsLouie commented 5 years ago

hello! there is a new problem : when i use the command ./detectnet the code will stop here: output blob1 shape c= 255, h = 13, w = 13 output blob2 shape c= 255, h = 26, w = 26 output blob3 shape c= 255, h = 52, w = 52 Segmentation fault (core dumped) I think may be the code below cause this problem:

int nboxes =0;
detection *dets = get_detections(blobs,im.w,im.h,&nboxes);

but i think the code is ok, can u tell me how to solve this problem?

ChenYingpeng commented 5 years ago

Usually memory errors.I suggest that you should locate specific error codes and post more details.

IsLouie commented 5 years ago

cause my network cannot predict ,so the nbox always is 0 ,therefore the code cannot allocate memory for the varaible "prob", so the core dumped. i added the upsample layer into the caffe model as ID 149, but when i make it, cause i comment the clip layer(ID 148) as the caffe.proto requested:

-// LayerParameter next available layer-specific ID: 148 (last added: swish_param)

when i make caffe, an error occurred: error: class "caffe::LayerParameter" has no member "clip_param" so i uncomment the id 148 :clip_layer then i make caffe success! but may be it still have some problem that i havent found. so my got an wrong network model that cannot predict?

ChenYingpeng commented 5 years ago

Please check this functions make_network_boxes in yolo_layer.cpp and make sure the nboxes > 0. If not, may be something wrong with your input blobs?

IsLouie commented 5 years ago

i checked the nboxes, it equals to 0. my command is "./detectnet" and the image input is " const char* imgFilename = "/mly/model/guiguai.jpg"; am i right?

ChenYingpeng commented 5 years ago

Can you send me this picture for testing?

IsLouie commented 5 years ago

guiguai

ChenYingpeng commented 5 years ago

test

sukibean163 commented 5 years ago

hi! @ChenYingpeng i have the same problem. the program core dump in forward_yolo_layer_gpu->copy_gpu err msg is: CUDA Error: invalid device function

ChenYingpeng commented 5 years ago

Please check your device compute capability in CMakeList.txt. For example ``set( CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS}; -O3 -gencode arch=compute_53,code=sm_53 #tegra tx1 -gencode arch=compute_61,code=sm_61 #gtx 1060 -gencode arch=compute_62,code=sm_62 #tegra tx2 )

sukibean163 commented 5 years ago

Please check your device compute capability in CMakeList.txt. For example ``set( CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS}; -O3 -gencode arch=compute_53,code=sm_53 #tegra tx1 -gencode arch=compute_61,code=sm_61 #gtx 1060 -gencode arch=compute_62,code=sm_62 #tegra tx2 )

thank you! my device is gtx 1080, i comment the setting CUDA_NVCC_FLAGS code, and it works

DancingJane commented 5 years ago

hi @ChenYingpeng I have similar problem. when i run the first example: Example 1: yolov3 $ ./x86_64/bin/detectnet 0 ../../data/yolov3/prototxt/yolov3.prototxt ../../data/yolov3/caffemodel/yolov3.caffemodel I face the error: Segmentation fault (core dumped) There are no other description. Can you help me with this problem? thank you a lot

ChenYingpeng commented 5 years ago

@DancingJane Check your picture path. For example,const char* imgFilename = "/home/chen/projects/data/images/dog.jpg"; //modify your images file path in detectnet.cpp file.

DancingJane commented 5 years ago

@DancingJane Check your picture path. For example,const char* imgFilename = "/home/chen/projects/data/images/dog.jpg"; //modify your images file path in detectnet.cpp file.

thank you for your responce. I modify the imgFilename as const char* imgFilename = "/home/jane/Files/object_detection/data/images/dog.jpg"; //modify your images file path , put the dog image in corresponding path and make clean, cmake ,make againe. However, the error is still there.

chengyao0929 commented 4 years ago

@DancingJane Check your picture path. For example,const char* imgFilename = "/home/chen/projects/data/images/dog.jpg"; //modify your images file path in detectnet.cpp file.

thank you for your responce. I modify the imgFilename as const char* imgFilename = "/home/jane/Files/object_detection/data/images/dog.jpg"; //modify your images file path , put the dog image in corresponding path and make clean, cmake ,make againe. However, the error is still there.

I meet the same error, Are you solve the problem? can you tell me how to solve?

chengyao0929 commented 4 years ago

@DancingJane Check your picture path. For example,const char* imgFilename = "/home/chen/projects/data/images/dog.jpg"; //modify your images file path in detectnet.cpp file.

thank you for your responce. I modify the imgFilename as const char* imgFilename = "/home/jane/Files/object_detection/data/images/dog.jpg"; //modify your images file path , put the dog image in corresponding path and make clean, cmake ,make againe. However, the error is still there.

I meet the same error, Are you solve the problem? can you tell me how to solve?

@DancingJane

Hongyuan-Liu commented 4 years ago

@IsLouie,hello Imeet the same error, Are you solve the problem? can you tell me how to solve?