Skip to content

✨ feat(obb): serve native oriented models and Workflow transport - #3279

Closed
cfviotti wants to merge 3 commits into
mainfrom
caio/native-obb-serving
Closed

cfviotti wants to merge 3 commits into
mainfrom
caio/native-obb-serving

Conversation

@cfviotti

@cfviotti cfviotti commented Oct 27, 2026 •

Copy link
Copy Markdown

Superseded by Inference #3280, which contains this serving implementation and native Workflow consensus in one draft against main. The original branch and description are retained for history. Source consolidation does not publish packages or deploy.

Description

Serve exported RF-DETR oriented models as the native oriented-object-detection task. The CPU ONNX loader requires frozen class semantics and the explicit uniform letterbox contract, selects raw box/class/heading outputs, and returns ordered [cx, cy, width, height, theta] tuples in original-image pixels. Four box-relative heading sides preserve footprint/front by swapping ordered sides for adjacent axes; malformed or missing semantics do not fall back to ordinary detection.

Add the dedicated server response/route and current Inference SDK API v1 task dispatch. Native SDK requests skip client resizing. Add a distinct Workflow kind, model and visualization blocks, plus NumPy/tensor transport through row filters, row combination, crop/root offsets and serialization. Frozen class maps reconcile explicitly during combination. General warped footprints serialize as ordered quadrilaterals, without inventing a rectangle fit.

Validation

  • Installed model package, synthetic ONNX and actual random-initialized 64px RF-DETR export: 28 tests passed. Includes real AutoModel loading, request consumption and Workflow provider execution in both carriers; all four fronts, directed squares, width < height, odd image sizes, static-crop inversion, unused frozen classes, empty detections and metadata rejection.
  • Native Workflow transport suite: 40 tests passed in each representation setting. Includes actual crop/root restoration, filters/combination, schema conflict rejection, explicit warped quadrilaterals, serialization, native front visualization, and actual query dispatcher rejection for Shift/Offset without input mutation. The combined transport/query regression suite passed 48 tests with 15 skips in NumPy mode and 56 tests with 7 skips in tensor mode.
  • git diff --check passed. Existing SDK client/entities regression run: 198 passed, 65 failed, 2 errors, identically on base 18eb2936 and this head. There are no newly failing cases; 63 failures lack the async pytest plugin and both fixture errors come from the isolated test-root setting. This is environment-limited regression evidence, not a fully green SDK suite.

Dependencies and supported targets

Requires compatible native export/trainer artifacts and adoption of the resulting inference-models, Workflows and SDK packages. Local CPU ONNX execution was tested; hosted deployment, cloud/GPU execution and package release were not performed. CUDA/TRT/CoreML, browser inferencejs, legacy roboflow-python version.model, and the legacy SDK API v0 downsizing path are excluded from the advertised native target matrix.

Native kind compatibility is enabled for its model/visualization, row filters/combination and dynamic crop paths. Query-language DetectionsShift and DetectionsOffset are excluded and reject native inputs before mutation in both carriers. Perspective blocks are not opted into the native kind in this change; the transport/schema can retain explicit ordered quadrilaterals. Native row combination preserves contributors; the existing union-AABB Detections Merge and consensus are not enabled for this kind. A separate followup on #2420 preserves coherent contributor geometry/front, and needs its package-migration rebase before native opt-in. Perspective/refit annotation acceptance and dataset writeback require compatible platform adapters and admission checks. Full details: docs/fine-tuned/rfdetr-obb.md.

@github-actions

Copy link
Copy Markdown
Contributor

👋 Thanks for the pull request! Here is how automated Claude review works here, so you spend credits (and reviewer time) wisely.

🚧 Right now this is a draft, so automated Claude review is paused — nothing is being spent yet. Mark it Ready for review to trigger it.

Warning

💸 The Claude reviewer bills in credits, not vibes

Automated review spins up a real agent that reads real code and spends real credits on every pass. It is glad to help — but it is not a rubber duck, a linter you poke in a loop, or a substitute for reading the contributing guide. Treat it like an expensive senior reviewer whose time you booked, and show up prepared.

Draft when unsure, Ready when you mean it:

  • 🌱 Not sure the PR is in good shape yet? Keep it (or set it back) as a draft — drafts pause review, so you can push and iterate without burning credits on a moving target.
  • 💪 Feel strong about the contents? Mark it Ready for review and the reviewer will take a look.

However you get there, arrive prepared:

  • 🧱 Bring a SOLID, thorough PR. Point your local agent at our skills/ to tune it to our guidelines first — or, if you are one of those fabled carbon-based contributors, read them yourself. A half-baked diff costs exactly the same to review as a finished one.
  • ✅ Resolve every comment before you re-request review. Re-requesting with threads still open means paying twice for the same conversation.
  • 🔁 Do not use CI review as an inner loop for a local agent. The reviewer is not a step-by-step debugger — do the unfolding locally and arrive with the answer, not the search.
  • 🙋 If something looks off, ask a human. One question to a maintainer is cheaper and faster than three rounds of agent re-review chasing a misread.

Reviews are not free. A draft costs nothing to review; a Ready PR is a promise that it is worth reviewing.

  • Prefer to skip automated review entirely? Add the skip-claude-review label.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@cfviotti cfviotti closed this Oct 27, 2026
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.

2 participants