Giter Club home page Giter Club logo

pants's Introduction

Pants filter

Add pants or blur out everything from the waist down for extra safety on Zoom calls.

View a demo and more background on the project at https://youtu.be/ZHQ4XACBUqo

demo

The pants filter uses OpenCV and MediaPipe's Pose detection to add a real-time pants filter to video input. The result is piped to a virtual camera output using pyvirtualcam.

To use the resulting output, you must have a virtual camera device. The easiest way to do this on any OS is to download and install OBS, open it up, then click "Start Virtual Camera" on the bottom right. You can now close OBS for good. With the pants filter running, select "OBS Virtual Camera" as your video source in Zoom/Teams/etc.

Hit the p key on the preview window to toggle your pants among ten different styles, included in the pants folder as a standard PNG template.

Hit ESC on the preview window to exit the pants filter, or CTRL+C to close the Python process.

Optional flags:

  • --help - Display the below options
  • --input - Choose a camera or video file path (defaults to device 0)
  • --pants - Draw pants by default, instead of only blurring
  • --width - Proportional width of pants beyond mid-leg width (defaults to 0.4)
  • --flip - Flip along the y-axis for selfie view
  • --landmarks - Draw detected body landmarks from MediaPipe
  • --record - Write the output to a timestamped AVI recording in the current folder

Example usage:

  • python pantser.py -h - Show all argument options
  • python pantser.py --input 2 --pants 1 --width .6 --flip 1 --landmarks 1 --record 1 - Camera device 2; slightly wider hips; flip the image; draw landmarks; generate a recording
  • python pantser.py -i "/Downloads/shakira.mp4" -w .9 - Use video file as input; extra hips

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.