Comments (12)
Please clone a fresh repository, run the following:
cd bodypix
npm install
Please post the output in a code block. It is hard to figure out what's going out during the installation process.
from linux-fake-background-webcam.
Please clone a fresh repository, run the following:
cd bodypix npm install
Please post the output in a code block. It is hard to figure out what's going out during the installation process.
Thanks for getting back so fast (on a weekend!).
Again, I captured the result using script. Here you go:
carlf@debian-NUCi5:~/Linux-Fake-Background-Webcam/bodypix$ npm install
> @tensorflow/[email protected] install /home/carlf/Linux-Fake-Background-Webcam/bodypix/node_modules/@tensorflow/tfjs-node
> node scripts/install.js
CPU-linux-1.7.4.tar.gz
* Downloading libtensorflow
[==============================] 7201561/bps 100% 0.0s
* Building TensorFlow Node.js bindings
> @tensorflow/[email protected] install /home/carlf/Linux-Fake-Background-Webcam/bodypix/node_modules/@tensorflow/tfjs-node-gpu
> node scripts/install.js gpu download
GPU-linux-1.7.4.tar.gz
* Downloading libtensorflow
[==============================] 5548712/bps 100% 0.0s
* Building TensorFlow Node.js bindings
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
added 95 packages from 100 contributors and audited 95 packages in 40.876s
1 package is looking for funding
run `npm fund` for details
found 0 vulnerabilities
carlf@debian-NUCi5:~/Linux-Fake-Background-Webcam/bodypix$
from linux-fake-background-webcam.
Erm, did it work?
from linux-fake-background-webcam.
Erm, did it work?
I was just coming back to say that yes, now I can start the app!
But starting fake.py fails, with this message:
carlf@debian-NUCi5:~/Linux-Fake-Background-Webcam/fakecam$ python3 fake.py
Cannot set camera property 3 to 1280, used value: 0.0
Cannot set camera property 4 to 720, used value: 0.0
Cannot set camera property 5 to 30, used value: 0.0
Traceback (most recent call last):
File "fake.py", line 379, in <module>
main()
File "fake.py", line 367, in main
use_akvcam=args.akvcam)
File "fake.py", line 114, in __init__
self.fake_cam = pyfakewebcam.FakeWebcam(v4l2loopback_path, self.width, self.height)
File "/home/carlf/.local/lib/python3.7/site-packages/pyfakewebcam/pyfakewebcam.py", line 54, in __init__
fcntl.ioctl(self._video_device, _v4l2.VIDIOC_S_FMT, self._settings)
OSError: [Errno 22] Invalid argument
from linux-fake-background-webcam.
You have to set your webcams properly using:
-w WEBCAM_PATH, --webcam-path WEBCAM_PATH
Set real webcam path
-v V4L2LOOPBACK_PATH, --v4l2loopback-path V4L2LOOPBACK_PATH
V4l2loopback device path
from linux-fake-background-webcam.
Thanks for the tip. I know that the video stream is /dev/video1. I have no idea what the V4L2LOOPBACK_PATH should be set to. There is nothing under /dev/v4l except the two empty directories, by-id and by-path.
from linux-fake-background-webcam.
You probably haven't even installed v4l2loopback properly. You should have multiple devices in /dev/video*.
from linux-fake-background-webcam.
I have 3. The raw video is /dev/video0. I am using webcamoid to preprocess it, and that stream is /dev/video1. Ideally, I'd be able to then hook fake.py after webcamoid to do the background.
If /dev/video1 is the V4L2LOOPBACK_PATH, then what would be the WEBCAM_PATH? Or is V4L2LOOPBACK_PATH the output or target device, not an input? I'm afraid the syntax is opaque to me. Is one of those a device that fake.py creates, as opposed to one it looks for?
from linux-fake-background-webcam.
V4L2LOOPBACK_PATH should be /dev/video2. I have no idea. The real webcam tends to tie up 2 devices.
from linux-fake-background-webcam.
OK, I tried a bunch of combinations. This loaded without error:
python3 fake.py -w /dev/video0 -v /dev/video0
That works! The /dev/video0 stream, as read by VLC, has the White House image in the background. And a terrible, terrible flicker.
Weirdly, Webcamoid now sees video0 as just the White House press room scene. VLC sees that same device as me superimposed on the horribly flickering bckground. I would intuitively have expected all software to see video0 as the same stream, but I guess not.
Hmm ... dropping both the fps setting of fake.py and Webcamoid makes the flickering far worse. That's also unintuitive.
Looks as if my i5-based Intel system just doesn't have the power to do non-chromakey virtual background, maybe?
Thanks again for helping.
from linux-fake-background-webcam.
Your -w
and -v
should be different devices. You are clearly doing something wrong.
Also, I have a quad-core i7, and I am only getting about 10fps.
from linux-fake-background-webcam.
It might be more generous to say that something is configured wrong, instead of, y'know, making an accusation. I followed the documentation as much as possible, but I've never used node.js or Python-controlled video. Debugging it myself would take more than the hour I've spent on this project.
Thank you for the info about CPU-bounding of the program. Looks like I'll just do without background removal for the time being.
from linux-fake-background-webcam.
Related Issues (20)
- Insane CPU usage HOT 3
- background image overlapping too much of person HOT 3
- "Descriptors cannot not be created directly" HOT 5
- OSError: [Errno 22] Invalid argument HOT 1
- line 71, in get_frame_rate ... ValueError: cannot convert float NaN to integer HOT 2
- effect of --threshold ?
- ondemand does not work for WebEx HOT 14
- Debian Bullseye HOT 1
- Static file
- Don't understand modprobe config HOT 1
- TypeError: 'numpy._DTypeMeta' object is not subscriptable HOT 4
- Google Meet switching from real cam to fake cam results in black screen HOT 1
- Errno 22 when video-call app (or on browser) is opened before running fake.py. (Resolved by system reboot) HOT 6
- Suggestion: switch to new async interface for segmentation (>50% drop in CPU usage) HOT 2
- Overload resolution failed HOT 3
- Someone please write some sort of CI workflow for testing this stuff.
- requirements.txt missing HOT 1
- IDEA: Support Pipewire camera source, as an alternative to v4l2loopback HOT 1
- No fake.py as mentioned in README.md HOT 1
- backend is generally available but can't be used to capture by name
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linux-fake-background-webcam.