AlexeyAB / darknet

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

memory error in detector.c::validate_detector_map #2482

Closed aimhabo closed 5 years ago

aimhabo commented 5 years ago

my command is /home/wit/wjx/AlexeyAB/darknet/darknet detector map parameters.data yolov3-tiny.cfg yolov3-tiny.weights weights is downloaded from https://pjreddie.com/media/files/yolov3-tiny.weights 2019-02-26 21-34-17

It also happen while /home/wit/wjx/AlexeyAB/darknet/darknet detector map parameters.data yolov3spp.cfg yolov3-spp.weights 2019-02-26 21-41-29 and I found that 'id' https://github.com/AlexeyAB/darknet/blob/f37ea75b28f01a87f08cb3cdea2f3d58f72224f8/src/detector.c#L766 was changed unreasonable before https://github.com/AlexeyAB/darknet/blob/f37ea75b28f01a87f08cb3cdea2f3d58f72224f8/src/detector.c#L887 . So the program break down at that line this time. but I still cannot solve this bug.

here's my parameters.data, and other files were acquired by git just half an hour ago. 2019-02-26 21-48-00

No abnormalities were found in 139 image and label. 2019-02-26 21-54-41 2019-02-26 21-55-30

ghost commented 5 years ago

What is 4path : .....139.jpg in your 2nd image ? Is there only 1 image in testimage.list ? Did you try to put more image in this list ?

AlexeyAB commented 5 years ago

@aimhabo Hi,

aimhabo commented 5 years ago

@MartyEz there are over thousands images in both valid and test. 4 is 'print' at the top of the 'for i' ,and path 'fprintf' before 'char *id'

aimhabo commented 5 years ago

@AlexeyAB yes, I have changed label-loading rule. there are no other bugs when calculating map on yolov3-tiny but break down at the last of calculating show. But... it break down on the way to calculating spp. bad.list and bad_label.list are empty.(I have removed corresponding elements after transfered coco label)

AlexeyAB commented 5 years ago

@aimhabo So currently, do you have errors only with yolov3-spp.cfg model? But does it work successfully with yolov3-tiny.cfg model?

aimhabo commented 5 years ago

@AlexeyAB yes. maybe values are problem, but anyway the calculating process is done. 2019-02-26 22-32-53 2019-02-26 22-33-15

AlexeyAB commented 5 years ago

@aimhabo You can try to comment some of these lines, to find where is a problem: https://github.com/AlexeyAB/darknet/blob/f37ea75b28f01a87f08cb3cdea2f3d58f72224f8/src/detector.c#L999-L1019

Since I can't reproduce it.

aimhabo commented 5 years ago

@AlexeyAB I have failed to download mscoco2014 many times before. I can try again tomorrow. thankyou

AlexeyAB commented 5 years ago

@aimhabo Did you use script from my repo https://github.com/AlexeyAB/darknet/blob/master/scripts/get_coco_dataset.sh#L12-L15 instead of pjreddie's repo?

I changed links to cocodataset.org site for faster downloading.

aimhabo commented 5 years ago

@AlexeyAB The problem was passed after the two lines were commented.
https://github.com/AlexeyAB/darknet/blob/f37ea75b28f01a87f08cb3cdea2f3d58f72224f8/src/detector.c#L887 https://github.com/AlexeyAB/darknet/blob/f37ea75b28f01a87f08cb3cdea2f3d58f72224f8/src/detector.c#L1004

yolov3spp seems good on val2014 2019-02-27 18-06-39