Source-linked AI summary

AVSegFormer: Audio-Visual Segmentation with Transformer

Shengyi Gao, Zhe Chen, Guo Chen, Wenhai Wang, Tong Lu

arXiv:2307.01146v4cs.CVcs.LGcs.SDeess.AS

TL;DR

Audio-visual segmentation requires fine-grained pixel-level understanding to locate and segment sounding objects, a challenge existing approaches for other audio-visual tasks face. AVSegFormer combines transformer-based dense mixing and sparse audio-conditioned decoding. The paper reports superior performance to existing state-of-the-art methods across AVS scenarios.

  • Problem

    AVS requires fine-grained alignment between image pixels and audio to locate and segment sounding objects, which methods developed for other audio-visual tasks struggle to handle.

    Source: Introduction · pp. 1–2
  • Method

    AVSegFormer combines a transformer encoder, dense audio-visual mixer, audio-conditioned queries, and sparse cross-modal decoder for AVS.

    Source: Introduction · p. 2
  • Results

    AVSegFormer achieves superior AVS performance compared with existing state-of-the-art methods across different scenarios.

    Source: Introduction · p. 2, Conclusion · p. 7
  • Takeaways & Limitations

    The dense mixer and sparse decoder provide complementary pixel-level and instance-level representations for AVS scenarios with multiple sound sources and objects.

    Source: Introduction · p. 2

Abstract

from arXiv · show

The combination of audio and vision has long been a topic of interest in the multi-modal community. Recently, a new audio-visual segmentation (AVS) task has been introduced, aiming to locate and segment the sounding objects in a given video. This task demands audio-driven pixel-level scene understanding for the first time, posing significant challenges. In this paper, we propose AVSegFormer, a novel framework for AVS tasks that leverages the transformer architecture. Specifically, we introduce audio queries and learnable queries into the transformer decoder, enabling the network to selectively attend to interested visual features. Besides, we present an audio-visual mixer, which can dynamically adjust visual features by amplifying relevant and suppressing irrelevant spatial channels. Additionally, we devise an intermediate mask loss to enhance the supervision of the decoder, encouraging the network to produce more accurate intermediate predictions. Extensive experiments demonstrate that AVSegFormer achieves state-of-the-art results on the AVS benchmark. The code is available at https://github.com/vvvb-github/AVSegFormer.

Introduction

AVS requires pixel-level alignment between audio and video to locate and segment sounding objects, a challenge existing methods for other audio-visual tasks struggle with. AVSegFormer addresses this with transformer-based dense and sparse cross-modal features and outperforms existing state-of-the-art methods.

  • AVS asks models to locate audible frames and delineate sounding objects, requiring fine-grained relationships between image pixels and audio.Its sub-tasks include single-source S4, multi-source MS3, and multi-category semantic segmentation AVSS.Source: Introduction · p. 1, Figure 1 · p. 1
  • Existing methods for other audio-visual tasks face difficulty on AVS, while simple fusion struggles with dense mixed audio and changing sources.Dense segmentation also struggles to separate multiple coexisting sounding objects for one-to-one localization.Source: Introduction · pp. 1–2
  • AVSegFormer combines a transformer encoder, audio-visual mixer, query generator, and cross-modal transformer decoder for audio-visual segmentation.The mixer uses an auxiliary loss; the decoder forms sparse queries to separate sources and match visual features.Source: Introduction · p. 2, Figure 2 · p. 2
  • The framework combines bidirectional cross-modal feature fusion with dense pixel-level mixing and sparse instance-level decoding.The complementary representations are intended to adapt to multiple sound sources and objects.Source: Introduction · p. 2
  • AVSegFormer significantly outperforms existing state-of-the-art methods on the AVS benchmark.Source: Introduction · p. 2

Related Works

Prior work on multimodal tasks and transformer-based vision and segmentation informs AVSegFormer. The paper connects these developments to audio-visual segmentation, a newer task requiring cross-modal understanding and segmentation.

Multi-Modal Tasks

  • Audio-visual correspondence, event localization, and sound-source localization are established multimodal tasks; transformer architectures are also used in unified multimodal models.The paper describes AVS as sharing commonalities with these tasks and says pioneering work inspired AVSegFormer.Source: Multi-Modal Tasks · p. 2

Vision Transformer

  • Vision transformers developed from ViT and advanced through models such as DETR, Deformable DETR, and DINO, inspiring their application to AVS.Source: Vision Transformer · pp. 2–3

