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

Decouple semantic segmentation models #3376

Merged
merged 22 commits into from
Apr 26, 2024
Merged

Decouple semantic segmentation models #3376

merged 22 commits into from
Apr 26, 2024

Conversation

kprokofi
Copy link
Collaborator

@kprokofi kprokofi commented Apr 21, 2024

Summary

Eliminate mmseg dependency for models, decouple all models, introduce updated model structure, added support for torchvision data pipeline

Unit tests will be added with next PRs.

How to test

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) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

@github-actions github-actions bot added DEPENDENCY Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM BUILD labels Apr 24, 2024
@github-actions github-actions bot added TEST Any changes in tests and removed DEPENDENCY Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM BUILD labels Apr 24, 2024
@kprokofi
Copy link
Collaborator Author

kprokofi commented Apr 24, 2024

Strange error on CI with CUDA
image

Locally, all unit tests are passed with tox
image

Copy link
Contributor

@jaegukhyun jaegukhyun left a comment

Choose a reason for hiding this comment

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

Overall LGTM.
Could you share some regression tests between decoupling?
In some case torchvision data pipeline slower than mm's pipeline since mm use opencv and it is faster than torch tensor ops.
So we need regression tests results for accuracy and e2e time.

@jaegukhyun
Copy link
Contributor

And it seems unit tests run on cpu machine. So I think you need to fix unit tests failure on cpu machine.

Copy link

codecov bot commented Apr 25, 2024

Codecov Report

Attention: Patch coverage is 68.66097% with 220 lines in your changes are missing coverage. Please review.

Project coverage is 76.59%. Comparing base (4c18ab1) to head (7807455).

Files Patch % Lines
src/otx/algo/segmentation/backbones/mscan.py 61.71% 67 Missing ⚠️
src/otx/algo/segmentation/heads/ham_head.py 49.42% 44 Missing ⚠️
src/otx/algo/segmentation/heads/base_segm_head.py 73.13% 18 Missing ⚠️
...mentation/losses/cross_entropy_loss_with_ignore.py 46.87% 17 Missing ⚠️
src/otx/algo/segmentation/modules/aggregators.py 82.35% 12 Missing ⚠️
src/otx/core/model/segmentation.py 62.50% 12 Missing ⚠️
src/otx/algo/segmentation/heads/fcn_head.py 80.70% 11 Missing ⚠️
src/otx/algo/segmentation/backbones/dinov2.py 28.57% 10 Missing ⚠️
src/otx/algo/segmentation/base_model.py 81.25% 9 Missing ⚠️
src/otx/algo/segmentation/litehrnet.py 80.00% 7 Missing ⚠️
... and 3 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3376      +/-   ##
===========================================
- Coverage    77.30%   76.59%   -0.72%     
===========================================
  Files          250      255       +5     
  Lines        22828    23281     +453     
===========================================
+ Hits         17648    17831     +183     
- Misses        5180     5450     +270     
Flag Coverage Δ
py310 76.58% <68.66%> (-0.45%) ⬇️
py311 76.47% <68.66%> (-0.82%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kprokofi
Copy link
Collaborator Author

Tests are passed. I propose to merge this PR, since today is FF.
Please, feel free to leave comments to address in the following PRs before code freeze.

I compared algorithms on KITTI dataset.

iter_time is the same, data_train_time is worse on 0.002 sec., due to difference in resizing and augmentations, we have changed accuracy values about 2-4 % DICE score on this dataset. We need to align augmentations with mm*

@kprokofi kprokofi requested a review from eugene123tw April 25, 2024 23:23
@kprokofi kprokofi enabled auto-merge (squash) April 25, 2024 23:26
@kprokofi kprokofi merged commit 52a0687 into develop Apr 26, 2024
14 of 15 checks passed
@kprokofi kprokofi deleted the kp/decouple_mmseg branch April 26, 2024 00:56
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.

5 participants