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

Fix to allow Scheduler to be configured as a list and fix a bug in the AdaptiveTrainingCallback #2910

Merged
merged 11 commits into from
Feb 14, 2024
Merged

Fix to allow Scheduler to be configured as a list and fix a bug in the AdaptiveTrainingCallback #2910

merged 11 commits into from
Feb 14, 2024

Conversation

harimkang
Copy link
Contributor

@harimkang harimkang commented Feb 13, 2024

Summary

  • Fix wrong update the frequency of the warmup-scheduler (This is the cause of a bug from AdaptiveTrainingCallback. -> Longer warmup times in small-dataset)
Model Dataset Before (map_50) After (map_50) seed
ATSS_MobilenetV2 Pothole_small_0 0.0 0.46 0
  • Fixes an issue where overrides would throw an error if configs.callbacks came in as None.
  • Modify the optimizer and scheduler to receive them as a list.
  • WarmupReduceLROnPlateau -> LinearWarmupScheduler + ReduceLROnPlateau.
  • WarmupPolynomialLR -> LinearWarmupScheduler + PolynomialLR.
  • It also modifies it to match the configuration based on OTX1.6 (develop).
    • max_epochs, warmup_iters, early-stopping patience

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

Sorry, something went wrong.

@github-actions github-actions bot added TEST Any changes in tests OTX 2.0 labels Feb 13, 2024
@harimkang harimkang changed the title Fix to allow Scheduler to be configured as a list, and Fix a bug in the Warmup Scheduler Fix to allow Scheduler to be configured as a list and fix a bug in the AdaptiveTrainingCallback Feb 13, 2024
@sovrasov
Copy link
Contributor

@harimkang could you also add results on tests/assets/car_tree_bug/ to increase confidence that the fix can handle various datasets?

@harimkang
Copy link
Contributor Author

@harimkang could you also add results on tests/assets/car_tree_bug/ to increase confidence that the fix can handle various datasets?

For now, it seems to be working fine based on atss_mobilenetv2. I've also run a regression test and will share the results when I get them.
image

@eugene123tw
Copy link
Collaborator

@harimkang Could you also check the accuracy for instance seg algos on car_tree_bug dataset?

@harimkang
Copy link
Contributor Author

harimkang commented Feb 13, 2024

@harimkang Could you also check the accuracy for instance seg algos on car_tree_bug dataset?

@eugene123tw
With car_tree_bug dataset

  test/map_50 best-epochs
maskrcnn_efficientnetb2b 1 19
maskrcnn_r50 1 14

I'll also attach the regression result when it's done.

@harimkang
Copy link
Contributor Author

harimkang commented Feb 13, 2024

[Small-Dataset Comparison]
WW06.3: e3cc66f (3 times)
This PR: 53f5dcb (1 time)
classification (multi-class): multiclass-CUB-small
detection: pothole_small
*WW06.3 is the average of three measurements, so it may vary slightly.

Task model ww test/score train/iter_time duration
MULTI_CLASS_CLS Efficientnet_b0 ww06.3 0.9529   8
    This PR 0.9492   6.8
  Efficientnet_v2 ww06.3 0.9962   13
    This PR 0.9831   15.6333
  MobileNet_v3_large_1.0 ww06.3 0.9737   7
    This PR 0.9887   6.8333
  DeiT-Tiny ww06.3 0.4915   8
    This PR 1   7.7
  DINO-v2 ww06.3 0.9661   11
    This PR 0.9661   13.4667
DETECTION yolox_x ww06.3 0.2834 0.1651 56
    This PR 0.3015 0.1558 44
  yolox_l ww06.3 0.0069 0.1763 37
    This PR 0.3613 0.174 45
  yolox_s ww06.3 0 0.1181 18
    This PR 0.1594 0.1049 35
  yolox_tiny ww06.3 0.0022 0.0948 19
    This PR 0.3862 0.0917 24
  ssd_mobilenetv2 ww06.3 0.006 0.1175 20
    This PR 0.2115 0.1137 23
  atss_resnext101 ww06.3 0.494 0.2825 75
    This PR 0.5272 0.2831 70
  atss_mobilenetv2 ww06.3 0 0.1548 18
    This PR 0.534 0.171 31

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.

Thanks for the fix

@chuneuny-emily chuneuny-emily merged commit c5ad425 into openvinotoolkit:v2 Feb 14, 2024
6 checks passed
@harimkang harimkang mentioned this pull request Feb 14, 2024
10 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.

5 participants