ASCII Art Webcam Effect for Linux

Hi everybody, english is not my first language and i'm still learning, sorry for grammar and spelling mistakes.

Like everybody else in this COVID 19 time, in my work we are practicing social distancing, so, all meetings are online. One coworker was using a background filter in Teams and i want to do the same, unfortunately, filters are not available for linux at this moment, so, i implement my own filter (for fun).

While researching how to implement filters, i found this excellent post:

In this post they use docker whit a model called BodyPix for generating a mask of the background, i did not like this. I remember a model called Deeplab, this model implement semantic image segmentation

So, i get a trained model form the model zoo

I implement it and!!!!

Input Image

Deeplab v3 inference Mask

Nice! but i find the borders too big for me, so i apply an erode filter

Deeplab v3 inference Mask + erode

Better. Next step is mix the input and the mask

Input + Mask

The result was not perfect (good for the work), the latency was ok whit my nvidia video card.

OK Background removal finished…. What i do now ? well… I love ASCII Art! y and found this cool post:

I implement the ASCII Art transformation function in my code and this is the result:

Result Image

Pretty cool.

So, next step is make this a make this behave like a Webcam, for that, we use pyfakewebcam and v4l2loopback (like in post) and we get this:

Result in movement

You can get the source code and install instructions in:

Thank you for reading.

submitted by /u/dhvazquez
[link] [comments]
from Linux, GNU/Linux, free software…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s