This thesis addresses the problem of generating large, seamless bark
textures of spruce logs. The problem arises from two facts. First, a log is
cylindrical along its circumference, and only a narrow strip can be
photographed at high resolution. Second, diffusion models, the current state
of the art for image synthesis, are typically trained on patches of
512×512 pixels, while the full circumference spans several thousand.
The goal is to fine-tune a generative model that composes the full
circumferential texture from limited captures, closes it seamlessly into a
torus, and preserves a natural distribution of classes: bark, knots, and
mechanical damage.
We propose a two-stage pipeline. In the first stage, a Markov Random Field
generates a coarse semantic map that controls the global class proportions.
In the second stage, an existing latent diffusion model based on the
DiffInfinite approach is adapted and fine-tuned on our data to produce a
high-resolution image conditioned on that map. We extend the approach with
modular patch indexing and periodic blending during decoding, so that the
generated texture tiles seamlessly under the chosen geometry, either
toroidal or cylindrical. The U-Net architecture itself is unchanged.
Together with the Biotechnical Faculty we captured 140 photographs of 15
spruce logs in the field and built a dataset of 270 bark image and mask
pairs. We fine-tuned the diffusion model for 200,000 steps; broad
augmentation of the training patches lowered FID and KID substantially, and
lighter augmentation in the final phase lowered them further. We also
observed that after a few thousand steps the loss function no longer
reflects visual quality progress, while FID and KID computed on patches
continue to track it well. The generated texture was wrapped seamlessly
around a demonstration cylindrical log in Blender.