make ASCII Art by Deep Learning

Overview

DeepAA

This is convolutional neural networks generating ASCII art. This repository is under construction.

This work is accepted by NIPS 2017 Workshop, Machine Learning for Creativity and Design The paper: ASCII Art Synthesis with Convolutional Networks

Web application (using previous version model) (by tar-bin)

image sample

Change log

  • 2017/12/2 added light model

Requirements

  • TensorFlow (1.3.0)
  • Keras (2.0.8)
  • NumPy (1.13.3)
  • Pillow (4.2.1)
  • Pandas (0.18.0)
  • Scikit-learn (0.19.0)
  • h5py (2.7.1)
  • model's weight (download it from here and place it in dir model.)
  • training data (additional, download it from here, extract it and place the extracted directory in dir data.) )

How to use

please change the line 15 of output.py

image_path = 'sample images/original images/21 original.png' # put the path of the image that you convert.

into the path of image file that you use. You should use a grayscale line image.

then run output.py . converted images will be output at output/ .

You can select light model by change the line 13, 14 of output.py into

model_path = "model/model_light.json"
weight_path = "model/weight_light.hdf5"

License

The pre-trained models and the other files we have provided are licensed under the MIT License.

Comments
  • It looks very nice

    It looks very nice

    Sorry, I can not understand Japanese language. I think your work looks promising :+1: I've also written some codes trying to achieve the results as Xu did in her article, but what I got is pretty messy as in the following image(70 chars a line) :disappointed_relieved: image Hope you can write an article explaining the details about how you train the model :grin:

    opened by MacLeek 5
  • Missing weight.hdf5

    Missing weight.hdf5

    Large file size so file wasn't uploaded: https://github.com/OsciiArt/DeepAA/blob/master/model/weight.hdf5

    Possibly supply file in releases or upload elsewhere.

    opened by nethunteros 3
  • Update requirements

    Update requirements "h5py" missing in README

    Executing output.py returns the following error:

    $ python output.py                                                                                              v8.8.1 | 01:08 
    Using TensorFlow backend.
    /usr/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
      return f(*args, **kwds)
    2017-11-13 13:11:08.607633: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
    Traceback (most recent call last):
      File "output.py", line 38, in <module>
        model.load_weights(weight_path)
      File "/usr/lib/python3.6/site-packages/keras/engine/topology.py", line 2615, in load_weights
        raise ImportError('`load_weights` requires h5py.')
    ImportError: `load_weights` requires h5py.
    

    Adding h5py (2.7.1) to requirements list fix the issue

    opened by suizman 2
  • deepaa_output.pyを実行時にmodel_from_jsonで実行時例外が発生しますー。

    deepaa_output.pyを実行時にmodel_from_jsonで実行時例外が発生しますー。

    pip でtensorflowとKerasはインストールしましたー。

    #スタックトレース

    Using TensorFlow backend. Traceback (most recent call last): File "C:/Users/(ユーザー名)/Downloads/DeepAA-master/deepaa_output.py", line 24, in model = model_from_json(json_string) File "C:\Program Files\Anaconda3\lib\site-packages\keras\models.py", line 325, in model_from_json return layer_module.deserialize(config, custom_objects=custom_objects) File "C:\Program Files\Anaconda3\lib\site-packages\keras\layers_init_.py", line 46, in deserialize printable_module_name='layer') File "C:\Program Files\Anaconda3\lib\site-packages\keras\utils\generic_utils.py", line 140, in deserialize_keras_object list(custom_objects.items()))) File "C:\Program Files\Anaconda3\lib\site-packages\keras\engine\topology.py", line 2370, in from_config process_layer(layer_data) File "C:\Program Files\Anaconda3\lib\site-packages\keras\engine\topology.py", line 2339, in process_layer custom_objects=custom_objects) File "C:\Program Files\Anaconda3\lib\site-packages\keras\layers_init_.py", line 46, in deserialize printable_module_name='layer') File "C:\Program Files\Anaconda3\lib\site-packages\keras\utils\generic_utils.py", line 141, in deserialize_keras_object return cls.from_config(config['config']) File "C:\Program Files\Anaconda3\lib\site-packages\keras\engine\topology.py", line 1202, in from_config return cls(**config) TypeError: init() got an unexpected keyword argument 'input_dtype'

    #環境 Python 3.5.2 |Anaconda custom (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)] on win32 依存ライブラリのバージョン

    • tensorflow (1.0.1)
    • Keras (2.0.1)
    • numpy (1.12.0)
    • Pillow (3.3.1)
    opened by umyuu 2
  • Font?

    Font?

    I was wondering which font would be best for output. I generated ascii art someting like this:

       ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,   
      |                      |    
      |  '|''''''''''''''''''''''''''''''''''''''''''''''''''''''''''|    |   
      |  :|  ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-,,,,   |    |   
      |  :|   |          ]|  |    |   
      |  :|   |          :|  :|    |   
      |  :|   |          :|  :|    |   
      |  :|   |           l|   |    |   
      |  :|   └――――――-┘  |    |   
      |  .|____________,|    |   
       |                      :|   
      |-----------------------------┘
    

    and I think fixed width font is not proper for this.

    opened by dhnam 1
  • Link to training data is actually to the weight.hdf5 file

    Link to training data is actually to the weight.hdf5 file

    The bullet point "training data (additional, download it from [here], extract it and place the extracted directory in dir data.) )" in the readme seems like it should link to a training data file but it actually links to the same weights.hdf5 file as in the previous bullet point.

    opened by xenostalgic 1
  • Weights access on drive

    Weights access on drive

    I was trying to download the weights file over google drive and it asked for me to request access. I believe there is a way to set it to not make people request access, but still not be able to edit the file. That will make it so you don't have to give access to anyone who wants to download in the future.

    Thanks for the cool program!

    opened by mbpowers 0
  • Update deprecated line+README smooth out

    Update deprecated line+README smooth out

    as_matrix is deprecated since 0.23.0, to_numpy should be used instead. Also fixed some grammar in readme. .idea/ folder is not needed. It is automatically generated by Jetbrains IDE.

    opened by ghost 0
Owner
OsciiArt
Ascii Art Artist, learning deep learning.
OsciiArt
Make a Turtlebot3 follow a figure 8 trajectory and create a robot arm and make it follow a trajectory

HW2 - ME 495 Overview Part 1: Makes the robot move in a figure 8 shape. The robot starts moving when launched on a real turtlebot3 and can be paused a

Devesh Bhura 0 Oct 21, 2022
State of the Art Neural Networks for Deep Learning

pyradox This python library helps you with implementing various state of the art neural networks in a totally customizable fashion using Tensorflow 2

Ritvik Rastogi 60 May 29, 2022
tsai is an open-source deep learning package built on top of Pytorch & fastai focused on state-of-the-art techniques for time series classification, regression and forecasting.

Time series Timeseries Deep Learning Pytorch fastai - State-of-the-art Deep Learning with Time Series and Sequences in Pytorch / fastai

timeseriesAI 2.8k Jan 8, 2023
😇A pyTorch implementation of the DeepMoji model: state-of-the-art deep learning model for analyzing sentiment, emotion, sarcasm etc

------ Update September 2018 ------ It's been a year since TorchMoji and DeepMoji were released. We're trying to understand how it's being used such t

Hugging Face 865 Dec 24, 2022
A Deep Learning based project for creating line art portraits.

ArtLine The main aim of the project is to create amazing line art portraits. Sounds Intresting,let's get to the pictures!! Model-(Smooth) Model-(Quali

Vijish Madhavan 3.3k Jan 7, 2023
Deepparse is a state-of-the-art library for parsing multinational street addresses using deep learning

Here is deepparse. Deepparse is a state-of-the-art library for parsing multinational street addresses using deep learning. Use deepparse to Use the pr

GRAAL/GRAIL 192 Dec 20, 2022
Deep Learning Datasets Maker is a QGIS plugin to make datasets creation easier for raster and vector data.

Deep Learning Dataset Maker Deep Learning Datasets Maker is a QGIS plugin to make datasets creation easier for raster and vector data. How to use Down

deepbands 25 Dec 15, 2022
Deep Text Search is an AI-powered multilingual text search and recommendation engine with state-of-the-art transformer-based multilingual text embedding (50+ languages).

Deep Text Search - AI Based Text Search & Recommendation System Deep Text Search is an AI-powered multilingual text search and recommendation engine w

null 19 Sep 29, 2022
A fast, dataset-agnostic, deep visual search engine for digital art history

imgs.ai imgs.ai is a fast, dataset-agnostic, deep visual search engine for digital art history based on neural network embeddings. It utilizes modern

Fabian Offert 5 Dec 14, 2022
QuickAI is a Python library that makes it extremely easy to experiment with state-of-the-art Machine Learning models.

QuickAI is a Python library that makes it extremely easy to experiment with state-of-the-art Machine Learning models.

null 152 Jan 2, 2023
Adversarial Robustness Toolbox (ART) - Python Library for Machine Learning Security - Evasion, Poisoning, Extraction, Inference - Red and Blue Teams

Adversarial Robustness Toolbox (ART) is a Python library for Machine Learning Security. ART provides tools that enable developers and researchers to defend and evaluate Machine Learning models and applications against the adversarial threats of Evasion, Poisoning, Extraction, and Inference. ART supports all popular machine learning frameworks (TensorFlow, Keras, PyTorch, MXNet, scikit-learn, XGBoost, LightGBM, CatBoost, GPy, etc.), all data types (images, tables, audio, video, etc.) and machine learning tasks (classification, object detection, speech recognition, generation, certification, etc.).

null 3.4k Jan 4, 2023
Ivy is a templated deep learning framework which maximizes the portability of deep learning codebases.

Ivy is a templated deep learning framework which maximizes the portability of deep learning codebases. Ivy wraps the functional APIs of existing frameworks. Framework-agnostic functions, libraries and layers can then be written using Ivy, with simultaneous support for all frameworks. Ivy currently supports Jax, TensorFlow, PyTorch, MXNet and Numpy. Check out the docs for more info!

Ivy 8.2k Jan 2, 2023
Deep learning (neural network) based remote photoplethysmography: how to extract pulse signal from video using deep learning tools

Deep-rPPG: Camera-based pulse estimation using deep learning tools Deep learning (neural network) based remote photoplethysmography: how to extract pu

Terbe Dániel 138 Dec 17, 2022
Time-series-deep-learning - Developing Deep learning LSTM, BiLSTM models, and NeuralProphet for multi-step time-series forecasting of stock price.

Stock Price Prediction Using Deep Learning Univariate Time Series Predicting stock price using historical data of a company using Neural networks for

Abdultawwab Safarji 7 Nov 27, 2022
FTIR-Deep Learning - FTIR Deep Learning With Python

CANDIY-spectrum Human analyis of chemical spectra such as Mass Spectra (MS), Inf

Wei Mei 1 Jan 3, 2022
Deep Learning: Architectures & Methods Project: Deep Learning for Audio Super-Resolution

Deep Learning: Architectures & Methods Project: Deep Learning for Audio Super-Resolution Figure: Example visualization of the method and baseline as a

Oliver Hahn 16 Dec 23, 2022
Make your master artistic punk avatar through machine learning world famous paintings.

Master-art-punk Make your master artistic punk avatar through machine learning world famous paintings. 通过机器学习世界名画制作属于你的大师级艺术朋克头像 Nowadays, NFT is beco

Philipjhc 53 Dec 27, 2022
ArtEmis: Affective Language for Art

ArtEmis: Affective Language for Art Created by Panos Achlioptas, Maks Ovsjanikov, Kilichbek Haydarov, Mohamed Elhoseiny, Leonidas J. Guibas Introducti

Panos 268 Dec 12, 2022