An ascii art generator that's actually good. Does edge detection and selects the most appropriate characters.

Overview

Ascii Artist

An ascii art generator that's actually good. Does edge detection and selects the most appropriate characters.

Blue Tit

Blue Tit

Niko from oneshot!

Installing

Installing with pip:

pip install asciiartist

Installing from wheel:

Download the wheel file from this project's releases and run

pip install 
   

   

Quick Start

from asciiartist import asciiartist, display_edges
from PIL import Image

img = Image.open("niko.png")

art, edges = asciiartist(
    img, # The image!
    30,  # Number of lines of the output ascii art
    noise_reduction=2,  # Level of noise reduction (optional)
    line_weight=1,      # Weight of the lines to draw (optional)
    text_ratio=2.2      # Height/width ratio of each character (optional)
)

print(art) # `art` is a string u can just print

# v Display the result of edge detection. 
#   Good for finetuning params.
display_edges(edges)

Build from Source

Run the script ./model/model-gen.py and build the wheel with poetry build -f wheel.

How it works

Roughly, how Ascii Artist generates the drawings:

  1. Run edge detection
  2. Segment the image for each char
  3. Pass each segment through a CNN to get the most appropriate character.

The CNN is trained with distorted images of characters (in font consolas), created in a way that emulates the output of the edge detection.

Bye

^-^

C<4@'C`'`"-[_,/ _,L-L ," -````` ```` _-' _ _ __~`` `` "<` _ `(V\_ `V(<_ _____,,~~<7oEE(@@_Eo@@Fo, ___,-~-^```` .-.__V) ,_ ">
                                          __=E.L__      
                                        >#-=@>@F* `<_   
                                      _/`@o
   
    C<4@'C`'`"-[_,/   _,L-L             ,"       
 -`````          ````                       _-'         
                        _   _           __~``           
                        ``  "<`  _                      
                              `(V\_                     
                                `V(<_                   
                   _____,,~~<7oEE(@@_Eo@@Fo,            
       ___,-~-^````               .-.__V)  ,_           

   
You might also like...
Python Digital Art Generator

Python Digital Art Generator The main goal of this repository is to generate all possible layers permutations given by the user in order to get unique

QR-Generator - An awesome QR Generator to create or customize your QR's
QR-Generator - An awesome QR Generator to create or customize your QR's

QR Generator An awesome QR Generator to create or customize your QR's! Table of

A python program to generate ANSI art from images and videos
A python program to generate ANSI art from images and videos

ANSI Art Generator A python program that creates ASCII art (with true color support if enabled) from images and videos Dependencies The program runs u

Using P5.js, Processing and Python to create generative art
Using P5.js, Processing and Python to create generative art

Experiments in Generative Art Using Python, Processing, and P5.js Quick Links Daily Sketches March 2021. | Gallery | Repo | Done using P5.js Genuary 2

Computer art based on quadtrees.
Computer art based on quadtrees.

Quads Computer art based on quadtrees. The program targets an input image. The input image is split into four quadrants. Each quadrant is assigned an

vsketch is a Python generative art toolkit for plotters
vsketch is a Python generative art toolkit for plotters

Generative plotter art environment for Python

Computer art based on joining transparent images
Computer art based on joining transparent images

Computer Art There is no must in art because art is free. Introduction The following tutorial exaplains how to generate computer art based on a series

Pixel art as well as various sets for hand crafting
Pixel art as well as various sets for hand crafting

Pixel art as well as various sets for hand crafting

👾 Python project to help you convert any image into a pixel art.
👾 Python project to help you convert any image into a pixel art.

👾 Pixel Art Generator Python project to help you convert any image into a pixel art. ⚙️ Developer's Guide Things you need to get started with this co

Comments
Owner
Hobbyist interested in a lot of things
null
Ascify-Art - An easy to use, GUI based and user-friendly colored ASCII art generator from images!

Ascify-Art This is a python based colored ASCII art generator for free! How to Install? You can download and use the python version if you want, modul

Akash Bora 14 Dec 31, 2022
Plots the graph of a function with ASCII characters.

ASCII Graph Plotter Plots the graph of a function with ASCII characters. See the change log here. Developed by InformaticFreak (c) 2021 How to use py

InformaticFreak 2 Apr 29, 2022
Convert Image to ASCII Art

Convert Image to ASCII Art Persiapan aplikasi ini menggunakan bahasa python dan beberapa package python. oleh karena itu harus menginstall python dan

Huda Damar 48 Dec 20, 2022
Convert any image into greyscale ASCII art.

Image-to-ASCII Convert any image into greyscale ASCII art.

Ben Smith 12 Jan 15, 2022
Generative Art Synthesizer - a python program that generates python programs that generates generative art

GAS - Generative Art Synthesizer Generative Art Synthesizer - a python program that generates python programs that generates generative art. Examples

Alexey Borsky 43 Dec 3, 2022
Maze generator with most popular shapes - hexagon, triangle, square

Maze-Generator Maze generator with most popular shapes - hexagon, triangle, square (sqaure not implemented yet): Theory: Planar Graph https://en.wikip

Kacper Plesiak 2 Dec 28, 2021
Conversion of Image, video, text into ASCII format

asciju Python package that converts image to ascii Free software: MIT license

Aju Tamang 11 Aug 22, 2022
Python library for ascii graphics

Python library for ascii graphics

Anton 6 Oct 20, 2021
Combinatorial image generator for generative NFT art.

ImageGen Stitches multiple image layers together into one image. Run usage: stitch.py [-h] <backgrounds_dir> <dinos_dir> <traits_dir> <texture_file> <

Dinosols NFT 19 Sep 16, 2022
Samila is a generative art generator written in Python

Samila is a generative art generator written in Python, Samila let's you create arts based on many thousand points. The position of every single point is calculated by a formula, which has random parameters. Because of the random numbers, every image looks different.

Sepand Haghighi 947 Dec 30, 2022