Skip to content
Back to skills

Inference

ASecurity

"Guides YOLOP PyTorch demo inference, checkpoint loading,

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 9, 2026
toolspythonbash

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill inference --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Inference?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Inference
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-inference-cc04c589/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-inference-cc04c589)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

- [references/workflows.md](references/workflows.md) explains the source demo command, inputs, outputs, preprocessing, NMS, mask overlays, and safe bundled helper.
- [references/model-loading.md](references/model-loading.md) covers `get_net(cfg)`, checkpoint dictionaries, `hubconf.yolop`, and CPU/CUDA device choices.
- [references/troubleshooting.md](references/troubleshooting.md) covers missing weights, unsupported sources, OpenCV/video/camera issues, device errors, and empty detections.
- Run [scripts/run_demo_inference.py](scripts/run_demo_inference.py) for a safer image/folder/video helper with explicit `--repo-root`, `--weights`, `--source`, and `--save-dir`.

## Quick route

```bash
# 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](../export/SKILL.md).
- To configure evaluation metrics instead of demo visualization, use [../training/SKILL.md](../training/SKILL.md).

Files in this skill

  • SKILL.md2.7 KB
  • references/model-loading.md2.1 KB
  • references/troubleshooting.md2.4 KB
  • references/workflows.md3 KB
  • scripts/run_demo_inference.py7.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.