Skip to main content

Deepfry images in Python.

Project description


banner image

deeppyer is an image deepfryer written in Python using Pillow and OpenCV.

NOTE: This requires at least Python v3.6 in order to run.

How to use

You can either use deeppyer as a module, or straight from the command line.

Command line usage

$ python -h

usage: [-h] [-v] [-o OUTPUT] [-f] FILE

Deepfry an image.

positional arguments:
  FILE                  File to deepfry.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         Display program version.
  -o OUTPUT, --output OUTPUT
                        Filename to output to.
  -f, --flares          Try and detected faces for adding lens flares.

By default, flares will try to be added to the image, unless you're using the CLI script, in which case it is off by default.

Program usage

from PIL import Image
import deeppyer, asyncio

async def main():
    img ='./foo.jpg')
    img = await deeppyer.deepfry(img)'./bar.jpg')

loop = asyncio.get_event_loop()

API Documentation

async deepfry(img: Image, type=DeepfryTypes.RED, *, flares: bool = True)

Deepfry a given image.


  • img (PIL.Image) - Image to apply the deepfry effect on.
  • [type] (DeepfryTypes) - Colours to apply on the image.
  • *[flares] (bool) - Whether or not to try and detect faces for applying lens flares.

Returns: PIL.Image - Deepfried image.


¯\_(ツ)_/¯ Why not


If you wish to contribute something to this, go ahead! Just please make sure to format it with flake8 + isort, and that the test(s) pass fine.


Simply run tests/ and make sure that all the images output properly.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for deeppyer, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size deeppyer-1.0.1-py3-none-any.whl (55.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size deeppyer-1.0.1.tar.gz (56.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page