Giter Club home page Giter Club logo

selfie-anywhere's Introduction

Selfie Anywhere โ€“ Person Segmentation

Instance segmentation to separate person body with background. Put youself inside beautiful natural scenes by changing the background of a selfie in real-time.

Live Demo

https://bensonruan.com/selfie-anywhere-person-segmentation-with-bodypix/

body-pix-background-change

Installing

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

Start Playing

  • 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

Notes

Please note that on iOS Safari, cameras can only be accessed via the https protocol

Regerence

  • 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

Support me

ko-fi

selfie-anywhere's People

Contributors

bensonruan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

selfie-anywhere's Issues

How to reduce webcam size

Hello
Firstly you have developed an Awesome project ! It works like a charm.
I just want to know how can I reduce the size of webcam view, currently its showing on full screen. Maybe I just want to display 360px by 240px with our custom top & left positions. Any suggestion where shall we update it ?

thanks

Bug in selfie-anywhere.js drawbody webcam drawing

In function drawBody(personSegmentation) the context.drawImage(webcamElement, 0, 0); line does not account for various webcam resolutions and the logic fails. This needs the additional arguments: context.drawImage(webcamElement, 0, 0, webcamElement.width, webcamElement.height); to work.

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.