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 Self-SL configs for SegNext #2215

Merged
merged 11 commits into from
Sep 19, 2023

Conversation

sungchul2
Copy link
Contributor

@sungchul2 sungchul2 commented Jun 1, 2023

Summary

This PR is just to add Self-SL configs for our new semantic segmentation model, SegNext.
Performance verification for these configs is required.
With this configs, Self-SL training normally works with the below script:

otx train otx/algorithms/segmentation/configs/ham_segnext_t/template.yaml \
    --train-data-roots=path/dataset \
    params \
    --algo_backend.train_type=Selfsupervised

Experimental results

  • Dataset
    • pre-training : sampled whole images with person, car, bicycle classes
    • fine-tuning : sampled 8 images with person, car, bicycle classes
model mode Epoch mDice
ham_segnext_t supervised 90.20 ± 28.08 64.23 ± 14.25
ham_segnext_t pre-trained 65.53 ± 25.82 64.92 ± 12.48 (+0.69)
ham_segnext_s supervised 81.00 ± 39.99 60.28 ± 17.23
ham_segnext_s pre-trained 74.55 ± 25.68 68.13 ± 9.98 (+7.85)
ham_segnext_b supervised 89.60 ± 16.93 68.25 ± 6.77
ham_segnext_b pre-trained 69.15 ± 26.28 68.87 ± 8.08 (+0.62)

How to test

$ tox -vv -e tests-seg-py310 -- tests/integration/cli/semantic_segmentation
================================================================= short test summary info ==================================================================
SKIPPED [1] tests/integration/cli/semantic_segmentation/test_segmentation.py:90: Segnext model doesn't support supcon training.
FAILED tests/integration/cli/semantic_segmentation/test_segmentation.py::TestSegmentationCLI::test_otx_hpo[Custom_Semantic_Segmentation_SegNext_s] - AssertionError
============================================= 1 failed, 45 passed, 1 skipped, 2 warnings in 1249.68s (0:20:49) =============================================

$ tox -vv -e tests-seg-py310 -- tests/e2e/cli/semantic_segmentation
================================================================= short test summary info ==================================================================
SKIPPED [3] tests/e2e/cli/semantic_segmentation/test_segmentation.py:241: Skip the majority of models to reduce PTQ running time.
SKIPPED [3] tests/e2e/cli/semantic_segmentation/test_segmentation.py:250: Skip the majority of models to reduce PTQ running time.
SKIPPED [3] tests/e2e/cli/semantic_segmentation/test_segmentation.py:259: Skip the majority of models to reduce PTQ running time.
================================================= 136 passed, 9 skipped, 2 warnings in 13479.97s (3:44:39) =================================================

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 the ALGO Any changes in OTX Algo Tasks implementation label Jun 1, 2023
@kprokofi
Copy link
Collaborator

Hi @sungchul2, do we have time to update this PR and check if it works correctly? We updated SegNext from experimental template.

@kprokofi kprokofi added this to the 1.5.0 milestone Aug 29, 2023
@sungchul2 sungchul2 force-pushed the add-selfsl-for-segnext branch from d543796 to 2363cc6 Compare September 15, 2023 08:06
@github-actions github-actions bot added TEST Any changes in tests DOC Improvements or additions to documentation labels Sep 15, 2023
@sungchul2 sungchul2 marked this pull request as ready for review September 15, 2023 08:08
@sungchul2 sungchul2 requested a review from a team as a code owner September 15, 2023 08:08
@sungchul2 sungchul2 requested a review from kprokofi September 15, 2023 08:08
Copy link
Contributor

@goodsong81 goodsong81 left a comment

Choose a reason for hiding this comment

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

Too nitpick, but could you please fix the license notice?

@sungchul2
Copy link
Contributor Author

sungchul2 commented Sep 15, 2023

Too nitpick, but could you please fix the license notice?

@goodsong81 Updated all.

@sovrasov
Copy link
Contributor

@sungchul2 thanks for the PR. Do you have any experimental results obtained with this configs?

@sungchul2
Copy link
Contributor Author

sungchul2 commented Sep 18, 2023

@sungchul2 thanks for the PR. Do you have any experimental results obtained with this configs?

I updated one of many results. Some results showed dropped performance but they are usually ~-2.0 mDice.

@sungchul2 sungchul2 merged commit bd8d482 into openvinotoolkit:develop Sep 19, 2023
19 of 21 checks passed
@sungchul2 sungchul2 deleted the add-selfsl-for-segnext branch September 19, 2023 05:28
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