Deep Art Effects Command Line Tool For Batch Processing & Scripting


#1

With Deep Art Effects v1.1.0 it is now possible to render Images without the GUI!

Java 1.8 or newer is required to run this version of the client.
make sure it is installed correctly and added to the PATH
You can find the Deep Art Effects console client at the download page

Just download the zip file and start the executable
DeepArtEffectsCli.exe

For a List of possible commands use:
DeepArtEffectsCli.exe -help

To check your client version use:

DeepArtEffectsCli.exe -version

If you did not use Deep Art Effects for Desktop yet, you first have to register your license with:
DeepArtEffectsCli.exe license -add [your key]
You only have to do this step once!

  • Usage of Art Style:
    DeepArtEffectsCli.exe artfilter -input [path to image] -output [path to output file] -stylename [name of artfilter] (-intensity [1-100] -chunksize [128-2048] -bokeh [x.x] -extension [ext])

  • Example:
    DeepArtEffectsCli.exe artfilter -input "C:/images/example.png" -output "C:/images/stylized.png" -stylename "Colorful"

  • Usage of Abstract AI:
    DeepArtEffectsCli.exe abstract -input [path to image] -output [path to output file] -stylename [path to style image] -styleweight [0-100] (-intensity [1-100] -chunksize [128-2048] -bokeh [x.x] -extension [ext])

  • Example:
    DeepArtEffectsCli.exe abstract -input "C:/images/example.png" -output "C:/images/stylized.png" -stylename "C:/images/style.png" -styleweight 100

  • Usage of Vincent AI:
    DeepArtEffectsCli.exe vincent -input [path to image] -output [path to output file] -stylename [path to style image] -styleweight [0-100] (-intensity [1-100] -chunksize [128-2048] -bokeh [x.x] -extension [ext])

  • Example:
    DeepArtEffectsCli.exe vincent -input "C:/images/example.png" -output "C:/images/stylized.png" -stylename "C:/images/style.png" -styleweight 100

  • Usage of Artistic AI:
    DeepArtEffectsCli.exe artistic -input [path to image] -output [path to output file] -stylename [path to style image] -styleweight [0-100] -contentweight [0-100] -iteration [x] (-intensity [1-100] -chunksize [128-2048] -bokeh [x.x] -extension [ext])

  • Example:
    DeepArtEffectsCli.exe artistic -input "C:/images/example.png" -output "C:/images/stylized.png" -stylename "C:/images/style.png" -styleweight 100 -contentweight 50 -iteration 100

  • Usage for Superresolution:
    DeepArtEffectsCli.exe superresolution -input [path to image] -output [path to output file]

  • Example:
    DeepArtEffectsCli.exe superresolution -input "C:/images/example.png" -output "C:/images/stylized.png"

  • Usage for removing Backgroung:
    DeepArtEffectsCli.exe removebackground -input [path to image] -output [path to output file]

  • Example:
    DeepArtEffectsCli.exe removebackground -input "C:/images/example.png" -output "C:/images/stylized.png"

  • Using multiple input images:
    For all commands above (artfilter, abstract, vincent, artistic, superresolution, removebackground) it is possible to render multiple images at once!
    To utilize this feature you simply have to use directories instead of files for input / output / style parameters:

  • Examples:
    DeepArtEffectsCli.exe artfilter -input "C:/images/" -output "C:/imageoutputs/" -stylename "Colorful"

  • DeepArtEffectsCli.exe artfilter -input "C:/images/" -output "C:/imageoutputs/" -stylename "Colorful, Retro, Epoch"

  • DeepArtEffectsCli.exe abstract -input "C:/images/" -output "C:/imageoutputs/ -stylename "C:/styleimages/" -styleweight 100

  • DeepArtEffectsCli.exe abstract -input "C:/images/" -output "C:/imageoutputs/ -stylename "C:/images/style.png" -styleweight 100

  • Setting image extension:
    The -extension parameter is used to save all rendered images encoded in specified image format

  • Example:
    DeepArtEffectsCli.exe artfilter -input "C:/images/" -output "C:/imageoutputs/" -stylename "Colorful" -extension "png"

  • To get a list of available Art Styles use:
    DeepArtEffectsCli.exe liststyles

  • Usage for video:
    DeepArtEffectsCli.exe video -input [path to image] -output [path to output file] -stylename [name of artfilter] (-intensity [1-100] -chunksize [128-2048])

  • Example:
    DeepArtEffectsCli.exe video -input "C:/images/example.png" -output "C:/images/stylized.png" -stylename "Colorful"

  • Usage for generating artworks:
    DeepArtEffectsCli.exe generate -name artwork -output [path to output file]

  • Example:
    DeepArtEffectsCli.exe generate -name artwork -output out.jpg


