xiangweizeng / darknet2ncnn

Darknet2ncnn converts the darknet model to the ncnn model

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

内存溢出,程序崩快malloc(): memory corruption,Aborted (core dumped)

lisongtiankong opened this issue · comments

我在ubuntu 16.4中安装darknet2ncnn过程中,make和install过程均没有出错,运行cifiar历程也没有问题,但是当运行yolov3-tiny历程时,出现如下:
./yolo zoo/yolov3-tiny.param zoo/yolov3-tiny.bin data/dog.jpg data/coco.names
malloc(): memory corruption
Aborted (core dumped)
请问这是什么原因,是生成的param和bin文件有问题吗?

@lisongtiankong Hi,

it runs well on Mac, but I had the same problem on Ubuntu before. I checked the size of detected object which is always 1. There could be some problem on data conversion.

The problem is here:
yolov3_detection.cpp
change
top_blob.create(6, detected_objects.size(), 4u, opt.blob_allocator);
to
top_blob.create(6, static_cast<int>(detected_objects.size()), 4u, opt.blob_allocator);