MengyuWang826 / SegRefiner

SegRefiner: Towards Model-Agnostic Segmentation Refinement with Discrete Diffusion Process
Apache License 2.0
137 stars 8 forks source link

How to run inference on an image from the wild? #15

Open LastTargaryen opened 3 months ago

LastTargaryen commented 3 months ago

I'm sorry if it's like, RIGHT in front of my face and I just can't see it, but can someone please tell me how to just run plain inference on an image? I have been reviewing this entire repo for the last day and a half and I cannot figure it out. Please tell me exactly how to just run inference on an image--an image that isn't part of a dataset.

Edit: After further review, it seems I'm asking the wrong question; updated question is:

How does one extract only the mask from the result of a SAM model in order to feed it into SegRefiner...?

xuyu666 commented 3 months ago

It's the same problem.

LastTargaryen commented 3 months ago

Okay, then can I please please be blessed with simple instructions for inference? I understand now I need an original image (reference image) and a single-channel mask. I have these--how do I apply them to your code?