TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Bokehlicious Selfies

134 点作者 rahulrav大约 5 年前

16 条评论

rezistik大约 5 年前
This is really cool, but it isn't bokeh, it's just blur.
评论 #22708991 未加载
评论 #22709796 未加载
评论 #22708746 未加载
评论 #22711035 未加载
评论 #22708786 未加载
Derbasti大约 5 年前
To make the Gaussian blur look better, it needs to be applied to linear lightness, not to gamma-encoded colors, as it is done here. In reality, the blur is induced by the lens, on linear lightness, and only gamma-encoded afterwards.<p>The effect being that blurred colors mix wrongly, as you can see where the red from the flower mixes with the green. The transition looks wrong, and not how a lens would render it.
评论 #22712010 未加载
rahulrav大约 5 年前
This is a quick proof of concept of an idea. This won&#x27;t work for every use-case but it worked surprisingly well for a use-case I had in mind. Happy to answer any questions.
评论 #22708590 未加载
mark-r大约 5 年前
I just discovered that Zoom teleconferencing software has the ability to detect the background and replace it with an arbitrary video in real time. I have no idea how they do it, but it&#x27;s as impressive as heck.
评论 #22709417 未加载
评论 #22710327 未加载
评论 #22711152 未加载
评论 #22710601 未加载
评论 #22709819 未加载
评论 #22710970 未加载
joshvm大约 5 年前
It would be nice if there was some more information about where the mask comes from. We want a segmentation map for people, so this technique basically takes the layer activation map for the &quot;person&quot; class - which is id 0 in COCO - and you can threshold that to get foreground&#x2F;background. If you changed the mask index, this would respond to other object types (so as written this code will only work for humans).<p>--<p>By the way, Google does some absolutely nuts stuff with this on the Pixel 3 and 4 - they actually calculate a stereo depth map using the two autofocus sites in <i>individual pixels</i>. Essentially some modern CMOS sensors use a technology called dual pixel autofocus (DPAF), by measuring the response from two photodiodes in the same pixel, you adjust focus until each pixel has the same intensity (more or less). If the camera is out of focus, the two photodiodes will have different intensities.<p>However what this gives you is two separate images with an extremely small (but detectable) parallax which can be used to give coarse 3D reconstruction, and you can segment foreground and background. It&#x27;s nice because you get a strong physical prior, rather than having to worry about using a convnet to identify fore&#x2F;background regions. (They of course apply a convnet anyway to refine the result).<p><a href="https:&#x2F;&#x2F;ai.googleblog.com&#x2F;2018&#x2F;11&#x2F;learning-to-predict-depth-on-pixel-3.html" rel="nofollow">https:&#x2F;&#x2F;ai.googleblog.com&#x2F;2018&#x2F;11&#x2F;learning-to-predict-depth-...</a><p><a href="https:&#x2F;&#x2F;ai.googleblog.com&#x2F;2019&#x2F;12&#x2F;improvements-to-portrait-mode-on-google.html" rel="nofollow">https:&#x2F;&#x2F;ai.googleblog.com&#x2F;2019&#x2F;12&#x2F;improvements-to-portrait-m...</a>
评论 #22708779 未加载
mdciotti大约 5 年前
Awesome! Computational photography is fascinating. A while back, I wrote some OpenGL shaders to do the same thing, and got stuck when I wanted variable bokeh based on scene depth. This is easy when you have the depth map (say, in a renderer). I recall reading about how Apple achieved this using stereo disparity mapping, which is great if you have the hardware. I hadn&#x27;t considered a neural net approach like yours for auto-generating a depth map, although I now that I look into it, Facebook recently published research on just that!<p><a href="https:&#x2F;&#x2F;ai.facebook.com&#x2F;blog&#x2F;-powered-by-ai-turning-any-2d-photo-into-3d-using-convolutional-neural-nets&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ai.facebook.com&#x2F;blog&#x2F;-powered-by-ai-turning-any-2d-p...</a>
amelius大约 5 年前
One problem with bokeh is that it disappears when you scale the image down. Perhaps this technique can help solve that (but I suppose there would be better ways to do this).<p>Anyway, the entire technique is also very easy to do manually with Photoshop.
评论 #22711305 未加载
dheera大约 5 年前
One step further would be to incorporate the blurring, masking, and combining operations into the network itself, so you can leverage the GPU to do the whole computation in one fell swoop.
kingkawn大约 5 年前
Ain’t no lens that would blur the front brim of her hat and her face is clear like that. Disregarding the nature of the optics you are emulating ruins the value of the effect
a012大约 5 年前
OT: I can&#x27;t understand why this website _want_ to looks like a mobile web __and__ hides scrolling bar. I&#x27;m on desktop and it irritates me a bit.
评论 #22709211 未加载
Causality1大约 5 年前
I think I&#x27;m missing the part of my brain that lets me understand why bokeh selfies are even a thing. If you&#x27;re going to remove your surroundings from the picture, why even bother taking a new picture?
smikhanov大约 5 年前
His original photo looks way nicer compared to the processed one.
kyberias大约 5 年前
Page is broken with no scrollbar.
Jack000大约 5 年前
if we&#x27;re using deep learning anyways, might as well use a u-net (ie. pix2pix) to add the bokeh directly - this would require pair training data but would probably look a lot better visually.
lsh大约 5 年前
website has no scrollbar??
评论 #22710487 未加载
marta_morena_23大约 5 年前
Wow this looks ugly :D. But still nice work. It&#x27;s just that the girl is totally over-processed and the &quot;bokeh&quot;, well I hate to break it to you, but this isn&#x27;t bokeh, its called &quot;blur&quot;.<p>This is bokeh: <a href="https:&#x2F;&#x2F;cdn.mos.cms.futurecdn.net&#x2F;JgrDuxQPCAvgd5VzqiKN5a-650-80.jpg.webp" rel="nofollow">https:&#x2F;&#x2F;cdn.mos.cms.futurecdn.net&#x2F;JgrDuxQPCAvgd5VzqiKN5a-650...</a><p>And bokeh is 3 dimensional and surrounds the focus area, increasing with distance: <a href="https:&#x2F;&#x2F;www.flickr.com&#x2F;photos&#x2F;scottcartwrightphotography&#x2F;14511003253&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.flickr.com&#x2F;photos&#x2F;scottcartwrightphotography&#x2F;145...</a><p>I suggest to brush up a bit on photo skills, although I agree that the instragram and iPhone culture can shift your perception of &quot;bokehlicious&quot; quite a bit.<p>I don&#x27;t want to make you feel bad, so I also tell you that Apple&#x27;s &quot;bokeh&quot; in portrait mode looks disgusting, doesn&#x27;t make any sense and breaks the image in a lot of trivial cases... and they spent a lot more money &amp; effort on it than you :).
评论 #22709329 未加载