Loading video...

Video Failed to Load

Go Home

Depth-aware light injection in TypeGPU I got a 448x448 monocular depth model down to ~8 ms on my M4 Pro across ~250 dispatches, which is fast enough to use in realtime :D Since the inference is written directly in TypeGPU, I can just feed the depth buffer straight into...

10,104,013 views • 1 month ago •via X (Twitter)

50 Comments

Konrad Reczko's profile picture
Konrad Reczko1 month ago

Here are some fun intermediate textures, the depth and constructed normals

Fernando's profile picture
Fernando1 month ago

Really nice. But you shouldn't cast a shadow when the light source is between you and the wall

Konrad Reczko's profile picture
Konrad Reczko1 month ago

True, but it looks cool :D Doubles as fake godrays

Marc Krenn's profile picture
Marc Krenn1 month ago

dope! what depth model are you using?

Konrad Reczko's profile picture
Konrad Reczko1 month ago

Repacked DepthArt

Marc Krenn's profile picture
Marc Krenn1 month ago

thanks, man! :)

dax's profile picture
dax1 month ago

cool

Rehan Ali Shah's profile picture
Rehan Ali Shah1 month ago

Can you share the link of the code you are using for this video. I want to try it.

Konrad Reczko's profile picture
Konrad Reczko1 month ago

Sure! I’m building it as a TypeGPU example so it will be fully open and runnable just like my selfie segmentation inference

vogel's profile picture
vogel1 month ago

woah this is insane wtf holyshit

グスタボ 🇧🇷's profile picture
グスタボ 🇧🇷1 month ago

can this add dynamic backgrounds in webcam?

Konrad Reczko's profile picture
Konrad Reczko1 month ago

Yeah, you get raw depth and pixel color you can do whatever you want with it

Mustafa.'s profile picture
Mustafa.1 month ago

this is sickk

Rubén's profile picture
Rubén1 month ago

You invented Navi! :)

Marc's profile picture
Marc1 month ago

Does this use the TrueDepth camera? VisionCamera?

Konrad Reczko's profile picture
Konrad Reczko1 month ago

This on web but I will port it to Vision Camera on RN too

Marc's profile picture
Marc1 month ago

Nice! let me know how it goes, VisionCamera gives you depth frames via the CameraDepthOutput:

Konrad Reczko's profile picture
Konrad Reczko1 month ago

I actually wanted to run my custom network and just use the external texture interface via react-native-webgpu. Worked nicely for me last time :D

Marc's profile picture
Marc1 month ago

wdym exactly? no depth streaming? and which external texture interface do you mean, NativeBuffer?

Konrad Reczko's profile picture
Konrad Reczko1 month ago

Yup, exactly, I just take the raw camera info and run the inference via TypeGPU compute shaders

Marc's profile picture
Marc1 month ago

ah yes that is the perfect approach for stuff like this. if you build this with VisionCamera can you show me the code? :)

Konrad Reczko's profile picture
Konrad Reczko1 month ago

Of course, I love the lib btw, I can run code on the camera frames in a way that never reaches JS outside of native handles, brilliant

Sam Sheffer's profile picture
Sam Sheffer1 month ago

whoa

Indra55's profile picture
Indra551 month ago

Dayummm!! Where's the code

Konrad Reczko's profile picture
Konrad Reczko1 month ago

Soon, I have to clean it up and handle licensing the weights

Indra55's profile picture
Indra551 month ago

Waiting!!

ahmet's profile picture
ahmet1 month ago

wtf have you built?!?!?!

Gyan Jara Hatke's profile picture
Gyan Jara Hatke1 month ago

😳😍👌

Kacper Kapuściak's profile picture
Kacper Kapuściak1 month ago

what kind of sorcery is this

Ackerman's profile picture
Ackerman1 month ago

yoo this is so cool, is it opensource?

Konrad Reczko's profile picture
Konrad Reczko1 month ago

Soon (it will be joining the family of TypeGPU examples I will post an update when it’s ready

John Kim's profile picture
John Kim1 month ago

very cool. I can see it being very useful for live streaming.

Google @ Home's profile picture
Google @ Home1 month ago

@grok_owner if you could plz implement this in your livestream to have a fairy fly around you the chat would appreciate it

Michał Wierzbiński's profile picture
Michał Wierzbiński1 month ago

Brought some stable fluids to the party. Can confirm: TypeGPU is, ineed, fire 🔥🔥

gfodor.id's profile picture
gfodor.id1 month ago

Wow, definitely gonna check this model out

Atom the UiUx Designer's profile picture
Atom the UiUx Designer1 month ago

Sorcery

Artur Chakhvadze's profile picture
Artur Chakhvadze1 month ago

This is so sick!!!

Joseph Azar's profile picture
Joseph Azar1 month ago

that's smooth 🤘

taf 🝮's profile picture
taf 🝮1 month ago

@sivori Amazing!

am.will's profile picture
am.will1 month ago

the lighting physics are the most impressive part. very cool.

Dave Katague's profile picture
Dave Katague1 month ago

dude you are fucking brilliant

adyingdeath's profile picture
adyingdeath1 month ago

This project is super cool. Like a AR game haha.

Aman Gupta's profile picture
Aman Gupta1 month ago

Can we use lidar sensor on iphone for accurate depth ??

Konrad Reczko's profile picture
Konrad Reczko1 month ago

That would be amazing, on web I doubt it but on RN maybe

Duncan's profile picture
Duncan1 month ago

wizardry

PDF's profile picture
PDF1 month ago

The shadow effect annoys me, when the hand is between the camera and the light source the light would be directly hitting the wall there should not be a shadow casted from the hand

Konrad Reczko's profile picture
Konrad Reczko1 month ago

Yeah I get that a lot, good news is the shadow is togglable and I already took the feedback and tweaked the shadows so they are less offensive while still getting the “godray” effect which I like

PDF's profile picture
PDF1 month ago

Niceee, all the best!

Fred Wanders's profile picture
Fred Wanders1 month ago

I ve literally been working on something like this for web design. Your implementation is brilliant

Shweta Bharadwaj's profile picture
Shweta Bharadwaj1 month ago

brilliant stuff, konrad!

Related Videos