Skip to content

export_coreml_decoder.py how to set point_labels? #91

@zongzhesun

Description

@zongzhesun

Hi, Thank you for your great work!

I have some questions about exporting the repvit-sam decoder onnx model:

  1. How to set point_labels?
  2. How to distinguish between point and box prompts?
  3. How to distinguish betwee positive and negative prompts?

source code in RepViT/sam/scripts
/export_coreml_decoder.py, line 123.
dummy_inputs = {
"image_embeddings": torch.randn(1, embed_dim, *embed_size, dtyptorch.float),
"point_coords": torch.randint(low=0, high=1024, size=(1, 5, 2), dtype=torch.float),
"point_labels": torch.randint(low=0, high=4, size=(1, 5), dtype=torch.float),
"mask_input": torch.randn(1, 1, *mask_input_size, dtype=torch.float),
"has_mask_input": torch.tensor([1], dtype=torch.float),
}

I hope you can help me answer these questions. Thank you.

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