Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Image Background removal #93

Open
ThijsZijdel opened this issue Aug 10, 2024 · 2 comments
Open

[Feature request] Image Background removal #93

ThijsZijdel opened this issue Aug 10, 2024 · 2 comments

Comments

@ThijsZijdel
Copy link
Contributor

For a quick background removal I mainly use this site. Easier than firing up photoshop each time.

I came across this rust repo that uses onnx, would it be viable to implement it?
https://github.com/dnanhkhoa/rust-background-removal/tree/main

@Sparkenstein I would like to learn more about the rust part and are happy to collaborate on this feature.
Note: I could implement the JS library myself, but see a major benefit in using the rust ported one

Screenshot 2024-08-10 at 11 09 47
@Sparkenstein
Copy link
Member

This is a great feature. But the rust library you mentioned, uses the same models js library uses @imgly/background-removal. There's won't be any difference in performance. rust one starts a webserver on users machine, we can't do that.

plus it relies on downloading the models first. not a great idea in my opinion. Devtools-x guarantees to be offline first even today and it's a security risk to download anything on users computer on our behalf.

Feel free to explore any offline first library, if that increases the bundle size I am fine with that. we already have image-rs installed if that helps. but primary requirements are it shouldn't open any ports, download anything.

(If you want to download models, I would recommend creating a separate "background remover" tauri app. will be happy to contribute)

@ThijsZijdel
Copy link
Contributor Author

plus it relies on downloading the models first. not a great idea in my opinion. Devtools-x guarantees to be offline first even today and it's a security risk to download anything on users computer on our behalf.

Ok fair points, what about the MonacoWrapper.tsx, could u take a look there.
Since the themes should be available within the node_modules, just couldn't get it to work.

They are currently downloading from jsdelivr.

Feel free to explore any offline first library, if that increases the bundle size I am fine with that. we already have image-rs installed if that helps. but primary requirements are it shouldn't open any ports, download anything.

Will take a closer look at it next week. Should be possible with node.

(If you want to download models, I would recommend creating a separate "background remover" tauri app. will be happy to contribute)

And for sure, DevTools-Models

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants