diff --git a/deploy/cpp/src/keypoint_postprocess.cc b/deploy/cpp/src/keypoint_postprocess.cc index 52ac8d3d36ec384bf3eb81c56356c6639a61433f..405195c3ef5f550d0243aa2d4b890bd4e899ee16 100644 --- a/deploy/cpp/src/keypoint_postprocess.cc +++ b/deploy/cpp/src/keypoint_postprocess.cc @@ -193,7 +193,7 @@ void get_final_preds(std::vector& heatmap, int px = int(coords[j * 2] + 0.5); int py = int(coords[j * 2 + 1] + 0.5); - if(DARK && px > 1 && px < heatmap_width - 2){ + if(DARK && px > 1 && px < heatmap_width - 2 && py > 1 && py < heatmap_height - 2){ dark_parse(heatmap, dim, coords, px, py, index, j); } else{