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

Refactor DetCon logic & Update SupCon for seg recipes #1958

Merged

Conversation

sungchul2
Copy link
Contributor

@sungchul2 sungchul2 commented Mar 30, 2023

Summary

This PR includes

  • enable to use two views per image instead of single view
  • update lr warmup iters in supcon recipe
  • create DetConHead including detcon loss and predictor
  • update configs & docstrings
  • add unit test

Through these changes, we can expect improved mDice (~+4.96) and reduced training time (~0.68x) compared with base supervised learning.

How to test

tests/unit/algorithms/segmentation/adapters/mmseg/models/heads/test_detcon_head.py
image

tests/unit/algorithms/segmentation/adapters/mmseg/models/segmentors/test_detcon.py
image

tests/unit/algorithms/segmentation/adapters/mmseg/models/losses/test_detcon_loss.py
image

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

@sungchul2 sungchul2 added this to the 1.2.0 milestone Mar 30, 2023
@github-actions github-actions bot added the ALGO Any changes in OTX Algo Tasks implementation label Mar 30, 2023
@sungchul2 sungchul2 changed the title [FIX] Refactor detcon supcon seg [FIX] Refactor DetCon logic & SupCon for seg recipes Mar 30, 2023
@github-actions github-actions bot added the TEST Any changes in tests label Mar 31, 2023
@sungchul2 sungchul2 marked this pull request as ready for review March 31, 2023 02:33
@sungchul2 sungchul2 requested a review from a team as a code owner March 31, 2023 02:33
@sungchul2 sungchul2 changed the title [FIX] Refactor DetCon logic & SupCon for seg recipes [FIX] Refactor DetCon logic & Update SupCon for seg recipes Mar 31, 2023
@github-actions github-actions bot added the DOC Improvements or additions to documentation label Mar 31, 2023
@sungchul2 sungchul2 force-pushed the refactor_detcon_supcon_seg branch from 89393e3 to b4c7ca8 Compare March 31, 2023 02:59
@sungmanc sungmanc changed the title [FIX] Refactor DetCon logic & Update SupCon for seg recipes Refactor DetCon logic & Update SupCon for seg recipes Mar 31, 2023
@sungmanc
Copy link
Contributor

I changed the title of this PR, we're not using [FIX], [ENHANCE] prefix anymore.

sungmanc
sungmanc previously approved these changes Mar 31, 2023
Copy link
Contributor

@sungmanc sungmanc left a comment

Choose a reason for hiding this comment

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

LGTM, it showed quite improvement for SupCon algorithm. How about adding this changes to CHANGELOG ?

jaegukhyun
jaegukhyun previously approved these changes Mar 31, 2023
@jaegukhyun
Copy link
Contributor

Ah, there is test failure, could you check it?

@sungchul2 sungchul2 dismissed stale reviews from jaegukhyun and sungmanc via 210f29f March 31, 2023 05:06
@sungchul2
Copy link
Contributor Author

@sungmanc @jaegukhyun
I updated CHANGELOG and self-sl recipes to resolve integration test errors.
Could you review it again?

Co-authored-by: Sungman Cho <sungman.cho@intel.com>
@sungchul2 sungchul2 requested a review from jaegukhyun March 31, 2023 07:32
Copy link
Contributor

@supersoob supersoob left a comment

Choose a reason for hiding this comment

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

LGTM

@sungmanc sungmanc merged commit 8ae3e2a into openvinotoolkit:develop Apr 3, 2023
@sungchul2 sungchul2 deleted the refactor_detcon_supcon_seg branch April 4, 2023 00:41
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 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