Skip to content

Point Sampling #30

Open
Open
@Crazy-Tony

Description

@Crazy-Tony

I'm trying to sample points for finetuning the SimpleClick model using my own sampling algorithm. Therefore i tried to figure out the points format, that's required to use the model.forward(self, image, points) function.
I added some vebose messages but the results where quite confusing to me.

In case of one positive point, I got the following output:

points.shape = torch.Size([2, 2, 3])
points = tensor([[[ 21.2914, 149.6880,   0.0000],
         [ -1.0000,  -1.0000,  -1.0000]],
        [[ 21.2914, 297.3120,   0.0000], 
         [ -1.0000,  -1.0000,  -1.0000]]]) 

Adding another positive point, I got the following output:

points.shape = torch.Size([2, 4, 3])
points = tensor([[[ 21.2914, 149.6880,   0.0000],
         [363.7146, 229.9360,   1.0000],
         [ -1.0000,  -1.0000,  -1.0000],
         [ -1.0000,  -1.0000,  -1.0000]],

        [[ 21.2914, 297.3120,   0.0000],
         [363.7146, 217.0640,   1.0000],
         [ -1.0000,  -1.0000,  -1.0000],
         [ -1.0000,  -1.0000,  -1.0000]]])

Providing one negative point:

points.shape = torch.Size([2, 4, 3])
points = tensor([[[ 21.2914, 149.6880,   0.0000],
         [363.7146, 229.9360,   1.0000],
         [298.6300, 218.0080,   2.0000],
         [ -1.0000,  -1.0000,  -1.0000]],

        [[ 21.2914, 297.3120,   0.0000],
         [363.7146, 217.0640,   1.0000],
         [298.6300, 228.9920,   2.0000],
         [ -1.0000,  -1.0000,  -1.0000]]])

The clicks that my sourcecode provides are in the format (batch_size, max_amount_clicks, 3), where the last dimension stores x_coord, y_coord and (1 for positive clicks and 0 for negative clicks).
Could you please help me to transform my clicks to the required format?
Thanks in advance! :)

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