Skip to content
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

DeformConv operation from Onnx to TFLite #469

Open
jlamperez opened this issue Aug 29, 2023 · 1 comment
Open

DeformConv operation from Onnx to TFLite #469

jlamperez opened this issue Aug 29, 2023 · 1 comment
Labels
OP:DeformConv OP:DeformConv TODO TODO

Comments

@jlamperez
Copy link

Issue Type

Feature Request

OS

Linux

onnx2tf version number

1.16.2

onnx version number

1.14.1

onnxruntime version number

1.15.1

onnxsim (onnx_simplifier) version number

0.4.33

tensorflow version number

2.13.0

Download URL for ONNX

dcnv2.zip

Parameter Replacement JSON

N/A

Description

  1. Personal
  2. What
user@80ee9d66194e:/workdir$ onnx2tf -i dcnv2.onnx   

Model optimizing started ============================================================
Simplifying...
Finish! Here is the difference:
┏━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
┃            ┃ Original Model ┃ Simplified Model ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
│ Constant   │ 4              │ 4                │
│ DeformConv │ 1              │ 1                │
│ Model Size │ 876.1KiB       │ 872.3KiB         │
└────────────┴────────────────┴──────────────────┘

Simplifying...
Finish! Here is the difference:
┏━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
┃            ┃ Original Model ┃ Simplified Model ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
│ Constant   │ 4              │ 4                │
│ DeformConv │ 1              │ 1                │
│ Model Size │ 872.3KiB       │ 872.3KiB         │
└────────────┴────────────────┴──────────────────┘

Simplifying...
Finish! Here is the difference:
┏━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
┃            ┃ Original Model ┃ Simplified Model ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
│ Constant   │ 4              │ 4                │
│ DeformConv │ 1              │ 1                │
│ Model Size │ 872.3KiB       │ 872.3KiB         │
└────────────┴────────────────┴──────────────────┘

Model optimizing complete!

Automatic generation of each OP name started ========================================
Automatic generation of each OP name complete!

Model loaded ========================================================================

Model conversion started ============================================================
INFO: input_op_name: input.1 shape: [1, 3, 64, 64] dtype: float32
WARNING: The optimization process for shape estimation is skipped because it contains OPs that cannot be inferred by the standard onnxruntime.
WARNING: [ONNXRuntimeError] : 9 : NOT_IMPLEMENTED : Could not find an implementation for DeformConv(19) node with name '/DeformConv'
ERROR: DeformConv OP is not yet implemented.

  1. I would like to have DeformConv conversion from ONNX to TFLite.
  2. Resources:
@PINTO0309 PINTO0309 added TODO TODO OP:DeformConv OP:DeformConv labels Aug 29, 2023
@PINTO0309
Copy link
Owner

PINTO0309 commented Aug 29, 2023

I have been considering implementing this for half a year, but it is hard to verify that the output of the converted DCNv2 OP is correct because onnxruntime does not yet support DeformConv. Since onnx2tf is a personal tool developed almost exclusively by myself, I will try to implement it appropriately. However, I think it will take very long time to verify it.

https://github.com/onnx/onnx/blob/main/docs/Changelog.md#deformconv-19

https://github.com/PeymanTahghighi/DeformConvLSTM/blob/master/DeformableConv2D.py

https://arxiv.org/pdf/1811.11168.pdf

dcnv2_19.onnx.zip

image

sit4onnx -if dcnv2_19.onnx -oep cpu

onnxruntime.capi.onnxruntime_pybind11_state.NotImplemented:
[ONNXRuntimeError] : 9 : NOT_IMPLEMENTED :
Could not find an implementation for DeformConv(19) node with name '/DeformConv'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OP:DeformConv OP:DeformConv TODO TODO
Projects
None yet
Development

No branches or pull requests

2 participants