Git Product home page Git Product logo

styletransfersnip's Introduction

Style Transfer Snipping Tool

This Python run lightweight GUI allows you to apply a number of style transfer models on a screenshot taken from your computer screen. The screenshot is taken just like the windows Snipping Tool, and can be used across multiple monitors. The Style Transfer Models can be cycled between and final image can be saved.

Installation

Please run pip install -r requirements.txt to get required modules

How to run and use

In command line, run python style_transfer_snip Once the GUI is open, press "New" in order to create your first screenshot. Your screen (or screens if you have multiple monitors) will turn slightly opaque, and by clicking and dragging your mouse, you can create a rectangular area which will become your input image. The style transfer model applied to the input can then be changed and the output is shown on the right. "Save" will then allow you to save the output.

How it works

This work is essentially the combination of the Style Transfer project from https://www.pyimagesearch.com/2018/08/27/neural-style-transfer-with-opencv/ and the screenshot project from https://github.com/harupy/snipping-tool

Style Transfer

The Style Transfer Algorithm combines the "content" of one image and the "style" of another image to create a new image that is optimised to minimise the loss function for both the "content" and "style". One can then take famous art pieces, such as starry night and the scream, and apply the style of that image to completely new photographs or paintings. The original algorithm by Gatys et al. 2015 can be found at https://arxiv.org/abs/1508.06576, and a faster version developed later at the Stanford Vision and Learning Lab can be found at https://cs.stanford.edu/people/jcjohns/eccv16/

Example Style Transfer

{Cute Dog Image Source: https://www.pexels.com/photo/white-long-coated-dog-3722196/}

Screenshot project

The snipping tool created at https://github.com/harupy/snipping-tool was modified to include multiple horizontal or vertical monitors

Why create it?

I found the process of applying Style Transfer to images quite tedious and long winded. I wanted an interface that allowed me to apply different style transfer models quickly for ideation when looking at source images. Now when I come across different pictures on the internet, I can use this tool to create a screenshot of it and apply different style transfer models to get inspiration

styletransfersnip's People

Contributors

ckirby19 avatar

Stargazers

 avatar

Watchers

 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.