Make Your Zoom Call Work-Friendly with a Custom Pants Filter

YouTuber Everything Is Hacked has created a fun way to ensure you're always wearing pants on camera with a specialized filter.

The importance of pants

The recent COVID-19 pandemic has spurred a wave of people working from home, including everyone from journalists to writers and even politicians. But with this newly found freedom has come an embarrassing drawback: people who don't wear pants while on video calls. This has led to many situations in which someone stands up and can be seen on camera in just their underwear. In order to combat this issue, the YouTuber known as Everything Is Hacked has created a fun solution that uses machine learning to digitally add pants when needed.

Adding sight

This pants-adding project is a continuation of Everything Is Hacked's experiments with computer vision and augmented reality, as his last one, called CheekyKeys, allowed him to type with just his facial expressions. In a similar manner, the pants filter relies on a laptop's webcam to provide a video input for an instance of MediaPipe's Pose Detection model that recognizes and isolates the waist region of a person, yielding a bounding box. From here, OpenCV is used to add a pants layer of the subject's choosing over their legs and resizes them to fit. Alternatively, everything from the waist-down can be blurred for extra security.

Virtual webcams

The next task was to somehow take the output of OpenCV's work and send it to a video conferencing meeting. Open Broadcasting Software, also known more commonly as OBS, has support for virtual webcams, so the script running everything includes a section at the end which sends the resulting video frames to the camera via the pyvirtualcam package. This enables a user to select the virtual camera within Zoom, Teams, or Google Meet and let everyone else see them in their now fully-covered glory.

Testing it out

Initially, testing was done using the mouth as the tracking region since public spaces don't take kindly to people not wearing pants. Once calibrated, Everything Is Hacked even added features for adjusting the width of the pants and for inputting a video file as the source rather than a webcam. To see more about how this project was made, you can watch its demonstration video below.

Evan Rust
IoT, web, and embedded systems enthusiast. Contact me for product reviews or custom project requests.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles