sudo dnf install wget git
# Only if you don't have them already
wget http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-32.noarch.rpm
sudo dnf install ./rpmfusion*rpm
sudo dnf update
sudo dnf install python3.6 ffmpeg v4l2loopback
git clone https://gitlab.com/parrot_parrot/ms-teams-replace-background
cd ms-teams*
curl https://bootstrap.pypa.io/get-pip.py | sudo -H python3.6 # We also need pip3.6
pip3.6 install numpy matplotlib scipy scikit-image # ... and these packages
scikit_image
pyfakewebcam
opencv_python
imutils
tensorflow_gpu
numpy
scikit-image
tensorflow
pip3.6 install -r requirements.txt
ls /dev/video* # Check out your video devices - your camera probably will be /dev/video0
ffplay /dev/video0 # Let's check that it's correct camera (if not - check the others, /dev/video1 etc.)
In the output of ffplay command you will be also able to see width and height of your video (for example 640x480). Remember those numbers as you will need them as an input parameter to a script.
sudo modprobe v4l2loopback devices=1
--width (default=640): The width of you webcam footage
--height (default=480): The height of you webcam footage
--image (default='office.jpeg'): The path to background image
--input-stream (default=0): The number of the video device, where webcam is recorded.
--output-stream (default=2): The number of the video device, where the modified video is streamed.
Example:
python3.6 run.py --width 1280 --height 720 --input-stream 1 --output-stream 2