Image Segmentation
BiRefNet
Safetensors
Transformers
background-removal
mask-generation
Dichotomous Image Segmentation
Camouflaged Object Detection
Salient Object Detection
pytorch_model_hub_mixin
model_hub_mixin
custom_code
Instructions to use ZhengPeng7/BiRefNet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- BiRefNet
How to use ZhengPeng7/BiRefNet with BiRefNet:
# Option 1: use with transformers from transformers import AutoModelForImageSegmentation birefnet = AutoModelForImageSegmentation.from_pretrained("ZhengPeng7/BiRefNet", 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") - Transformers
How to use ZhengPeng7/BiRefNet with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="ZhengPeng7/BiRefNet", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForImageSegmentation model = AutoModelForImageSegmentation.from_pretrained("ZhengPeng7/BiRefNet", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Fix the no attribute 'all_tied_weights_keys' issue in transformers==5.0.0.
e2bf8e4 -
For the compatibility with the meta device used in transformers==5.0.0.
273735e
-
Upgrade the ways of importing timm modules (>=1.0.23).
26e7919
-
Fix metadata (#17)
Verified signature- Fix metadata (d5714d214ece88bacc2f4ae9cbc26fa5c9a36ff3) Co-authored-by: Joshua <[email protected]>1c48c2d
-
Compatible with the latest version of transformers (#18)
Verified signature- Compatible with the latest version of transformers (51c9ad2140729fe0076ad50f601669316d69d4b0) Co-authored-by: xiaoxiao112233 <[email protected]>b7d7f31
-
Turn the weights to FP16 format for a smaller size.
6a62b7d
-
Add transformers and transformers.js tag for discoverability.
Verified signature8b15dd1
-
Update the citation to the complete version.
Verified signature612a2ac
-
Fix the wrong bb setting. Fix the bug by latest transformers and update req.txt.
66f7f80
-
Add half precision setting in README.
1d30e9f
-
Update codes if handler.py.
bca1df1
-
Recover "use this model" badge on the model page.
Verified signaturead04501
-
Add inference endpoint feature in HF model page.
282961d -
Add inference endpoint feature in HF model page.
4e60c70
-
Dtype adaptability between FP32 and FP16 in inference.
Verified signaturef6b7155
-
Update README.md
Verified signature937a7a8 -
Update README.md
Verified signature5f9b83e
-
Update birefnet.py (#10)
Verified signature- Update birefnet.py (8d153a7f721e03f44b882fdedb3299069781c83e) Co-authored-by: Lain <[email protected]>049b245
-
Correct the `_name_or_path ` in config.json.
Verified signatured6b8eb4
-
Add journal release info.
Verified signaturec28fba3 -
Add journal release info.
Verified signatureb94982d
-
Update README.md (#6)
Verified signature- Update README.md (f8222717b1892bb3e548d4f07538c24e39c596f7) Co-authored-by: Lain <[email protected]>99ec976
-
Add license (#4)
Verified signature- Add license (ef49e65518c1273f50e879a504c622e3be01bd27) Co-authored-by: Lain <[email protected]>c9bfa66 -
Lowercase birefnet in model card metadata (#3)
Verified signature- Lowercase birefnet in model card metadata (5bd48e8cad20182433d3ce9da6dc085b963ce788) Co-authored-by: Lucain Pouget <[email protected]>3d2d132
-
Update the model for general use of which the training data includes portrat seg data.
bb4456a
-
Add pip installation in REAME.
Verified signature598e83d -
Capitalize the BiRefNet when used as the HF model name.
a7bfa64 -
Improve the README.
17f5dfc -
Update the journal in README.
Verified signature00c694e
-
Update README.md
Verified signaturec7d1588
-
Upgrade info display in README.
ba522be -
Upgrade info display in README.
acfe66c -
Upgrade info display in README.
d56e8d2 -
Upgrade info display in README.
98c4b95
-
Ensemble BiRefNet codes to HF to load model with weights in one line.
a7e29d3 -
Ensemble BiRefNet codes to HF to load model with weights in one line.
6f22264 -
Ensemble BiRefNet codes to HF to load model with weights in one line.
40a7dcf -
Remove redundant vis image of demos.
d933a2b -
Add acknowledgement section.
f9584bd -
Add guideline to use BiRefNet. Remove codes of model.
b305b72 -
Add guideline to use BiRefNet. Remove codes of model.
d6ffbb8 -
Move all BiRefNet github codes to the first level directory.
d2056e8 -
Move all BiRefNet github codes to the first level directory.
7e7e527 -
Move all BiRefNet github codes to the first level directory.
d0e8e56 -
Add some metadata (#1)
Verified signature- Add some metadata (601d8b2996809d8f6365b10b960094b5590384e5) Co-authored-by: Omar Sanseviero <[email protected]>8795865 -
Move all BiRefNet github codes to the first level directory.
ec88fc8 -
Move all BiRefNet github codes to the first level directory.
6a6592d -
Move all BiRefNet github codes to the first level directory.
108ae46 -
Move all BiRefNet github codes to the first level directory.
af31851 -
Move all BiRefNet github codes to the first level directory.
79a6660