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

Update head and h-label format for hierarchical label classification #3810

Merged

Conversation

sooahleex
Copy link
Contributor

@sooahleex sooahleex commented Aug 7, 2024

Summary

  • Related to revamp model for h-cls

  • Update head of h-label cls with CBAM head

  • Update ground truth format of h-label cls

    • For example, this case has label like [-1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7].
      This is example of cifar100, which has 100 subclasses and 20 superclasses.
      image
  • Only consider multi-class case, so for multi-label case, I will cover later.

How to test

  • Update unit test and dataset for it

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

@github-actions github-actions bot added TEST Any changes in tests OTX 2.0 labels Aug 7, 2024
@sooahleex sooahleex force-pushed the feat/update_head_loss_h_cls branch 2 times, most recently from a78c61f to 89ba872 Compare August 9, 2024 08:56
@sooahleex sooahleex changed the title Update head and loss for hierarchical label classification Update head for hierarchical label classification Aug 9, 2024
@sooahleex sooahleex changed the title Update head for hierarchical label classification Update head and h-label format for hierarchical label classification Aug 9, 2024
@sooahleex sooahleex force-pushed the feat/update_head_loss_h_cls branch 2 times, most recently from d46f73f to e6d101a Compare August 12, 2024 06:57
@sooahleex sooahleex marked this pull request as ready for review August 12, 2024 07:21
@github-actions github-actions bot added the DOC Improvements or additions to documentation label Aug 12, 2024
Copy link
Contributor

@harimkang harimkang left a comment

Choose a reason for hiding this comment

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

Looks good, I left a few comments, and could you please write some more unit-tests for the classes added to hlabel_cls_head.py?

Also, it would be great if you could summarize and share the results of experiments comparing the old head to the new head. (cifar100)

  • @chuneuny-emily I think we should use cifar100 that sooah used in experiments here for H-label cls large performance tests, what do you think? (There is currently no Large-data case for H-label.)

src/otx/algo/classification/classifier/base_classifier.py Outdated Show resolved Hide resolved
src/otx/algo/classification/efficientnet_v2.py Outdated Show resolved Hide resolved
src/otx/algo/classification/efficientnet.py Outdated Show resolved Hide resolved
Copy link
Contributor

@harimkang harimkang left a comment

Choose a reason for hiding this comment

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

LGTM, I left a few minor comments.

src/otx/algo/classification/heads/hlabel_cls_head.py Outdated Show resolved Hide resolved
src/otx/algo/classification/torchvision_model.py Outdated Show resolved Hide resolved
src/otx/algo/classification/vit.py Show resolved Hide resolved
@sooahleex sooahleex force-pushed the feat/update_head_loss_h_cls branch from b67ead4 to ed48f15 Compare August 13, 2024 01:15
harimkang
harimkang previously approved these changes Aug 13, 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 minor comment. Please take a look.

@harimkang harimkang enabled auto-merge August 13, 2024 06:20
@harimkang harimkang added this pull request to the merge queue Aug 13, 2024
Merged via the queue into openvinotoolkit:develop with commit 962d26c Aug 13, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DOC Improvements or additions to documentation TEST Any changes in tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants