zubairahmed-ai / live-background-blur Goto Github PK
View Code? Open in Web Editor NEW2 days ago Microsoft introduced Teams with a background blur feature for video calls using AI, so I used AI to build my own
2 days ago Microsoft introduced Teams with a background blur feature for video calls using AI, so I used AI to build my own
Hi, I tried your implementation and it works fine, it blurred the background pretty well, but I don't have the same performance you show in video in the README.md, Could there be a problem with the way I set up the project? I couldn't install cuda, so i set up the older version of keras-deeplab-v3-plus. Now I'm having like 1 frame per second, how many do you have? I now that the slowest part is when deeplab_model.predict is called but I don't understand where the method predict is.
Thanks in advance.
I'm running this on:
Hello, Zubair!
I would like to use deeplab on macOS Python 3.7
. I have to install tensorflow v1.15
(due to deeplab compatibility problem).
I install tensorflow models and extract it to:
./PROJECT_NAME/venv/lib/python3.7/site-packages/tensorflow
.
Now, I have read in tensorflow installation guide, that I should execute in terminal:
>>> $ pwd
>>> ./PROJECT_NAME/venv/lib/python3.7/site-packages/tensorflow/models/research
>>> $ export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim.
After that I test it from the same path: $ python deeplab/model_test.py
and it works fine:
Ran 5 tests in 35.463s
OK (skipped=1)
PROBLEM: So, I would like to test it in my project in path PROJECT_NAME/main.py
simple way:
from matplotlib import pyplot as plt
import cv2
from model import Deeplabv3
# according your code I trying to run this
deeplab_model = Deeplabv3()
and $ python main.py
gives me:
from model import Deeplabv3
ModuleNotFoundError: No module named 'model'
I have already tried to move deeplab model folder to ./PROJECT_NAME/
and in another way move main.py
to deeplab folder:
from deeplab import model # this way import
deeplab_model = Deeplabv3()
NameError: name 'Deeplabv3' is not defined
I'm not very familiar in python. Thanks for any information!
@zubairahmed-ai Hi, I don't find the model and can't find the module of Deeplabv3 ?
It seems like there is extra padding around the foreground object. Any ideas on how to reduce padding (smoothen) to get a more accurate profile/outline???
Code:
https://pastebin.com/UNeNFbgm
Related post:?
https://www.pyimagesearch.com/2018/11/26/instance-segmentation-with-opencv/
A simple yet effective update to our instance segmentation pipeline would be to potentially:
Use morphological operations to increase the size of our mask
Apply a small amount of Gaussian blurring to the mask itself, helping smooth the mask
Scale the mask values to the range [0, 1]
Create an alpha layer using the scaled mask
Overlay the smoothed mask + person ROI on the blurred background
Alternatively, you could compute the contours of the mask itself and then apply contour approximation to help create a “more smoothed” mask.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.