ssd-pytorch
Operate the amdegroot SSD.PyTorch repository for SSD300 model construction, VOC/COCO training, evaluation, and demos.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- ssd-pytorch
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Operate the amdegroot SSD.PyTorch repository for SSD300 model construction, VOC/COCO training, evaluation, and demos.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/installation-and-compatibility.md3.9 KB
- 参考文档references/repo-provenance.md1.6 KB
- 参考文档references/repo-routing-metadata.json496 B
- 参考文档references/troubleshooting.md2.8 KB
- 脚本scripts/smoke_imports.py4.2 KB
03 SKILL.md 正文
ssd-pytorch
Use this repo skill when a task names ssd.pytorch, SSD.PyTorch, amdegroot/ssd.pytorch, or asks for the legacy PyTorch SSD300 object detector implementation, its VOC/COCO training pipeline, evaluation scripts, or demos.
What this skill covers
- SSD300 model construction with
build_ssd(phase, size=300, num_classes=21). - Prior boxes, VGG/extras/multibox heads, detection decode, and NMS behavior.
- VOC and COCO dataset layout, annotation transforms, SSD augmentations, and
detection_collate. - Training command planning for
train.py, including base VGG weights, checkpoints, CUDA, and Visdom. - VOC evaluation/test-output command planning with
eval.pyandtest.py. - Notebook and webcam demo prerequisites.
- Legacy-runtime troubleshooting for modern Python, modern PyTorch, import-time COCO label-map behavior, and optional dependencies.
Start here
- Read references/installation-and-compatibility.md before running code. This repository has no package metadata and has known legacy compatibility traps.
- Check references/repo-provenance.md when freshness matters; it records the source commit, branch, and evidence paths used to build this skill.
- Use scripts/smoke_imports.py for a no-download import/model smoke check in the user's current environment.
- Route to the focused sub-skill:
- sub-skills/model-inference/SKILL.md for model construction, priors, box utilities, weights, and inference-layer compatibility.
- sub-skills/data-training/SKILL.md for VOC/COCO layouts, augmentation, dataloaders, and training command planning.
- sub-skills/evaluation-demos/SKILL.md for VOC mAP/test-output planning, notebook demos, and webcam prerequisites.
- If the symptom spans setup, model, data, and scripts, first read references/troubleshooting.md, then follow its route.
Minimal operating context
SSD.PyTorch is a source-layout project, not a modern installable Python package. Future agents usually need one of these contexts:
- a checkout or copied source tree on
PYTHONPATH, or - an environment where modules such as
ssd,data,layers, andutilsare importable.
Core dependencies for selected workflows are PyTorch, TorchVision, NumPy, OpenCV (cv2), and Pillow for test.py image imports. Optional dependencies include pycocotools for COCO, visdom for training plots, imutils for the webcam demo, and Jupyter/IPython for notebook use.
High-priority caveats
- Importing the package-level
datamodule can fail if the default COCO label map is absent, becauseCOCOAnnotationTransform()is evaluated during module import. See references/troubleshooting.md. build_ssd('test')may construct under modern PyTorch but fail on forward becauseDetectis an old-styletorch.autograd.Function. Use sub-skills/model-inference before promising end-to-end inference or evaluation.- Full training, full VOC mAP evaluation, dataset downloads, weight downloads, webcam loops, and notebook demos are not safe smoke tests. Plan and validate prerequisites before running them.
- The repository is SSD300-focused.
size=512config tables are empty in source and should not be treated as implemented.
Typical routes
| User task | Route |
|---|---|
| "Build SSD300 for VOC and inspect output shapes" | model-inference, then scripts/inspect_model_shapes.py |
"Why does build_ssd('test') fail on PyTorch 2?" |
model-inference/references/troubleshooting.md |
| "Prepare VOC0712 for training" | data-training, then scripts/validate_dataset_layout.py --dataset voc |
| "Create a COCO training command" | data-training/references/training-workflow.md, then scripts/plan_training_command.py --dataset COCO |
| "Run or plan VOC mAP evaluation" | evaluation-demos/references/evaluation-and-test.md, then scripts/plan_evaluation_command.py --mode eval |
| "Check webcam demo dependencies" | evaluation-demos, then scripts/check_demo_requirements.py |
Verification stance
This skill is based on source, README, live import inspection, and safe smoke checks. It intentionally does not claim reproduced README mAP, full training completion, dataset download success, webcam access, or notebook execution. Those require external data, weights, hardware, and runtime choices in a Researcher session.
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).