-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于新版mask的疑问: #4
Comments
netOutputImg[1]是mask的特征矩阵,需要和第一个输出中长度为32的特征掩码进行矩阵乘法之后得到1x160x160大小的mask图像,然后缩放两次(第一次是640x640(也就是mask比推理图像缩小了mask-ratio,默认为4),第二次从640x640开始)回到原图大小,至于你说的一维数组,我没搞懂你在说哪个是一维数组。 |
请问这个32的特征掩码该怎么理解呢? 有没有对应的分割网络可以帮助理解? |
YOLACT里面有提到,论文你可以自己搜索下 |
opencv里面,img.rows是行数,也就是图像y方向的高度,img.cols是x方向的宽度,你这点不要搞混掉了,如果原始的没问题,你看下是不是这点的问题导致你的原始图像长宽反了出现条状。我也不知道你修改了哪些东西,无法复现你的问题。如果旧版本的没问题,那你换旧版本的吧。 |
net.forward(netOutputImg, outputLayerName); //获取output的输出
netOutputImg[1]为mask数据,数据大小应该为:132160*160,但是这里这个维度应该是咋样的?
正常推理处理这个mask数据应该是一维数组,怎么变成相应维度呢?
另外,进行GetMask2的时候:
for (int i = 0; i < temp_mask_proposals.size(); ++i) {
GetMask2(Mat(temp_mask_proposals[i]).t(), netOutputImg[1], params, SrcImg.size(), output[i]);
}
里面:
vectorcv::Range roi_rangs;
roi_rangs.push_back(cv::Range(0, 1));
roi_rangs.push_back(cv::Range::all());
roi_rangs.push_back(cv::Range(rang_y, rang_h + rang_y));
roi_rangs.push_back(cv::Range(rang_x, rang_w + rang_x));
//crop
cv::Mat temp_mask_protos = maskmat(roi_rangs).clone();
这个cv::Range::all()是啥意思,这个maskmat维度不对,直接会导致maskmat(roi_rangs).clone()崩溃!
The text was updated successfully, but these errors were encountered: