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

🐞 Bugfix: Set reverse_input_channels to True in OpenVINO models #2848

Merged

Conversation

ashwinvaidya17
Copy link
Contributor

Summary

Fixes: CVS-129988

How to test

Checklist

  • I have added unit tests to cover my changes.​
  • I have added integration tests to cover my changes.​
  • I have added e2e tests for validation.
  • 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) 2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

@ashwinvaidya17 ashwinvaidya17 requested a review from a team as a code owner January 29, 2024 13:24
@github-actions github-actions bot added the ALGO Any changes in OTX Algo Tasks implementation label Jan 29, 2024
@sovrasov
Copy link
Contributor

Do we need changes from openvinotoolkit/model_api#152 in this PR?

@ashwinvaidya17
Copy link
Contributor Author

Do we need changes from openvinotoolkit/model_api#152 in this PR?

I don't think so as media pipe already passes RGB image to the inference model. But my understanding might be incorrect here.

@sovrasov
Copy link
Contributor

@ashwinvaidya17
Copy link
Contributor Author

I'll leave that decision to the maintainers. I agree that OTX's OpenVINO inference is affected by the change in modelAPI but as of now since Geti does not use OTX for OpenVINO inference, the missing modelAPI upgrade should not affect Geti. I guess upgrading modelAPI version in OTX is more challenging given the current timeline of release.
As for the actual issue, there were two. Turns out the RGB issue was not the actual reason for 0% score on normal images. That was probably a coincidental discovery during the hunt. The actual reason was that normal images also reported anomaly scores. So a good image would report anomaly score of 0. The solution implemented in modelAPI currently flips the score reported when the predicted label is Normal. So the users now see normal score of 100%

@sovrasov
Copy link
Contributor

I'll leave that decision to the maintainers. I agree that OTX's OpenVINO inference is affected by the change in modelAPI but as of now since Geti does not use OTX for OpenVINO inference, the missing modelAPI upgrade should not affect Geti. I guess upgrading modelAPI version in OTX is more challenging given the current timeline of release. As for the actual issue, there were two. Turns out the RGB issue was not the actual reason for 0% score on normal images. That was probably a coincidental discovery during the hunt. The actual reason was that normal images also reported anomaly scores. So a good image would report anomaly score of 0. The solution implemented in modelAPI currently flips the score reported when the predicted label is Normal. So the users now see normal score of 100%

I see, according to the discussion in jira, let's avoid upgrading MAPI here. To be precise, Geti still uses OTX inference tasks for batch inference (see Ludo's comment in CVS-130051). If now in OTX 1.4 anomaly inference task works somehow (probably because it doesn't use MAPI), I'm ok with this solution.

@ashwinvaidya17
Copy link
Contributor Author

Geti still uses OTX inference tasks for batch inference (see Ludo's comment in CVS-130051)

Hmm I wasn't aware. I'll have a closer look at this task later. For now I am merging this. It does not affect the 0% issue but it closes one loose end.

@ashwinvaidya17 ashwinvaidya17 merged commit af77ed0 into openvinotoolkit:releases/1.4.0 Jan 29, 2024
13 checks passed
yunchu added a commit that referenced this pull request Feb 2, 2024
* Update MAPI version (#2730)

* Update anomaly ov inference task

* Fix one more place of conversion of anomaly map

* Update dependency for exportable code (#2732)

* Fix unsupported dtype in ov graph constant converter

* Filter invalid polygon shapes (#2795)

* fix segmentation test

* Update for releases 1.4.5 (#2837)

* 🐞 Bugfix: Set reverse_input_channels to True in OpenVINO models (#2848)

* Set reverse_input_channels to True

* Remove dependency of protobuf (#2851)

* Update release notes and changelog for 1.4.5 (#2853)

---------

Co-authored-by: Vladislav Sovrasov <sovrasov.vlad@gmail.com>
Co-authored-by: Eugene Liu <eugene.liu@intel.com>
Co-authored-by: Ashwin Vaidya <ashwin.vaidya@intel.com>
chuneuny-emily added a commit that referenced this pull request Mar 29, 2024
* Mergeback 1.4.4 to 1.5.0 (#2745)

* Update MAPI version (#2730)

* Update anomaly ov inference task

* Update reqs in exportable code

* Fix one more place of conversion of anomaly map

* Update dependency for exportable code (#2732)

* Fix unsupported dtype in ov graph constant converter

---------

Co-authored-by: Vladislav Sovrasov <sovrasov.vlad@gmail.com>

* Mergeback 1.4.0 to 1.5.0 (#2826)

* Update MAPI version (#2730)

* Update dependency for exportable code (#2732)

* Filter invalid polygon shapes (#2795)

---------

Co-authored-by: Vladislav Sovrasov <sovrasov.vlad@gmail.com>
Co-authored-by: Eugene Liu <eugene.liu@intel.com>

* Mergeback changes for 1.4.5 to releases/1.5.0 (#2871)

* Update MAPI version (#2730)

* Update anomaly ov inference task

* Fix one more place of conversion of anomaly map

* Update dependency for exportable code (#2732)

* Fix unsupported dtype in ov graph constant converter

* Filter invalid polygon shapes (#2795)

* fix segmentation test

* Update for releases 1.4.5 (#2837)

* 🐞 Bugfix: Set reverse_input_channels to True in OpenVINO models (#2848)

* Set reverse_input_channels to True

* Remove dependency of protobuf (#2851)

* Update release notes and changelog for 1.4.5 (#2853)

---------

Co-authored-by: Vladislav Sovrasov <sovrasov.vlad@gmail.com>
Co-authored-by: Eugene Liu <eugene.liu@intel.com>
Co-authored-by: Ashwin Vaidya <ashwin.vaidya@intel.com>

* Update version string to 1.5.1 (#2874)

update version string to 1.5.1

* [Release 1.5] Fix label order for h-cls (#2921)

Fix h-cls label order

* Revert MRCNN resize to state from 1.4 (#2922)

* Update openvino.txt (#2923)

* Remove polygon clipping code (#2926)

* Fix default memcache size to 100MB (#2960)

* Fix default memcache size to 100MB

* Deal with empty annotation of 'No Object' label images

---------
Signed-off-by: Songki Choi <songki.choi@intel.com>

* Hotfix default memcache size to 100MB (#2990)

* Fix default memcache size to 100MB

* Fix memcache size max limit to 10GB

* Update CHANGELOG.md

* Hotfix: fix wrong domain in tiling rotated detection (#3141)

* domain=rotated_detection in tile_pipeline

* update tile pipeline

* Update otx version to 1.5.2 (#3174)

* update otx version to 1.5.2

* Update CHANGELOG.md

---------

Co-authored-by: Vladislav Sovrasov <sovrasov.vlad@gmail.com>
Co-authored-by: Eugene Liu <eugene.liu@intel.com>
Co-authored-by: Ashwin Vaidya <ashwin.vaidya@intel.com>
Co-authored-by: Galina Zalesskaya <galina.zalesskaya@intel.com>
Co-authored-by: Emily Chun <emily.chun@intel.com>
Co-authored-by: Songki Choi <songki.choi@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ALGO Any changes in OTX Algo Tasks implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants