BiRefNet-V2: Rethinking Bilateral Reference for High-Resolution Dichotomous Image Segmentation
Authors: Peng Zheng, Deng-Ping Fan, Binglu Wang, Nicu Sebe
Organizations: Department of Information Engineering and Computer Science, University of Trento, Trento 38123, Italy · College of Computer Science, Nankai University, Tianjin 300350, China · School of Astronautics, Northwestern Polytechnical University, Xi’an 710072, China
Dichotomous image segmentation requires pixel-accurate foreground-background separation while preserving fine structures such as thin filaments, sharp edges, and intricate textures. BiRefNet addressed this challenge through bilateral references, combining image patches and gradient information, but its inward reference loses local spatial structure and lacks semantic guidance, while its outward reference relies on single-channel gradient attention. We recast this paradigm as controlled information recovery - locality determines what spatial information survives, semantic selectivity what information enters, and focused boundary supervision where refinement occurs - and propose BiRefNet-V2 to implement it: (1) locality-preserving and semantically guided detail injection through space-to-depth transformation, overlapping patches, and a Semantically Guided Gate; (2) a learned boundary stream with focused supervision that generates full-channel residual attention without requiring boundary annotations; and (3) a dual-branch decoder integrating depth-wise boundary convolutions with large-kernel attention. A modernized framework - LayerNorm, GELU, the Lion optimizer, and a DINOv3 backbone - cuts training from 600 to 50 epochs. Extensive experiments demonstrate state-of-the-art performance on DIS5K, camouflaged object detection, and high-resolution salient object detection across all 13 evaluation sets. Code is available at https://github.com/ZhengPeng7/BiRefNet-V2.
Figures & tables
Fig. 1: Visual comparison on high-resolution dichotomous image segmentation. BiRefNet-V2 versus PDFNet [ 7 ] and DiffDIS [ 8 ] (mask binarized per its official protocol). Insets enlarge the red-boxed region. On a filament-level structure such as this racket’s string bed, the competing methods blur the lattice into solid regions and absorb the people seen through the strings into the foreground, whereas BiRefNet-V2 reconstructs the topology nearly identically to the ground truth.
Fig. 2: The defining challenge of DIS and three architectural responses. The mask tiles in (b)–(d) are real predictions, (b) by IS-Net [ 1 ] , on the red-boxed region of one DIS-TE4 image whose ground truth is given in (a); the remaining image content is rendered from the input pixels for illustration, except the teal map in (d), the RMS over channels of BiRefNet-V2’s gated inward reference at full resolution, high (teal) between the strings and low (white) on them. Patch Merge: BiRefNet’s channel-wise stacking of grid-split patches; S2D: space-to-depth; Sem. Gate: Semantically Guided Gate; focused-edge target: the prediction-gated image-edge target of § III-D .
Fig. 3: Overall architecture of BiRefNet-V2. The framed stage is detailed in Fig. 4 , its gate in Fig. 5 ; the edge target is square-root scaled for display.
Component
BiRefNet
BiRefNet-V2
Backbone
Swin-L, fine-tuned
DINOv3-L, last-stage tuned
Norm / activation
BatchNorm / ReLU
LayerNorm / GELU
Inward Reference
grid-split, ungated
S2D + overlap, SGG-gated
Outward Reference
image grad., 1-ch.
pred.-gated edge, full-ch.
Decoder block
conv ( + deform.)
dual-branch conv + LKA
Optimizer / schedule
Adam, 600 epochs
Lion, 50 epochs
TABLE I: Component-level changes from BiRefNet to BiRefNet-V2. LKA: large-kernel attention; deform.: deformable convolution
Fig. 4: Bilateral reference at one decoder stage. Panel (a) is drawn on toy grids ( 15×15 pixels, 3×3 positions), with an overlap border of o=⌊αk⌋ pixels. Maps come from the trained model on one DIS-VD image: Ds is shown by its first principal component, As by its mean over channels, and E⊙M^s with a 0.5 display gamma.
Fig. 5: The Semantically Guided Gate (SGG). The gate σ(g) has one value per channel and pixel of Rsin .
Methods
DIS-TE1 (500)
DIS-TE2 (500)
DIS-TE3 (500)
Fβx↑
Fβω↑
M↓
Sm↑
Eϕm↑
HCEγ↓
Fβx↑
Fβω↑
M↓
Sm↑
Eϕm↑
HCEγ↓
Fβx↑
Fβω↑
M↓
Sm↑
Eϕm↑
HCEγ↓
IS-Net 22 [ 1 ]
.740
.662
.074
.787
.820
149
.799
.728
.070
.823
.858
340
.830
.758
.064
.836
.883
687
InSPyReNet 22 [ 11 ]
.845
.788
.043
.873
.894
110
.894
.846
.036
.905
.928
255
.919
.871
.034
.918
.943
522
FP-DIS 23 [ 16 ]
.784
.713
.060
.821
.860
160
.827
.767
.059
.845
.893
373
.868
.811
.049
.871
.922
780
UDUN 23 [ 9 ]
.784
.720
.059
.817
.864
140
.829
.768
.058
.843
.886
325
.865
.809
.050
.865
.917
658
MVANet 24 [ 10 ]
.873
.823
.037
.879
.916
105
.916
.874
.030
.915
.943
252
.929
.890
.031
.920
.952
527
TABLE II: Quantitative comparison on DIS5K. All methods use 1024×1024 input; DIS-TEs is the mean of the per-split scores, and best results are in bold . † We recompute GenPercept’s scores from its official inference, changing only the input resolution from its native 768. ‡ Unlike the other methods, DiffDIS is evaluated on fully binarized maps, following its official protocol. Hyperlinked method names link to their released code
Methods
TR
DAVIS-S (92)
HRSOD-TE (400)
UHRSD-TE (988)
DUTS-TE (5,019)
DUT-OMRON (5,168)
Sm↑
Fβx↑
Eϕm↑
M↓
Sm↑
Fβx↑
Eϕm↑
M↓
Sm↑
Fβx↑
Eϕm↑
M↓
Sm↑
Fβx↑
Eϕm↑
M↓
Sm↑
Fβx↑
Eϕm↑
M↓
HRSOD 19\lx@paragraphsign [ 33 ]
1,2
.876
.899
.955
.026
.896
.905
.934
.030
-
-
-
-
.824
.835
.885
.050
.762
.743
.831
.065
LDF 20\lx@paragraphsign [ 44 ]
1
.922
.911
.947
.019
.904
.904
.919
.032
.888
.913
.891
.047
.892
.898
.910
.034
.838
.820
.873
.051
DHQ 21 [ 45 ]
1,2
.939
.938
-
.012
.922
.922
-
.022
-
-
-
-
.892
.900
-
.031
.843
.820
-
.048
PGNet 22 [ 25 ]
2,3
.954
.957
.979
.010
.938
.945
.946
.020
.935
.949
.916
.026
.859
.871
.897
.038
.786
.772
.884
.058
BiRefNet 24 [ 13 ]
1
.967
.966
.984
.008
.957
.958
.972
.014
.931
.933
.943
.030
.939
.937
.958
.019
.868
.813
.878
.040
TABLE III: Quantitative comparison on high- and low-resolution salient object detection benchmarks. The last two benchmarks are low-resolution. TR is the training set: 1, 2, and 3 denote DUTS, HRSOD, and UHRSD. Second-best results are underlined , and “-” marks unavailable scores; ¶ whole row taken from [ 25 ] , which reports more of these scores than the method’s own paper
Methods
CAMO-TE (250)
COD10K-TE (2,026)
NC4K (4,121)
Sm↑
Fβω↑
Fβm↑
Eϕm↑
Eϕx↑
M↓
Sm↑
Fβω↑
Fβm↑
Eϕm↑
Eϕx↑
M↓
Sm↑
Fβω↑
Fβm↑
Eϕm↑
Eϕx↑
M↓
SINet 20\lx@paragraphsign [ 36 ]
.745
.644
.702
.804
.829
.091
.776
.631
.679
.864
.874
.043
.808
.723
.769
.871
.883
.058
SINet-V2 22† [ 35 ]
.820
.743
.782
.882
.895
.070
.815
.680
.718
.887
.906
.037
.847
.770
.805
.903
.914
.048
FEDER 23\lx@paragraphsign [ 48 ]
.802
.738
.781
.867
.873
.071
.822
.716
.751
.900
.905
.032
.847
.789
.824
.907
.915
.044
HitNet 23\lx@paragraphsign [ 49 ]
.849
.809
.831
.906
.910
.055
.871
.806
.823
.935
.938
.023
.875
.834
.853
.926
.929
.037
FSPNet 23 [ 50 ]
.856
.799
.830
.899
.928
.050
.851
.735
.769
.895
.930
.026
.879
.816
.843
.915
.937
.035
TABLE IV: Quantitative comparison on COD benchmarks. Competitors’ scores are from their papers where the metric is reported with the same definition; † remaining cells recomputed from the released predictions of the same model; ‡ whole row recomputed from the released model, which is not the cited version’s checkpoint but scores within 0.01 of it on every metric both report; ¶ whole row taken from re-evaluations of the released predictions reported in [ 13 ] (SINet: the authors’ retrained release, as reported in [ 46 , 47 ] ), as the cited papers report fewer metrics
Fig. 6: Cross-task architectural transferability. Sectors: DIS (yellow), HRSOD (teal; TR=2,3), and COD (green); task specialists (strongest compared): PDFNet , PGNet , and ZoomNeXt , respectively. The radial axis runs from 0.87 (center) to 0.99 (rim), which enlarges the differences.
Fig. 7: The cumulative component build-up, visualized. Insets (top three rows) enlarge the red-boxed region.
Configuration
Modernized framework
Inward Reference (IR)
Outward Reference (OR)
Dual-Branch Decoder (DB)
Fβx↑
HCEγ↓
Baseline framework
×
×
×
×
.8722 ± .0022
1270 ± 2
Modernized framework ( Table VI )
✓
×
×
×
.9155 ± .0024
1374 ± 5
+ BiRefNet references & decoder
✓
v1
v1
v1
.9193 ± .0028
1108 ± 2
+ IR
✓
✓
×
×
.9285 ± .0031
752 ± 7
+ OR
✓
×
✓
×
.9145 ± .0026
1341 ± 4
+ DB
✓
×
×
✓
.9218 ± .0015
1297 ± 7
TABLE V: Component-combination ablation of the main contributions. Every row is an independent configuration. × denotes the BiRefNet framework in the Modernized framework column and the absence of the component elsewhere (no reference; a plain single-branch decoder block: two 3×3 convolutions, each followed by normalization, with an activation between the two, plus a 1×1 projection shortcut); v1 marks BiRefNet’s counterpart of that component ( Table I )
Framework
Fβx↑
HCEγ↓
Baseline framework
.8722 ± .0022
1270 ± 2
→ DINOv3-L (frozen)
.8870 ± .0018
1474 ± 2
→ LayerNorm
.8925 ± .0017
1454 ± 4
→ GELU
.8948 ± .0021
1429 ± 2
→ Lion (all four replacements, backbone frozen)
.8955 ± .0017
1404 ± 3
+ DINOv3 last-stage tuning
.9155 ± .0024
1374 ± 5
TABLE VI: From BiRefNet to the modernized framework. In the top block, each row replaces ( → ) or adds ( + ) one framework choice on top of the previous row. Shaded rows mark the adopted setting of each block
Design axis
Value
Fβx↑
HCEγ↓
absent
.9156 ± .0022
1374 ± 6
Inward reference
adopted
.9332 ± .0040
751 ± 10
hybrid Window/Conv
.9332 ± .0040
751 ± 10
Conv SGG only
.9266 ± .0029
757 ± 5
Gate (SGG)
none (ungated)
.9260 ± .0024
993 ± 6
grid split ( α=0 )
.9300 ± .0007
814 ± 7
TABLE VII: Inward-reference design ablation. All rows come from one dedicated sweep, so the two rows of the Inward reference axis are independent replicates of—not identical to—the corresponding rows of Table V
Fβx↑/HCEγ↓
DINOv3
Params
TMACs
FPS
DIS-TEs
DIS-VD
S+
35 (16)
0.39
34.1
.911 / 792
.907 / 818
B
94 (37)
0.79
29.8
.917 / 763
.916 / 756
L (default)
312 (85)
2.21
18.4
.936 / 736
.932 / 731
H+
851 (220)
4.97
11.9
.938 / 729
.930 / 745
7B
6738 (1700)
33.27
2.5
.939 / 733
.942 / 739
TABLE VIII: Scaling the semantic encoder on DIS5K. Each size reports its best checkpoint, selected by the five-set mean of Fβx . Params: total (trainable), in M; TMACs at 10242
Method
#Params (M) ↓
Trainable ↓
FPS ↑
Peak mem. (GB) ↓
IS-Net 22 [ 1 ]
44.0
44.0
77.4
2.8
InSPyReNet 22 [ 11 ]
90.7
90.7
24.9
2.8
UDUN 23 [ 9 ]
24.9
24.9
63.0
0.6
MVANet 24 [ 10 ]
94.1
94.1
19.1
2.6
GenPercept 25 [ 12 ]
949.6 †
865.9
3.9
8.8
DiffDIS 25 [ 8 ]
996.6 †
912.9
0.31 ‡
16.7
TABLE IX: Efficiency comparison. Each method runs its official inference path ( 1024×1024 input, batch size 1, bf16 mixed precision); the Trainable column counts the inference model’s parameters that are trained
Fig. 8: Resolution–accuracy trade-off on DIS-VD. Each point is a model retrained from scratch at its resolution configuration. The inset’s runtime axis is also logarithmic. Error bars: ± 1 standard deviation.
Fig. 9: Qualitative comparison on DIS5K. An all-white inset means the method labels the whole enlarged region as foreground.
Fig. 10: Qualitative comparison on COD. All four samples are from COD10K-TE.
Fig. 11: Application demonstration. A held-out DIS-TE4 wrought-iron gate processed by the released BiRefNet-V2. New background: cropped from a photo by AuHaidhausen , CC BY 4.0 .
Fig. 12: Failure cases on DIS5K. Top: ambiguous extent of the target; bottom: same-color adjacency.
Key Laboratory of Intelligent Perception and Image Understanding of Ministry of Education, International Research Center for Intelligent Perception and Computation, School of Artificial Intelligence, Xidian University, Xi’an, Shaanxi Province, 710071, China