Batch mode improvements
Background removal + compositing
Deep Art Effects Desktop v1.2.0 available
Deep Art Effects Desktop v1.1.0 available
Batch process failing
#2

Amazing. Thank you very much!


#3

I do not see the link to the JAR on the download page; just the three OS versions. Can you link to that please?


#5

It can be downloaded from the download page under the Windows section.


#6

oh, is it windows only?


#7

Initially yes for the testing period. Which OS do you need?


#8

MacOS please. I’m so excited to try this out, thank you!


#9

Oops…

c:\dae>DeepArtEffectsCli.exe -help
java.lang.NullPointerException
at java.io.Reader.(Reader.java:78)
at java.io.InputStreamReader.(InputStreamReader.java:97)
at com.deeparteffects.desktopapp.util.g.a(Unknown Source)
at com.deeparteffects.desktopapp.Main.main(Unknown Source)
Usage: [options] [command] [command options]
[blah, blah, blah]


#10

Quick notes…

Note the FULL PATH is required - c:\dir\subdir\image.png (or jpg)

Style list (“★ daily ★” don’t work)…

“abstract 1”, “abstract 2”, “abstract 3”, “abstract 4”, “abstract 7”, “abstract 10”,
“anime”, “aurora”, “baroque”, “calmness”, “ceremony”, “charles”, “coffee”,
“colorful”, “comic”, “cubism”, “dawn”, “discofever”, “dreamworld”, “eagle”,
“elegant silence”, “epoch”, “explosion”, “expressionism”, “eye”, “forelock”,
“forward”, “gothic”, “impressionism 1”, “iridescent”, “joke”, “landscape”,
“luminous”, “manga”, “mixture”, “modern art 1”, “modern art 2”, “modern art 3”,
“modern art 4”, “modern art 6”, “moonlight”, “mosaic 1”, “mosaic 2”, “mosaic 3”,
“mudita”, “newspaper”, “ocean”, “patterns”, “photography”, “pixel art”,
“pointillism 1”, “pointillism 2”, “pop art”, “retro”, “satisfaction”, “sketch 1”, “snow”,
“surrealism 1”, “surrealism 2”, “surrealism 3”, “ukiyo-e”, “urban”, “voyage”,
“waterbird”, “watercolor 1”, “watercolor 2”, “wolf”, “yira”

Off to play with it now…


#11

Just ran a batch file to compare command line to inbuilt batch processing mode (Java load kills)

The point being are there any issues with Command Line mode? (yep)

For my test wrote a batch file with…

DeepArtEffectsCli artfilter -input c:\dae\upload\Sintel.2010.512p.jpg -output c:\dae\slist\guy_Abstract_1.jpg -stylename "Abstract 1"

--- 66 more lines with different output files and styles ---
DeepArtEffectsCli artfilter -input c:\dae\upload\Sintel.2010.512p.jpg -output c:\dae\slist\guy_Yira.jpg -stylename "Yira"

I also ran exactly the same set of stuff through DAE batch processing

Timings were…
Batch file - 13:56.876
DAE Batch processing - 2:02.010

I grabbed the debug log and did a little analysis on it

The command line tool is a self-contained Java executable so every time it’s run it has 10…

  1. Extract program
  2. Load Java
  3. Load DAE
  4. Parse command line
  5. Read input file
  6. Process (5) using stylename
  7. Save output file
  8. Quit

Avg Startup - 9.152 (1-4)
Avg Render - 1.939 (5-7)
Avg Stop - 1.216 (8)

Avg Render with Start + Stop = 12.307

Of course - it only needs to start once and stop once

A better good solution would be to have a file that contained all the commands you wanted to run, one set of commands that follow DeepArtEffectsCli per line

e.g. cmdline.txt =

artfilter -input infile1 -output outfile1 -stylename style1
artfilter -input infile2 -output outfile2 -stylename style2
artfilter -input infile3 -output outfile3 -stylename style3
artfilter -input infile4 -output outfile4 -stylename style4
artfilter -input infile5 -output outfile5 -stylename style5

DeepArtEffectsCli dofile cmdline.txt


#12

