--- license: mit library_name: libreyolo pipeline_tag: image-segmentation tags: - background-removal - matte - dichotomous-image-segmentation - birefnet - libreyolo --- # LibreBiRefNetl-matte BiRefNet background removal (BiRefNet general (Swin-L tier), the quality default), repackaged for LibreYOLO's `matte` task. Predicts a soft alpha matte at a fixed native 1024x1024. ```python from libreyolo import LibreYOLO m = LibreYOLO("LibreBiRefNetl-matte.pt") res = m.predict("product.jpg") res[0].matte # (H, W) float alpha in [0, 1] res[0].save("cut.png") # transparent-background PNG ``` ## Source Derived from [ZhengPeng7/BiRefNet](https://github.com/ZhengPeng7/BiRefNet) at commit d83f355. Copyright (c) 2024 ZhengPeng (Peng Zheng). Licensed under the MIT License. Backbone: Swin Transformer v1 (Swin-L). Training data provenance (upstream): the BiRefNet DIS/General checkpoints are trained on dichotomous-image-segmentation datasets (e.g. DIS5K) under their own academic terms; this repo hosts the author's released weights and does not redistribute training data. ## Modifications State-dict key remapping only (metadata-wrap into the LibreYOLO v1.0 checkpoint schema). Learned parameters are unchanged. Our fp32 forward matches the upstream released weights with `max_abs_diff == 0`. See `weights/convert_birefnet_weights.py` in the [LibreYOLO source repository](https://github.com/LibreYOLO/libreyolo). ## License MIT License. See the [`LICENSE`](./LICENSE) and [`NOTICE`](./NOTICE) files.