Run this model with HF Jobs
Run linxy97/CustomCodeForRMBG 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/linxy97/CustomCodeForRMBG. 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/linxy97/CustomCodeForRMBG 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 linxy97/CustomCodeForRMBG with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use linxy97/CustomCodeForRMBG with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="linxy97/CustomCodeForRMBG", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForImageSegmentation model = AutoModelForImageSegmentation.from_pretrained("linxy97/CustomCodeForRMBG", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download MyConfig.py from linxy97/CustomCodeForRMBG: direct link, hf CLI and curl.
- Browser
- Download file 327 Bytes
-
https://huggingface.co/linxy97/CustomCodeForRMBG/resolve/main/MyConfig.py
- Command line
-
hf download hf://linxy97/CustomCodeForRMBG/MyConfig.py
-
curl -L -o MyConfig.py https://huggingface.co/linxy97/CustomCodeForRMBG/resolve/main/MyConfig.py
327 Bytes
| from transformers import PretrainedConfig | |
| from typing import List | |
| class RMBGConfig(PretrainedConfig): | |
| model_type = "SegformerForSemanticSegmentation" | |
| def __init__( | |
| self, | |
| in_ch=3, | |
| out_ch=1, | |
| **kwargs): | |
| self.in_ch = in_ch | |
| self.out_ch = out_ch | |
| super().__init__(**kwargs) | |