Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to format scribble in demo json file? #22

Open
mrwu-mac opened this issue Apr 11, 2024 · 4 comments
Open

How to format scribble in demo json file? #22

mrwu-mac opened this issue Apr 11, 2024 · 4 comments

Comments

@mrwu-mac
Copy link

mrwu-mac commented Apr 11, 2024

Thank you for your outstanding work.
I try to format scribble with format [[x1,y1],[x2,y2],...], but got an error as follows,
scribbles_embeddings[idx] = torch.tensor(scribble) input.py line 72, in prepare_batch; RuntimeError: expand(torch.FloatTensor{[96, 2]}, size=[40]): the number of sizes provided (1) must be greater or equal to the number of dimensions in the tensor (2)

@frank-xwang
Copy link
Owner

Hi, could you please provide an example of the scribble you used? Before you do that, it might be helpful to verify the format of the scribbles by referring to this line in our code, which generates scribbles randomly when none is provided:

if len(scribbles_list) == 0:

Based on the error message you shared, it appears that the scribble you provided does not conform to the format expected by our code.

@mrwu-mac
Copy link
Author

The code used to randomly sample the points inside the scribble works for me. But manually giving scribble seems to get a different form of input, resulting in an error.

@zhanghh-031102
Copy link

I have the same problem.

@frank-xwang
Copy link
Owner

Sorry for the late reply. The scribble should be in the format of [x1, y1, ..., x20, y20]. Hope it helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants