stitching
Routes panorama stitching, the `stitch` CLI, `Stitcher` and `AffineStitcher` API usage, verbose diagnostics, feature-mask troubleshooting, and headless installation decisions for the stitching package.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- stitching
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Routes panorama stitching, the `stitch` CLI, `Stitcher` and `AffineStitcher` API usage, verbose diagnostics, feature-mask troubleshooting, and headless installation decisions for the stitching package.
- disable-model-invocation
- true
02 资源文件 6
- 参考文档references/installation.md2.0 KB
- 参考文档references/repo-provenance.md1.4 KB
- 参考文档references/repo-routing-metadata.json326 B
- 参考文档references/troubleshooting.md4.1 KB
- 脚本scripts/check_install.py3.9 KB
- 脚本scripts/download_sample_images.py4.4 KB
03 SKILL.md 正文
stitching
Use this repo skill for image panorama stitching tasks with the Python package
stitching. It is the top-level router for the package CLI, the Python API,
and failure analysis around verbose outputs and sample-image workflows.
Start here
- If you want a shell command, go to CLI usage.
- If you want
StitcherorAffineStitcherfrom Python, go to Python API. - If you are diagnosing failed stitches, missing images, or poor matches, go to diagnostics.
- If you are checking whether this skill matches the current checkout, read repository provenance.
Install
The public package name is stitching.
python -m pip install stitching
For headless server or Docker environments, use the headless build when the OpenCV GUI stack is not available:
python -m pip install stitching-headless
The runtime package depends on OpenCV and largestinteriorrectangle. The
repository's native test suite also uses requests to download public sample
images when they are not already present.
Minimal verification
After installing the package in a clean Python environment, run:
python -c "import stitching; print(stitching.__version__)"
stitch --help
If you need a stronger smoke check, use the bundled helper:
python scripts/check_install.py --help
python scripts/check_install.py
What this skill covers
- Panorama stitching from filenames, glob patterns, or loaded NumPy arrays.
stitchCLI flags for affine mode, masks, verbose output, crop control, match tuning, and output selection.StitcherandAffineStitcherconstructors and their verified defaults.- Verbose output, matches graphs, feature masks, timelapse output, and crop troubleshooting.
- Safe sample-image download guidance for users who want to reproduce the repository's public examples.
What this skill does not do
- It does not depend on the original repository checkout at runtime.
- It does not claim CUDA support as a required capability. The
--try_use_gpuoption is optional and only works with a CUDA-enabled OpenCV build. - It does not bundle the original repository's native tests or generated output.
Bundled references and scripts
Read these when you need deeper detail than the router provides:
- Installation notes for package names, headless builds, and verification commands.
- Troubleshooting for import, OpenCV, image, crop, and GUI failures.
- Package provenance to check whether this skill matches the current repository snapshot.
- Routing metadata for managed router placement during import in supported workflows.
- CLI reference for flags and options.
- Python API reference for signatures and verified defaults.
- Diagnostics workflow guide for verbose outputs, match graphs, and recovery paths.
- Install check helper to verify the installed package from a clean environment.
- Sample image downloader when you want the public fixture set used by the repository's native tests.
Quick route map
| User intent | Read next |
|---|---|
| "stitch these images from the shell" | sub-skills/cli/SKILL.md |
| "use Stitcher in Python" | sub-skills/python-api/SKILL.md |
| "why did stitching fail" | sub-skills/diagnostics/SKILL.md |
| "I need the CLI flags" | sub-skills/cli/references/cli-reference.md |
| "what defaults does the API use" | sub-skills/python-api/references/api-reference.md |
| "I need the sample images" | scripts/download_sample_images.py |
Common runtime reminders
- Use the
stitchentry point for end users; it is the public CLI. - Use
AffineStitcherwhen the input is scans or specialized-device imagery. - Use feature masks only when the mask shape matches the image shape.
- Use
stitch --no-croporCropper(False)when the cropper cannot find a valid interior rectangle. - Treat verbose output and matches graphs as diagnostics, not as required runtime data files.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).