Bilateral Reference for High-Resolution Dichotomous Image Segmentation

Peng Zheng, Dehong Gao, Deng-Ping Fan, Li Liu, Jorma Laaksonen, Wanli Ouyang, Nicu Sebe

Abstract

We introduce a novel bilateral reference framework (BiRefNet) for high-resolution dichotomous image segmentation (DIS). It comprises two essential components: the localization module (LM) and the reconstruction module (RM) with our proposed bilateral reference (BiRef). LM aids in object localization using global semantic information. Within the RM, we utilize BiRef for the reconstruction process, where hierarchical patches of images provide the source reference, and gradient maps serve as the target reference. These components collaborate to generate the final predicted maps. We also introduce auxiliary gradient supervision to enhance the focus on regions with finer details. In addition, we outline practical training strategies tailored for DIS to improve map quality and the training process. To validate the general applicability of our approach, we conduct extensive experiments on four tasks to evince that BiRefNet exhibits remarkable performance, outperforming task-specific cutting-edge methods across all benchmarks. Our codes are publicly available at https://github.com/ZhengPeng7/BiRefNet.

Introduction: The Challenge of High-Resolution Segmentation

Dichotomous Image Segmentation (DIS) aims to produce highly accurate binary masks for objects in high-resolution (HR) images. While traditional segmentation handles general object shapes well, it often fails at "slender structures"—think of the fine legs of an insect, individual strands of hair, or thin cracks in a wall.

The core challenge is a trade-off: deep learning models typically downsample images to save memory and capture global context, but this process destroys the very fine-grained details needed for high-precision masks. Existing "refinement" strategies often rely on resized versions of the image or intermediate feature supervision, which are still insufficient for capturing "tiny-pixel" features.

Comparison between ground truth (GT) and IS-Net, illustrating how traditional methods struggle with fine-grained structures.

Methodology: Bilateral Reference (BiRefNet)

The authors propose BiRefNet, which splits the task into two specialized stages:

  1. Localization Module (LM): This module uses a Vision Transformer (Swin-L) backbone to extract global semantic information. Its job is to identify where the object is at a coarse level.
  2. Reconstruction Module (RM): This is where the precision happens. It uses a Bilateral Reference (BiRef) strategy:
  3. Inward Reference (InRef): Instead of resizing the whole image, the model adaptively crops the original HR image into patches and feeds them directly into the decoder. This ensures the "intact detail" of the original pixels is available at every decoding stage.
  4. Outward Reference (OutRef): The model generates and supervises predicted gradient maps. By forcing the network to predict edges (gradients), it becomes much more sensitive to fine boundaries.

To make training feasible on HR data, the authors also introduced Multi-Stage Supervision (MSS) to accelerate convergence and Region-Level Loss Fine-Tuning (RLFT) to sharpen the final binary predictions.

Datasets and Evaluation

The model was primarily trained and evaluated on the DIS5K dataset (containing 5,470 high-resolution images with extremely detailed annotations). To demonstrate generalization, the authors also tested on:

  • High-Resolution Salient Object Detection (HRSOD): HRSOD, UHRSD, and DAVIS-S.
  • Concealed/Camouflaged Object Detection (COD): COD10K, CAMO, and NC4K.
  • Low-Resolution Benchmarks: DUTS and DUT-OMRON.

Key Results and Performance

BiRefNet achieved a new state-of-the-art (SOTA) across all tested benchmarks. On DIS5K, it achieved a significant 6.8% average improvement in the $S_m$ metric over previous leaders like IS-Net. Despite being designed for DIS, it improved SOTA for Salient Object Detection by 2.0% and Camouflaged Object Detection by 5.6%.

Qualitative results comparing BiRefNet (Ours) against UDUN, showcasing superior reconstruction of intricate architectural details.

Visual results show the model successfully segmenting individual hairs on a person's head and complex, spindly structures of bicycles and insects that previous models (like UDUN or IS-Net) simply blurred or ignored. In terms of speed, the largest version (Swin-L) runs at ~12 FPS on an A100 GPU, while smaller versions (PVTv2) reach up to ~30 FPS, making it viable for near-real-time applications.

Conclusion and Future Directions

BiRefNet demonstrates that maintaining original-resolution patches and utilizing gradient-based supervision are key to high-precision segmentation. While training on 1024x1024 resolution remains computationally expensive, the framework offers a path toward a "unified model" capable of handling diverse binary segmentation tasks—from salient and camouflaged objects to medical imaging—with a single architecture.

Summary updated

BibTeX
@inproceedings{zheng2024bilateral,
  author = {Peng Zheng and Dehong Gao and Deng-Ping Fan and Li Liu and Jorma Laaksonen and Wanli Ouyang and Nicu Sebe},
  title = {{Bilateral Reference for High-Resolution Dichotomous Image Segmentation}},
  booktitle = {CAAI},
  year = {2024},
  doi = {10.26599/air.2024.9150038},
}
Figure