CARVIEW |
Select Language
HTTP/2 200
date: Sun, 27 Jul 2025 13:52:22 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/opencv/opencv.git
etag: W/"62a10fdf7d2f5dc2355fd844c2e1608c"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=KVJCUtT%2FlKGXhIPVnrOVxlUdbzU8eoCaeXxe82Os8R6Tt7uv1eHrw10xwMhMCNc7McGrSrYI54BOrWtMIW7q2k6vSf%2BmujS7kfwBv46Uj1f82FvzZQ6odliLZ16a4d%2BVuMG%2BPBUZe9L%2FxuN0TXm4LNytdmrJNchXsm7HSRvVZLVdfyzqwfDQ3Npizw%2FRE9IVkVVCFmVHhekv2%2B3xI7KXFt8El0w%2Bb%2Fbx38XfweHX7ky2LPDVngRH8yaBDMoI2SZUetG0r5uR6HtIMP9Z%2BgKPwg%3D%3D--r9irlX6623nUB4WH--X5X71Bhpjl5gJN7dlPzreQ%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1862100550.1753624342; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 13:52:22 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 13:52:22 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: C3CC:3C6DB4:55BCD8:71A03E:68862F16
Merge pull request #25779 from fengyuentau:dnn/fix_onnx_depthtospace · opencv/opencv@3f13ce7 · GitHub
Copy file name to clipboardExpand all lines: modules/dnn/include/opencv2/dnn/all_layers.hpp
Copy file name to clipboardExpand all lines: modules/dnn/src/cuda4dnn/csl/tensor.hpp
Copy file name to clipboard
Skip to content
Navigation Menu
{{ message }}
-
-
Notifications
You must be signed in to change notification settings - Fork 56.2k
Commit 3f13ce7
authored
Merge pull request #25779 from fengyuentau:dnn/fix_onnx_depthtospace
dnn: add DepthToSpace and SpaceToDepth #25779
We are working on updating WeChat QRCode module. One of the new models is a fully convolutional model and hence it should be able to run with different input shapes. However, it has an operator `DepthToSpace`, which is parsed as a subgraph of `Reshape -> Permute -> Reshape` with a fixed shape getting during parsing. The subgraph itself is not a problem, but the true problem is the subgraph with a fixed input and output shape regardless input changes. This does not allow the model to run with different input shapes.
Solution is to add a dedicated layer for DepthtoSpace and SpaceToDepth.
Backend support:
- [x] CPU
- [x] CUDA
- [x] OpenCL
- [x] OpenVINO
- [x] CANN
- [x] TIMVX
- ~Vulkan~ (missing fundamental tools, like permutation and reshape)
### Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
- [x] I agree to contribute to the project under Apache 2 License.
- [x] 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
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake1 parent acd16e3 commit 3f13ce7Copy full SHA for 3f13ce7
File tree
Expand file treeCollapse file tree
8 files changed
+663
-95
lines changedFilter options
- modules/dnn
- include/opencv2/dnn
- src
- cuda4dnn
- csl
- primitives
- layers
- onnx
- test
Expand file treeCollapse file tree
8 files changed
+663
-95
lines changedmodules/dnn/include/opencv2/dnn/all_layers.hpp
Copy file name to clipboardExpand all lines: modules/dnn/include/opencv2/dnn/all_layers.hpp+10Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1188 | 1188 |
| |
1189 | 1189 |
| |
1190 | 1190 |
| |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
1191 | 1201 |
| |
1192 | 1202 |
| |
1193 | 1203 |
| |
|
modules/dnn/src/cuda4dnn/csl/tensor.hpp
Copy file name to clipboardExpand all lines: modules/dnn/src/cuda4dnn/csl/tensor.hpp+12-17Lines changed: 12 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
265 | 265 |
| |
266 | 266 |
| |
267 | 267 |
| |
268 |
| - | |
269 | 268 |
| |
270 | 269 |
| |
271 | 270 |
| |
| |||
284 | 283 |
| |
285 | 284 |
| |
286 | 285 |
| |
| 286 | + | |
287 | 287 |
| |
288 | 288 |
| |
289 | 289 |
| |
| |||
298 | 298 |
| |
299 | 299 |
| |
300 | 300 |
| |
301 |
| - | |
302 |
| - | |
303 |
| - | |
304 |
| - | |
305 |
| - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
306 | 304 |
| |
307 | 305 |
| |
308 | 306 |
| |
| |||
600 | 598 |
| |
601 | 599 |
| |
602 | 600 |
| |
| 601 | + | |
603 | 602 |
| |
604 | 603 |
| |
605 | 604 |
| |
| |||
614 | 613 |
| |
615 | 614 |
| |
616 | 615 |
| |
617 |
| - | |
618 |
| - | |
619 |
| - | |
620 |
| - | |
621 |
| - | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
622 | 619 |
| |
623 | 620 |
| |
624 | 621 |
| |
| |||
946 | 943 |
| |
947 | 944 |
| |
948 | 945 |
| |
949 |
| - | |
950 | 946 |
| |
951 | 947 |
| |
952 | 948 |
| |
| |||
965 | 961 |
| |
966 | 962 |
| |
967 | 963 |
| |
| 964 | + | |
968 | 965 |
| |
969 | 966 |
| |
970 | 967 |
| |
| |||
979 | 976 |
| |
980 | 977 |
| |
981 | 978 |
| |
982 |
| - | |
983 |
| - | |
984 |
| - | |
985 |
| - | |
986 |
| - | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
987 | 982 |
| |
988 | 983 |
| |
989 | 984 |
| |
|
modules/dnn/src/cuda4dnn/primitives/depth_space_ops.hpp
Copy file name to clipboard+76Lines changed: 76 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + |
+4Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
164 | 164 |
| |
165 | 165 |
| |
166 | 166 |
| |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
167 | 171 |
| |
168 | 172 |
| |
169 | 173 |
| |
|
You can’t perform that action at this time.
0 commit comments