Data Augmentation via Latent Diffusion Models for Detecting Smell-Related Objects in Historical Artworks

Ahmed Sheta, Mathias Zinnen, Aline Sindel, Andreas Maier, Vincent ChristleinarXiv 2025

TL;DR

This paper explores using Latent Diffusion Models (LDMs) to perform data augmentation for a highly niche and challenging task: detecting smell-related objects in historical artworks. By introducing EDGE, a pipeline combining edge-conditioned ControlNet generation and contextual background inpainting, the authors successfully mitigate extreme class imbalance and boost object detection performance.

What Problem Does This Paper Address?

Computer vision models typically struggle with historical artworks due to the massive "domain gap" caused by stylistic variations, brushwork, and varying levels of abstraction. This problem is severely compounded in olfactory art history—the study of how smell is visually represented (e.g., flowers, incense, or food).

Extracting these visual smell references suffers from two major bottlenecks:

  1. Extreme Class Imbalance & Sparsity: While common objects like roses are abundant, rare smell-signaling objects like "lobsters" have fewer than 20 annotated examples in existing datasets.
  2. Spatial Bias: Standard object detection datasets favor center-biased objects. In contrast, smell-related objects are often small, subtle, and scattered along the periphery of a canvas.

To solve the lack of training data, the authors investigate whether modern generative diffusion models can synthesize high-quality, stylistically appropriate training data to balance these niche datasets.

Methods

The authors experimented with several diffusion-based inpainting and masking strategies (based on entropy, saliency, and boundaries) before developing their top-performing approach: EDGE (Edge-Conditioned Object Generation with Contextual Inpainting).

The EDGE pipeline consists of two main phases:

  1. Edge-Conditioned Object Replacement: To increase stylistic diversity without altering the composition, the framework extracts an object's bounding box and computes its edge map using Holistically-nested Edge Detection (HED). A fine-tuned ControlNet uses this edge map and a text prompt (e.g., "oil painting of {class_name} on canvas") to generate a structurally identical but stylistically unique version of the object, which is smoothly blended back into the original artwork.
Fig. 1: Illustration of the ControlNet-based augmentation pipeline. Each object is extracted from the ODOR images using its bounding box, processed through an HED edge detector to generate an edge map, and conditioned alongside a textual prompt in ControlNet. The augmented object is then reintegrated into its original position within the full ODOR image, preserving spatial and structural consistency.
  1. Class-Balancing via Contextual Inpainting: To handle underrepresented classes, the authors oversample rare objects by generating synthetic crops and placing them onto blank canvases. To prevent the object detection model from developing a localization bias (i.e., only looking at the center of a blank block), they use Stable Diffusion inpainting to fill the empty canvas with contextually plausible background textures.
Fig. 2: Illustration of the inpainting-based background generation for syn- thetic images. The process fills the blank background onto which ControlNet- augmented objects were previously overlaid, aiming to obtain realistic contextual surroundings.

Datasets

The models were trained and evaluated using the Object Detection for Olfactory References (ODOR) dataset, which contains approximately 4,700 images. For the experiments, the dataset was partitioned into:

  • Training: 3,408 images
  • Validation: 856 images
  • Testing: 448 images

Using their tiered augmentation schedule, underrepresented classes were upsampled to ensure a minimum of 1,000 instances in the synthetic training set.

Key Insights and Ideas

  • Contiguous Masks are Vital: The authors discovered that masking strategies based on low-entropy pixel fragments (like the ENT-L strategy) performed poorly. Diffusion-based inpainting models are fundamentally unsuited for reconstructing fine-grained, scattered pixel fragments; they require spatially contiguous masks to generate semantically meaningful textures.
  • Training Order Matters: The authors evaluated different training schemes: joint training (mixed real + synthetic), training on synthetic then fine-tuning on real, and vice versa. They found that staged training configurations led to severe overfitting or distribution shifts. Synthetic data provides the highest benefit when trained concurrently (jointly) with real data.

Key Results

The downstream object detection task was evaluated using the state-of-the-art YOLOv11-M architecture, measuring performance with COCO-style mean Average Precision ([email protected]:0.95):

  • Vanilla Baseline: Trained solely on the original real ODOR dataset, the model achieved a test mAP of 16.3%.
  • EDGE Augmentation: Jointly training the model on real data combined with the EDGE synthetic data pipeline boosted the test mAP to 17.4% (a +6.7% relative improvement).
  • Other Strategies Failed: Alternative masking methods like OPBG (-2.5%), ADAPT (-11.1%), and ENT-L (-14.3%) actually degraded performance relative to the baseline when scaled up, underscoring the importance of structural and contextual coherence in synthetic data.

Limitations and Future Work

While the EDGE method proved effective, the absolute performance gains remain modest, highlighting just how difficult the artistic domain gap is to bridge.

The authors note that future performance could be unlocked by:

  • Refining the masking boundaries used during the background inpainting phase.
  • Implementing adaptive training schedules, where the ratio of real-to-synthetic data is dynamically shifted over the course of training to help the model better anchor to the true real-data distribution.

Summary updated

BibTeX
@misc{sheta2025data,
  author = {Ahmed Sheta and Mathias Zinnen and Aline Sindel and Andreas Maier and Vincent Christlein},
  title = {{Data Augmentation via Latent Diffusion Models for Detecting Smell-Related Objects in Historical Artworks}},
  year = {2025},
  eprint = {2509.14755},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.14755},
}
Figure