Conversation
Signed-off-by: wyh88 <2469410854@qq.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
Signed-off-by: wyh88 <2469410854@qq.com>
Signed-off-by: wyh88 <2469410854@qq.com>
Collaborator
|
Hey @wyh88 thanks for the contribution. The PR looks good and I'm triggering the internal CI for you! Let's see how it goes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Add YOLOX-s object detection using the official Megvii checkpoint. This follows the family layout and native detection interface used by YOLOv8 (#1258) and YOLO11 (#1265).
Exit Criteria
Scope is the published 80-class models, batch one. Nano and tiny use 416 x 416; the other models use 640 x 640.
Implementation
Adds
families/yolox/with checkpoint loading, TensorRT graphs, native preprocessing and class-aware NMS. Nano uses depthwise separable convolutions. Darknet53 uses its own backbone, FPN and LeakyReLU. A model directory contains one official checkpoint.The graph decodes boxes at strides 8, 16 and 32, multiplying objectness by class probability. Runtime preprocessing follows YOLOX's BGR byte input and top-left letterbox padding. Runtime shape checks account for both supported input sizes.
FP16 builds keep the stem, neck, head, SiLU arithmetic and depthwise/pointwise pairs with their CSP residual paths in FP32. Keeping those pairs in FP32 prevents accumulated score error in nano. Test tolerances are unchanged.
Each model has one FP16 manifest. Release-performance profiles are explicitly excluded until benchmark workloads and measurements are available. The public build/detection API and bundle schema are unchanged. PyTorch reads state dictionaries with
weights_only=True; the other family requirements support the official reference tests.Change categories
Validation
Commands and Results
All seven FP16 engines were built and tested against the official reference. Both image geometries passed raw-output and final-detection checks. The current native runtime was then replayed for all 14 model/image combinations:
Errors above are maxima across the two inputs after NMS; boxes are in original image pixels. Native and reference detection counts and classes matched in every comparison.
Local checks:
python -m tools.model_ci validate: passed.python -m tools.community_ci source-quality --base 474c50e7: passed, 166 tests.python -m pytest apps/benchmark/trtmc_benchmark/tests/test_perf_matrix.py -q -p no:cacheprovider: 43 passed.website/,SITE_URL=https://nvidia.github.io BASE_URL=/TensorRT-Model-Connect/ npm run build: passed, including 34 SVG checks; dependencies installed withnpm cifrom the lockfile.Hardware, Environment, and Revisions
8500bae2in this PR branch.0.1.1rc0; the unmodified reference revision is pinned infamilies/yolox/tests/reference-source.json.Not Run / Remaining Gaps
Contributor Self-Review
Pending before marking the draft ready.
Notes For Future Readers
Start with
model.py, then the native runtime andtests/test_e2e.py. The model topology and checkpoints come from Megvii's official YOLOX repository. The seven manifests drive the generated model-support documentation.Risk level
This adds a model family with two backbone architectures and mixed precision. Current GPU validation covers one device and two image geometries.