Skip to content

Commit

Permalink
Solving the issue of out of bounds caused by detection boxes less tha…
Browse files Browse the repository at this point in the history
…n 0 when filling colors in segmentation masks
  • Loading branch information
lindsayshuo committed May 9, 2024
1 parent 4feb62e commit 1cf09f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yolov8/src/postprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ cv::Rect get_rect(cv::Mat& img, float bbox[4]) {
}

cv::Rect get_rect_adapt_landmark(cv::Mat& img, float bbox[4], float lmk[kNumberOfPoints * 3]) {
int l, r, t, b;
float l, r, t, b;
float r_w = kInputW / (img.cols * 1.0);
float r_h = kInputH / (img.rows * 1.0);
if (r_h > r_w) {
Expand Down

0 comments on commit 1cf09f2

Please sign in to comment.