asus4 / tf-lite-unity-sample

TensorFlow Lite Samples on Unity
834 stars 249 forks source link

removing background in webcam - deeplab segmantation #268

Closed cancaglar closed 1 year ago

cancaglar commented 1 year ago

I'm trying to remove non-human backgrounds using deeplab example. Since the webcam texture and segmentation result textures are different, I tried something like this at first, I deleted the pixels that were not green in the result texture and it worked. Then when I tried to delete the pixels in the same coordinate in the web texture, it didn't work. because web texture and result textur sizes are different, webcam 1920/1080 and result texture is 256/256. can you help me with this? or can I do this in selfie segmantation?

asus4 commented 1 year ago

I think MediaPipe's selfie segmentation is better in your case, as DeepLab output contains 21 classes you don't need. But you still need to write a simple shader to mask the webcam texture using the output of segmentation.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.