Image Segmentation

  • Transformer segmentation models including Mask2Former, Mask DINO, and OneFormer unify image-segmentation tasks and inform the segmentation design of AVSegFormer.Image segmentation partitions an image into distinct regions.Source: Image Segmentation · p. 3

Methods

AVSegFormer uses a query-based transformer architecture to separate potential sparse objects and refine visual features with audio. Its visual and audio encoders provide the features used by the model.

Overall Architecture

  • The query-based architecture uses audio queries and a transformer encoder to produce features for a decoder that separates potential sparse objects.The audio-visual mixer amplifies relevant features and suppresses irrelevant ones, with an auxiliary mixing loss supervising the reinforced features.Source: Overall Architecture · p. 3

Multi-Modal Representation

  • The visual backbone extracts hierarchical visual features from video frames, while the audio pipeline uses VGGish features derived from a mel spectrum.The audio is resampled to 16 kHz mono and mapped to a 64th-order mel filter bank before VGGish extraction.Source: Multi-Modal Representation · pp. 3–4
  • The adopted channel-attention mixer uses audio features to adjust visual channels and performed better than the initial cross-attention mixer.Source: Figure 4 · p. 4

Query Generator

The query generator turns audio features into sparse audio-conditioned queries and combines them with learnable queries for the transformer decoder. Learnable queries add dataset-level context and let the model adjust attention across sounding targets.

  • The query generator uses initial queries with audio features as keys and values to produce sparse audio-conditioned queries, then combines them with learnable queries for the decoder.Source: Query Generator · p. 4
  • Learnable queries provide dataset-level context and let the model adjust attention allocated to different sounding targets.Source: Query Generator · p. 4

Transformer Encoder

The encoder builds a mask feature by combining backbone features from multiple resolutions. It upsamples the 1/8-scale features and adds them to the 1/4-scale visual features.

Transformer Encoder

  • Backbone features at 1/8, 1/16, and 1/32 resolution are flattened and concatenated as transformer-encoder input queries.Source: Transformer Encoder · p. 4
  • The encoder outputs are reshaped to their original spatial shapes, and the 1/8-scale features are upsampled by 2×.Source: Transformer Encoder · p. 4
  • The upsampled 1/8-scale features are added to the visual backbone’s 1/4-scale features to form the mask feature.The mask feature has dimensions T × D × h × w, with h = H/4 and w = W/4.Source: Transformer Encoder · p. 4

Audio-Visual Mixer

The audio-visual mixer adjusts visual mask features in response to audio, aiming to address the difficulty of identifying inconspicuous sounding objects when audio semantics vary. It uses cross-attention to weight visual channels.

Audio-Visual Mixer

  • Because audio semantics vary widely, a static network may fail to capture relevant information and identify inconspicuous sounding objects.Source: Audio-Visual Mixer · p. 4
  • The mixer uses channel attention and audio-visual cross-attention to learn weights that amplify or suppress visual channels based on audio features.Source: Audio-Visual Mixer · p. 4
  • The mixer takes audio features and the initial mask feature as inputs and produces a mixed mask feature.The number of attention heads is set to 8 by default.Source: Audio-Visual Mixer · p. 4

Transformer Decoder

The decoder matches mixed queries with multi-scale visual features, with output queries aggregating visual information as decoding proceeds. The resulting mixed mask features and queries are used to predict segmentation masks.

Transformer Decoder

  • The decoder uses mixed queries as input queries and multi-scale visual features as keys and values to match queries with visual features.Source: Transformer Decoder · p. 4
  • As decoding proceeds, output queries aggregate visual features and combine auditory and visual modalities while containing target information.Source: Transformer Decoder · p. 4
  • The model multiplies the mixed mask feature by output queries, integrates channels with an MLP, and predicts the segmentation mask through a fully connected layer.The output mask has dimensions T × Nclass × h × w, where Nclass is the number of semantic classes.Source: Transformer Decoder · p. 4

Loss Function

The loss combines final-mask IoU supervision with an auxiliary mixing loss. Dice loss is used for the final mask and for a binary mask predicted from the mixed mask feature.

Loss Function

  • The auxiliary mixing loss supervises the mixer to improve target-object localization in complex scenes.Source: Loss Function · p. 4
  • The mixing loss compares a binary mask predicted from the channel-integrated mixed mask feature with foreground labels using Dice loss.Source: Loss Function · p. 5
  • The final segmentation mask is supervised against ground truth with Dice loss as the IoU loss, and the total loss adds the weighted mixing loss.The auxiliary-loss coefficient λ is set to 0.1 because it performs best.Source: Loss Function · p. 5

