Git Product home page Git Product logo

fast-style-transfer's Introduction

fast-style-transfer webcam script

This is a fork of fast-style-transfer which has an additional script, run_webcam.py to apply style models live to a webcam stream. Go to the README of the original page for instructions on how to train your own models, apply them to images and movies, and all the original functionality of that repository.

Installation

Setting up models

Pre-trained models for Picasso, Hokusai, Kandinsky, Liechtenstein, Wu Guanzhong, Ibrahim el-Salahi, and Google Maps.

At the top of the file run_webcam.py, there are paths to model files and style images in the variable list models. They are not included in the repo because of space. If you'd like to use the pre-trained models referred to up there, these models may be downloaded from this shared folder. To train your own, refer to the original documentation.

Usage

python run_webcam.py --width 360 --disp_width 800 --display_source 1

There are three arguments:

  • width refers to the width in pixels of the image being restyled (the webcam will be scaled down or up to this size).
  • disp_width is the width in pixels of the image to be shown on the screen. The restyled image is resized to this after being generated. Having disp_width > width lets you run the model more quickly but generate a bigger image of lesser quality.
  • display_source is whether or not to display the content image (webcam) and corresponding style image alongside the output image (1 by default, i.e. True)

You can toggle between the different models by hitting the 'a' and 's' keys on your keyboard.

Example

stylized webcam

fast-style-transfer's People

Contributors

lengstrom avatar genekogan avatar schwusch avatar fbcotter avatar cbonitz avatar tibbon avatar minimaxir avatar radarhere avatar drakerehfeld avatar lupino avatar btwael avatar

Watchers

Yang avatar James Cloos 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.