Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pixelwise_masks support when the ratio is on in the coco reader #5407

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

JanuszL
Copy link
Contributor

@JanuszL JanuszL commented Apr 2, 2024

  • when the ratio option is on the pixelwise_masks calculation
    uses relative coordinates instead of the real one which leads
    to creating a 1-pixel map in the corner of the tensor. This PR
    fixes the math.
  • adds relevant test

Category:

Bug fix (non-breaking change which fixes an issue)

Description:

  • when the ratio option is on the pixelwise_masks calculation
    uses relative coordinates instead of the real one which leads
    to creating a 1-pixel map in the corner of the tensor. This PR
    fixes the math.
  • adds relevant test
  • relates to COCO Reader pixelwise_masks Emtpy Output #5404

Additional information:

Affected modules and functionalities:

  • coco reader

Key points relevant for the review:

Tests:

  • Existing tests apply
  • New tests added
    • Python tests
      • test_coco.test_coco_pix_mask_ratio
    • GTests
    • Benchmark
    • Other
  • N/A

Checklist

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: N/A

@JanuszL JanuszL added the important-fix Fixes an important issue in the software or development environment. label Apr 2, 2024
- when the ratio option is on the pixelwise_masks calculation
  uses relative coordinates instead of the real one which leads
  to creating a 1-pixel map in the corner of the tensor. This PR
  fixes the math.
- adds relevant test

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@JanuszL
Copy link
Contributor Author

JanuszL commented Apr 2, 2024

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [13938873]: BUILD STARTED

@5had3z
Copy link
Contributor

5had3z commented Apr 2, 2024

I think it would be more efficient to not have normalized points in the first place (since mask and points are exclusive anyway) and change condition here to be something along the lines of if (ratio && !spec_.GetArgument<bool>("pixelwise_masks"))

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [13938873]: BUILD PASSED

@JanuszL JanuszL merged commit 660354e into NVIDIA:main Apr 4, 2024
7 checks passed
@JanuszL JanuszL deleted the fix_ratio_rle branch April 4, 2024 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
important-fix Fixes an important issue in the software or development environment.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants