Data Augmentation Based on Pixel-level Image Blend and Domain Adaptation

Di Liu, Xiao-Chun Hou, Yanbo Liu, Lei Liu, Yan-Cheng Wang2019

Abstract

Object detection typically requires a large amount of data to ensure detection accuracy. However, it is often impossible to ensure sufficient data in practice, particularly in specialized fields like medical imaging. This paper presents a new data augmentation method based on pixel-level image blend and domain adaptation. The method consists of two steps: 1) Image blend using a labeled dataset as object instances and an unlabeled dataset as background images; 2) Domain adaptation based on Cycle Generative Adversarial Networks (CycleGAN). A neural network is trained to transform samples from the first step to approximate the original dataset distribution. Statistical consistency between the generated and original datasets is measured using metrics such as generator loss and Hellinger distance. Finally, a Mask R-CNN network for diabetic retinopathy detection is trained on the generated dataset to evaluate the impact on detection accuracy.

Introduction: The Data Scarcity Problem in Medical AI

Deep learning models for object detection, such as Mask R-CNN, are notoriously data-hungry. In medical imaging, obtaining thousands of high-quality, labeled samples is often constrained by privacy concerns, the high cost of expert annotation, and the inherent rarity of certain pathologies. While traditional augmentation techniques like rotation and flipping help, they do not introduce new contextual variety.

Simple "cut-and-paste" image blending can create new contexts but often results in visual artifacts—such as harsh edges and style mismatches—that can degrade model performance. Neural networks may inadvertently learn to detect these synthetic artifacts rather than the actual clinical features. This research proposes a framework to bridge this "reality gap" for diabetic retinopathy (DR) detection.

Methodology

1. Pixel-level Image Blending

The first stage involves extracting object instances (e.g., retinal hemorrhages) using precise pixel-level masks and pasting them onto diverse background images sourced from unlabeled datasets.

Visualization of the pixel-level image blending process, from object extraction to final placement on a new background.

While techniques like Poisson Blending are common in computer graphics for smoothing gradients, the authors found they often blurred critical medical features. Instead, the team utilized a direct cut-and-paste method followed by a strategic Gaussian blur on the edges. This approach maintains the integrity of the pathological features while reducing the harshness of the transition between the object and the new background.

2. CycleGAN Domain Adaptation

To resolve remaining style inconsistencies and ensure the synthetic images are statistically indistinguishable from real clinical data, the framework employs a Cycle Generative Adversarial Network (CycleGAN).

The CycleGAN architecture used for domain adaptation, refining synthetic blended images to match the target real-world distribution.

In this setup, the blended images serve as the "source domain" and original real images as the "target domain." The CycleGAN learns a mapping that transforms synthetic images to match the style and texture of the real dataset. A key innovation in this implementation is the integration of the Hellinger distance into the cyclic consistency loss, which helps better align the statistical distributions of the generated and real-world data.

Experimental Results

The effectiveness of the "blend + adapt" strategy was tested by training a Mask R-CNN model to detect retinal hemorrhages. The model was evaluated on a real-world test set of 547 cases from West China Hospital.

Method $AP_{0.5}$ (Precision) $AR_{0.5}$ (Recall)
No data augmentation 0.61 0.67
Traditional method 0.72 0.75
Image blend & Domain adaptation 0.74 0.84

The results demonstrate a significant improvement in recall ($AR_{0.5}$), which rose from 0.75 to 0.84 compared to traditional augmentation. This suggests that the additional contextual variety provided by the blending process, refined by domain adaptation, allows the model to recognize pathology across a much wider variety of retinal environments.

Conclusion

This two-step augmentation strategy effectively addresses the limitations of simple image blending by using GANs as a refinement layer. By ensuring that synthetic images are both structurally accurate and statistically realistic, the method provides a robust way to train high-performance detection models even when labeled data is scarce. Future work will focus on refining the CycleGAN architecture to further reduce false positives and testing the framework on other medical imaging domains.

Summary updated

BibTeX
@misc{liu2019data,
  author = {Di Liu and Xiao-Chun Hou and Yanbo Liu and Lei Liu and Yan-Cheng Wang},
  title = {{Data Augmentation Based on Pixel-level Image Blend and Domain Adaptation}},
  year = {2019},
  doi = {10.5121/csit.2019.90923},
}
Figure