We will optimize this with a multiple batch input. Thanks for testing.


#13

Didn’t do the multiple batch for 1.1.1 I notice

Superresolution introduces artefacts

No CLI command recognises file extensions

=======================================
C:\dae\cli>c:\dae\dae.exe artfilter -input c:\dae\cli\guy-256.jpg -output c:\dae\cli\guy-mosaic3.png -stylename “Abstract 3”
java.lang.NullPointerException
at java.io.Reader.(Reader.java:78)
at java.io.InputStreamReader.(InputStreamReader.java:97)
at com.deeparteffects.desktopapp.util.g.a(Unknown Source)
at com.deeparteffects.desktopapp.Main.main(Unknown Source)
rendering…
null
unknown image extension! Currently supported: ‘.jpg’ and ‘.png’. If you need another extension please suggest it on our forums!
Defaulting to ‘.png’
initializing core…


#14

Extensions should now be correctly detected


#15

Can you add the facility for CLI to encode video

Can you add an optional chunk size parameter to the artfilter invocation of CLI

CLI switches work with full DAE (complex command line) but the path is ignored - that’d be another cool fix.


#16

Thanks for feedback. we will add these requests to our feature list.


#17

Can you add a command-line switch to optionally send log messages to stdout (as well as / instead of debug.log)

stdout + stderr get system messages anyway so it’s easy to send them all to stdout, having the debug log in the same stream would be a great help


#18

The instructions are fantastic but where is the Batch Processing command; meaning doing the same thing in Deep Art Effects AI TOOLS > BATCH PROCESSING. What is the command line for this option?


#19

When I use the command line function with an included stylename the process always fails. What am I doing wrong? Here’s the screen print of the command line and the response, the first works, the second does not. How do I fix it to use the included style names?

C:\Windows\system32>"C:\Users\hutch\Downloads\DeepArtEffectsCli-win-1.2.6\DeepArtEffectsCli.exe" abstract -input "D:\My Documents\Images\2020\Bill Mask 2020.jpg"  -output "D:\My Documents\Images\2020\Bill Mask 2020 Aba Abstract 1 b2 s76.jpg" -stylename "C:\Users\hutch\Pictures\Saved Pictures\WKH\Aba abstract 1 b2 s76.jpg" -styleweight 76
rendering...
scaling to original!
waiting for core...
2020-12-06 16:46:54.475613: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
Dec 06, 2020 4:46:54 PM com.deeparteffects.core.e.d a
INFO: Watching files matching [*.model] under C:\Users\hutch\.deeparteffects\assets for changes.
Dec 06, 2020 4:46:54 PM com.deeparteffects.core.e.d run
INFO: Starting file watcher service.
core initialized!
starting to render Bill Mask 2020.jpg with Aba abstract 1 b2 s76.jpg (1 of 1)
loading style...
style loaded...
starting AI...
Image processed!
finished!

C:\Windows\system32>"C:\Users\hutch\Downloads\DeepArtEffectsCli-win-1.2.6\DeepArtEffectsCli.exe" abstract -input "D:\My Documents\Images\2020\Bill Mask 2020.jpg"  -output "D:\My Documents\Images\2020\Bill Mask 2020 Aba Abstract 1.jpg" -stylename "Abstract 1" -styleweight 76
rendering...
scaling to original!
waiting for core...
2020-12-06 16:54:58.535736: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
Dec 06, 2020 4:54:58 PM com.deeparteffects.core.e.d a
INFO: Watching files matching [*.model] under C:\Users\hutch\.deeparteffects\assets for changes.
Dec 06, 2020 4:54:58 PM com.deeparteffects.core.e.d run
INFO: Starting file watcher service.
core initialized!
starting to render Bill Mask 2020.jpg with Abstract 1 (1 of 1)
loading style...
Could not render image with this style... skipping

#20

If you want to use a predefined style you have to use the option artfilter not abstract.

Please refer this guide here for more examples:


#21

I am following the instructions to the letter! Why is this failing?
C:\Users\hutch\AppData\Roaming\DeepArtEffects>DeepArtEffectsCli.exe artfilter -input “C:\Users\hutch\Pictures\Saved Pictures\Karlsplatz\Karlsplatz.jpg” -output “C:\Users\hutch\Pictures\Saved Pictures\Karlsplatz” -stylename "Colorful"
The following option is required: [-stylename]
For a help use “DeepArtEffects.exe help” or visit our Forums for a Guide.