Giter Site home page Giter Site logo

thomas-maurice / deepfry Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 1.0 2.75 MB

Script to deepfry images

License: Do What The F*ck You Want To Public License

Dockerfile 3.44% Python 96.56%
deepfry shitpost shitposting memes opencv python image-processing

deepfry's Introduction

Deepfrier

This is a python OpenCV based scrit aimed at deep frying images.

Installation

You need to install the OpenCV library on your system, read the docs of the project for more info on how to do so.

Install the python dependencies afterwards, pip3 install -r requirements.txt should do it.

You should be all set to use the project.

Usage

$ ./deepfry.py fry --help
Usage: deepfry.py fry [OPTIONS]

Options:
  --image TEXT                    Image to process
  --video                         Do use the video ?
  --filters TEXT                  Coma separated list of filters to use, the
                                  filters will be applied in the order you
                                  specify them on every face found
  --noise_type [gauss|poisson|speckle|sp]
                                  types of noises to add
  --gauss_amount INTEGER          Amount of gaussian noise
  --sp_ratio FLOAT                Salt and pepper noise ratio
  --sp_amount FLOAT               Salt and pepper noise amount
  --motion INTEGER                Amount of motion blur to add
  --sharpening INTEGER            Sharpening
  --saturation FLOAT              Saturation
  --brightness INTEGER            Brightness
  --contrast INTEGER              Contrast
  --jpeg_iterations INTEGER       How many times compress the image after
                                  frying ?
  --jpeg_quality INTEGER          How shitty should the compression be
  --filters_dir TEXT              Where to find the filters
  --output TEXT                   Output file name
  --overrides TEXT                Coma separated list of overrides on the form
                                  filter:variable=value
  --effects TEXT                  Coma separated list of the effects you want
                                  to apply,
                                  like motion,noise,saturation,jpeg,
                                  the full list of available effects is
                                  ['motion', 'sharpening', 'contrast', 'jpeg',
                                  'noise', 'saturation']
  --url TEXT                      URL of an image to download and deepfry
  --help                          Show this message and exit.

Examples

You can find in the examples directory 2 images generated with the following command lines:

For my github avatar:

./deepfry.py fry --filters deal_with_it,shutterstock --jpeg_quality 8 --noise_type sp --sp_ratio 0.1 --sp_amount 0.3 --image  source.jpg --sharpening 200 --saturation 1.5 --contrast 2

For Lena:

./deepfry.py fry --filters lasers_2,joint --jpeg_quality 5 --noise_type gauss --image  lena.png --sharpening 100 --saturation 1 --gauss_amount 300 --motion 8

License

           DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                   Version 2, December 2004

Copyright (C) 2004 Sam Hocevar <[email protected]>

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

           DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

 0. You just DO WHAT THE FUCK YOU WANT TO.

deepfry's People

Contributors

thomas-maurice avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.