RepViT icon indicating copy to clipboard operation
RepViT copied to clipboard

export_coreml_decoder.py how to set point_labels?

Open zongzhesun opened this issue 2 months ago • 0 comments

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.

zongzhesun avatar Nov 25 '25 03:11 zongzhesun