Table of Contents
Fetching ...

Finding the Reflection Point: Unpadding Images to Remove Data Augmentation Artifacts in Large Open Source Image Datasets for Machine Learning

Lucas Choi, Ross Greer

TL;DR

This work tackles the problem of reflective padding artifacts introduced by symmetric image padding in large datasets, which can distort evaluation when data is repurposed across tasks. It proposes an image unpadding algorithm that locates the reflection boundary by minimizing the mean squared error between a top crop and its mirrored region, with a thresholding step to decide padding presence and a fixed offset to avoid border artifacts. On the SHEL5k dataset, unpadding yields substantial improvements in zero-shot detection performance with OWLv2, increasing average precision for hard hats from 0.467 to 0.612 and for persons from 0.677 to 0.735, reflecting cleaner annotations and more reliable evaluation. The method enhances dataset integrity for cross-domain machine learning and offers a practical path toward more realistic augmentation practices in large-scale image collections.

Abstract

In this paper, we address a novel image restoration problem relevant to machine learning dataset curation: the detection and removal of noisy mirrored padding artifacts. While data augmentation techniques like padding are necessary for standardizing image dimensions, they can introduce artifacts that degrade model evaluation when datasets are repurposed across domains. We propose a systematic algorithm to precisely delineate the reflection boundary through a minimum mean squared error approach with thresholding and remove reflective padding. Our method effectively identifies the transition between authentic content and its mirrored counterpart, even in the presence of compression or interpolation noise. We demonstrate our algorithm's efficacy on the SHEL5k dataset, showing significant performance improvements in zero-shot object detection tasks using OWLv2, with average precision increasing from 0.47 to 0.61 for hard hat detection and from 0.68 to 0.73 for person detection. By addressing annotation inconsistencies and distorted objects in padded regions, our approach enhances dataset integrity, enabling more reliable model evaluation across computer vision tasks.

Finding the Reflection Point: Unpadding Images to Remove Data Augmentation Artifacts in Large Open Source Image Datasets for Machine Learning

TL;DR

This work tackles the problem of reflective padding artifacts introduced by symmetric image padding in large datasets, which can distort evaluation when data is repurposed across tasks. It proposes an image unpadding algorithm that locates the reflection boundary by minimizing the mean squared error between a top crop and its mirrored region, with a thresholding step to decide padding presence and a fixed offset to avoid border artifacts. On the SHEL5k dataset, unpadding yields substantial improvements in zero-shot detection performance with OWLv2, increasing average precision for hard hats from 0.467 to 0.612 and for persons from 0.677 to 0.735, reflecting cleaner annotations and more reliable evaluation. The method enhances dataset integrity for cross-domain machine learning and offers a practical path toward more realistic augmentation practices in large-scale image collections.

Abstract

In this paper, we address a novel image restoration problem relevant to machine learning dataset curation: the detection and removal of noisy mirrored padding artifacts. While data augmentation techniques like padding are necessary for standardizing image dimensions, they can introduce artifacts that degrade model evaluation when datasets are repurposed across domains. We propose a systematic algorithm to precisely delineate the reflection boundary through a minimum mean squared error approach with thresholding and remove reflective padding. Our method effectively identifies the transition between authentic content and its mirrored counterpart, even in the presence of compression or interpolation noise. We demonstrate our algorithm's efficacy on the SHEL5k dataset, showing significant performance improvements in zero-shot object detection tasks using OWLv2, with average precision increasing from 0.47 to 0.61 for hard hat detection and from 0.68 to 0.73 for person detection. By addressing annotation inconsistencies and distorted objects in padded regions, our approach enhances dataset integrity, enabling more reliable model evaluation across computer vision tasks.

Paper Structure

This paper contains 10 sections, 2 equations, 7 figures, 2 tables, 1 algorithm.

Figures (7)

  • Figure 1: Example padded images from public datasets. Described from left to right and top to bottom: Zhang's Face Mask Dataset maskdataset, Gohil's License Plate Dataset licenseplatedataset, and the LISA Lights Dataset greer2024patternskeskar2025lights contain zero-padding on vertical and horizontal edges. Das's IQ-OTH/NCCD Augmented Lung Cancer Dataset subhajeet_das_2025 contains radial zero padding. Fernandez's Markov Transition Field Images of Heart Beats heartdataset, an image-based derivation of mark1982annotated, contains unique padding for transition states beyond the areas of interest. Sample images from the SHEL5k dataset (bottom row), demonstrate our primary interest in this research, addressing the issue of noisy mirrored padding on the top and right for the first image, and the left and right for the second.
  • Figure 2: Sample control image from the Hard Hat Workers Dataset.
  • Figure 3: Histograms of MSEs from 10 padded and 10 not padded images. The top graph is generated by setting the dividing line offset to 0, iterating the dividing line from the image boundary, and for the bottom graph, the dividing line offset is 10 pixels out from the boundary. As shown, when the offset is 0, the MSEs of the padded and not padded images are intersecting, disallowing for a clear threshold to differentiate between the two classes. In contrast, starting 10 pixels out disregards the edge cases where the pixels at the border have no difference, differentiating the MSEs between padded and unpadded images.
  • Figure 4: Precision-recall curve of the accuracy of various thresholds in the task of differentiating the MSEs of padded and not-padded images.
  • Figure 5: Example of effectively removing the reflective padding of an image using the proposed algorithm and the best threshold obtained in the results. The first image is the original, and the second is the unpadded version.
  • ...and 2 more figures