Run this model with HF Jobs
Run nobg/BiRefNet-Finetuned 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/nobg/BiRefNet-Finetuned. 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/nobg/BiRefNet-Finetuned 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 nobg/BiRefNet-Finetuned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- nobg
How to use nobg/BiRefNet-Finetuned with nobg:
pip install nobg
# Option 1: use via the predict method from nobg import AutoModel, AutoProcessor model = AutoModel.from_pretrained("nobg/BiRefNet-Finetuned").eval() processor = AutoProcessor.from_pretrained("nobg/BiRefNet-Finetuned") cutout = model.predict(processor, "image.jpg")# Option 2: use the model and processor directly import torch from loadimg import load_img from nobg import AutoModel, AutoProcessor model = AutoModel.from_pretrained("nobg/BiRefNet-Finetuned").eval() processor = AutoProcessor.from_pretrained("nobg/BiRefNet-Finetuned") image = load_img("image.jpg").convert("RGB") inputs = processor(image, return_tensors="pt") with torch.no_grad(): outputs = model(pixel_values=inputs["pixel_values"]) alpha = processor.post_process_alpha_matting(outputs, target_sizes=[(image.height, image.width)])[0] processor.cutout(image, alpha).save("output.png") - BiRefNet
How to use nobg/BiRefNet-Finetuned with BiRefNet:
# Option 1: use with transformers from transformers import AutoModelForImageSegmentation birefnet = AutoModelForImageSegmentation.from_pretrained("nobg/BiRefNet-Finetuned", 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("nobg/BiRefNet-Finetuned") - Notebooks
- Google Colab
- Kaggle
Push model using huggingface_hub.
Browse files123version https://git-lfs.github.com/spec/v1oid sha256:bb40cc268deb438d1f1a9d426beba2c36b1460a2881e7755d34e75bebdc3dc1esize 884878824123version https://git-lfs.github.com/spec/v1oid sha256:f4fd0c3815cea82af6239e0bfd419830259227c777e8cbdf08a0ad6d14653256size 884878824
model.safetensors+1-1