ZhengPeng7 / BiRefNet

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

Image Sequence Inference #72

Open jtsanborn1 opened 2 weeks ago

jtsanborn1 commented 2 weeks ago

Is there a way to run the inference on image sequence like a batch instead of single frame?

Thanks!

ZhengPeng7 commented 2 weeks ago

Hi, I've upgraded the initial single image inference colab in README to the multiple images inference version, you can try that. All images in a folder you specify will be inferenced in a loop.

jtsanborn1 commented 2 weeks ago

Cool, its working fine! Thank you!! What about running it locally instead of a colab?

ZhengPeng7 commented 2 weeks ago

You can save the colab to your computer as a notebook and remove the !xxx commands. It won't cost you one minute. But if there is any problem, feel free to ask me again.

ZhengPeng7 commented 2 weeks ago

Hi, I also found a HF spaces of BiRefNet which support online inference on a batch of images. You can have a try on it (it doesn't have GPU and could be a little slow): https://huggingface.co/spaces/NegiTurkey/Multi_Birefnetfor_Background_Removal

ZhengPeng7 commented 2 weeks ago

I'll also add this function to my official HF space.