xuebinqin / U-2-Net

The code for our newly accepted paper in Pattern Recognition 2020: "U^2-Net: Going Deeper with Nested U-Structure for Salient Object Detection."
Apache License 2.0
8.34k stars 1.43k forks source link

How to slim the u2net-human-seg.pth? #204

Open fastscannerapps opened 3 years ago

fastscannerapps commented 3 years ago

u2net-human-seg.pth is 168 MB which is too large. How to slim it?

xuebinqin commented 3 years ago

Thanks for your interests. You can try to convert it to Tensorflow Lite, ONNX, CoreML, etc.

On Tue, May 18, 2021 at 11:06 AM fastscannerapps @.***> wrote:

u2net-human-seg.pth is 168 MB which is too large. How to slim it?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/xuebinqin/U-2-Net/issues/204, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGOROOCXAQ3L2QFMKU2J3TOIGYDANCNFSM45B5BUUA .

-- Xuebin Qin PhD Department of Computing Science University of Alberta, Edmonton, AB, Canada Homepage:https://webdocs.cs.ualberta.ca/~xuebin/

fastscannerapps commented 3 years ago

Thanks Qin. But convert to coreml or onnx will not will affect the size very much.

xuebinqin commented 3 years ago

OK, I see. May I know what the model size limit is for your project ?

On Wed, May 19, 2021 at 2:17 PM fastscannerapps @.***> wrote:

Thanks Qin. But convert to coreml or onnx will not will affect the size very much.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/xuebinqin/U-2-Net/issues/204#issuecomment-843959937, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORK7UNE2UQ6VSDVCMVLTOOF2VANCNFSM45B5BUUA .

-- Xuebin Qin PhD Department of Computing Science University of Alberta, Edmonton, AB, Canada Homepage:https://webdocs.cs.ualberta.ca/~xuebin/