Deep Art Effects Command Line Tool For Batch Processing & Scripting


#22

You haven’t given the command an output filename - change the command to something like this…

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\test.jpg” -stylename "Colorful"


#23

See what you meant, I forgot to include the \ after Karlsplatz (e.g. -output “C:\Users\hutch\Pictures\Saved Pictures\Karlsplatz\").

Your example above shows: **
*** 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"**

The solution does not work. Something is left out of your example and instructions. So, please enlighten me with correcting the following input:
“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, Retro, Epoch” -extension “jpg”
The following option is required: [-stylename]
For a help use “DeepArtEffects.exe help” or visit our Forums for a Guide.

That failed.

Below I added what is not in your instructions, a filename, as you suggested without file type (e.g. “\Karlsplatz\-”), since -extension is being used, there was no mention of including a file name. Only one file is created. I then added an extension the same results happen (e.g. “\Karlsplatz\-.jpg”). Only one file is created.

Below is the first example from above. I included all the code so you may see what is happening.

“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, Retro, Epoch” -extension “jpg”
rendering…
scaling to original!
Styles:
Colorful
Retro
Epoch
waiting for core…
2020-12-15 00:32:28.474061: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
Dec 15, 2020 12:32:29 AM com.deeparteffects.core.e.d a
INFO: Watching files matching [*.model] under C:\Users\hutch.deeparteffects\assets for changes.
Dec 15, 2020 12:32:29 AM com.deeparteffects.core.e.d run
INFO: Starting file watcher service.
core initialized!
starting to render Karlsplatz.jpg with Colorful (1 of 3)
loading style…
Dec 15, 2020 12:32:30 AM com.deeparteffects.core.d.b a
INFO: Add new model ed8e394f-1b90-11e7-afe2-06d95fe194ed.model
style loaded…
finished!
starting to render Karlsplatz.jpg with Retro (2 of 3)
loading style…
Dec 15, 2020 12:46:01 AM com.deeparteffects.core.d.b a
INFO: Add new model c79859dc-1560-11e7-afe2-06d95fe194ed.model
style loaded…
finished!
starting to render Karlsplatz.jpg with Epoch (3 of 3)
loading style…
Dec 15, 2020 12:47:33 AM com.deeparteffects.core.d.b a
INFO: Add new model c7984f92-1560-11e7-afe2-06d95fe194ed.model
style loaded…
finished!

So, what I believe is going on, the instructions are lacking information when using multiple input images. What am I missing here?


#24

Well, it clearly says it’s writing the images out but it’s overwriting each output with the next one

The examples are not mine, they’re by DAE

The processing of directories is a bit hit and miss - removebackground doesn’t work at all ATM for example. I remember getting artfilter to apply one style to all the images in a directory but there’s no command-line way to do one image > multiple styles I’m aware of. The way I got around this limitation was to simply automate writing a batch file.

The GUI batch processing option at least allows you to select an input image then it outputs a version for each style available. They could implement that in cli I guess (that’s up to DAE)

I did start writing something to process multiple files before CLI came out - maybe I’ll look into that again. Someone wants video background compositing so I might get around to it as CLI makes processing multiple files at least possible,


#26

Can anyone tell me how to use the “original colors” option?


#27

Use the -originalcolors flag.


#28

Cedric answered your question for both within Deep Art Effect and command line.

Below not only answers your question, but may answer other user questions on how to use the command line prompt. The following may prove to be helpful to others.

This article directly addresses using Windows 10 and creating a batch file. To make it easier to follow I am listing explanation in numbered steps.

  1. First, I created a batch file (below) in NOTEPAD and saved the file “DAE Multiple Files.bat” make sure to put the file name in quotes, when saving in Notepad. This saves the file as a batch file and NOT a text file. To run the file, you simply double click the bat file.

  2. Why do I use this method? It saves me time and gives me a reference folder with all the baseline source images and their impact on what I generally take photos of and want to have DAE generate a painted image. Sound confusing, keep reading, hopefully, the following will help you understand what I am doing.

  3. For my source images, I have a higher level folder kept in the Windows USER default Pictures folder. In my case that folder is located “C:\Users\USERNAME\Pictures”.

  4. In that folder, I created a new folder I called, "Saved Pictures". The resulting folder is “C:\Users\USERNAME\Pictures\Saved Pictures”.

  5. In that folder, I keep source images. Known in DAE as stylename.

  6. Generally, I take nature, city, or portraits of people. In their respective folder, I have the baseline photograph; a beach scene, a town square, and a face shot. Known in DAE as input. Their folder names are Beach, City, and Portrait respectively.

  7. When I obtain a new source image, in this case, I modified a Picasso image (see attached) and called it Picasso-mine.png. I saved that image in the Saved Pictures; the stylename folder.

  8. I want to apply the new artwork to the three baseline images. Known in DAE as output. You will note in the bat file, I preceded the file name with an underscore, this is to help me, you may or may not want to use the underscore, it is your call.

  9. From Windows Explorer, in the Saved Pictures folder, right click the DAE Multiple Files.bat file, and select EDIT, and change the output and the stylename file to the name of the new stylename, in this case it is called Picasso-mine.png.

  10. Save the file.

  11. To run the file, right click the DAE Multiple Files.bat file and click OPEN. This will open the Command Prompt file telling you the process of the the conversion. Depending on many factors this can take a few minutes to over an hour. You can work on other things while the file is running. DO NOT CLOSE the file while it is running. When it is done, you will be notified to press enter to continue.

  12. When the program is done, it should save the new stylename DAE file in the respective folders. Now you can open those folders and view the impact of running DAE on your original image.

  13. Doing the above saves a lot of time. I do keep an Excel file with all the stylenames. Depending on what you want to do, you could save the information in a Word or Note file. This way you can sort the file names to make sure you do not make duplicate images.

Hope this helps. Below should also be of use.

DAE Multiple Files.bat file READABLE VERSION:

echo %date% %time%

“C:\Users\USERNAME\AppData\Roaming\DeepArtEffects\DeepArtEffectsCli.exe” abstract
-input “C:\Users\USERNAME\Pictures\Saved Pictures\Beach\Beach.jpg”
-output “C:\Users\USERNAME\Pictures\Saved Pictures\Beach\_Picasso-mine.png
-stylename “C:\Users\USERNAME\Pictures\Saved Pictures\Picasso-mine.png
-originalcolors -styleweight 100

“C:\Users\USERNAME\AppData\Roaming\DeepArtEffects\DeepArtEffectsCli.exe” abstract
-input “C:\Users\USERNAME\Pictures\Saved Pictures\City\City.jpg”
-output “C:\Users\USERNAME\Pictures\Saved Pictures\City\_Picasso-mine.png
-stylename “C:\Users\USERNAME\Pictures\Saved Pictures\Picasso-mine.png
-originalcolors -styleweight 100

“C:\Users\USERNAME\AppData\Roaming\DeepArtEffects\DeepArtEffectsCli.exe” abstract
-input “C:\Users\USERNAME\Pictures\Saved Pictures\Portrait\Portrait.jpg”
-output “C:\Users\USERNAME\Pictures\Saved Pictures\Portrait\_Picasso-mine.png
-stylename “C:\Users\USERNAME\Pictures\Saved Pictures\Picasso-mine.png
-originalcolors -styleweight 100

echo %date% %time%
pause

DAE Multiple Files.bat file (SAVE this version. The above one is for readability purposes only)

echo %date% %time%
“C:\Users\USERNAME\AppData\Roaming\DeepArtEffects\DeepArtEffectsCli.exe” abstract -input “C:\Users\USERNAME\Pictures\Saved Pictures\City\City.jpg” -output “C:\Users\USERNAME\Pictures\Saved Pictures\City_Picasso-mine.png” -stylename “C:\Users\USERNAME\Pictures\Saved Pictures\Picasso-mine.png” -originalcolors -styleweight 100
“C:\Users\USERNAME\AppData\Roaming\DeepArtEffects\DeepArtEffectsCli.exe” abstract -input “C:\Users\USERNAME\Pictures\Saved Pictures\Beach\Beach.jpg” -output “C:\Users\USERNAME\Pictures\Saved Pictures\Beach_Picasso-mine.png” -stylename “C:\Users\USERNAME\Pictures\Saved Pictures\Picasso-mine.png” -originalcolors -styleweight 100
“C:\Users\USERNAME\AppData\Roaming\DeepArtEffects\DeepArtEffectsCli.exe” abstract -input “C:\Users\USERNAME\Pictures\Saved Pictures\Portrait\Portrait.jpg” -output “C:\Users\USERNAME\Pictures\Saved Pictures\Portrait_Picasso-mine.png” -stylename “C:\Users\USERNAME\Pictures\Saved Pictures\Picasso-mine.png” -originalcolors -styleweight 100
echo %date% %time%
pause

ADDENDUM: If you are going to use an ARTFILTER style, the following parameters in BOLD must be changed. In the example below, the artfilter stylename is Pointillism 3.

“C:\Users\USERNAME\AppData\Roaming\DeepArtEffects\DeepArtEffectsCli.exe” artfilter
-input “C:\Users\USERNAME\Pictures\Saved Pictures\Beach\Beach.jpg”
-output “C:\Users\USERNAME\Pictures\Saved Pictures\Beach_Pointillism 3.jpg”
-stylename “Pointillism 3
-originalcolors

Picasso-mine.png


Video Problems- dissolves instead of cuts
#29

Great post, thanks. Keep up the good work