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

Sync rgb order between torch and ov inference of action classification task #3551

Merged
merged 6 commits into from
May 29, 2024

Conversation

jaegukhyun
Copy link
Contributor

Summary

This PR is for synchronize RGB order of ov inference and torch inference in action classification task

Currently action classification requires video loading for inference. For torch model inference OTX use video loading pipeline from mmaction. And for ov model inference OTX use datumaro video loading pipeline.
MMAction loads video as BGR format and Datumaro loads video as RGB format.
I'm not sure the pretrained weight is trained by BGR or RGB.
Therefore, we need additional PR to sync between pretrained weights and torch, ov inference

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

harimkang
harimkang previously approved these changes May 28, 2024
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 a comment. Please take a look.

@sungchul2
Copy link
Contributor

sungchul2 commented May 29, 2024

@jaegukhyun I updated auto_configurator to align ov model's image_color_channel in releases/2.0.0.
https://github.com/openvinotoolkit/training_extensions/pull/3534/files#diff-5fef67b60dac607755ebe35a63b56c1c773c540814354b4c7e3c1a1447c09581R387
Could you check if this update can be applied to this PR?

@jaegukhyun
Copy link
Contributor Author

@jaegukhyun I updated auto_configurator to align ov model's image_color_channel in releases/2.0.0. https://github.com/openvinotoolkit/training_extensions/pull/3534/files#diff-5fef67b60dac607755ebe35a63b56c1c773c540814354b4c7e3c1a1447c09581R387 Could you check if this update can be applied to this PR?

@sungchul2
It seems this PR should check the image_color_channel of openvino_model.py in recipe folder. Is it right?

@sungchul2
Copy link
Contributor

@jaegukhyun I updated auto_configurator to align ov model's image_color_channel in releases/2.0.0. https://github.com/openvinotoolkit/training_extensions/pull/3534/files#diff-5fef67b60dac607755ebe35a63b56c1c773c540814354b4c7e3c1a1447c09581R387 Could you check if this update can be applied to this PR?

@sungchul2 It seems this PR should check the image_color_channel of openvino_model.py in recipe folder. Is it right?

Right. Without this update, your below change is meaningless because otx in develop doesn't reflect image_color_channel in openvino_model.yaml.
https://github.com/openvinotoolkit/training_extensions/pull/3551/files#diff-662e7ef53bb9f36e726723c96cc1f6033ace1d29f557c236cadd777f1a36d7ebR21

@jaegukhyun
Copy link
Contributor Author

@jaegukhyun I updated auto_configurator to align ov model's image_color_channel in releases/2.0.0. https://github.com/openvinotoolkit/training_extensions/pull/3534/files#diff-5fef67b60dac607755ebe35a63b56c1c773c540814354b4c7e3c1a1447c09581R387 Could you check if this update can be applied to this PR?

@sungchul2 It seems this PR should check the image_color_channel of openvino_model.py in recipe folder. Is it right?

Right. Without this update, your below change is meaningless because otx in develop doesn't reflect image_color_channel in openvino_model.yaml. https://github.com/openvinotoolkit/training_extensions/pull/3551/files#diff-662e7ef53bb9f36e726723c96cc1f6033ace1d29f557c236cadd777f1a36d7ebR21

Thanks for the notice. Currently action task do not use image color channel both on torch and ov inference, but torch and ov inference use different format. This PR is trying to sync the default color format of torch and ov inference. After this PR we need to link image_color_channel for torch and ov inference of action classification. At that PR we need to consider your point

eunwoosh
eunwoosh previously approved these changes May 29, 2024
@jaegukhyun jaegukhyun requested review from eunwoosh and harimkang May 29, 2024 06:55
@jaegukhyun jaegukhyun enabled auto-merge (squash) May 29, 2024 07:52
@jaegukhyun jaegukhyun merged commit 447cd9c into openvinotoolkit:develop May 29, 2024
13 checks passed
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.

4 participants