detail | 详细描述 | 詳細な説明
find_blob_index_by_name input failed
Try
find_blob_index_by_name output1 failed
Try
2021-11-08 09:35:26.136010+0800 IDCardDemo[29738:9041248] ---------- step: angleNet getAngles ----------
find_blob_index_by_name input failed
Try
find_blob_index_by_name output failed
Try
std::vector
DbNet::getTextBoxes(cv::Mat &src, ScaleParam &s, float boxScoreThresh, float boxThresh, float unClipRatio) {
cv::Mat srcResize;
resize(src, srcResize, cv::Size(s.dstWidth, s.dstHeight));
ncnn::Mat input = ncnn::Mat::from_pixels(srcResize.data, ncnn::Mat::PIXEL_RGB,
srcResize.cols, srcResize.rows);
input.substract_mean_normalize(meanValues, normValues);
ncnn::Extractor extractor = net.create_extractor();
extractor.set_light_mode(true);
extractor.set_num_threads(numThread);
extractor.input(dbnet_param_id::BLOB_input, input);
ncnn::Mat out;
extractor.extract(dbnet_param_id::BLOB_output, out);
NSLog(@"返回结果%d", extractor.extract(dbnet_param_id::BLOB_output, out));
//-----Data preparation-----
cv::Mat fMapMat(srcResize.rows, srcResize.cols, CV_32FC1);
memcpy(fMapMat.data, (float *) out.data, srcResize.rows * srcResize.cols * sizeof(float));
//-----boxThresh-----
cv::Mat norfMapMat;
norfMapMat = fMapMat > boxThresh;
return findRsBoxes(fMapMat, norfMapMat, s, boxScoreThresh, unClipRatio);
}
这是我的代码,我通过断点 虽然报了找不到find_blob_index_by_name input failed
但是Input是有值得,但是out怎样都没有值,我一开始是通过.param以及.bin进行初始化,后面不行参考这上面的issue改成了.param .bin以及.param.bin去初始化,结果还是得不到out的输出,我的初始化函数是这样写的
bool DbNet::initModel(NSString *mgr) {
NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"assets" ofType:@"bundle"];
NSString *parmaPath= [bundlePath stringByAppendingPathComponent:@"dbnet.param"];
NSString *binPath= [bundlePath stringByAppendingPathComponent:@"dbnet.bin"];
NSString *bin_paramPath = [bundlePath stringByAppendingPathComponent:@"dbnet.param.bin"];
int ret_param = net.load_param([parmaPath UTF8String]);
int ret_bin = net.load_model([binPath UTF8String]);
int ret_bin_param = net.load_param_bin([bin_paramPath UTF8String]);
if (ret_param != 0 || ret_bin != 0 || ret_bin_param != 0) {
NSLog(@"# %d %d %d", ret_param,ret_bin,ret_bin_param);
return false;
}
return true;
}
大家知道的都帮忙解答下啊
2条答案
按热度按时间0ve6wy6x1#
@pH5@arnaudbrejeon@maxint@baryluk
snz8szmq2#
Have you resolved this error and then get the correct outputs? I meet the same problem.