ZhengPeng7 / BiRefNet

[CAAI AIR'24] Bilateral Reference for High-Resolution Dichotomous Image Segmentation
https://www.birefnet.top
MIT License
322 stars 28 forks source link

Can you provide a script to inference a single image? #20

Closed Yogurt2019 closed 2 months ago

Yogurt2019 commented 2 months ago

It's too hard for me to find the right weight and the right backbone & decoder & other things to load your provided pretrained weights. I just wanted to inference some images of mine T.T So can you please provide a script to inference a single image? Thanks a lot!

ZhengPeng7 commented 2 months ago

Have you taken a try at the colab demo I provided? If so, and you still have trouble, plz reply to me here. I'll make it even easier.

Yogurt2019 commented 2 months ago

Have you taken a try at the colab demo I provided? If so, and you still have trouble, plz reply to me here. I'll make it even easier.

Yes, I've tried, it won't run due to the update of your code. For example, there's no models/baseline.py in your code. Thanks a lot for your reply! 感激不尽!

ZhengPeng7 commented 2 months ago

I'm so sorry for that... I updated some filenames including that, but forgot to update the colab at the same time. I just updated the colab. Could you try it again? If you still have some trouble, I'll try to further make it simpler.

Yogurt2019 commented 2 months ago

It could run now, thanks a lot for your help! 十分感谢!

ZhengPeng7 commented 2 months ago

In another issue, Rishabh provided a colab demo for easier single image inference. You can use it now if still have that need: easier single image inference on colab.

Yogurt2019 commented 2 months ago

In another issue, Rishabh provided a colab demo for easier single image inference. You can use it now if still have that need: easier single image inference on colab.

已经用上了,谢谢!