BiMatting: Efficient Video Matting via Binarization

September 11, 2026 · View on GitHub

NeurIPS 2023

Haotong Qin, Lei Ke, Xudong Ma, Martin Danelljan, Yu-Wing Tai, Chi-Keung Tang, Xianglong Liu, Fisher Yu

Published paper | OpenReview | Citation

BiMatting reduces the cost of video matting with a 1-bit network, using a Shrinkable Binarized Block (SBB) to strengthen the encoder and Sparse-Assisted Binarization (SAB) to reduce redundant decoder computation. It is a trained video-matting model, requiring the data and training pipeline described in Section 3.4.

Published results

VM at 512×288 from Table 2. Alpha MAD/MSE are lower-is-better. The reported FLOPs use the paper's binary-operation accounting; model size is parameter storage, not runtime memory.

MethodBitsFLOPs (G)Model size (MB)Alpha MADAlpha MSE
RVM (oracle)324.5714.506.081.47
RVM-DoReFa10.520.5751.6434.50
RVM-ReAct10.550.6428.4918.16
BiMatting10.370.6712.826.65

The 12.4× computation and 21.6× storage savings compare BiMatting with RVM under this accounting; they are not measured wall-clock speedups. BiMatting improves over the binary baselines but still has a numerical accuracy gap to the full-precision RVM oracle.

What this paper supports

  • Direct binarization encounters encoder representation degradation and redundant decoding computation (Section 3.1).
  • SBB improves the binarized encoder through the proposed dense/shrinkable block design (Section 3.2; Table 1).
  • SAB reduces low-information decoder computation through sparsity (Section 3.3; Table 1).
  • The proposed design improves alpha-matting accuracy over the evaluated 1-bit baselines across VM, D646, and AIM (Table 2).
  • High-resolution performance is evaluated separately, including VM at 1920×1080 (Table 3); the low-resolution efficiency numbers above should not be transferred to another resolution.

loading-ag-172

Dependencies

# Go to the default directory
pip install -r requirements.txt

Execution

# We provide script to train and test our model
sh scripts/train.sh
sh scripts/test.sh

Repository training-stage records

The following table is retained from the original code release, including its original VM512x512 label and foreground entries. It is a historical training-stage record, not a transcription of Table 2. Use the published table above for paper-level comparisons; the paper row below also differs from the final Table 3 (for example VM dtSSD is 3.25 in the final paper).

VM512x512VM1920x1080
pha_madpha_msepha_gradpha_connpha_dtssdfgr_madfgr_msepha_madpha_msepha_gradpha_dtssd
stage115.068.752.831.762.7042.4614.8119.3311.6327.733.42
stage213.507.023.321.522.6946.2815.3919.6811.8029.643.39
stage312.676.892.781.402.6539.0713.3017.9511.4122.133.18
stage412.826.652.971.422.69363.69213.7717.7110.7922.103.24
paper12.826.652.971.422.69363.69213.7718.1611.1521.902.25

Citation

Please cite the published paper below. Open paper versions are linked at the top of this README.

@inproceedings{qin2023bimatting,
  title = {{BiMatting}: Efficient Video Matting via Binarization},
  author = {Haotong Qin and Lei Ke and Xudong Ma and Martin Danelljan and Yu-Wing Tai and Chi-Keung Tang and Xianglong Liu and Fisher Yu},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  volume = {36},
  url = {https://proceedings.neurips.cc/paper_files/paper/2023/hash/86c070ce724102ee876d1935590e111a-Abstract-Conference.html}
}