floe / backscrub

Virtual Video Device for Background Replacement with Deep Semantic Segmentation
Apache License 2.0
734 stars 85 forks source link

Background video support #131

Closed valk closed 2 years ago

valk commented 2 years ago

So guys, I wanted to have fun and added a video support. Thought it might be interesting to some of you. If you use my branch then the parameter for video is -z so you might have a bash script like this:

#!/bin/bash

cd /path/to/backscrub

read -p "Video?" -n 1 -r
echo    # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
  ./build/backscrub -c /dev/video0 -v /dev/video10 -z /path/to/some.mp4
else
  ./build/backscrub -c /dev/video0 -v /dev/video10 -b /path/to/some.png -m models/selfiesegmentation_mlkit-256x256-2021_01_19-v1215.f16.tflite
fi
BenBE commented 2 years ago

With the latest merge a few days ago background video support has been merged in the main development branch as a working feature (after having been in experimental for a few months).