Giter Club home page Giter Club logo

realtime-webcam-bg-replace-add-filters's Introduction

Real-time Webcam Background Replacement Web Application

Zoom-like feature: Real-time webcam background replacement with a Web UI + Cartoonification + Image filters implemented with FastAPI using WebSocket. (Also, utilizes JavaScript for frontend functionalities)

Demo:

Full demo on YouTube: https://youtu.be/00FC_3qZmZc
*I'm running on Mac M1 (no gpu+recording). So, it looks quite delayed especially when applying the CartoonGAN (Deep Learning model). But in general, the model/method is fast and efficient enough to run in realtime. You can try it yourself :)

Features:

  • Replace the webcam background with a selected prepopulated image or one uploaded by the user.
  • Two available models for background segmentation: Mediapipe (default) and Hugging Face (cannot be selected from the UI, but from code).
  • Cartoonify webcam stream with two options: OpenCV (Sequence of image processings) and CartoonGAN (Deep learning model).
  • Three available versions of CartoonGAN: int8, dr, and fp16 (again, cannot be selected from the UI, but from code).
  • Apply filters to the webcam stream. Available filters include Grayscale, Saturation, Brightness, Contrast.
  • Supports concurrent connections.

How to use:

  1. Clone this repository. (and make sure you have Docker installed)
  2. Build the Docker image using build.sh.
  3. Run the Docker container using run.sh.
  4. Access port localhost:8000 on a web browser.
  5. That's it.

References:

  • CartoonGAN: link
  • OpenCV cartoonification: link

Development Environments:

  • Mac M1
  • Docker version 24.0.6, build ed223bc
  • Docker Compose version v2.21.0-desktop.1

realtime-webcam-bg-replace-add-filters's People

Contributors

jomariya23156 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.