界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
设计与创意 · SKILL.md

inference

inference

【设计与创意】Guides YOLOP PyTorch demo inference, checkpoint loading, image/video source handling, detection/segmentation postprocessing, and visualization troubleshooting.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: inference description: "Guides YOLOP PyTorch demo inference, checkpoint loading, image/video source handling, detection/segmentation postprocessing, and visualization troubleshooting." disable-model-invocation: true metadata: disco-role: operating license: MIT

YOLOP Inference

Use this sub-skill when the task asks to run YOLOP on images, folders, videos, or streams; load the pretrained End-to-end.pth checkpoint; use hubconf.py; interpret combined detection/drivable/lane outputs; or debug tools/demo.py behavior.

Do not use this sub-skill for full training/evaluation metrics (use training), BDD100K layout generation (use data-preparation), or ONNXRuntime/TensorRT workflows (use export).

Read first

Quick route

# Source repo command from a YOLOP checkout root
PYTHONPATH=. python tools/demo.py --source inference/images --weights weights/End-to-end.pth --device cpu

# Bundled helper with explicit paths and no checkout-root assumption
python sub-skills/inference/scripts/run_demo_inference.py \
  --repo-root /path/to/YOLOP \
  --weights /path/to/YOLOP/weights/End-to-end.pth \
  --source /path/to/YOLOP/test.jpg \
  --save-dir /tmp/yolop-demo-output \
  --device cpu

Use CPU for correctness/debug smokes. Use CUDA only after installing a matching CUDA torch/torchvision pair and verifying device availability.

Output contract

For every image frame, YOLOP produces:

  • Detection boxes after YOLO-style NMS (xyxy, confidence, class id).
  • Drivable-area segmentation mask, blended green by the demo visualization.
  • Lane-line segmentation mask, blended red/blue depending on visualization helper conversion.
  • A merged visualization image or video written to the save directory.

Cross-links

  • To validate model architecture before loading weights, use the root scripts/check_install.py.
  • To export or validate ONNX models, use ../export/SKILL.md.
  • To configure evaluation metrics instead of demo visualization, use ../training/SKILL.md.
我的收藏