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

Add ImageColorScale context manager #1194

Conversation

vinnamkim
Copy link
Contributor

@vinnamkim vinnamkim commented Nov 17, 2023

Summary

  • To utilize Datumaro as the data pipeline frontend for model training, it is crucial to ensure that the input image's color format consistently adheres to the 3-channel requirement. This is a common practice for many model training frameworks. This pull request introduces a context manager designed to enforce the acquisition of raw images in Datumaro (e.g., data.media_as(Image).data) in the 3-channel.

How to test

I added some tests for this change.

Checklist

  • I have added unit tests to cover my changes.​
  • I have added integration tests to cover my changes.​
  • I have added the description of my changes into CHANGELOG.​
  • I have updated the documentation accordingly

License

  • I submit my code changes under the same MIT 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) 2023 Intel Corporation
#
# SPDX-License-Identifier: MIT

Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
@vinnamkim vinnamkim marked this pull request as ready for review November 17, 2023 07:27
@vinnamkim vinnamkim requested review from a team as code owners November 17, 2023 07:27
@vinnamkim vinnamkim requested review from wonjuleee and removed request for a team November 17, 2023 07:27
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
Copy link

codecov bot commented Nov 17, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (b163010) 80.06% compared to head (26b0f99) 80.07%.

Files Patch % Lines
src/datumaro/util/image.py 92.10% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1194   +/-   ##
========================================
  Coverage    80.06%   80.07%           
========================================
  Files          268      268           
  Lines        29849    29862   +13     
  Branches      5847     5846    -1     
========================================
+ Hits         23898    23911   +13     
+ Misses        4618     4617    -1     
- Partials      1333     1334    +1     
Flag Coverage Δ
macos-11_Python-3.8 79.19% <92.10%> (+<0.01%) ⬆️
ubuntu-20.04_Python-3.8 80.06% <92.10%> (+<0.01%) ⬆️
windows-2022_Python-3.8 80.03% <92.10%> (+<0.01%) ⬆️

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.

Copy link
Contributor

@wonjuleee wonjuleee left a comment

Choose a reason for hiding this comment

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

LGTM!

@vinnamkim vinnamkim merged commit e5c3760 into openvinotoolkit:develop Nov 20, 2023
7 checks passed
@vinnamkim vinnamkim deleted the enhance/add-decode-image-color-context branch November 20, 2023 09:35
@yunchu yunchu added this to the 2.0.0 milestone Mar 28, 2024
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.

3 participants