Skip to content

Consider half pixel mode in ONNX resize#23795

Merged
asmorkalov merged 2 commits intoopencv:4.xfrom
dkurt:tf_half_pixel_for_nn
Jun 16, 2023
Merged

Consider half pixel mode in ONNX resize#23795
asmorkalov merged 2 commits intoopencv:4.xfrom
dkurt:tf_half_pixel_for_nn

Conversation

@dkurt
Copy link
Copy Markdown
Member

@dkurt dkurt commented Jun 14, 2023

Pull Request Readiness Checklist

resolves #23745

merge with extra: opencv/opencv_extra#1070

image

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@asmorkalov asmorkalov requested a review from fengyuentau June 14, 2023 11:42
@asmorkalov asmorkalov added this to the 4.8.0 milestone Jun 14, 2023
Copy link
Copy Markdown
Member

@fengyuentau fengyuentau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

{
String interp_mode = layerParams.get<String>("coordinate_transformation_mode");
CV_Assert_N(interp_mode != "tf_crop_and_resize", interp_mode != "tf_half_pixel_for_nn");
CV_Assert_N(interp_mode != "tf_crop_and_resize");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CV_Assert_N is deprecated, see this comment #22898 (comment)

{
String interp_mode = layerParams.get<String>("coordinate_transformation_mode");
CV_Assert_N(interp_mode != "tf_crop_and_resize", interp_mode != "tf_half_pixel_for_nn");
CV_Assert_N(interp_mode != "tf_crop_and_resize");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

@asmorkalov asmorkalov merged commit 3c0b71b into opencv:4.x Jun 16, 2023
@dkurt dkurt deleted the tf_half_pixel_for_nn branch June 16, 2023 11:55
@asmorkalov asmorkalov mentioned this pull request Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenCV(4.7.0-dev) Error: Assertion failed (interp_mode != "tf_half_pixel_for_nn")

3 participants