Image Segmentation
BiRefNet
Safetensors
background-removal
mask-generation
Dichotomous Image Segmentation
Camouflaged Object Detection
Salient Object Detection
pytorch_model_hub_mixin
model_hub_mixin
custom_code
Run this model with HF Jobs
Run ZhengPeng7/BiRefNet_512x512 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/ZhengPeng7/BiRefNet_512x512. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/ZhengPeng7/BiRefNet_512x512 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use ZhengPeng7/BiRefNet_512x512 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- BiRefNet
How to use ZhengPeng7/BiRefNet_512x512 with BiRefNet:
# Option 1: use with transformers from transformers import AutoModelForImageSegmentation birefnet = AutoModelForImageSegmentation.from_pretrained("ZhengPeng7/BiRefNet_512x512", trust_remote_code=True)# Option 2: use with BiRefNet # Install from https://github.com/ZhengPeng7/BiRefNet from models.birefnet import BiRefNet model = BiRefNet.from_pretrained("ZhengPeng7/BiRefNet_512x512") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from ZhengPeng7/BiRefNet_512x512: direct link, hf CLI and curl.
- Browser
- Download file 5.85 kB
-
https://huggingface.co/ZhengPeng7/BiRefNet_512x512/resolve/main/README.md
- Command line
-
hf download hf://ZhengPeng7/BiRefNet_512x512/README.md
-
curl -L -o README.md https://huggingface.co/ZhengPeng7/BiRefNet_512x512/resolve/main/README.md
5.85 kB
metadata
library_name: birefnet
tags:
- background-removal
- mask-generation
- Dichotomous Image Segmentation
- Camouflaged Object Detection
- Salient Object Detection
- pytorch_model_hub_mixin
- model_hub_mixin
repo_url: https://github.com/ZhengPeng7/BiRefNet
pipeline_tag: image-segmentation
license: mit
This BiRefNet was trained with images in
512x512for faster and more accurate lower resolution inference.
Performance:
All tested in FP16 mode.
| Dataset | Method | Resolution | maxFm | wFmeasure | MAE | Smeasure | meanEm | HCE | maxEm | meanFm | adpEm | adpFm | mBA | maxBIoU | meanBIoU |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DIS-VD | BiRefNet_512x512-epoch_216 | 512x512 | .879 | .840 | .040 | .888 | .931 | 1526 | .941 | .864 | .938 | .857 | .732 | .747 | .726 |
| DIS-VD | BiRefNet-general-epoch_244 | 512x512 | .834 | .789 | .050 | .860 | .891 | 1589 | .905 | .817 | .902 | .816 | .708 | .698 | .669 |
| DIS-VD | BiRefNet_HR-general-epoch_130 | 512x512 | .540 | .409 | .112 | .634 | .565 | 1647 | .682 | .428 | .690 | .576 | .585 | .384 | .309 |
Bilateral Reference for High-Resolution Dichotomous Image Segmentation
Peng Zheng 1,4,5,6,
Dehong Gao 2,
Deng-Ping Fan 1*,
Li Liu 3,
Jorma Laaksonen 4,
Wanli Ouyang 5,
Nicu Sebe 6
1 Nankai University 2 Northwestern Polytechnical University 3 National University of Defense Technology 4 Aalto University 5 Shanghai AI Laboratory 6 University of Trento
| DIS-Sample_1 | DIS-Sample_2 |
|---|---|
This repo is the official implementation of "Bilateral Reference for High-Resolution Dichotomous Image Segmentation" (CAAI AIR 2024).
Check the main BiRefNet model repo for more info and how to use it:
https://huggingface.co/ZhengPeng7/BiRefNet/blob/main/README.md
Also check the GitHub repo of BiRefNet for all things you may want:
https://github.com/ZhengPeng7/BiRefNet
Acknowledgement:
- Many thanks to @freepik for their generous support on GPU resources for training this model!
Citation
@article{zheng2024birefnet,
title={Bilateral Reference for High-Resolution Dichotomous Image Segmentation},
author={Zheng, Peng and Gao, Dehong and Fan, Deng-Ping and Liu, Li and Laaksonen, Jorma and Ouyang, Wanli and Sebe, Nicu},
journal={CAAI Artificial Intelligence Research},
volume = {3},
pages = {9150038},
year={2024}
}