Background matting v2

From VectorSpaceLab/AREX-Skill · View interactive version

Background matting v2 is an AI agent skill from the GitHub repository VectorSpaceLab/AREX-Skill. Routes BackgroundMattingV2 tasks for background matting inference, export, and training workflows.

How to use this skill

Skill file

BackgroundMattingV2

BackgroundMattingV2 is a computer-vision repo for high-resolution background

matting with a source-image / background-image pair. Use this root skill as a

router, not as a full manual.

Start here

still matches the repository checkout.

forward smoke.

points between inference, export, and training.

foreground/alpha/background directories.

TorchScript, or ONNX paths.

backend issues.

Install and inspect

This repo is source-tree based rather than a packaged wheel. For inspection,

create an isolated Python environment, install the runtime stack used by the

repo workflows, and then import the source modules from a checkout of this repo.

The verified inspection stack used for this skill was Python 3.11 with:

A quick smoke is:

python scripts/check_env.py --repo-root <repo-checkout> --device cuda

Use --device cpu when you only need importability and tiny forward coverage. Add onnx when you want the ONNX smoke helper to validate export support.

Route map

Inference and demo

Use sub-skills/inference-and-demo/ when the task is about:

Read sub-skills/inference-and-demo/SKILL.md for the trigger terms and linked

workflow helpers.

Export and backend compatibility

Use sub-skills/export-and-backends/ when the task is about:

Read sub-skills/export-and-backends/SKILL.md when you need conversion steps or

backend troubleshooting.

Training and data setup

Use sub-skills/training/ when the task is about:

Read sub-skills/training/SKILL.md before configuring data paths or starting a

training run.

Public surface summary

The public source-root modules you are expected to know are model, dataset,

inference_utils, and data_path. The primary classes are MattingBase and

MattingRefine. The main inference CLIs work with source/background image or

video pairs and can optionally apply homographic alignment.

What not to do

bundled reference or script exists here.

hardware, data, and display devices.

Local entry points

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.