资源算法Python-van-Gogh

Python-van-Gogh

2020-02-20 | |  29 |   0 |   0

Python van Gogh

A simple Python script to recreate given images. Takes an image and creates two images of the same size. Then picks a random color from the original image and draws a line of that of random length and width on first image. If first image is more like the original, overwrites the second image with the contents of first image, and vice versa.

The script takes roughly 30 minutes to execute 1 mil iterations when logging is enabled and an image is of size 400x400. Larger images might take longer as the size of drawn lines depend on the size of an image.

Installation

In order to use this script you need to have the following installed:

  • Python 3 (tested on Python 3.7.0)

  • Pillow (pip install Pillow)

Then simply download the script or clone this repo.

Usage

  1. Download or clone this repo to your local machine.

  2. cd into the Python-van-Gogh folder (cd path/to/Python-van-Gogh)

  3. Run the script:

python3 main.py

When the script is running:

  • You will be asked to input number of iterations (recommended more than 5000).

  • You will be asked to input a path to an image

If the image is in the Python-van-Gogh folder you can simply provide the filename with extension (eg. rdj.jpg) or if the image is located elsewhere you can provide an absolute path (eg. /Users/myusername/Desktop/img.png)


上一篇:android_kernel_gogh

下一篇:van-gogh-first-prototype

用户评价
全部评价

热门资源

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • shih-styletransfer

    shih-styletransfer Code from Style Transfer ...