Instance segmentation to separate person body with background. Put youself inside beautiful natural scenes by changing the background of a selfie in real-time.
https://bensonruan.com/selfie-anywhere-person-segmentation-with-bodypix/
Clone this repository to your local computer
git https://github.com/bensonruan/Selfie-Anywhere.git
Point your localhost to the cloned root directory
Browse to http://localhost/index.html
- Turn on the Webcam switch and allowing the browser to access your webcam
- You would see yourself inside beautiful travel scene in the background of a selfie
- Choose your favorite scene
- Take a selfie by pressing the camera button
- Download the selfie by pressing the download button
Please note that on iOS Safari, cameras can only be accessed via the https protocol
- jquery - JQuery
- tfjs-models/body-pix - Person and body part segmentation in the browser using TensorFlow.js
- html2canvas - Javascript library allows you to take screenshots of webpages or parts of it, directly on the users browser