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

Support tf ResizeArea op. #2241

Merged
merged 3 commits into from
Sep 19, 2023
Merged

Support tf ResizeArea op. #2241

merged 3 commits into from
Sep 19, 2023

Conversation

fatcat-z
Copy link
Collaborator

Add support for ResizeArea op, and add tests.
Fix #2239

Signed-off-by: Jay Zhang <jiz@microsoft.com>
@fatcat-z fatcat-z requested a review from xiaowuhu September 18, 2023 08:48
Signed-off-by: Jay Zhang <jiz@microsoft.com>
@fatcat-z fatcat-z merged commit b57fe91 into onnx:main Sep 19, 2023
51 checks passed
@fatcat-z fatcat-z deleted the check_resize branch September 19, 2023 00:22
@ZachZhao96
Copy link

Thank you very much. So, does the current version on the PyPI support the ResizeArea after this commit got merged? or do I expect to see the area method support in the next release?

@fatcat-z
Copy link
Collaborator Author

Thank you very much. So, does the current version on the PyPI support the ResizeArea after this commit got merged? or do I expect to see the area method support in the next release?

This commit has been merged and will be available in next release which is not in a plan yet. If you want this function, you can install from source for your local usage.

@ZachZhao96
Copy link

Thank you very much. So, does the current version on the PyPI support the ResizeArea after this commit got merged? or do I expect to see the area method support in the next release?

This commit has been merged and will be available in next release which is not in a plan yet. If you want this function, you can install from source for your local usage.

I successfully converted my model to onnx using the new version, but when using onnxruntime for inference, the prediction result is way off compared to the result from the regular keras model.predict. I guess I will have to wait for onnx or onnxruntime to have the ResizeArea method in Resize operation as well. Look forward to the next release. Really appreciate your time.

MaximeChurin pushed a commit to MaximeChurin/tensorflow-onnx that referenced this pull request Oct 11, 2023
* Support ResizeArea op.

Signed-off-by: Jay Zhang <jiz@microsoft.com>

---------

Signed-off-by: Jay Zhang <jiz@microsoft.com>
Signed-off-by: Me <me@example.com>
MaximeChurin pushed a commit to MaximeChurin/tensorflow-onnx that referenced this pull request Oct 12, 2023
* Support ResizeArea op.

Signed-off-by: Jay Zhang <jiz@microsoft.com>

---------

Signed-off-by: Jay Zhang <jiz@microsoft.com>
Signed-off-by: Me <me@example.com>
MaximeChurin pushed a commit to MaximeChurin/tensorflow-onnx that referenced this pull request Oct 12, 2023
* Support ResizeArea op.

Signed-off-by: Jay Zhang <jiz@microsoft.com>

---------

Signed-off-by: Jay Zhang <jiz@microsoft.com>
Signed-off-by: Me <me@example.com>
MaximeChurin pushed a commit to MaximeChurin/tensorflow-onnx that referenced this pull request Oct 12, 2023
* Support ResizeArea op.

Signed-off-by: Jay Zhang <jiz@microsoft.com>

---------

Signed-off-by: Jay Zhang <jiz@microsoft.com>
Signed-off-by: Me <me@example.com>
@ZachZhao96
Copy link

ZachZhao96 commented Nov 17, 2024

@fatcat-z Hi, has resize_area method been included in the latest ONNX and supported by tf2onnx yet? I couldn't find anything regarding the resize_area in either onnx or tf2onnx documentation except for the test_backend file you committed last time.

I dont see any error message when i convert my keras model (with resize_area method) to onnx using tf2onnx.convert.from_keras(model,opset=13), however it seems that the "resize_area" method is recognized as "bilinear" because the inference result from the converted ONNX model is different from the original keras model.

@fatcat-z
Copy link
Collaborator Author

No, resize_area is not an ONNX op.

@ZachZhao96
Copy link

Thanks, I also tried resized_spectrogram = tf.image.resize(spectrogram, [256, 256],method = "bilinear", antialias = True), then I got this error:
image

I wonder if the antialias supported in Resize Op is the same as the tf.image.resize(..., antialias = True).
image

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.

tf2onnx support for tensorflow Resizing "area" method
3 participants