视觉画布设计
canvas-design
基于设计原则创作静态视觉作品,用于海报与品牌图形。
mobile-inference【文档与办公】Operate the documented MobileSAMv2 object-aware image inference route with explicit local weights, encoder selection, CUDA checks, and rendered output paths.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this route only for the separately documented MobileSAMv2 inference path: a local image directory is read, an object-aware detector supplies box prompts, and a prompt-guided SAM decoder renders masks. This is not the adapter-training CLI. Route training variants to training, and route image/dataset layout questions to data preparation.
Run the bundled, preflight-only wrapper with explicit local paths:
python scripts/run_mobile_samv2.py \
--ObjectAwareModel_path /abs/path/ObjectAwareModel.pt \
--Prompt_guided_Mask_Decoder_path /abs/path/Prompt_guided_Mask_Decoder.pt \
--encoder_path /abs/path/mobile_sam.pt \
--encoder_type tiny_vit \
--img_path /abs/path/images \
--output_dir /abs/path/rendered \
--preflight
--dry-run is an alias. Omitting both flags is also safe: this helper always
performs preflight and never imports PyTorch, the detector, or MobileSAMv2
model code. It never downloads, creates output files, or performs inference.
A passing result proves only the local path and static CLI contract; it is not a
model or CUDA smoke test.
models.MobileSAMv2.mobilesamv2 and provide the detector
dependency/import layout described in dependencies and weights.
The optional prompt-guided detector module was not executed in verification..cuda() unconditionally. CPU execution is therefore not supported;
CPU parsing/import is diagnostic only.tiny_vit, sam_vit_h, and
efficientvit_l2. The helper reports the other three as parser-accepted but
operationally unsupported instead of allowing a later KeyError.create_model() disagree: the parsed
paths are not consistently used, and some weights are hard-coded relative to
the process directory. The wrapper intentionally removes that ambiguity by
requiring explicit paths.source=None; the detector can
choose a demo URL in that case. The wrapper accepts only local paths and has
no network client.The verified checks for this route are --help, deterministic parser behavior,
local path/extension/weight/image/output validation, and no-network behavior.
Full training, evaluation, detector/model imports, real checkpoints, rendered
inference, notebook execution, and external downloads are not final checks and
remain unrun because they have artifact, optional-dependency, CUDA, and output
side effects. For shared failures, use the root troubleshooting guide.
See CLI reference, dependencies and weights, workflows, and troubleshooting.