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 label_to_idx for hierarchical classification #2906

Merged
merged 7 commits into from
Feb 14, 2024

Conversation

GalyaZalesskaya
Copy link
Contributor

@GalyaZalesskaya GalyaZalesskaya commented Feb 12, 2024

Summary

Issue CVS-132079

Change label_to_idx to represent the model outputs order.
For h-cls the labels order from model outputs and label_scema differ that caused fixes like PR#2440

The problem that after moving OpenVINO inference to Model API side, Model API required adding function to fix labels order for h-cls.

So I fixed label_to_idx dict to update label order without changes in Model API.
Updated order for labels and label_ids in .XML <model_info> meta to adjust to model outputs for Geti to pick saliency maps of the correct class index.

Validation on Geti passed
image

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

@github-actions github-actions bot added API Any changes in OTX API ALGO Any changes in OTX Algo Tasks implementation labels Feb 12, 2024
@GalyaZalesskaya GalyaZalesskaya force-pushed the gz/release_14_fix_hcls_label_order branch from d2d3d57 to 6627401 Compare February 12, 2024 15:59
@github-actions github-actions bot added the TEST Any changes in tests label Feb 12, 2024
Copy link

codecov bot commented Feb 12, 2024

Codecov Report

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

Comparison is base (1a91b0b) 79.62% compared to head (9dd1254) 79.61%.

Files Patch % Lines
...lgorithms/classification/adapters/openvino/task.py 75.00% 1 Missing ⚠️
...ortable_code/prediction_to_annotation_converter.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           releases/1.4.0    #2906      +/-   ##
==================================================
- Coverage           79.62%   79.61%   -0.01%     
==================================================
  Files                 506      506              
  Lines               38313    38317       +4     
==================================================
+ Hits                30505    30507       +2     
- Misses               7808     7810       +2     
Flag Coverage Δ
py310 79.59% <92.30%> (-0.01%) ⬇️
py38 79.57% <92.30%> (-0.01%) ⬇️
py39 79.56% <92.30%> (-0.02%) ⬇️

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.

@GalyaZalesskaya GalyaZalesskaya force-pushed the gz/release_14_fix_hcls_label_order branch from 26f31cf to c9dd261 Compare February 12, 2024 23:31
@GalyaZalesskaya GalyaZalesskaya marked this pull request as ready for review February 12, 2024 23:34
@GalyaZalesskaya GalyaZalesskaya requested a review from a team as a code owner February 12, 2024 23:34
@GalyaZalesskaya GalyaZalesskaya marked this pull request as draft February 13, 2024 00:04
@GalyaZalesskaya GalyaZalesskaya marked this pull request as ready for review February 13, 2024 17:47
chuneuny-emily
chuneuny-emily previously approved these changes Feb 14, 2024
@GalyaZalesskaya
Copy link
Contributor Author

@sovrasov @chuneuny-emily @sungmanc Can you please check if all suggestions are resolved?

@GalyaZalesskaya GalyaZalesskaya merged commit d46b69a into releases/1.4.0 Feb 14, 2024
16 of 17 checks passed
@GalyaZalesskaya GalyaZalesskaya deleted the gz/release_14_fix_hcls_label_order branch February 14, 2024 10:38
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 API Any changes in OTX API TEST Any changes in tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants