Skip to content

ONNX export issues #39

Description

@Demilock

This is a great model with repetitive refining of the mask. But please implement the code for ONNX exporting. I am trying to export but it is very difficult to figure out the exact inputs that are going to the model. Through inspection i found that for 1 image and 1 click, the model's forward method takes 2 batches [2,3,H,W] and then 2 clicks [2,N,3]. Also why are clicks appended with [-1,-1,-1] before sending to forward()? Also, since ISModel is inherited by PlainVitModel and real forward for the end to end input and output is backbone_forward() of PlainVitModel and not forward() of ISModel, it is very difficult to get the correct forward methods to get to work. I have to manually preprocess and postprocess the inputs and outputs and for that i have to know what exactly is the input shapes, types and meaning.
Even if you explain it here, it would be very helpful and maybe i can include ONNX export code to the repository saving you time and work. Or maybe you can include the ONNX export code here yourself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions