AV-SAM: Segment Anything Model Meets Audio-Visual Localization and Segmentation

Shentong Mo, Yapeng TianarXiv 2023 · DOI

Abstract

AV-SAM bridges the gap between the "Segment Anything Model" (SAM) and audio-visual tasks by introducing a pixel-wise fusion module that aligns audio signals with visual features. By integrating audio as a guiding prompt, the model can precisely localize and segment only the objects in a scene that are actually making noise, significantly outperforming the original SAM in multi-modal contexts.

Introduction

The Segment Anything Model (SAM) has revolutionized computer vision by providing a foundation model capable of segmenting almost any object given a visual prompt. However, SAM is effectively "deaf"—it lacks the inherent ability to process audio information. In real-world scenarios, identifying the source of a sound—such as a specific speaker in a crowd or an instrument in an orchestra—is a critical task. Existing audio-visual segmentation methods often rely on complex, manually designed pipelines. AV-SAM addresses this by asking: Can we leverage the massive pre-trained power of SAM to solve audio-visual localization and segmentation tasks? The core challenge lies in teaching the model to ignore silent objects and focus exclusively on "sounding" ones.

Methods

The authors propose AV-SAM, which augments the standard SAM architecture with a cross-modal fusion mechanism. The pipeline consists of four main stages:

  1. Feature Extraction: A pre-trained SAM image encoder extracts visual features, while a separate audio encoder (ResNet18) processes the audio spectrogram to produce a global audio feature.
  2. Pixel-wise Audio-Visual Fusion: This module "broadcasts" the global audio feature across the spatial visual feature map. Using $1 \times 1$ convolutions and a cross-attention-style mechanism, it computes a fused representation where visual pixels are weighted by their relevance to the audio signal.
  3. Prompt Encoding: AV-SAM uses the aggregated cross-modal features to guide the generation of mask prompts, replacing or augmenting traditional point/box prompts.
  4. Audio-Visual Mask Decoder: The fused features and prompt embeddings are fed into a modified version of SAM’s mask decoder to produce the final segmentation mask.
The AV-SAM architecture integrates audio features into the Segment Anything Model via a pixel-wise fusion module.

Research indicates that while SAM is a powerful foundation, fine-tuning the mask decoder and prompt encoder is essential for adapting it to the audio-visual domain.

Datasets and Evaluation

The model was trained and evaluated on several key benchmarks:

  • VGG-Sound: A subset of 144,000 pairs was used for training.
  • Flickr-SoundNet: Used for testing single-source sound localization.
  • AVSBench: A comprehensive dataset for audio-visual segmentation, containing over 4,900 videos across 23 categories including instruments, animals, and humans.

Key Results and Insights

AV-SAM demonstrates a substantial performance leap over the baseline SAM model. On the Flickr-SoundNet benchmark, AV-SAM achieved 28.93% AP and 50.80% IoU, outperforming the base SAM by approximately 9%. On AVSBench, the model reached 40.47% mIoU, a massive improvement over SAM’s 29.67% mIoU.

Qualitative comparison between Ground-Truth, baseline SAM, and the proposed AV-SAM across various audio-visual scenarios.

Key Insights

  • Audio as a Semantic Filter: Audio acts as a "soft prompt," directing the model to important features in the latent space without manual human intervention.
  • Spatial Alignment: Pixel-wise fusion allows the model to naturally suppress background noise and silent visual distractors by calculating correlations between the audio vector and every pixel in the visual map.
  • Fine-tuning Necessity: "Zero-shot" SAM performs poorly on audio-visual tasks, but lightweight fine-tuning of the decoder allows it to adapt effectively.

Limitations and Future Work

Despite its success, AV-SAM faces challenges. Fine-tuning the full image encoder provides the best results but is computationally expensive due to SAM's size. Additionally, while the model performs well on current datasets, "cocktail party" scenarios involving many overlapping sounds remain a difficult frontier. Future work may also focus on incorporating temporal dynamics to improve consistency by analyzing how sound and motion align over time.

Summary updated

BibTeX
@misc{mo2023av,
  author = {Shentong Mo and Yapeng Tian},
  title = {{AV-SAM: Segment Anything Model Meets Audio-Visual Localization and Segmentation}},
  year = {2023},
  eprint = {2305.01836},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.01836},
}
Figure