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

how to export onnx #1

Open
hywchina opened this issue Mar 7, 2025 · 1 comment
Open

how to export onnx #1

hywchina opened this issue Mar 7, 2025 · 1 comment

Comments

@hywchina
Copy link

hywchina commented Mar 7, 2025

How to Convert a Trained .pth File to an .onnx File

thanks

@Wishrem
Copy link

Wishrem commented Apr 7, 2025

Hi, I have done this work. I'm glad to share the exported .onnx file. Here is the download link powered by Google Drive.

The exported model have been tested by evaluate function in inference_rsvg.py, and the runtime arguments file is attached to this comment.

Result:

[email protected]: 0.8737	[email protected]: 0.8257	[email protected]: 0.7234	[email protected]: 0.5110	[email protected]: 0.1443	meanIoU: 0.7155	cumuIoU: 0.7006

The exported model ONLY accepts (due to static computing graph) the following inputs with specific names, shapes and dtypes:

img (1, 3, 1024, 1024) float32
img_attn_mask (1, 1024, 1024) bool
input_ids (1, dynamic shape) int64
input_ids_attn_mask (1, dynamic shape) int64

the outputs of this exported model are raw outputs_class and output_coord, which you can refer to models/LQVG.py:LQVG.forward.

args.txt

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

No branches or pull requests

2 participants