算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
inference【设计与创意】Run MMSegmentation semantic segmentation and depth inference from configs, checkpoints, or model aliases, with safe visualization, saved masks, device selection, and remote-sensing prerequisites.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when an agent needs to run MMSegmentation inference on images, image batches, videos, or tiled remote-sensing rasters from an existing model. It covers the high-level MMSegInferencer path, the lower-level init_model / inference_model / show_result_pyplot path, and the remote-sensing RSImage / RSInferencer concepts.
MMSegInferencer when the user gives a model alias, a config path plus optional weights, wants one-call outputs, or needs saved visualization and predicted masks under an output directory.init_model + inference_model when the user needs direct access to SegDataSample, custom Python control flow, video-frame loops, or explicit show_result_pyplot rendering.RSImage + RSInferencer only for geospatial/tiled remote-sensing images after confirming GDAL/osgeo is installed and the model config/checkpoint are local.../data-configuration/SKILL.md; for training or evaluation launch, route to ../training-evaluation/SKILL.md; for custom model code, route to ../model-customization/SKILL.md.Run these without model downloads or checkpoint loading:
python sub-skills/inference/scripts/mmseg_inference_smoke.py --help
python sub-skills/inference/scripts/mmseg_inference_smoke.py
python sub-skills/inference/scripts/mmseg_inferencer_smoke.py --help
python sub-skills/inference/scripts/mmseg_inferencer_smoke.py
Use local files for deterministic behavior:
python sub-skills/inference/scripts/mmseg_inference_smoke.py \
--config PATH/TO/MMSEG_CONFIG.py \
--checkpoint PATH/TO/CHECKPOINT.pth \
--image PATH/TO/IMAGE.png \
--device cpu \
--out-file outputs/demo_overlay.png
The script sets show=False whenever --out-file is provided, so it is safe for headless sessions.
Use a local config and local weights unless the user explicitly allows model-alias downloads:
python sub-skills/inference/scripts/mmseg_inferencer_smoke.py \
--model PATH/TO/MMSEG_CONFIG.py \
--weights PATH/TO/CHECKPOINT.pth \
--image PATH/TO/IMAGE.png \
--device cpu \
--out-dir outputs/inferencer
out_dir saves color overlays under vis/ and predicted label-index masks under pred/.
references/api-reference.md documents callable signatures, return objects, labels/palettes, devices, and saved-output behavior.references/workflows.md gives image, batch, video, headless, and remote-sensing workflows.references/deployment.md summarizes when to switch from PyTorch inference to MMDeploy/runtime inference.references/troubleshooting.md covers missing checkpoints, downloads, headless display, CPU/CUDA, GDAL, MMCV, and dependency compatibility.