- Notifications
You must be signed in to change notification settings - Fork952
[FEAT] Add U-2-Net#1222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
[FEAT] Add U-2-Net#1222
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…gmentation.This supports both the U-2-Net and ISNet models.
Hi@BritishWerewolf 👋 Thanks for the PR! I would imagine that the additional pre-processing needed introduces quite a large latency to model inference, especially because the necessary operations are implemented in JS as opposed to WASM/WebGPU. Is that correct? Do you see any benefits of a model like this over a model listed in the recent background-removal pipeline update?#1216 |
Hey@xenova, I started work on this before the pipeline, but kept this PR as draft because I hoped to fix it down the line. If you’re happy to leave this open as draft, then I will have a look into it when I buy a new laptop; but if you want to clean up the PRs and close this I completely understand (and this may be the better approach, I can reopen in futureif needed). Thanks |
Prerequisites
These PRs are required because the processors lean heavily on the new features.
Add support for the U-2-Net architecture which is a mask generation model; useful for background removal.
Both U-2-Net and ISNet can be used with these processors.
Below is an example of what the model will achieve when using theBritishWerewolf/U-2-Netp model.
If you would like to run this code, you can do with theBritishWerewolf/U-2-Net collection of models.