Merge pull request #160 from Flippchen/main

pull/192/head
triple Mu 1 year ago committed by GitHub
commit f36a1fdaef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      csrc/segment/normal/include/yolov8-seg.hpp
  2. 2
      csrc/segment/simple/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);

@ -300,7 +300,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