Fix crash on non-quadratic segmentation masks

pull/160/head
Flippchen 1 year ago committed by GitHub
parent a41c474849
commit 4bf9dd15ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      csrc/segment/normal/include/yolov8-seg.hpp

@ -326,7 +326,7 @@ void YOLOv8_seg::postprocess(
} }
else { else {
cv::Mat matmulRes = (masks * protos).t(); cv::Mat matmulRes = (masks * protos).t();
cv::Mat maskMat = matmulRes.reshape(indices.size(), {seg_w, seg_h}); cv::Mat maskMat = matmulRes.reshape(indices.size(), {seg_h, seg_w});
std::vector<cv::Mat> maskChannels; std::vector<cv::Mat> maskChannels;
cv::split(maskMat, maskChannels); cv::split(maskMat, maskChannels);

Loading…
Cancel
Save