Adds a different background to your video feed.
This is made in part by the hard work of many people:
- Dan Oved and Tyler Zhu for the Bodypix model.
- Ben Elder and Daniel Llewellyn for their implementations
Daniel Llewellyn has the highest polish solution so far, making it easily installable under Linux as a snap package.
This solution aims for lower latency through the following ways
- Uses ZeroMQ IPC for communication between the TFJS model and the image processing
- Less transformations
- If blurred background is chosen, only the first frame is captured and blurred
First we need to install the nodejs and python parts.
npm install
pip install .Next we need to setup the v4l2loopback kernel module for the fake webcam.
To install,
sudo apt install v4l2loopback-dkmsIf you already had an existing module, remove it so we can customize it,
sudo modprobe -r v4l2loopbackCreate a file in /etc/modprobe.d/fakecam.conf and add the following:
options v4l2loopback devices=1 video_nr=20 card_label=fakecam exclusive_caps=1
Finally, load the kernel module
sudo modprobe v4l2loopbackThen we can start the script with ./start.sh.