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 getting wrong shape during resizing #3644

Merged

Conversation

sungchul2
Copy link
Contributor

Summary

ticket no. : 144473
After #3582, if img is tensor wrong image shape is obtained during resize.

img_shape = img[0].shape[:2] if isinstance(img, list) else img.shape[:2]

How to test

Checklist

  • I have added unit tests to cover my changes.​
  • I have added integration tests to cover my changes.​
  • I have ran e2e tests and there is no issues.
  • I have added the description of my changes into CHANGELOG in my target branch (e.g., CHANGELOG in develop).​
  • I have updated the documentation in my target branch accordingly (e.g., documentation in develop).
  • I have linked related issues.

License

  • I submit my code changes under the same Apache License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below).
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

Copy link
Contributor

@eunwoosh eunwoosh left a comment

Choose a reason for hiding this comment

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

Thanks for your work :) I left minor comment. Please take a look.

src/otx/core/data/transform_libs/utils.py Outdated Show resolved Hide resolved
Co-authored-by: Eunwoo Shin <eunwoo.shin@intel.com>
Copy link
Contributor

@eugene123tw eugene123tw left a comment

Choose a reason for hiding this comment

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

@sungchul2 I added my comments. Please take a look. Thanks!

src/otx/core/data/transform_libs/utils.py Show resolved Hide resolved
src/otx/core/data/transform_libs/utils.py Outdated Show resolved Hide resolved
@eugene123tw
Copy link
Contributor

@sungchul2 Could you also verify if the changes in this PR are covered by unit tests? If not, could you add a unit test to cover them? Thanks.

@github-actions github-actions bot added the TEST Any changes in tests label Jun 20, 2024
@sungchul2
Copy link
Contributor Author

@sungchul2 Could you also verify if the changes in this PR are covered by unit tests? If not, could you add a unit test to cover them? Thanks.

Thanks for the suggestion! I updated unit tests to cover this issue, 35b0fb5.

eunwoosh
eunwoosh previously approved these changes Jun 20, 2024
Copy link

codecov bot commented Jun 20, 2024

Codecov Report

Attention: Patch coverage is 75.86207% with 7 lines in your changes missing coverage. Please review.

Project coverage is 78.24%. Comparing base (fa6d2f2) to head (35b0fb5).
Report is 1 commits behind head on develop.

Current head 35b0fb5 differs from pull request most recent head b3bfb25

Please upload reports for the commit b3bfb25 to get more accurate results.

Files Patch % Lines
src/otx/core/data/transform_libs/utils.py 50.00% 6 Missing ⚠️
src/otx/core/data/transform_libs/torchvision.py 94.11% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3644      +/-   ##
===========================================
- Coverage    78.59%   78.24%   -0.36%     
===========================================
  Files          260      260              
  Lines        26593    26606      +13     
===========================================
- Hits         20901    20818      -83     
- Misses        5692     5788      +96     
Flag Coverage Δ
py310 78.24% <75.86%> (-0.12%) ⬇️
py311 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sungchul2 sungchul2 requested a review from eunwoosh June 20, 2024 05:53
@sungchul2 sungchul2 merged commit 8f6b659 into openvinotoolkit:develop Jun 20, 2024
14 checks passed
@sungchul2 sungchul2 deleted the CVS-144473-fix-iseg-data-pipeline branch June 20, 2024 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TEST Any changes in tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants