Skip to main content

tinyfilter is the computer vision equivalent to micrograd. It convert images into ASCII art using the principles of CNNs (convolutional neural networks).

Project description

tinyfilter

Screenshot 2023-08-05 at 4 52 21 PM

tinyfilter [^1] is the computer vision equivalent to micrograd. It convert images into ASCII art using the principles of CNNs (convolutional neural networks).

Unlike other tools of its type, which map pixel darkness to an ASCII character, tinyfilter uses filters and convolution to detect features in an image and prints ASCII characters that correspond to them. This leads to much better results compared to other libraries for smaller images.

[^1]: For consistency, the first letter in "tinyfilter" is always lowercase, even when it begins a sentence.

Installation

To install tinyfilter locally run the command below. When installing python packages such as tinyfilter, I recommend using a virtual environment.

pip install tinyfilter

Usage

To print an image as ASCII characters using tinyfilter run the following command in your terminal. (Replace "image.png" with the name of your image.)

 tinyfilter image.png

You can also import tinyfilter inside a python file or interpreter to do the same thing:

from tinyfilter import tiny_print
tiny_print('image.png')

Why tinyfilter wins

Screenshot 2023-08-05 at 7 53 28 PM

While other python packages have features that tinyfilter doesn't yet support, tinyfilter clearly does win at one thing: recognizing the important features in an image and focusing on those. In the example above tinyfilter and Ascii-magic bother print images that are 80 columns wide. The difference is that tinyfilter's output is based on where there are edges in the image while Ascii-magic only focuses on where the image is dark and where is it bright.

Resources and sources

  • Pillow is a dependency for tinyfilter
  • numpy is a dependency for tinyfilter
  • mypy was used for type checking
  • Black was used for python code formatting

Project details


Download files

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

Source Distribution

tinyfilter-0.1.2.tar.gz (9.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tinyfilter-0.1.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file tinyfilter-0.1.2.tar.gz.

File metadata

  • Download URL: tinyfilter-0.1.2.tar.gz
  • Upload date:
  • Size: 9.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.1

File hashes

Hashes for tinyfilter-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b461a87492e3433d3c18af5056b56ee9fb1e47007b3a6992c83da135c245d931
MD5 36108a90ad77ac181803833701898bce
BLAKE2b-256 5e38a5d34421188b489b1751af04eb12bcb3f1b4b41ec2d541debbc49418975c

See more details on using hashes here.

File details

Details for the file tinyfilter-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tinyfilter-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.1

File hashes

Hashes for tinyfilter-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 955c84e47c602e59ba72d8ad461dede5eba1d0cb27c0ee9b3c7852a11b6b36b6
MD5 39d501ed9fc957beee2613ed99dba711
BLAKE2b-256 21b74bc463df1839b43e2e08835eeba6884668f4597df1a8ef5bd9b9eabff648

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page