bi-ref-net
Route BiRefNet image segmentation, matting, inference, configuration, training, evaluation, and model-export workflows.
Skill by VectorSpaceLab
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/vectorspacelab-bi-ref-net
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: ml
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/bi-ref-net
What's inside
- Skill name
bi-ref-net- Description
- Route BiRefNet image segmentation, matting, inference, configuration, training, evaluation, and model-export workflows.
- License
- MIT
- Metadata
- disco-role: operating
- Instructions
- 73 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (30)
- SKILL.md
- environment-and-install.md · references/
- repo-provenance.md · references/
- repo-routing-metadata.json · references/
- troubleshooting.md · references/
- check_birefnet_environment.py · scripts/
- SKILL.md · sub-skills/configuration-and-data/
- configuration.md · sub-skills/configuration-and-data/references/
- data-formats.md · sub-skills/configuration-and-data/references/
- troubleshooting.md · sub-skills/configuration-and-data/references/
- birefnet_config_summary.py · sub-skills/configuration-and-data/scripts/
- birefnet_dataset_check.py · sub-skills/configuration-and-data/scripts/
- SKILL.md · sub-skills/inference-and-postprocessing/
- inference-workflows.md · sub-skills/inference-and-postprocessing/references/
- troubleshooting.md · sub-skills/inference-and-postprocessing/references/
- video-workflows.md · sub-skills/inference-and-postprocessing/references/
- birefnet_image_infer.py · sub-skills/inference-and-postprocessing/scripts/
- birefnet_refine_smoke.py · sub-skills/inference-and-postprocessing/scripts/
- SKILL.md · sub-skills/model-architecture/
- api-reference.md · sub-skills/model-architecture/references/
- backbones-and-architecture.md · sub-skills/model-architecture/references/
- onnx-and-export-notes.md · sub-skills/model-architecture/references/
- troubleshooting.md · sub-skills/model-architecture/references/
- birefnet_model_probe.py · sub-skills/model-architecture/scripts/
- SKILL.md · sub-skills/training-and-evaluation/
- evaluation-workflows.md · sub-skills/training-and-evaluation/references/
- metrics-reference.md · sub-skills/training-and-evaluation/references/
- training-workflows.md · sub-skills/training-and-evaluation/references/
- troubleshooting.md · sub-skills/training-and-evaluation/references/
- birefnet_metric_smoke.py · sub-skills/training-and-evaluation/scripts/
SKILL.md (first lines)
# BiRefNet Repo Skill Use this skill when a task involves BiRefNet / BiRefNet-style high-resolution binary image segmentation, background removal, dichotomous image segmentation, camouflaged object detection, salient object detection, or trimap-free matting. BiRefNet is a source-code-first PyTorch repository plus Hugging Face model-family workflow. Prefer self-contained instructions and bundled helpers here instead of reopening the original repository notebooks or shell scripts. ## First checks 1. Read [references/repo-provenance.md](references/repo-provenance.md) when checking whether this skill matches a checkout or before refreshing it. 2. Read [references/environment-and-install.md](references/environment-and-install.md) before installing dependencies, choosing CPU/CUDA, or using the Hugging Face one-line model path. 3. Run [scripts/check_birefnet_environment.py](scripts/check_birefnet_environment.py) when you need a safe dependency/import/backend probe. 4. Use [references/troubleshooting.md](references/troubleshooting.md) for cross-cutting install, import, backend, data, and model-asset failures. Minimal source-code inspection check for a checkout: ```bash python scripts/check_birefnet_environment.py --repo-root /path/to/BiRefNet --check-source ``` Minimal dependency-only check: ```bash python scripts/check_birefnet_environment.py ``` ## Route map - Use [configuration-and-data](sub-skills/configuration-and-data/SKILL.md) when the task is about `Config`, tasks/testsets, dataset roots, `im`/`gt` layout, dynamic size, loss/backbone knobs, or preflight data validation. - Use [model-architecture](sub-skills/model-architecture/SKILL.md) when the task is about `BiRefNet`, backbones, decoder flags, checkpoint key cleanup, weight compatibility, Hugging Face loading choices, or ONNX/export planning. - Use [inference-and-postprocessing](sub-skills/inference-and-postprocessing/SKILL.md) when the task is about image/video inference, masks, foreground refinement, alpha/comparison outputs, device selection, or adapting the notebook inference flow. - Use [training-and-evaluation](sub-skills/training-and-evaluation/SKILL.md) when the task is about fine-tuning, `train.py`/launcher semantics, checkpoints/resume epochs, metrics, `eval_existingOnes.py`, or best-epoch selection. ## Common task routing | User asks for... | Go to | |---|---| | "How do I format custom data for BiRefNet?" | `configuration-and-data` | | "Which config fields change task, backbone, size, or losses?" | `configuration-and-data` plus `model-architecture` | | "Load a BiRefNet checkpoint or fix state-dict key mismatches" | `model-architecture` | | "Run background removal on images or save masks/foregrounds" | `inference-and-postprocessing` | | "Process videos with BiRefNet" | `inference-and-postprocessing` | | "Fine-tune from existing weights" | `training-and-evaluation` plus `configuration-and-data` | | "Evaluate predictions or choose the best epoch" | `training-and-evaluation` | | "Convert to ONNX or plan deployment" | `model-architecture` with inference constraints from `inference-and-postprocessing` | ## Verification-friendly helpers Use these bundled scripts before recommending expensive work: - `scripts/check_birefnet_environment.py --check-source --repo-root <checkout>` checks dependencies, source imports, torch backend visibility, state-dict prefix cleanup, and patch helpers. - `sub-skills/configuration-and-data/scripts/birefnet_dataset_check.py` checks custom dataset `im`/`gt` pairing without training. - `sub-skills/model-architecture/scripts/birefnet_model_probe.py` verifies checkpoint-prefix cleanup and can instantiate `BiRefNet(bb_pretrained=False)` when memory is acceptable. - `sub-skills/inference-and-postprocessing/scripts/birefnet_image_infer.py --dry-run` plans image mask outputs without loading model weights. - `sub-skills/training-and-evaluation/scripts/birefnet_metric_smoke.py` verifies metric dependencies with tiny masks. ## When not to use this skill Do not use this skill as the primary guide for SAM, YOLO, Detectron2, MMSegmentation, or another segmentation package unless the user is specifically comparing those tools to BiRefNet. Do not use it for generic PyTorch training advice that does not involve BiRefNet config, checkpoints, data layout, or metrics. Use a deployment-specific skill when the user asks primarily about TensorRT, GGUF, web APIs, or a third-party serving platform rather than BiRefNet itself. ## Dependency and backend stance - The repository documents Python 3.11 and `pip install -r requirements.txt` with PyTorch >= 2.5.0. - CPU is enough for import checks, config/data validation, metric smoke tests, patch-helper probes, and CPU foreground refinement. - Practical full-resolution inference, GPU refinement, DDP/Accelerate training, and ONNX GPU conversion are CUDA-sensitive. Do not claim they are locally verified unless you run an explicit backend check with model/data assets. - The README's `AutoModelForImageSegmentation.from_pretrained(..., trust_remote_code=True)` path requires `transformers`, which is not listed in the repository requirements file. ## Self-containment rules - Use bundled references/scripts instead of telling future agents to open source notebooks or shell scripts. - When a helper needs source modules, pass an explicit `--repo-root` for the user's current BiRefNet checkout or use a Hugging Face model path; never depend on the checkout that produced this skill. - Do not run long training, model/data downloads, Slurm jobs, cleanup scripts, or ONNX conversion unless the user explicitly provides assets, hardware, and approval.
From VectorSpaceLab/AREX-Skill, MIT.
More from VectorSpaceLab/AREX-Skill
- 0.563score
data-designer-repo-skill
VectorSpaceLab
Use when you need to design DataDesigner configs, run preview/create/validate workflows, inspect the CLI or agent context, work with plugins or MCP tools, or…
SkillBFreshness: B★ 341Claude Code +9 - 0.563score
everos
VectorSpaceLab
Use this skill for EverOS local-first Markdown memory service setup, HTTP memory and knowledge APIs, cascade/OME operations, and observability integration.
SkillBFreshness: B★ 341Claude Code +9 - 0.563score
bentoml
VectorSpaceLab
Use BentoML to author model-serving Services, build and containerize Bentos, run HTTP/gRPC servers and clients, manage models, operate the CLI and BentoCloud…
SkillBFreshness: B★ 341Claude Code +9 - 0.563score
dash
VectorSpaceLab
Use when building, debugging, testing, or maintaining Plotly Dash applications, callbacks, server backends, component packages, renderer internals, and Dash…
SkillBFreshness: B★ 341Claude Code +9 - 0.563score
diffusers
VectorSpaceLab
Use this skill for Hugging Face Diffusers tasks: pipeline inference, schedulers, adapters/loaders, training recipes, modular pipelines, conversion helpers…
SkillBFreshness: B★ 341Claude Code +9 - 0.563score
espnet
VectorSpaceLab
Use when working with ESPnet speech AI toolkit: installation, ESPnet2 recipes and training, pretrained inference/model zoo, ESPnet3 stage workflows, and…
SkillBFreshness: B★ 341Claude Code +9 - 0.563score
alphafold3
VectorSpaceLab
Use this skill for AlphaFold 3 input preparation, prediction command planning, output interpretation, and Python API inspection.
SkillBFreshness: B★ 341Claude Code +9 - 0.563score
autogen
VectorSpaceLab
Use this skill for maintaining, migrating, debugging, and safely operating Microsoft AutoGen Python 0.7.x applications, including AgentChat, Core runtimes…
SkillBFreshness: B★ 341Claude Code +9 - 0.563score
browser-use
VectorSpaceLab
Use this self-contained Browser Use repo skill for Python agents that automate websites, browser sessions, custom tools, LLM/provider setup, persistent CLI…
SkillBFreshness: B★ 341Claude Code +9 - 0.563score
dagster
VectorSpaceLab
Use when working with Dagster OSS: assets, jobs, Definitions, config/resources, schedules/sensors, automation, CLI/local development, deployment operations…
SkillBFreshness: B★ 341Claude Code +9 - 0.563score
datasets
VectorSpaceLab
Use this skill when working with Hugging Face Datasets: loading local or Hub datasets, defining Features schemas, processing/streaming datasets, converting…
SkillBFreshness: B★ 341Claude Code +9 - 0.563score
geopandas
VectorSpaceLab
Use when working with GeoPandas GeoDataFrame and GeoSeries workflows, vector geospatial I/O, CRS-aware spatial operations, mapping, geocoding, and…
SkillBFreshness: B★ 341Claude Code +9
Signals
- Stars
- 341
- Forks
- 26
- Open issues
- 0
- Last commit (this folder)
- Aug 26, 2026 (2 months ago)
- Last release
- Sep 2, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/VectorSpaceLab/AREX-Skill
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from VectorSpaceLab
- 0.563score
bentoml
VectorSpaceLab
Use BentoML to author model-serving Services, build and containerize Bentos, run HTTP/gRPC servers and clients, manage models, operate the CLI and BentoCloud…
SkillBFreshness: B★ 341Claude Code +9 - 0.563score
dagster
VectorSpaceLab
Use when working with Dagster OSS: assets, jobs, Definitions, config/resources, schedules/sensors, automation, CLI/local development, deployment operations…
SkillBFreshness: B★ 341Claude Code +9 - 0.563score
alphafold3
VectorSpaceLab
Use this skill for AlphaFold 3 input preparation, prediction command planning, output interpretation, and Python API inspection.
SkillBFreshness: B★ 341Claude Code +9 - 0.563score
autogen
VectorSpaceLab
Use this skill for maintaining, migrating, debugging, and safely operating Microsoft AutoGen Python 0.7.x applications, including AgentChat, Core runtimes…
SkillBFreshness: B★ 341Claude Code +9 - 0.563score
browser-use
VectorSpaceLab
Use this self-contained Browser Use repo skill for Python agents that automate websites, browser sessions, custom tools, LLM/provider setup, persistent CLI…
SkillBFreshness: B★ 341Claude Code +9 - 0.563score
dash
VectorSpaceLab
Use when building, debugging, testing, or maintaining Plotly Dash applications, callbacks, server backends, component packages, renderer internals, and Dash…
SkillBFreshness: B★ 341Claude Code +9
Cite this page
bi-ref-net skill. Agent Mart. https://agentmart.dev/skills/vectorspacelab-bi-ref-net (last updated 2026-10-24)