TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

20x Faster Background Removal in the Browser Using ONNX Runtime with WebGPU

165 pointsby buss_jan11 months ago

8 comments

DaiPlusPlus11 months ago
Background Removal can be thought of as Foreground Segmentation, inverted. That is no trivial feat; my undergraduate thesis was on segmentation, but using only “mechanical” approaches, no NNs, etc), hence my appreciation!<p>But here’s something I don’t understand: (And someone please correct me if I’m wrong!) - now I do understand that NNs are to software what FPGAs are to hardware, and the ability to pick any node and mess with it (delete, clone, more connections, less connections, link weights, swap-out the activation functions, etc) means they’re perfect for evolutionary-algorithms that mutate, spawn, and cull these NNs until they solve some problem (e.g. playing Super Mario on a NES (props to Tom7) or in this case, photo background segmentation.<p>…now, assuming the analogy to FPGAs still holds, with NNs being an incredibly inefficient way to encode and execute steps in a data-processing pipeline (but very efficient at evolving that pipeline) - doesn’t it then mean that whatever process is encoded in the NN, it should both be possible to represent in some more efficient representation (I.e. computer program code, even if it’s highly parallelised) <i>and</i> that “compiling” it down is essential for performance? And if so, then why are models&#x2F;systems like this being kept in NN form?<p>(I look forward to revisiting this post a decade from now and musing at my current misconceptions)
评论 #40756849 未加载
评论 #40756751 未加载
评论 #40757172 未加载
评论 #40756742 未加载
评论 #40758634 未加载
andrewstuart11 months ago
Worth noting that background removal is built in to Preview on Macos.
评论 #40756367 未加载
评论 #40765355 未加载
forgotusername611 months ago
&quot;Therefore, the first run of the network will take ~300 ms and consecutive runs will be ~100 ms&quot;<p>I only skimmed the article, but I don&#x27;t think they mention the size of the image. 100ms is not that impressive when you consider that you need to be three times as fast for acceptable video frame rate.
评论 #40758264 未加载
pjmlp11 months ago
As long as one uses a Chrome distribution.<p>WebGPU is at least one year away of becoming usable for cross browser deployment.
评论 #40758295 未加载
tlarkworthy11 months ago
Onnx is cool, the other option is tensorflow js which I have found quite nice as a usable matrix lib for JS with shockingly good perf.would love to know how well they compare
评论 #40756897 未加载
wruza11 months ago
Interesting, there’s also node version in &#x2F;packages.
评论 #40758403 未加载
jvdvegt11 months ago
MS teams does this already, right? (I assume they do, as it didn&#x27;t work in Firefox until recently)<p>Or do they do it server side?
评论 #40757845 未加载
tommek407711 months ago
If I run it in a browser on my client, why going to a website in the first place?
评论 #40756692 未加载
评论 #40757097 未加载