Skip to content

Improve MoT boundary handling and analysis tooling - #137

Draft
NOONELIKEYOU8 wants to merge 1 commit into
Tencent:mainfrom
NOONELIKEYOU8:agent/issue54-mot-analysis
Draft

Improve MoT boundary handling and analysis tooling#137
NOONELIKEYOU8 wants to merge 1 commit into
Tencent:mainfrom
NOONELIKEYOU8:agent/issue54-mot-analysis

Conversation

@NOONELIKEYOU8

Copy link
Copy Markdown

Summary

This PR delivers the reviewable code portion of Tencent/YOLO-Master Issue #54:

  • fix C2fMoA/C2fMoT model parsing so repeat counts are inserted correctly instead of shifting MoT YAML arguments;
  • preserve and validate the explicit shifted-window offset in _WindowTransformerExpert;
  • extend real-image MoT routing analysis with detector-style letterboxing, dataset-derived scene groups, per-layer heatmaps, image-level aggregation, bootstrap confidence intervals, permutation tests, Hedges' g, and BH-FDR correction;
  • add trained-checkpoint benchmarking that retains raw P50/P95/P99 latency samples, profiles actually executed routed FLOPs, and reports parameter/module counts and runtime metadata.

Why

Issue #54 asks for reproducible MoT/MoA/EsMoE ablation, real latency/FLOPs measurement, expert-routing explainability, and explicit boundary coverage. During validation, two correctness defects were confirmed:

  1. C2fMoA and C2fMoT were absent from repeat_modules, so model YAML repeat counts could shift positional arguments (for example, interpreting window_size=7 as top_k=7).
  2. _WindowTransformerExpert replaced every nonzero explicit shift with window_size // 2, silently ignoring the caller's requested value.

The routing script also resized images by distortion and could treat multiple layer rows from one image as independent samples. The updated analysis preserves aspect ratio and uses the image as the statistical unit.

Experimental outcome

The complete VisDrone experiment used seed 42, 640 px, batch 16, FP32, and 300 epochs for EsMoE, MoT, MoA, and MoA+MoT. EsMoE was the strongest measured model at 0.19937 mAP50-95 and 16.92 ms P50. Neither the heavy mixture nor the preregistered lightweight candidates met the Issue #54 synergy threshold.

Because no hybrid candidate produced stable meaningful gain, this PR intentionally does not add the experimental YAMLs as recommended configurations. The full negative result, routing contrasts, and deployment recommendations are published separately in the linked GitHub Discussion.

Validation

  • clean-worktree focused suite: 22 passed;
  • Ruff on all changed scripts and tests: passed;
  • explicit coverage includes oversized windows, odd shifted spatial sizes, caller-provided shift validation, and eval-time disabling of exploration_eps;
  • formal evidence: four contiguous finite 300-epoch runs, 24/24 milestone audits, seven 548-image latency benchmarks, and five all-image/all-layer MoT routing matrices.

Related to #54.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant