xiangweizeng / darknet2ncnn

Darknet2ncnn converts the darknet model to the ncnn model
Do What The F*ck You Want To Public License
158 stars 56 forks source link

请问我想转自己的.cfg和.weights出错 #18

Closed wn00 closed 5 years ago

wn00 commented 5 years ago

在运行这条命令时./convert_verify data/tiny-yolo-person.cfg data/tiny-yolo-person_38000.weights example/zoo/yolov3-tiny-person.param example/zoo/yolov3-tiny-person.bin example/data/dog.jpg报错 Loading weights from data/tiny-yolo-person_38000.weights...Done! OpenCV Error: Assertion failed (0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows) in Mat, file /home/wang/opencv/modules/core/src/matrix.cpp, line 538 terminate called after throwing an instance of 'cv::Exception' what(): /home/wang/opencv/modules/core/src/matrix.cpp:538: error: (-215) 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows in function Mat 已放弃 (核心已转储)

yolov3-tiny可以正常运行,但是我自己的就会出错,请问这该怎么解决

wn00 commented 5 years ago

已解决,是因为图像的ROI区域超过了图像的尺寸,我修改了.cfg中的width和height