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 semantic segmentation transforms to use OTX's instead of torchvision #3724

Merged
merged 35 commits into from
Jul 15, 2024

Conversation

sungchul2
Copy link
Contributor

@sungchul2 sungchul2 commented Jul 11, 2024

Summary

This PR includes:

  • Update transforms to OTX's
  • Check performance for reproducibility
    • before performance is from after in Recipe refinement (det, iseg, r-det, sseg, vpm, zsl) #3712
      before : 746d07e | after : 2e32819

      model test/Dice export/Dice
      dino_v2 before 0.90 0.90
      after 0.90 0.90
      litehrnet_18 before 0.90 0.89
      after 0.89 0.89
      litehrnet_s before 0.89 0.89
      after 0.88 0.88
      litehrnet_x before 0.90 0.88
      after 0.90 0.85
      segnext_b before 0.91 0.89
      after 0.91 0.90
      segnext_s before 0.91 0.91
      after 0.90 0.90
      segnext_t before 0.90 0.89
      after 0.89 0.88

**NOTE
When using RandomResize + RandomCrop + Pad (mmseg pipeline) instead of RandomResizedCrop (current, torchvision pipeline), it seems that sometimes very small GT region was extracted like below figure and it significantly affected training performance, especially segnext_t (test/Dice : 0.46 and export/Dice 0.45). Due to this issue, use RandomResizedCrop instead.

comp. image and GT loss & dice curve
image image

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 Jul 11, 2024
@github-actions github-actions bot removed the TEST Any changes in tests label Jul 11, 2024
@github-actions github-actions bot added the TEST Any changes in tests label Jul 11, 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 some comments. Please take a look.

src/otx/core/data/transform_libs/torchvision.py Outdated Show resolved Hide resolved
Co-authored-by: Eunwoo Shin <eunwoo.shin@intel.com>
@sungchul2 sungchul2 merged commit e49d65b into openvinotoolkit:develop Jul 15, 2024
6 checks passed
@sungchul2 sungchul2 deleted the update-sseg-tv-to-otx branch July 15, 2024 00:35
@sungchul2 sungchul2 mentioned this pull request Aug 1, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TEST Any changes in tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants