Repository navigation
Conversation
Check RLE dimensions, run counts, and decoded coverage before copying annotation data into image-sized buffers. Bound intermediate merged runs and release temporary RLEs when validation fails. Add CPU regressions for malformed and valid masks loaded from JSON and preprocessed annotations, including compressed counts and zero-length runs during label merging. Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
JanuszL
marked this pull request as ready for review
October 27, 2026 17:33
Contributor
[Medium impact] The latest changes appear safe to merge; no new blocking failure was established.
|
Replace scope guards and raw RLE containers with RLEMask ownership. Pass temporary non-owning views to the C merge API and release replaced label encodings through move assignment. Cover single- and multiple-polygon masks from JSON and preprocessed annotations alongside the existing malformed-RLE regressions. Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Throw invalid_argument for malformed mask inputs and include actual and expected dimensions, run counts, and pixel coverage in diagnostics. Assert Python ValueError and diagnostic values for JSON and preprocessed annotations, including runs that exceed the remaining image coverage. Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Contributor
Author
|
!build |
Collaborator
|
CI MESSAGE: [77139940]: BUILD STARTED |
Collaborator
|
CI MESSAGE: [77139940]: BUILD PASSED |
mzient
reviewed
Oct 29, 2026
mzient
reviewed
Oct 29, 2026
mzient
reviewed
Oct 29, 2026
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.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.
Validate COCO RLE masks before pixelwise decoding
Check RLE dimensions, run counts, and decoded coverage before copying
annotation data into image-sized buffers. Bound intermediate merged runs
and release temporary RLEs when validation fails.
Add CPU regressions for malformed and valid masks loaded from JSON and
preprocessed annotations, including compressed counts and zero-length
runs during label merging.
Category:
Bug fix (non-breaking change which fixes an issue)
Description:
Reject COCO RLE masks with inconsistent dimensions, excessive run counts,
or invalid decoded coverage before pixelwise processing. Check the merged
encoding size before writing into temporary buffers.
Tracks NVBug 7001099.
Additional information:
Affected modules and functionalities:
COCO reader pixelwise masks and annotation regression tests.
Key points relevant for the review:
Validation at the consumer covers JSON arrays, compressed counts, and
preprocessed annotations. Owning
RLEMaskcontainers free temporaryencodings on errors.
Tests:
Added
test_coco_invalid_rle_mask,test_coco_valid_rle_mask,test_coco_rle_mask_merge, andtest_coco_polygon_mask_ownershipindali/test/python/reader/test_coco.py.Existing malformed-bbox and filename tests also apply.
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: N/A