DDIM = Denoising Diffusion Implicit Models

english:

A plugin to generate treebark texture has been written in the context of an internship. For this deeplearning techniques have been used and later the trained models can be used to create new texture samples. An example project from Keras was forked. It comes with import requirements and configuring the GPU support greatly reduces the training and inference time. To setup the dependencies on a linux debian (version 11) system an anaconda (version 23.7.3) tensorflow (version 2.12.1) environment is generated.

To improve the speed of the dependency solving, a reimplementation of the conda package manager in C++, mamba is used. For the installation of mamba please refer to the `README.md` of this project. This project has been wrapped around a small run script to enable training and generating textures from the command-line interface. The `–help` argument returns the following description.

deutsch:

Im Rahmen eines Praktikums wurde ein Plugin zur Generierung von Baumrindentexturen geschrieben. Hierfür wurden Deep-Learning-Techniken eingesetzt und danach können die trainierten Modelle verwendet werden, um neue Texturmuster zu erstellen. Ein Beispielprojekt von Keras wurde geforked. Es enthält Importanforderungen und die Konfiguration der GPU-Unterstützung reduziert die Trainings- und Inferenzzeit erheblich. Um die Abhängigkeiten auf einem Linux-Debian-System (Version 11) einzurichten, wird eine anaconda (Version 23. 7. 3) tensorflow (Version 2. 12. 1) Umgebung erzeugt.

Um das Auflösen von Abhängigkeiten zu beschleunigen, wird eine Neuimplementierung des conda-Paketmanagers in C++, mamba, verwendet. Für die Installation von mamba lesen Sie bitte die `README.md` des Projekts. Dieses Projekt wurde um ein kleines Run-Skript gewickelt, um das Training und das Generieren von Texturen über die Befehlszeilenschnittstelle zu ermöglichen Das Argument `–help` gibt die folgende Beschreibung zurück.

(mamba-tf-gpu) $ python3 ./barknet_ddim.py --help
Num GPUs Available:  1
usage: barknet_ddim.py [-h] [--train TRAIN] [--inference INFERENCE] 
[--dataset_path DATASET_PATH]
[--dataset_name DATASET_NAME] [--model_path MODEL_PATH]
[--num_epochs NUM_EPOCHS] [--image_size IMAGE_SIZE]
[--vertical_tiles VERTICAL_TILES]
[--plot_diffusion_steps PLOT_DIFFUSION_STEPS]
[--min_signal_rate MIN_SIGNAL_RATE] [--max_signal_rate MAX_SIGNAL_RATE]
[--batch_size BATCH_SIZE] [--callback CALLBACK] [--init INIT]
[--image_path IMAGE_PATH] [--disable_tiling DISABLE_TILING]
[--plot_every_step PLOT_EVERY_STEP]
\end{Verbatim}
\begin{Verbatim}
Train on or generate treebark images with a diffusion denoising implicit model. 
Various models can be found in the source directory and selected with this command-
line interface. At default checkpoints_BarkNet-ERS_i128_e600 will be loaded and
a texture sample is generated to ./img.

optional arguments:
-h, --help show this help message and exit
--train TRAIN (bool) Start training
--inference INFERENCE (bool) Run inference
--dataset_path DATASET_PATH Dataset path
--dataset_name DATASET_NAME Dataname path
--model_path MODEL_PATH Dataset repetitions
--num_epochs NUM_EPOCHS Number of epochs
--image_size IMAGE_SIZE Size of generated image
--vertical_tiles VERTICAL_TILES Number of vertical tiles
--plot_diffusion_steps PLOT_DIFFUSION_STEPS Number of plot diffusion steps
--min_signal_rate MIN_SIGNAL_RATE Minimum signal rate
--max_signal_rate MAX_SIGNAL_RATE Maximum signal rate
--batch_size BATCH_SIZE Number of images per batch
--callback CALLBACK (bool) Generate image after each epoch
--init INIT (bool) Generate image of the initial noise
--image_path IMAGE_PATH Select path for the saved images
--disable_tiling DISABLE_TILING (bool) Disable horizontal and vertical tiling
--plot_every_step PLOT_EVERY_STEP Generate image for each step