Open yihenxi opened 3 years ago
看mtcnn.so,怀疑是 resize_bilinear 之前,copy_cut_border 的参数为负数,导致crop失败传入空 Mat ?
“参数为负数” ----》》》resize_bilinear(img, in, ws, hs); 请问是这里的ws和hs吗?
copy_cut_border(img, tempIm, (it).y1, img_h-(it).y2, (it).x1, img_w-(it).x2); 这是copy_cut_border
这个是在PNet函数处发生的崩溃,在这之前没有做copy_cut_border操作
`void MTCNN::PNet(float scale) { //first stage int hs = (int)ceil(img_hscale); int ws = (int)ceil(img_wscale);
ncnn::Mat in;
resize_bilinear(img, in, ws, hs);
ncnn::Extractor ex = Pnet.create_extractor();
ex.set_light_mode(true);
ex.set_num_threads(num_threads);
ex.input("data", in);
ncnn::Mat score_, location_;
ex.extract("prob1", score_);
ex.extract("conv4-2", location_);
std::vector<Bbox> boundingBox_;
generateBbox(score_, location_, boundingBox_, scale);
nms(boundingBox_, nms_threshold[0]);
firstBbox_.insert(firstBbox_.end(), boundingBox_.begin(), boundingBox_.end());
boundingBox_.clear();
}`
#01 pc 00210673 /data/app/com.jinxin.namibox-5ZZ5a-qR7o1gX1rpNi_7cA==/lib/arm/libmtcnn.so (__aeabi_idiv0+6) [armeabi-v7a::1dda145aaa18d0473091f469cef87ae3]
3 #02 pc 000573cd /data/app/com.jinxin.namibox-5ZZ5a-qR7o1gX1rpNi_7cA==/lib/arm/libmtcnn.so (ncnn::Mat::create(int, int, int, unsigned int, int, ncnn::Allocator*)+156) [armeabi-v7a::1dda145aaa18d0473091f469cef87ae3]
4 #03 pc 001635c1 /data/app/com.jinxin.namibox-5ZZ5a-qR7o1gX1rpNi_7cA==/lib/arm/libmtcnn.so (ncnn::Interp_arm::forward(std::ndk1::vector<ncnn::Mat, std::ndk1::allocator
ncnn-android-lib.zip 版本为https://github.com/Tencent/ncnn/releases/tag/20210322
02 pc 000573cd /data/app/com.jinxin.namibox-4_QRJUbw2X4gIYPGhjy50g==/lib/arm/libmtcnn.so (ncnn::Mat::create(int, int, int, unsigned int, int, ncnn::Allocator*)+156) [armeabi-v7a]
4
03 pc 001635c1 /data/app/com.jinxin.namibox-4_QRJUbw2X4gIYPGhjy50g==/lib/arm/libmtcnn.so (ncnn::Interp_arm::forward(std::ndk1::vector<ncnn::Mat, std::ndk1::allocator > const&, std::ndk1::vector<ncnn::Mat, std::ndk1::allocator >&, ncnn::Option const&) const+240) [armeabi-v7a]
5
04 pc 00161a1f /data/app/com.jinxin.namibox-4_QRJUbw2X4gIYPGhjy50g==/lib/arm/libmtcnn.so (ncnn::Interp::forward(ncnn::Mat const&, ncnn::Mat&, ncnn::Option const&) const+498) [armeabi-v7a]
6
05 pc 0004ef67 /data/app/com.jinxin.namibox-4_QRJUbw2X4gIYPGhjy50g==/lib/arm/libmtcnn.so (ncnn::resize_bilinear(ncnn::Mat const&, ncnn::Mat&, int, int, ncnn::Option const&)+110) [armeabi-v7a]