diff --git a/dlib/dnn/input.h b/dlib/dnn/input.h index 503fbb9b0..3b9d4548a 100644 --- a/dlib/dnn/input.h +++ b/dlib/dnn/input.h @@ -534,7 +534,7 @@ namespace dlib { auto&& rects = any_cast>(data.annotation()); DLIB_CASSERT(rects.size() > 0); - return rects[0].contains(p); + return rects[0].contains(p+rects[0].tl_corner()); } drectangle tensor_space_to_image_space (