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

Add Semi-SL MeanTeacher for semantic segmentation #3801

Merged
merged 22 commits into from
Aug 13, 2024
Merged

Conversation

kprokofi
Copy link
Collaborator

@kprokofi kprokofi commented Aug 6, 2024

Summary

This PR intends to add Semi-SL functionality for semantic segmentation task. This PR doesn't consider refactoring changes.

  • Add MeanTeacher algorithm
  • Semi-SL works for semantic segmentation
  • Conduct experiments. Results are better then supervised training at least on few percent
  • Add unit tests, integration and performance

In the next PRs the following changes are expected:

  • Semantic Segmentation refactoring including aligning models with TrainType introduced by @harimkang. This PR doesn't include this change and simply add new segmentation model with semi_sl suffix
  • Prototype based approach as in OTX1.6. Additional experiments are required

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 Aug 6, 2024
@github-actions github-actions bot added the DOC Improvements or additions to documentation label Aug 7, 2024
@kprokofi
Copy link
Collaborator Author

kprokofi commented Aug 9, 2024

Pascal-VOC results:

<style> </style>
  Supervised Semi-Supervised
all 0.6595 0.7192
dino_v2 0.8634 0.8768
litehrnet_18 0.5025 0.5978
litehrnet_s 0.4241 0.5376
litehrnet_x 0.3675 0.5185
segnext_b 0.8475 0.8520
segnext_s 0.8171 0.8409
segnext_t 0.7942 0.8109

DIS5K + Cityscapes results

<style> </style>
  Supervised Semi-Supervised
all 0.7213 0.7327
dino_v2 0.7875 0.7979
litehrnet_18 0.6627 0.6802
litehrnet_s 0.6389 0.6605
litehrnet_x 0.6930 0.7107
segnext_b 0.7759 0.7627
segnext_s 0.7571 0.7825
segnext_t 0.7337 0.7345

The results were averaged across 5 runs with different seeds (OTX perf tests)

Unfortunately, there is no always good result. For example, when labeled images are only 6-20, the pseudo-labels are not reliable and we can observe degradation in metric. Some other approaches / additional fine-tuning is required in that case:

<style> </style>
  Supervised Semi-Supervised
all 0.7693 0.7267
dino_v2 0.8560 0.8319
litehrnet_18 0.7548 0.7540
litehrnet_s 0.7261 0.6988
litehrnet_x 0.7378 0.7343
segnext_b 0.7805 0.6942
segnext_s 0.7718 0.7293
segnext_t 0.7584 0.6445

@kprokofi kprokofi requested a review from harimkang August 9, 2024 12:26
harimkang
harimkang previously approved these changes Aug 12, 2024
src/otx/algo/common/utils/utils.py Show resolved Hide resolved
src/otx/algo/callbacks/ema_mean_teacher.py Outdated Show resolved Hide resolved
src/otx/algo/segmentation/segmentors/mean_teacher.py Outdated Show resolved Hide resolved
src/otx/algo/segmentation/segmentors/base_model.py Outdated Show resolved Hide resolved
harimkang
harimkang previously approved these changes Aug 13, 2024
sungchul2
sungchul2 previously approved these changes Aug 13, 2024
@kprokofi kprokofi added this pull request to the merge queue Aug 13, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Aug 13, 2024
@kprokofi kprokofi dismissed stale reviews from sungchul2 and harimkang via dcad371 August 13, 2024 09:52
@kprokofi kprokofi enabled auto-merge August 13, 2024 09:52
@kprokofi kprokofi added this pull request to the merge queue Aug 13, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 13, 2024
@kprokofi kprokofi added this pull request to the merge queue Aug 13, 2024
Merged via the queue into develop with commit 2ecaac1 Aug 13, 2024
19 of 21 checks passed
@kprokofi kprokofi deleted the kp/add_semisl branch August 13, 2024 17:01
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.

6 participants