dinglufe / segment-anything-cpp-wrapper

MIT License
221 stars 34 forks source link

mask from box #6

Closed bnascimento closed 1 year ago

bnascimento commented 1 year ago

On the original demo, there is a method to turn a box into a mask. I think would be a nice addon here as well.

dinglufe commented 1 year ago

What kind of addon are you referring to? And does "original demo" mean version 1.0?

bnascimento commented 1 year ago

By original demo, I meant this: https://segment-anything.com/demo#

Also from https://github.com/facebookresearch/segment-anything/blob/6fdee8f2727f4506cfbbe553e23b895e27956588/notebooks/onnx_model_example.ipynb#L418 point_labels: Labels for the sparse input prompts. 0 is a negative input point, 1 is a positive input point, 2 is a top-left box corner, 3 is a bottom-right box corner, and -1 is a padding point. If there is no box input, a single padding point with label -1 and coordinates (0.0, 0.0) should be concatenated. So a box where TL and BR points have 2 and 3 values.

What you understand here by padding?

dinglufe commented 1 year ago

Specifying the region is indeed a very important feature, I will add it.But I'm not sure what 'padding' means here.

Jacc999 commented 1 year ago

Hello, what will happen if I run on linux? Can I get through it?

dinglufe commented 1 year ago

Hello, what will happen if I run on linux? Can I get through it?

I tested running the program on Linux before, but it crashed. However, it's possible that the machine I used for testing had insufficient memory (more test needed). We can continue the discussion on a new issue.

bnascimento commented 1 year ago

it can run yes

On Mon, Jun 26, 2023 at 8:06 AM dinglufe @.***> wrote:

Hello, what will happen if I run on linux? Can I get through it?

I tested running the program on Linux before, but it crashed. However, it's possible that the machine I used for testing had insufficient memory (more test needed). We can continue the discussion on a new issue.

— Reply to this email directly, view it on GitHub https://github.com/dinglufe/segment-anything-cpp-wrapper/issues/6#issuecomment-1606836973, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYKG4LSFPLLAJ2YSO3NDV3XNEYINANCNFSM6AAAAAAZHZIVRU . You are receiving this because you authored the thread.Message ID: @.***>

dinglufe commented 1 year ago

This feature (box prompt) was added in v1.4.

Specifying the region is indeed a very important feature, I will add it.But I'm not sure what 'padding' means here.