Optimize RF-DETR RLE postprocess with Triton#44
Open
aseembits93 wants to merge 23 commits into
Open
Conversation
10 tasks
4a1a57f to
8875cf7
Compare
aseembits93
commented
Jun 2, 2026
| classes_re_mapping=classes_re_mapping, | ||
| ) | ||
| if unsupported_reason is not None: | ||
| LOGGER.debug( |
| selected_boxes_xyxy_pct = torch.cat([xy_min, xy_max], dim=-1) | ||
| denorm_size = ( | ||
| image_meta.nonsquare_intermediate_size or image_meta.inference_size | ||
| for image_bboxes, image_logits, image_masks, image_meta in zip( |
There was a problem hiding this comment.
comment on why there is a loop here
2318a9c to
60dea68
Compare
…new-model-manager (roboflow#2406)
* fix batch processing * style: run black on asset_library_attributes v1
* Add volume mount support to inference server container Adds a --volume / -v CLI flag to `inference server start` and a corresponding `volumes` parameter to `start_inference_container()`, allowing users to bind-mount host directories into the container. * Apply black formatting * Remove unused import * Document --volume flag in server CLI docs
* Expose NumberInRange operator in workflow builder UI The (Number) in range operator was already implemented in the evaluation engine and BinaryStatement union but was not included in the introspection export, making it invisible to the workflow builder UI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Implement NumberInRange operator in query language backend Adds the NumberInRange BinaryOperator class and its evaluation lambda so the operator exposed in the workflow builder UI has a working backend. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Add roboflow_core/current_time@v1 Workflow block New formatter block that outputs the current date/time for a user-selected timezone. Inputs a curated IANA timezone (literal or selector, default UTC) and returns a timezone-aware timestamp plus iso_string, date, and time strings. Uses stdlib zoneinfo (backports.zoneinfo for py<3.9) and adds tzdata so the timezone database is available on slim/Windows runtimes. Curated dropdown options expose friendly UTC-offset labels via values_metadata. Registered in loader.py. Includes unit tests and a full execution-engine integration test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Remove zoneinfo backport dependency --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* init rfdetr keypoints * post process keypoints * bump version * update inference-model version to 0.29.0-rc1 * update requirements cpu and gpu with inference_models 0.29.0rc1 * upd uv lock * add inf adapter for rfdetr keypoint preview * normalize kp scores * upd version * Bump inference-models version * Update inference dependencies --------- Co-authored-by: Paweł Pęczek <146137186+PawelPeczek-Roboflow@users.noreply.github.com> Co-authored-by: Paweł Pęczek <pawel@roboflow.com>
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.
What does this PR do?
This is the bottom PR in the RF-DETR optimization stack:
main <- opt-python-postproc <- opt-preprocess <- opt-pipeline-integrationIt optimizes RF-DETR instance-segmentation RLE post-processing:
The hot path generates compact COCO RLE records from RF-DETR mask logits with Triton instead of materializing full-size dense upsampled masks and compressing them back to RLE. The implementation selects query/class metadata on GPU, supports up to 4 passing classes per query, generates sparse RLE runs directly from interpolation metadata, and copies only compact metadata/run records back.
The torch reference path remains available when Triton fast-path preconditions are not met.
Type of Change
Testing
Test details:
Reference command on
main:Candidate command on
opt-python-postproc:vehicles_312px.mp4 (538 frames, src 312x176):
vehicles_720p.mp4 (538 frames, src 1280x720):
vehicles_1080p.mp4 (538 frames, src 1920x1080):
mainflags-offThe non-byte-identical RLEs decode to semantically matching masks; the minimum mask IoU is caused by empty-mask IoU bookkeeping.
Each row uses 100 captured calls and 300 timed replays.
The captured replay cases can be regenerated with the same script by using
--mode capture-and-replay --video_reference <video> --cases-dir <new-cases-dir>.Results:
22 passedand36 passed.Checklist
Additional Context
This PR is intentionally scoped to Triton RLE post-processing. The next PR adds Triton preprocessing on top of this branch, and the top PR adds CUDA graph / depth-2 pipeline integration plus CPU response-path optimizations.