Comments (7)
As a further idea, now that MediaPipe is being used, could we extend this to do stuff like show specific overlays when certain facial expressions or hand gestures are recognized? E.g. like SnapLensStudio does: https://twitter.com/cameronhunter/status/1305667539922550784
from linux-fake-background-webcam.
- That sounds like a good idea, but the current approach works fine as a hack together project.
- I actually thought about doing that, but it turned out that scaling the frame provided enough performance boost for my own machine. Although I am not sure how knowing the previous mask would help in terms reducing wobbling. Each frame is a new classification task. I suppose you can use it to filter out outliers, but I think bodypix performs well enough. If you know more than one previous mask, you could predict trajectory and things, but that's quite complicated, and I feel it is beyond me.
- I agree.
- Yes, that would be helpful.
- That could be done with OpenCV's face tracker. I suppose. We might have to do some computation on the scaling of the face as well.
- The halo effect might be due to blurring at the edge of the mask, it is done at fakecam/fake.py#L64. I think to fit a better mask, you need piping in more pixels to bodypix. This in term slows things down. This is why I downscale the image sent to the network, and upscale it when it comes back. One could argue that GPU would be a better performance, but I think a lot of people would agree that Nvidia GPU drivers are not the easiest thing to set up. Setting up your Nvidia GPU for playing game is actually separate to setting it up for CUDA. CUDA driver is definitely non-free.
- At this point, have you thought about simply using obs-v4l2sink
Overall this is a big list of things. This "project" started off as tidying up someone else's blog post. I actually came across the blog post when I was reading a feature request for Webcamoid (https://github.com/webcamoid/WebcamoidIssues/issues/26). I kind of prefer this project ends up being a plugin for OBS or Webcamoid.
In terms of the things that really should be worked on - I really don't like the concept of passing images from Python to Node.js via HTTP. This creates unnecessary overhead. I did wonder why this was even a design decision, it turns out that that bodypix is only officially available a Tensorflow.js model (tensorflow/tfjs#2043). Although someone else is working on this already (allo-/virtual_webcam_background).
I may work through the list when I have more time, I make no guarantees. I need to go back and finish my PhD thesis. I only did this whole thing because I wanted to impress my labmates in research group Zoom meetings. :)
from linux-fake-background-webcam.
@liske , someone sent in a patch to support animated video background. It works really well.
from linux-fake-background-webcam.
@liske I updated the repository to use Mediapipe as the segmentation backend. It is now running so much faster.
from linux-fake-background-webcam.
I just want to say that be aware of https://github.com/allo-/virtual_webcam_background/issues/10 when installing Virtual Webcam Background. At the moment, its performance is similar to mine.
from linux-fake-background-webcam.
@liske , feel free to work on any of the suggestions you listed. I think it would be a good idea to add a description on how to use Android or ip-based webcams.
from linux-fake-background-webcam.
@zeorin , feel free to work on it yourself, and submit patches.
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 HOT 1
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.