Skip to content

Adding YOLOX native support#226

Merged
klemen1999 merged 5 commits into
mainfrom
feat/yolox
Jul 24, 2026
Merged

Adding YOLOX native support#226
klemen1999 merged 5 commits into
mainfrom
feat/yolox

Conversation

@klemen1999

@klemen1999 klemen1999 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Purpose

  • Add pinned upstream YOLOX submodule and exporter for official .pth state-dict checkpoints.
  • Support YOLOX Nano, Tiny, S, M, L, and X detection variants.
  • Detect YOLOX using checkpoint state-dict markers rather than file extension.
  • Export as yolov6r1, reusing its output names and grid decoder metadata.
  • Configure YOLOX archive preprocessing as unscaled BGR input.
  • Add focused YOLOX unit tests plus official checkpoint E2E coverage and rebalance full E2E shards.

Specification

None / not applicable

Dependencies & Potential Impact

None / not applicable

Deployment Plan

None / not applicable

Testing & Validation

None / not applicable

AI Usage

Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]

Submitted code was reviewed by a human: YES/NO

The author is taking the responsibility for the contribution: YES/NO

Summary by CodeRabbit

  • New Features
    • Added support for exporting YOLOX detection models, including Nano, Tiny, S, M, L, and X variants.
    • YOLOX checkpoints are automatically detected and configured with appropriate architecture and preprocessing settings.
    • Class names are populated automatically for compatible COCO-trained models.
  • Documentation
    • Updated the supported-models list and credits to include YOLOX.

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
2028 1130 56% 0% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: 9e800f1 by action🐍

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@klemen1999, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 9 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 351640b0-36b8-436d-a65f-3a2fef9e1a0b

📥 Commits

Reviewing files that changed from the base of the PR and between 2e72763 and 9e800f1.

📒 Files selected for processing (4)
  • tests/e2e_shards.py
  • tests/helper_functions.py
  • tests/test_end2end.py
  • tests/test_unittests.py
📝 Walkthrough

Walkthrough

YOLOX support was added across checkpoint detection, model construction, NNArchive export, CLI conversion, registry wiring, preprocessing, model catalogs, documentation, and end-to-end tests.

Changes

YOLOX conversion pipeline

Layer / File(s) Summary
YOLOX checkpoint detection and architecture
.gitmodules, pyproject.toml, tools/yolox/YOLOX, tools/version_detection/..., tools/yolox/yolox_exporter.py
YOLOX checkpoint markers and architecture inference were added alongside the YOLOX submodule and exporter dependencies.
YOLOX model and archive exporter
tools/yolox/yolox_exporter.py, tools/modules/exporter.py
YOLOX detection outputs, checkpoint loading, model construction, class naming, parser configuration, and configurable preprocessing were added.
Registry and CLI integration
tools/conversion_registry.py, tools/main.py, tools/version_detection/__init__.py
YOLOX exporter creation was registered, and omitted CLI encoding now defaults to BGR for YOLOX and RGB otherwise.
YOLOX test coverage and model catalog
tests/..., README.md
YOLOX variants, checkpoint URLs, output checks, exporter tests, shard assignments, CLI choices, documentation, and updated shard expectations were added.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI as convert CLI
  participant Detection as detect_version
  participant Registry as conversion_registry
  participant Exporter as YoloXExporter
  participant Archive as make_nn_archive
  CLI->>Detection: detect YOLOX checkpoint
  Detection-->>CLI: return YOLOX_CONVERSION
  CLI->>Registry: create exporter for yolox
  Registry-->>CLI: return YoloXExporter
  CLI->>Exporter: export_nn_archive with BGR encoding
  Exporter->>Archive: generate NNArchive with YOLOExtendedParser
Loading

Possibly related PRs

Suggested reviewers: rolandocortez

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 35.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: native YOLOX support was added.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/yolox

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tools/yolox/YOLOX`:
- Line 1: Update the tools/yolox/YOLOX gitlink to a valid, fetchable commit SHA
from its configured YOLOX remote, preserving the intended release or branch.
Verify the pinned commit can be fetched and initialize the submodule
successfully.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c03c4f0e-6310-465e-8b54-af5faa4e771d

📥 Commits

Reviewing files that changed from the base of the PR and between 0338cfc and 2e72763.

⛔ Files ignored due to path filters (1)
  • media/coverage_badge.svg is excluded by !**/*.svg
📒 Files selected for processing (17)
  • .gitmodules
  • README.md
  • pyproject.toml
  • tests/conftest.py
  • tests/constants.py
  • tests/e2e_shards.py
  • tests/nnarchive_output_checks.py
  • tests/test_unittests.py
  • tests/test_yolox_exporter.py
  • tools/conversion_registry.py
  • tools/main.py
  • tools/modules/exporter.py
  • tools/version_detection/__init__.py
  • tools/version_detection/version_detection.py
  • tools/yolox/YOLOX
  • tools/yolox/__init__.py
  • tools/yolox/yolox_exporter.py

Comment thread tools/yolox/YOLOX
Comment thread tools/yolox/yolox_exporter.py
Comment thread tests/e2e_shards.py
@github-actions

Copy link
Copy Markdown

Test Results

  6 files    6 suites   14m 45s ⏱️
 32 tests  32 ✅ 0 💤 0 ❌
192 runs  192 ✅ 0 💤 0 ❌

Results for commit 9e800f1.

@rolandocortez rolandocortez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@klemen1999
klemen1999 merged commit fa3d3d7 into main Jul 24, 2026
28 checks passed
@klemen1999
klemen1999 deleted the feat/yolox branch July 24, 2026 12:05
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.

3 participants