data-preparation
Prepares and validates BDD100K-style YOLOP data roots, detection JSONs, drivable-area masks, lane-line masks, and label-generation workflows.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- data-preparation
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Prepares and validates BDD100K-style YOLOP data roots, detection JSONs, drivable-area masks, lane-line masks, and label-generation workflows.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/data-layout.md4.2 KB
- 参考文档references/troubleshooting.md2.3 KB
- 脚本scripts/check_data_layout.py5.1 KB
- 脚本scripts/generate_drivable_masks.py5.2 KB
03 SKILL.md 正文
YOLOP Data Preparation
Use this sub-skill when the task asks how to prepare BDD100K data for YOLOP, set DATASET.*ROOT config fields, diagnose missing masks/JSONs/images, generate drivable-area segmentation masks, or understand the detection label conversion used by BddDataset.
Do not use this sub-skill for model hyperparameters, checkpoint loading, ONNX export, or demo inference except where those tasks depend on data roots; route those to training, export, or inference.
Read first
- references/data-layout.md explains the expected BDD100K directory layout, how
BddDatasetmaps mask paths to image/label/lane paths, and how detection categories are converted. - references/troubleshooting.md covers empty datasets, missing path pairs, malformed JSONs, mask rendering failures, and common config mistakes.
- Run scripts/check_data_layout.py before training/evaluation to check that roots and split directories line up.
- Run scripts/generate_drivable_masks.py when you need a safer, argument-driven version of the repo's drivable-area mask generator.
Minimal workflow
- Acquire the BDD100K images and the YOLOP-compatible detection, drivable-area, and lane-line annotations from the source project instructions or an already prepared mirror.
- Put the roots into one of these forms:
- README combined layout:
images/{train,val},det_annotations/{train,val},da_seg_annotations/{train,val},ll_seg_annotations/{train,val}under one dataset root. - Source config layout: independent roots where each root contains
train/andval/subdirectories.
- README combined layout:
- If drivable masks are not already PNG files, generate them from BDD polygon JSONs with the bundled generator.
- Validate the roots and filename correspondence.
- Update
cfg.DATASET.DATAROOT,LABELROOT,MASKROOT, andLANEROOTbefore running training or evaluation.
Safe helpers
# Combined README-style root
python sub-skills/data-preparation/scripts/check_data_layout.py \
--dataset-root /path/to/yolop-dataset --splits train val --max-samples 20
# Explicit roots matching lib/config/default.py fields
python sub-skills/data-preparation/scripts/check_data_layout.py \
--images-root /path/to/images/100k \
--det-root /path/to/det_annotations \
--da-root /path/to/da_seg_annotations \
--lane-root /path/to/ll_seg_annotations
# Generate drivable-area masks for one split from BDD label JSONs
python sub-skills/data-preparation/scripts/generate_drivable_masks.py \
--labels-dir /path/to/bdd100k/labels/100k/train \
--output-dir /path/to/bdd_seg_gt/train
These helpers do not import YOLOP source code. They validate/generate files from paths you pass explicitly and are safe to run outside the original repo checkout.
Key ownership boundary
This sub-skill owns data layout and label generation. Once the layout is valid, use ../training/SKILL.md for tools/train.py and tools/test.py config choices, metrics, and checkpoint behavior.
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).