ZhengPeng7 / BiRefNet

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

CoreML model #45

Open ynie opened 3 months ago

ynie commented 3 months ago

Hey ZhengPeng,

I'm interested in helping you to convert this model to CoreML, so it can run on Apple device locally. I'm planning to take a look in late August for this. Have you done similar work before?

Thanks!

ZhengPeng7 commented 3 months ago

That would be an interesting work! But I didn't know much about app CoreML and deployment... If you want to do it, I can offer any help with the model and algorithm of BiRefNet and segmentation. Really love to see this open-source project to be used by more people.

Regards

ynie commented 3 months ago

Awesome. I will keep you posted in this issue.

ZhengPeng7 commented 2 months ago

Hi, Steven~ You can now find the ONNX files of all weights files in the GitHub release or the ONNX folder in the stuff folder on my GDrive. They may do some help if you want to do some deployment on Apps.

ynie commented 2 months ago

Hey Peng,

Thanks for your ONNX model! I can give it a try in few weeks after I wrap up the current work. However, I believe ONNX model can only run on CPU on iOS. I could be wrong tho. I can reply to this thread once I find out more. Thanks again!

Dong-Studio commented 2 months ago

hi,ynie~ I’m really excited to see your idea. The lightweight version can be converted into iOS CoreML format so that it can run locally on the iPhone. Will you continue to research it?

mrlzla commented 2 months ago

Has someone managed to convert the model to coreml?

pierre1618 commented 2 months ago

i tried to convert it to coreml and i feel i was close to succeed but i got an error with the DeformConv2d function that i tried to fix with this package. If someone want to take a look to my error here.

czxichen commented 1 week ago

Does coreml support progress? I am using ort's coreml backend and it keeps blocking.