Discussion

AVSegFormer builds on a Mask2Former-like segmentation framework, tailoring it for audio-visual segmentation. Its dual-tower backbones, dense mixer, and sparse decoder are designed to use auditory cues effectively.

Discussion

  • AVSegFormer adapts a Mask2Former-like segmentation framework to handle multimodal information for audio-visual segmentation.The paper notes that this capability is not inherent in Mask2Former.Source: Discussion · p. 5
  • Dual-tower backbone networks extract visual and auditory features.Source: Discussion · p. 5
  • A dense audio-visual mixer and sparse audio-visual decoder are designed to leverage auditory cues effectively and enhance segmentation performance.Source: Discussion · p. 5

Experiments

AVSegFormer outperforms AVSBench across all three AVS sub-tasks and also surpasses prior-task methods. Experiments evaluate the datasets and training setup, ablate key designs, and compare qualitative segmentations.

Dataset

  • AVSBench-Object supplies pixel-level annotations for S4 and MS3, while AVSBench-Semantic adds semantic labels and longer videos for AVSS.The Object videos are 5 seconds with one frame per second; Semantic videos are 10 seconds with 10 frames extracted.Source: Dataset · p. 5

Implementation Details

  • Training uses AdamW, batch size 2, and a 2 × 10^-5 initial learning rate; MS3 trains for 60 epochs, while S4 and AVSS train for 30.The encoder and decoder each have six layers and 256-dimensional embeddings; the mixing-loss coefficient is 0.1.Source: Implementation Details · p. 5

Comparison with Prior Arts

  • Against AVSBench, AVSegFormer improves S4 by 3.66 mIoU and 1.1 F-score (R50), and AVSS by 6.89 mIoU and 6.8 F-score (PVTv2), among gains across all tasks.On MS3, AVSegFormer-PVTv2 improves by 1.65 mIoU and 5.0 F-score; AVSS R50 improves by 4.75 mIoU and 4.1 F-score.Source: Table 1 · p. 6, Comparison with Prior Arts · pp. 6–7
  • AVSegFormer-PVTv2 reaches 82.06 mIoU and 89.9 F-score on S4, and improves over prior-task methods by 15.47 mIoU and 14.9 F-score on MS3.On AVSS, AVSegFormer-PVTv2 surpasses AOT by 11.26 mIoU and 11.0 F-score; on S4, it exceeds LGVT by 7.12 mIoU and 2.6 F-score.Source: Comparison with Prior Arts · p. 6, Table 1 · p. 6

Ablation Study

  • In experiments varying decoder-input queries among 1, 100, 200, and 300, performance increased with query count, and the best performance was obtained with 300 queries.Source: Ablation Study · p. 7
  • Learnable decoder queries bring relatively small gains on S4 but significant gains on MS3, which the authors attribute to sounding-object complexity.The ablation compares S4 and MS3.Source: Ablation Study · p. 7
  • The channel-attention mixer outperforms cross-attention; visualizations show it enhances sounding-object features and suppresses non-sounding features, while mixing loss helps final predictions.The visualization examples include a sounding girl and dog and non-sounding objects or background.Source: Ablation Study · p. 7
  • Qualitative comparisons across three AVS tasks show better sounding-object localization, semantic understanding, and segmentation by AVSegFormer than AVSBench.The visualizations include multiple-sound scenes.Source: Ablation Study · p. 7, Figure 6 · p. 7

Conclusion

AVSegFormer is a transformer-based framework for audio-visual segmentation. Its encoder, query generator, dense mixer, and sparse decoder provide cross-modal representations, and experiments show stronger performance than existing state-of-the-art methods.

Conclusion

  • AVSegFormer combines a transformer encoder, audio-conditioned query generator, dense audio-visual mixer, and sparse audio-visual decoder.The components build mask features, adjust visual features, and separate audio sources while matching visual features.Source: Conclusion · p. 7
  • The framework is designed to improve audio-visual cross-modal representations and AVS performance across different scenarios.Source: Conclusion · p. 7
  • Experiments show that AVSegFormer outperforms existing state-of-the-art methods.Source: Conclusion · p. 7
Loading 2307.01146v4…