A simple Python script that applies live face filters to your webcam using OpenCV and NumPy. The idea simply comes to my mind when I was doing a TikTok livestream on mobile while showing my desktop monitor without Live Studio on desktop.
- Live webcam face detection
- Filter overlays for fun and experimentation
- Plug-and-play: Just run a Python script
This project requires Python 3.8+ and the following Python packages:
opencv-pythonnumpy
The filters are stored in the sample gifts/ folder (already included). You can add or remove .png files from this folder to run the project.
Don't forget your webcam!
You can install the dependencies using pip or uv (if you prefer a faster, modern alternative).
pip install opencv-python numpyuv pip install opencv-python numpyDon't have
uv? Check it out here: https://github.com/astral-sh/uv
Once dependencies are installed, check which filters you want to display by commenting/uncommenting inside faizalingo_livestream.py. Then, simply run it:
python faizalingo_livestream.pyThis will launch your webcam with live face filtering enabled.
📁 TikTok-Live-Webcam-Face-Filter/
├── faizalingo_livestream.py # Main script to run
└── gifts/ # Folder containing filter overlays
You can add or modify the filters inside the gifts/ folder if you want to customize the effects.
- Ensure your webcam is not being used by another application.
- If the window opens blank or freezes, try restarting your Python kernel or system.
- For best performance, use a well-lit environment.
Pull requests are welcome! Feel free to open issues or suggest new features/filters.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for more information.