FOAM: A General Frequency-Optimized Anti-Overlapping Framework for Overlapping Object Perception

Mingyuan Li, Tong Jia, Han Gu, Hui Lu, Hao Wang, Bowen Ma, Shuyang Lin, Shiyi Guo, Shizhuo Deng, Dongyue ChenarXiv 2025 · DOI

Introduction

Detecting objects that overlap in X-ray images—such as contraband hidden in cluttered luggage or pneumonia obscured by ribs—is a significant challenge for standard computer vision models. Because X-ray images are 2D projections of 3D spaces, foreground and background objects often blend together, degrading the contours and textures of target items. Most current solutions rely solely on the spatial domain (raw pixel values), which are easily distorted by background interference. This paper introduces FOAM, a novel framework that leverages both spatial and frequency domain features to better decouple foreground objects from noisy backgrounds.

Methodology: The FOAM Framework

The Frequency-Optimized Anti-Overlapping Framework (FOAM) operates on the premise that while overlapping degrades spatial pixels, these degradations are highly predictable and visible in the frequency domain.

Frequency Domain Motivation

The authors observed that classic image corruptions, such as blurring or noise (which simulate overlapping interference), drastically alter the magnitude spectrum of an image's frequency domain, while the phase spectrum remains relatively stable.

Analysis of image corruptions in spatial, phase, and magnitude domains. The magnitude spectrum is most sensitive to degradations, making it a prime target for enhancement.

By specifically targeting the magnitude spectrum with an attention mechanism, the model can recover lost textures and edges without distorting the object's underlying shape (stored in the phase).

Architectural Components

FOAM is a plug-and-play module consisting of two main components:

  1. Frequency Spatial Transformer Block (FSTB): This core unit processes features in parallel streams. The Spatial Stream uses Spatial Domain Channel Self-Attention (SDCA) for local details and long-range dependencies. The Frequency Stream applies a Fast Fourier Transform (FFT) and uses Frequency Domain Bands Self-Attention (FDBA) on the magnitude spectrum to enhance high-frequency contour cues. These are fused via a Frequency Spatial Feed-forward Network (FSFN).
  2. Hierarchical De-Corrupting (HDC) Mechanism: This training-only regularization strategy uses a "corruption branch" to simulate worse overlapping scenarios. A consistency loss forces the network to extract identical features from both clean and corrupted images, teaching the model to suppress background noise.
The overall FOAM architecture, featuring the Hierarchical De-Corrupting (HDC) mechanism and the integration of Frequency Spatial Transformer Blocks (FSTB).

Experimental Evaluation

FOAM was evaluated across four datasets covering three distinct tasks: Prohibited Item Detection (PIXray-det, OPIXray), Instance Segmentation (PIXray-seg), and Medical Imaging (RLP/RSNA Lung Opacities).

Key Results

  • Prohibited Item Detection: Adding FOAM to the DINO (ResNet-50) model on PIXray-det boosted Average Precision (AP) from 64.3% to 67.2%. With a Swin-L backbone, it reached a massive 73.7% AP.
  • Medical Imaging: On the RLP pneumonia dataset, FOAM improved Cascade R-CNN's AP from 19.7% to 20.2%, demonstrating utility beyond security screening into clinical diagnostics.
  • Instance Segmentation: On PIXray-seg, FOAM improved Mask-R-CNN's mask AP, producing segmentation masks visibly closer to ground truth in highly cluttered areas.

Conclusion

FOAM provides a robust, general-purpose framework for overlapping object perception by effectively fusing spatial and frequency domain information. While it introduces some computational overhead, its ability to act as a plug-and-play enhancement for various backbones and task heads makes it a powerful tool for security and medical imaging. Future work may extend this approach to other domains suffering from severe visual occlusion, such as autonomous driving in adverse weather or camouflaged object detection.

Summary updated

BibTeX
@misc{li2025foam,
  author = {Mingyuan Li and Tong Jia and Han Gu and Hui Lu and Hao Wang and Bowen Ma and Shuyang Lin and Shiyi Guo and Shizhuo Deng and Dongyue Chen},
  title = {{FOAM: A General Frequency-Optimized Anti-Overlapping Framework for Overlapping Object Perception}},
  year = {2025},
  eprint = {2506.13501},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.13501},
}
Figure