arXiv:2611.03455cs.CVNov 2026

Manuscript Offprint

arXiv:2611.03455

Bg-Mix: On Using Image Backgrounds for Data Augmentation in Electron Microscopy Images

Ankur Srivastava, Joana Sarah Grah, Katharina Ladewig, Nils Körber

ABSTRACT

Electron microscopy (EM) serves as a cornerstone in virology enabling the visualization of viral particles and is widely used in research, diagnostics and morphological characterization of pathogens. Computer-assisted image analysis can help facilitate and speed up this labor-intensive method, however, typical EM virus datasets are small and sparsely labeled, resulting in a lack of readily available deep learning models due to training limitations. To overcome data shortages and leverage content-rich, diverse sample backgrounds, we employed background-based data augmentation. To this end, we propose Bg-Mix, a form of data augmentation method, which decomposes training images into foreground objects and backgrounds and subsequently rearranges both into novel augmented images. This not only enhances the performance of object detection models but also increases the diversity of the training data. Using Bg-Mix provides an increase between +0.8 and +3.3 box mean average precision (mAP) points over the baseline when tested across two datasets using two architectures, thereby demonstrating its effectiveness.

Keywords Data Augmentation · Object Detection · Electron Microscopy

1 Introduction

Negative-staining Scanning-Transmission/Transmission Electron Microscopy (STEM/TEM) of clinical samples can help diagnose unknown and emerging infections [1]. Recognizing virus particles in those images, however, requires expert knowledge: viruses must be differentiated from debris and cell material, and morphologically similar viruses must be distinguished from one another. Automated virus detection can reduce the workload of experts by alleviating the need for labor-intensive manual analysis, while potentially enabling faster and more accurate diagnoses.

In light of the rise of deep learning methods in imaging and microscopy data availability, a myriad of models for object detection/instance segmentation [2, 3] and classification [4, 5] have been developed over the past decade. Still, biomedical imaging datasets remain costly to acquire and particularly time-consuming to annotate, often resulting in limited dataset availability and size. Several strategies have been proposed to address these limitations, including transfer learning [6], synthetic image generation [7], and data augmentation [8]. In this work, we focus on the latter strategy, which is particularly well suited to negative-staining STEM/TEM images because of their content-rich backgrounds.

In recent years, several methods have been proposed for data augmentation: In the Copy-Paste method [9], objects are cut from a random training image and pasted at random on another training image. The model in [10] learns the kind of background each class appears on and pastes objects only where the background fits. In [11] the labeled objects are kept intact and only the background is synthetically generated by using diffusion models [12].

All of the above works use large numbers of natural training images, for example from the COCO dataset [13]. However, STEM/TEM datasets are often limited in size, typically comprising only a few hundred annotations, making data augmentation particularly valuable for supervised learning approaches.

*Corresponding authors: {srivastavaa, koerbern}@rki.de

Figure

Figure 1: Bg-Mix. The background of a random training image (a) and the foreground objects of another random training image (b) are extracted and blended to form the background-augmented image (c).

Here, we propose Bg-Mix, a data augmentation method where segmented objects are extracted from one training image, an object-free background is extracted from another one and both are subsequently rearranged into a new augmented training image. We thus make use of the rich and diverse negative-stained STEM/TEM backgrounds without the need to either learn them or generate them artificially. We tested three ways to obtain object-free backgrounds, two ways to blend the object's edges and six ways to place the foreground objects. We evaluate on two public negative-stained STEM/TEM virus datasets with two model architectures including an ablation study on different Bg-Mix modes and compare with the previously described Copy-Paste method.