Skip to content

Explicit usage of int64_t in CropAndResizeLayer (IE backend)#19961

Merged
alalek merged 4 commits intoopencv:3.4from
alvoron:dnn_ngraph_int64_fix
Apr 21, 2021
Merged

Explicit usage of int64_t in CropAndResizeLayer (IE backend)#19961
alalek merged 4 commits intoopencv:3.4from
alvoron:dnn_ngraph_int64_fix

Conversation

@alvoron
Copy link
Copy Markdown
Contributor

@alvoron alvoron commented Apr 21, 2021

Pull Request Readiness Checklist

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 other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to 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

The fix complements #17998

force_builders=Custom,Custom Win,Custom Mac
build_image:Custom=ubuntu-openvino-2021.3.0:20.04
build_image:Custom Win=openvino-2021.3.0
build_image:Custom Mac=openvino-2021.3.0

test_modules:Custom=dnn,python2,python3,java
test_modules:Custom Win=dnn,python2,python3,java
test_modules:Custom Mac=dnn,python2,python3,java

buildworker:Custom=linux-1
# disabled due high memory usage: test_opencl:Custom=ON
test_opencl:Custom=OFF
test_bigdata:Custom=1
test_filter:Custom=*

@alvoron alvoron added this to the 3.4.15 milestone Apr 21, 2021
ngraph::Shape{offsets.size()}, std::vector<int64_t>(offsets.begin(), offsets.end()));
auto upper_bounds = std::make_shared<ngraph::op::Constant>(ngraph::element::i64,
ngraph::Shape{dims.size()}, dims.data());
ngraph::Shape{dims.size()}, std::vector<int64_t>(dims.begin(), dims.end()));
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.

I believe we should change this line above instead:

std::vector<size_t> dims = rois->get_shape(), offsets(4, 0);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I changed the fix.

Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

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

Thank you 👍

@alalek alalek merged commit 2e143b8 into opencv:3.4 Apr 21, 2021
@alvoron alvoron deleted the dnn_ngraph_int64_fix branch April 21, 2021 18:56
@alalek alalek mentioned this pull request May 1, 2021
danielenricocahall pushed a commit to danielenricocahall/opencv that referenced this pull request May 27, 2021
Explicit usage of int64_t in CropAndResizeLayer (IE backend)

* Update crop_and_resize_layer.cpp
@alalek alalek mentioned this pull request Jun 4, 2021
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.

2 participants