Skip to content

Can't export sam onnx model without "orig_im_size" input #6

@jiahan

Description

@jiahan

Hi mingj2021,

I had a problem when using the export_sam_model function in demo.py script:
If the "orig_im_size" input in dummy_inputs is commented (as default), I cannot export the onnx model.
Got the following error:
TypeError: forward() missing 1 required positional argument: 'orig_im_size'

If I add the "orig_im_size" input, export can be success but cannot further transfer to .engine model.

Any hints to solve this issue?

I had tried both sam_vit_b_01ec64.pth and sam_vit_l_0b3195.pth
With TensorRT-8.5.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions