-
Notifications
You must be signed in to change notification settings - Fork 3.8k
add DeformConv-19 #4783
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
add DeformConv-19 #4783
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe new operators now require a reference implementation as well. Reference evaluator can be found at https://github.com/onnx/onnx/tree/main/onnx/reference.
|
Hi @xadupre , can I ask whether there's a way to call the python implementation of an existing op when writing it for a new op in |
|
Page https://onnx.ai/onnx/api/reference.html shows an example which uses an implementation of new custom operator. The same mechanism can be used to replace an existing op. Is that what you are looking for? |
|
I see. Thanks!
…________________________________
From: Xavier Dupré ***@***.***>
Sent: Tuesday, February 14, 2023 12:58 PM
To: onnx/onnx ***@***.***>
Cc: Yuan Yao (yuanyao) ***@***.***>; Author ***@***.***>
Subject: Re: [onnx/onnx] add DeformConv-19 (PR #4783)
Page https://onnx.ai/onnx/api/reference.html shows an example which uses an implementation of new custom operator. The same mechanism can be used to replace an existing op. Is that what you are looking for?
—
Reply to this email directly, view it on GitHub<#4783 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AXYTJBB3AR6RJFY65F6QCVDWXPWWTANCNFSM6AAAAAAT6P34MY>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
c224823 to
7089e41
Compare
b0e0252 to
629e9cb
Compare
629e9cb to
3dd1e43
Compare
3dd1e43 to
bfc6a7c
Compare
|
Hi @gramalingam @p-wysocki , do you have any more comments or questions about this PR? |
Signed-off-by: Yuan Yao <[email protected]>
Signed-off-by: Yuan Yao <[email protected]>
Signed-off-by: Yuan Yao <[email protected]>
Signed-off-by: Yuan Yao <[email protected]>
Signed-off-by: Yuan Yao <[email protected]>
Signed-off-by: Yuan Yao <[email protected]>
fecf4a3 to
eef9158
Compare
Signed-off-by: Yuan Yao <[email protected]>
|
Thanks for this PR @yuanyao-nv ! feel free merging it anytime. I have 2 follow up questions on implementation of this op in ORT: |
|
Hi @liqunfu , to answer your questions:
|
Thank you very much @yuanyao-nv ! |
* add DeformConv Signed-off-by: Yuan Yao <[email protected]> * fix lint error Signed-off-by: Yuan Yao <[email protected]> * add clarification on dimensionality Signed-off-by: Yuan Yao <[email protected]> * rename function Signed-off-by: Yuan Yao <[email protected]> * RUFF fix Signed-off-by: Yuan Yao <[email protected]> * add node about dimension support Signed-off-by: Yuan Yao <[email protected]> * revert accidental pybind11 change Signed-off-by: Yuan Yao <[email protected]> --------- Signed-off-by: Yuan Yao <[email protected]>
Description
Add new op
DeformConvto opset 19.Motivation and Context
Deformable convolution (introduced in https://arxiv.org/abs/1703.06211 and https://arxiv.org/abs/1811.11168) is a popular variant of the convolutional neural network used in situations where scale, pose, viewpoints, etc. deform parts of the image. Instead of sampling using an evenly spaced kernel, it adds offsets to the sampling locations.
Related issues: #2395, #2665, #2485
Torchvision implementation: https://pytorch.org/vision/stable/_modules/torchvision/ops/deform_conv.html