Skip to main content
QUICK REVIEW

[Paper Review] AdaptiveClick: Clicks-aware Transformer with Adaptive Focal Loss for Interactive Image Segmentation

Jiacheng Lin, Jiajun Chen|arXiv (Cornell University)|May 7, 2023
CCD and CMOS Imaging SensorsEngineering3 citations
TL;DR

AdaptiveClick proposes a clicks-aware Vision Transformer with an Adaptive Focal Loss (AFL) to address interaction ambiguity in interactive image segmentation. By introducing a mask-adaptive decoder and gradient-adaptive loss, it improves segmentation accuracy and robustness across nine datasets, achieving state-of-the-art performance with a plain ViT backbone.

ABSTRACT

Interactive Image Segmentation (IIS) has emerged as a promising technique for decreasing annotation time. Substantial progress has been made in pre- and post-processing for IIS, but the critical issue of interaction ambiguity, notably hindering segmentation quality, has been under-researched. To address this, we introduce AdaptiveClick -- a click-aware transformer incorporating an adaptive focal loss that tackles annotation inconsistencies with tools for mask- and pixel-level ambiguity resolution. To the best of our knowledge, AdaptiveClick is the first transformer-based, mask-adaptive segmentation framework for IIS. The key ingredient of our method is the Click-Aware Mask-adaptive transformer Decoder (CAMD), which enhances the interaction between click and image features. Additionally, AdaptiveClick enables pixel-adaptive differentiation of hard and easy samples in the decision space, independent of their varying distributions. This is primarily achieved by optimizing a generalized Adaptive Focal Loss (AFL) with a theoretical guarantee, where two adaptive coefficients control the ratio of gradient values for hard and easy pixels. Our analysis reveals that the commonly used Focal and BCE losses can be considered special cases of the proposed AFL. With a plain ViT backbone, extensive experimental results on nine datasets demonstrate the superiority of AdaptiveClick compared to state-of-the-art methods. The source code is publicly available at https://github.com/lab206/AdaptiveClick.

Motivation & Objective

  • To address interaction ambiguity in interactive image segmentation, particularly inter-class and intra-class click ambiguities.
  • To overcome gradient swamping in focal loss during training, which hinders model convergence and segmentation quality.
  • To develop a mask-adaptive framework that dynamically generates and selects optimal masks per click.
  • To design a generalized loss function with theoretical guarantees that generalizes BCE, FL, and PL as special cases.
  • To establish a robust, end-to-end baseline for generalized prompt segmentation models.

Proposed method

  • Introduces a Clicks-aware Mask-adaptive Transformer Decoder (CAMD) with Pixel-level Multi-scale Mask Transformer Decoder (PMMD) and Clicks-Aware Attention Module (CAAM) for enhanced click-image feature interaction.
  • Employs a novel Adaptive Focal Loss (AFL) with two adaptive coefficients to balance gradients between hard and easy pixels, preventing gradient swamping.
  • The AFL loss is theoretically grounded, showing that BCE, Focal Loss, and PL are special cases at specific parameter values.
  • Uses a multi-head attention mechanism with learnable click embeddings to model long-range dependencies and resolve ambiguous user inputs.
  • Applies a mask selection strategy that evaluates multiple candidate masks per click and selects the optimal one based on ground truth alignment.
  • Optimizes the model with a hybrid loss combining AFL, dice loss, and click loss, with hyperparameters tuned via ablation on five datasets.

Experimental results

Research questions

  • RQ1How can interaction ambiguity—both inter-class and intra-class—be effectively resolved in interactive image segmentation?
  • RQ2To what extent does gradient swamping in focal loss degrade model performance in vision transformer-based IIS models?
  • RQ3Can a generalized loss function be designed to adaptively balance hard and easy samples without prior knowledge of class distribution?
  • RQ4Does the proposed mask-adaptive strategy improve segmentation accuracy and convergence speed compared to fixed-mask baselines?
  • RQ5Can the proposed AFL loss generalize across different IIS models and datasets, improving performance consistently?

Key findings

  • AdaptiveClick achieves state-of-the-art performance on nine benchmark datasets using only a plain Vision Transformer backbone.
  • The model demonstrates robustness to hyperparameter variations, with optimal performance at λ_cli=2, λ_afl=5, λ_dice=5, and Q=10 clicks.
  • Ablation studies show that AFL with δ=0.4 yields the best segmentation performance, outperforming standard focal and BCE losses.
  • The proposed AFL loss generalizes BCE, Focal Loss, and PL as special cases, with theoretical guarantees on gradient adaptation.
  • The mask-adaptive strategy significantly reduces interaction ambiguity, enabling dynamic mask selection per click and improving final segmentation quality.
  • The model maintains consistent performance across diverse datasets, indicating strong generalization and robustness to varying click ambiguity levels.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.