[PYTHON] Deep learning ASCII art auto tracer installation procedure for people who do not understand programming

While thinking that it is not the content to write in Qiita.

Overview

For those who do not know programming, we will explain how to install the Deep Learning AA Auto Tracer (DeepAA). For AA clusters and Yaruo clusters. Click here for details on DeepAA ↓ Making ASCII art with deep learning

environment

If you have Windows 7 or later, it's probably okay.

Various installations

1. Install Python (Anaconda)

Anaconda installer archive https://repo.continuum.io/archive/ Click on ʻAnaconda3-4.2.0-Windows-x86_64.exe` to download from. Anaconda.png After downloading, run it and install according to the installer.

2. Install various libraries

Open a command prompt (search for windows and type "cmd" in the child to get it). Execute the following command (enter the content after the "$" on each line).

$ pip install keras==1.2.0
$ pip install tensorflow

3. Install PyCharm

Download the installer from the official PyCharm website. https://www.jetbrains.com/pycharm/ pycharm.png After downloading, install according to the installer.

4. Install DeepAA

github repository https://github.com/OsciiArt/DeepAA Then click "Clone or Download" and then "Download Zip" to download the DeepAA zip. DeepAA.png After downloading, unzip it. Place the unzipped folder DeepAA-master in any folder you like.

5. ** Execution test **

Start Pycharm. You will be asked a lot at the first startup, but let's click yes for all. Click [File]-[Open] from the menu on the upper right. open.png Select the saved "Deep AA-master". Select deepaa_output.py from the left panel and double-click it. Right-click on the screen that opens to the right and click Run'deepaa_output' on the opened panel. execute.png Execution is successful when AA output starts at the bottom of the screen.

Convert your own image to AA

1. Install the line art creation software

Here Download ʻAA Convert.7z from. After downloading, unzip the file. Execute ʻAsciiArtConverter08.exe inside (Although it is AA automatic conversion software, I will borrow only the line art creation function.)

2. Line art extraction

Click [File]-[Open Image File] from the menu on the upper left. Select the prepared image you want to convert. Click Contour Extraction Preview to draw a line art. Adjust other parameters on the panel for better line art extraction. After extracting the line art, right-click on the line art and click Save outline image on the opened panel. Select "Deep AA-master" as the save destination folder and save.

3. AA conversion

Set the contents of deepaa_output.py in PyCharm. Rewrite the contents of # parameter as follows.

17th line

image_path = 'test_image.png' #Specify the image to convert

Changed test_image.png to the file name of the file saved earlier.

18th line

image_width = 550 #Image size conversion settings.Enter the converted width. ''If not converted. 1st setting: 550

Adjust the size by changing the 550 of. The value corresponds to the width of the adjusted image.

20th line

multi_output = False #Output 18 pixels by shifting each pixel vertically

If you change False to True, the image will be shifted by 1 pixel and output 18 times at once (optional). Right-click and click Run'deepaa_output' on the open panel. If AA is output as expected, it is successful.

Recommended Posts

Deep learning ASCII art auto tracer installation procedure for people who do not understand programming
Make ASCII art with deep learning
100 language processing knocks for those who do not understand the meaning of problem sentences Chapter 8 Machine learning