Skip to content

Latest commit

 

History

History
53 lines (43 loc) · 2 KB

File metadata and controls

53 lines (43 loc) · 2 KB

Back-Off: Real Time Background Replacement

A tool that takes video and replace with new background provided by user in real time.

Table of contents

Description

Background removal helps with creative portrait photography and much more, helping provide the ability to change the background to a location of your choice. There are 4 methods available to use. One is a simple live-method using the webcam, a user can change the background by pressing and holding 'a', 'b', or 'c'. Other is live streaming from a mobile app. The last one is by requesting the server with pre-recorded video and background picture of choice. Fourth one is android app with a Flask server.

Technologies Used

  • Tensorflow
  • OpenCV
  • Flask

Results

Input Background Result
input background output

How It Works

$ git clone https://github.com/neatpun/real-time-background-replacement
  1. Live Webcam Front
  • cd "Live Webcam Front"
  • install dependencies
  • python live_webcam.py
  1. Server Front
  • cd "Server Front"
  • install dependencies
  • FLASK_APP=index.py flask run
  • then open localhost:5000
  • provide video and background image
  • after processing download of required video will begin
  1. Live Stream Output
  • cd "Live Stream Output"
  • install dependencies
  • connect any mobile device to same network and stream video.
  • provide the ip address of mobile device in IP_Webcam_Out.py
  • python IP_Webcam_Out.py

Contributors