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 visual prompting pipeline for multi-label zero-shot learning support #3993

Merged
merged 14 commits into from
Oct 15, 2024

Conversation

sungchul2
Copy link
Contributor

@sungchul2 sungchul2 commented Oct 2, 2024

Summary

This PR includes below updates for multi-label support:

  • Add ZeroShotPromptType
  • Migrate polygons or bitmap masks into prompts
  • Integrate inference_step

** The table below shows reproduced results based on dice score.

  • There is a performance difference between before and after this update because:
    • polygon and bitmap mask that were ground truth are used as prompts as well (bbox/point -> bbox/point/polygon/bitmap mask)
    • predicted masks are not multiplied with scores anymore
    • after multi-label enablement, benchmark performance can be changed one more because the current version has only considered single-label inference
model task before (52fef3d) after (a811a11)
sam_tiny_vit (fine-tuning) test 0.91 0.92
export 1.00 0.92
optimize 0.99 0.92
sam_vit_b (fine-tuning) test 0.93 0.94
export 1.00 0.94
optimize 1.00 0.93
sam_tiny_vit (zero-shot) test 0.59 0.53
export 0.59 0.58
optimize 0.55 0.52
sam_vit_b (zero-shot) test 0.32 0.29
export 0.33 0.30
optimize 0.29 0.26

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

@github-actions github-actions bot added TEST Any changes in tests OTX 2.0 labels Oct 2, 2024
@sungchul2 sungchul2 added this to the 2.4.0 milestone Oct 2, 2024
@sungchul2 sungchul2 changed the title Update zero-shot pipeline Update visual prompting pipeline for multi-label zero-shot learning support Oct 7, 2024
@sovrasov
Copy link
Contributor

sovrasov commented Oct 8, 2024

@sungchul2 could you provide ZSL results on reduced coco (torch+OV) to prove there's no regression?

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 some comments. Please take a look.

src/otx/core/data/entity/visual_prompting.py Show resolved Hide resolved
src/otx/core/data/entity/visual_prompting.py Show resolved Hide resolved
src/otx/core/model/visual_prompting.py Show resolved Hide resolved
src/otx/algo/visual_prompting/sam.py Show resolved Hide resolved
@github-actions github-actions bot added the DOC Improvements or additions to documentation label Oct 11, 2024
Copy link
Collaborator

@kprokofi kprokofi left a comment

Choose a reason for hiding this comment

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

postpone to merge PR before 2.2/2.3 is finalized

@sovrasov sovrasov removed the OTX 2.0 label Oct 11, 2024
@sungchul2 sungchul2 merged commit 78b560d into openvinotoolkit:develop Oct 15, 2024
19 of 20 checks passed
@sungchul2 sungchul2 deleted the fix-zsl-perf-degradation branch October 15, 2024 02:25
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.

4 participants