Show HN: Open-source background removal in the browser
395 points by buss_jan 2 years ago | 38 comments- culi 2 years agoSeems to be on par with the other best background remover I've tried.[0] The first one I've come across that's open source and this good. And it works in the browser! This is great, thanks
- culi 2 years agoAfter looking into there are actually a ton of these websites out there. This is the first actual open source one I've come across that runs in the browser (using WASM)
Non-OS freemium competitors:
- https://bgremover.vanceai.com/
- toshiyori 2 years agoThank you for this list! Some of them have excellent quality in terms of processing time and output. The reason we shipped this library is that it's now possible to run the background removal on the client, which can save a lot of costs. Especially, if this is not a one off feature, but used frequently by each user / customer. We also believe that client side processing will only get better and even more optimised, so we're happy to kick this race off with the library :)
- jrd79 2 years agoAnother competitor that has AFAIK the best unit pricing is: https://pixian.ai
- jtriangle 2 years agohttps://www.photoroom.com is also very good for some things.
- isuleman 2 years agoyes good for creating product images but it leaves a watermark in the free version.
- isuleman 2 years ago
- lazylion2 2 years ago
- isuleman 2 years agoHow can you forget Stability Ai's Clipdrop.co
- toshiyori 2 years ago
- culi 2 years ago
- iamflimflam1 2 years agoI didn’t realise that the preview app on Mac’s now has background removal built in. But I’ll also be bookmarking this site!
- stephenr 2 years agoYou can also just right click a file and choose "Remove background" from the Actions menu - on iOS this same behaviour is available just by long-press on a photo almost anywhere and drag the resulting foreground-only image, or alternatively hold and then choose "Copy Subject".
Quite different (arguably better but I guess your use case will determine if it's better or worse) results for some images too, e.g. this image (https://www.southwiltonvet.com/files/HedgehogSouthWiltonVet....). The linked demo removes the hands/arms, macOS retains the hands/arms.
On this image (https://media-cldnry.s-nbcnews.com/image/upload/streams/2014...) the linked demo makes the hands fade away like Greg Kinnear
- elishah 2 years agoYeah, and as is usually the case, it's not Preview in particular doing it. Preview itself does almost nothing, it's just a wrapper around the standard file handling libraries that everything on the platform uses.
So this is just a normal thing you can do in nearly any context that any image is displayed anywhere on macos/ios. Not only no external site required, but not even any particular application required.
- stephenr 2 years ago
- ianbicking 2 years agoThis was the first time I heard of img.ly and had a little hobby project I was considering where the tools might be a nice fit... but the terms and cost is extremely opaque. Feels a little surprising given how pleasingly usable and straight-forward this open source software is.
(I _think_ as long as I'm doing a hobby project I could use the img.ly CE.SDK for free indefinitely...? The only restriction is on "production" but what does that mean?)
Probably these products don't match what I'm looking for, but it was all a little hard to ingest. That said, background-removal looks very easy to use and probably does fit my needs, so kudos for that. As someone who loves the ease of prototyping 100% in the browser this is also great!
- nimrody 2 years agoUnrelated: anything similar for increasing photo resolution? I frequently encounter cases where users upload low resolution images (transferred using Whatsapp or similar) and need to increase the resolution to get something suitable for printing.
- jtriangle 2 years agoThere's nothing automated that produces reliably good results with a variety of content currently.
I've tried https://bigjpg.comhttps://imglarger.comhttps://vanceai.com/image-enlarger/https://www.upscale.mediahttps://photoaid.com/en/tools/ai-image-enlargerhttps://waifu2x.org <- specifically for animated stuff
Given the similarity of the results of some of these, I'd guess they're using the same model with some input parameter tweaks.
Waifu2x is probably the closest to "reliable" if you're looking to enlarge some sort of animated content.
- coel 2 years agoI was checking out one of the suggestions in another comment for background remove and they seem to have this functionality to increase resolution: https://clipdrop.co/apis/docs/super-resolution
- rand0mx1 2 years ago
- 8bithero 2 years agoI recently came across https://imglarger.com/ which is an AI image enlarger. I haven't used it yet so can't give a review, but they there is a free plan you can try and even their paid tiers seem reasonably priced.
- jtriangle 2 years ago
- moffkalast 2 years agoHmm it works surprisingly well, but it would be practical to have some kind of background area selector to help guide it and a threshold to adjust the removal, since the default setup sometimes messes up ever so slightly in some areas.
- jtriangle 2 years agoThe only software I've seen do that is Topazlab's product, which works based on trimapping with some AI edge detection/cleaning thrown in on top of it. Takes some fiddling to get good results, but, easily print quality.
- jtriangle 2 years ago
- hackernewds 2 years agoamazing library! I've been using pixian.ai but this is a game changer
- culi 2 years agoNow if someone can just do this for a WASM AI-powered bitmap to vector conversion library, I'll be set
- toshiyori 2 years agoIs there already something like that in the markets? As an API?
- kekub 2 years agoI found this one to be really good: https://vectorizer.ai/
- toshiyori 2 years agoThank you!
- toshiyori 2 years ago
- kekub 2 years ago
- toshiyori 2 years ago
- mydriasis 2 years agoThat's awesome! I'm bookmarking this for later. This is something I always find myself wanting.
- ibrarmalik 2 years agoWhere does the model come from? Hard to trust the license when we have no idea with what data it has been trained.
- mbappe123 2 years agoNice one, Remove.bg does the job little better over hairs.
- iamflimflam1 2 years agoWhat are the licensing options? Can I use the npm package in a commercial project?
- dec0dedab0de 2 years agoIt says it's GPL. So yes you can use it in a commercial project as long as it is also GPL. Also, any license that restricts commercial use is neither Open Source as defined by the OSI, nor is it Free Software as defined by the FSF.
- pcthrowaway 2 years agoIANAL, but I think it'd be OK to use it as long as you're not transpiling/minifying/bundling it in with your code[1].
Since it's Typescript, you obviously need to transpile to Javascript and host it somewhere you control for security (your own server is fine, just make sure the GPL license text is embedded). This is your GPL-respecting distribution of the software
Then in your webpage's index.html or other markup, include a `<script>` tag that links to it.
I believe this is all you need to be compliant with GPL.
[1]: https://unbiased-coder.com/can-you-use-gpl-in-closed-source/...
edit: much more detail in this answer: https://opensource.stackexchange.com/a/4385/10533
If there's any doubt, it seems like you'd be safe releasing a GPL-ed service worker which your website calls, as the boundary when calling a service worker is definitely enough for it to be deemed communication between two distinct pieces of software. This might be a bit difficult with a library that removes the background from your webcam though
- dec0dedab0de 2 years agoI believe those links are talking about exceptions, and the LGPL.
Any exception would have to be granted by the copyright holder, and the LGPL is a different license which is designed for allowing libraries to be linked into non GPL code.
- dec0dedab0de 2 years ago
- pcthrowaway 2 years ago
- buss_jan 2 years agoThe project is GPL licensed, if, however, you cannot use GPL licensed software do get in touch with support@img.ly and we'll make the package available to you under a different license.
- dec0dedab0de 2 years ago
- jjohansson 2 years agoAmazing tech, congratulations!
- Gelob 2 years agohow can i modify this if i have product images that have white in them but it keeps getting removed as this think its blended in the background?
- lionkor 2 years agoIs there a similar tool as an android app?
- syuzannah 2 years agoGreat addition!
- revskill 2 years agoI need watermark removal version.
- dathos 2 years agoYou need to pay for art
- dathos 2 years ago