8000 (5.x) Merge 4.x by asmorkalov · Pull Request #1119 · opencv/opencv_extra · GitHub
[go: up one dir, main page]

Skip to content

(5.x) Merge 4.x #1119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Nov 8, 2023
Merged

(5.x) Merge 4.x #1119

merged 7 commits into from
Nov 8, 2023

Conversation

asmorkalov
Copy link
Contributor

#1082 from Aser-Abdelfatah:GSoC_Support_GatherElements_ONNX
#1106 from Abdurrahheem:ash/dev_einsum_ellips
#1108 from asmorkalov:as/resize_interarea_perf
#1110 from alexlyulkov:al/fixed-cumsum-inplace-flag

Previous "Merge 4.x": #1109

asmorkalov and others added 7 commits October 17, 2023 09:44
New sanity data for resize interarea perfomance test.
…erElements_ONNX

Merge with opencv/opencv#24092

This pull request serves as an addition to the pull request "GSoC Add ONNX Support for GatherElements #24092", which is submitted to the original OpenCV repository. It contains three tests to the GatherElements operator. 
The three tests are sourced from:
* https://github.com/onnx/onnx/tree/main/onnx/backend/test/data/node/test_gather_elements_0
* https://github.com/onnx/onnx/tree/main/onnx/backend/test/data/node/test_gather_elements_1
* https://github.com/onnx/onnx/tree/main/onnx/backend/test/data/node/test_gather_elements_negative_indices
And the models were configured using the code provided by Yuantao Feng at https://github.com/fengyuentau/onnx_utils to confirm output shape in pre-run.

---

Reference outputs for `optical_flow_estimation_raft_2023aug.onnx` is generated with the following script:

```python
import cv2 as cv
import numpy as np

img1 = cv.imread("./opencv_extra/testdata/gpu/opticalflow/frame0.png")
img2 = cv.imread("./opencv_extra/testdata/gpu/opticalflow/frame1.png")

img1_blob = cv.cvtColor(img1, cv.COLOR_BGR2RGB)
img1_blob = cv.resize(img1_blob, (480, 360))
# source: (1, 3, 388, 584)
# target: 1, 3, 360, 480
img1_blob = cv.dnn.blobFromImage(img1_blob)
# source:  (1, 3, 388, 584)
# target: 1, 3, 360, 480
img2_blob = cv.cvtColor(img2, cv.COLOR_BGR2RGB)
img2_blob = cv.resize(img2_blob, (480, 360))
img2_blob = cv.dnn.blobFromImage(img2_blob)
print(img1_blob.shape, img2_blob.shape)

import onnxruntime as ort
net = ort.InferenceSession("optical_flow_estimation_raft_2023aug.onnx", providers=["CPUExecutionProvider"])
output = net.run(["12007", "12006"], {"0": img1_blob, "1": img2_blob})
np.save("output_optical_flow_estimation_raft_2023aug_0.npy", output[0])
np.save("output_optical_flow_estimation_raft_2023aug_1.npy", output[1])
print(output[0].shape)
print(output[1].shape)
```
…ce-flag

Added test for cumsum exclusive inplace
Test case for Einsum ellipse functionality opencv#1106

This PR contains test case for Einsum Ellipses addition patch [#24322](opencv/opencv#24322)
@asmorkalov asmorkalov merged commit 5bc2cd9 into opencv:5.x Nov 8, 2023
@asmorkalov asmorkalov mentioned this pull request Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0