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

[MMSIG-87] Migrate SoftWingLoss config to 1.x #2287

Merged
merged 5 commits into from
Apr 24, 2023
Merged

[MMSIG-87] Migrate SoftWingLoss config to 1.x #2287

merged 5 commits into from
Apr 24, 2023

Conversation

xin-li-67
Copy link
Contributor

Motivation

MMSIG-87: migrate face2d deeppose softwingloss model to 1.x

Modification

configs/face_2d_keypoint/topdown_regression/wflw/resnet_softwingloss_wflw.yml
configs/face_2d_keypoint/topdown_regression/wflw/resnet_softwingloss_wflw.md
configs/face_2d_keypoint/topdown_regression/wflw/td-reg_res50_softwingloss_8xb64-210e_wflw-256x256.py

BC-breaking (Optional)

Use cases (Optional)

Checklist

Before PR:

  • I have read and followed the workflow indicated in the CONTRIBUTING.md to create this PR.
  • Pre-commit or linting tools indicated in CONTRIBUTING.md are used to fix the potential lint issues.
  • Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests.
  • New functionalities are covered by complete unit tests. If not, please add more unit tests to ensure correctness.
  • The documentation has been modified accordingly, including docstring or example tutorials.

After PR:

  • CLA has been signed and all committers have signed the CLA in this PR.

@xin-li-67
Copy link
Contributor Author

The first few training epochs using configs/face_2d_keypoint/topdown_regression/wflw/td-reg_res50_softwingloss_8xb64-210e_wflw-256x256.py :

04/23 14:28:20 - mmengine - WARNING - The prefix is not set in metric class NME.
04/23 14:28:20 - mmengine - INFO - load model from: torchvision://resnet50
04/23 14:28:20 - mmengine - INFO - Loads checkpoint by torchvision backend from path: torchvision://resnet50
04/23 14:28:20 - mmengine - WARNING - The model and loaded state dict do not match exactly

unexpected key in source state_dict: fc.weight, fc.bias

04/23 14:28:20 - mmengine - WARNING - "FileClient" will be deprecated in future. Please use io functions in https://mmengine.readthedocs.io/en/latest/api/fileio.html#file-io
04/23 14:28:20 - mmengine - WARNING - "HardDiskBackend" is the alias of "LocalBackend" and the former will be deprecated in future.
04/23 14:28:20 - mmengine - INFO - Checkpoints will be saved to /home/xinli/Projects/mmpose/work_dirs/td-reg_res50_softwingloss_8xb64-210e_wflw-256x256.
/home/xinli/Projects/mmpose/mmpose/datasets/transforms/common_transforms.py:70: UserWarning: Use the existing "bbox_center" and "bbox_scale". The padding will still be applied.
  warnings.warn('Use the existing "bbox_center" and "bbox_scale"'
/home/xinli/Projects/mmpose/mmpose/datasets/transforms/common_transforms.py:70: UserWarning: Use the existing "bbox_center" and "bbox_scale". The padding will still be applied.
  warnings.warn('Use the existing "bbox_center" and "bbox_scale"'
04/23 14:28:31 - mmengine - INFO - Epoch(train)   [1][ 50/118]  lr: 6.193637e-06  eta: 1:36:58  time: 0.235280  data_time: 0.085799  memory: 7279  loss: 90.398080  loss_kpt: 90.398080  acc_pose: 0.008610
04/23 14:28:42 - mmengine - INFO - Epoch(train)   [1][100/118]  lr: 1.244990e-05  eta: 1:30:04  time: 0.202723  data_time: 0.076319  memory: 7279  loss: 50.954976  loss_kpt: 50.954976  acc_pose: 0.051339
04/23 14:28:45 - mmengine - INFO - Exp name: td-reg_res50_softwingloss_8xb64-210e_wflw-256x256_20230423_142817
04/23 14:28:56 - mmengine - INFO - Epoch(train)   [2][ 50/118]  lr: 2.095842e-05  eta: 1:29:50  time: 0.219243  data_time: 0.091326  memory: 7279  loss: 14.144817  loss_kpt: 14.144817  acc_pose: 0.276945
04/23 14:29:07 - mmengine - INFO - Epoch(train)   [2][100/118]  lr: 2.721468e-05  eta: 1:29:27  time: 0.216887  data_time: 0.090792  memory: 7279  loss: 8.813807  loss_kpt: 8.813807  acc_pose: 0.474011
04/23 14:29:11 - mmengine - INFO - Exp name: td-reg_res50_softwingloss_8xb64-210e_wflw-256x256_20230423_142817
04/23 14:29:22 - mmengine - INFO - Epoch(train)   [3][ 50/118]  lr: 3.572320e-05  eta: 1:28:24  time: 0.214081  data_time: 0.087280  memory: 7279  loss: 6.516705  loss_kpt: 6.516705  acc_pose: 0.689573
04/23 14:29:32 - mmengine - INFO - Epoch(train)   [3][100/118]  lr: 4.197946e-05  eta: 1:28:08  time: 0.215080  data_time: 0.088150  memory: 7279  loss: 5.227034  loss_kpt: 5.227034  acc_pose: 0.742985
04/23 14:29:36 - mmengine - INFO - Exp name: td-reg_res50_softwingloss_8xb64-210e_wflw-256x256_20230423_142817
04/23 14:29:47 - mmengine - INFO - Epoch(train)   [4][ 50/118]  lr: 5.048798e-05  eta: 1:27:33  time: 0.215274  data_time: 0.086516  memory: 7279  loss: 4.526577  loss_kpt: 4.526577  acc_pose: 0.799585
04/23 14:29:57 - mmengine - INFO - Epoch(train)   [4][100/118]  lr: 5.674424e-05  eta: 1:27:16  time: 0.213363  data_time: 0.086669  memory: 7279  loss: 4.481093  loss_kpt: 4.481093  acc_pose: 0.551499
04/23 14:30:01 - mmengine - INFO - Exp name: td-reg_res50_softwingloss_8xb64-210e_wflw-256x256_20230423_142817
04/23 14:30:12 - mmengine - INFO - Epoch(train)   [5][ 50/118]  lr: 6.250000e-05  eta: 1:27:14  time: 0.223089  data_time: 0.095208  memory: 7279  loss: 4.239157  loss_kpt: 4.239157  acc_pose: 0.731505
04/23 14:30:23 - mmengine - INFO - Epoch(train)   [5][100/118]  lr: 6.250000e-05  eta: 1:26:45  time: 0.207333  data_time: 0.080608  memory: 7279  loss: 4.130995  loss_kpt: 4.130995  acc_pose: 0.653061
04/23 14:30:26 - mmengine - INFO - Exp name: td-reg_res50_softwingloss_8xb64-210e_wflw-256x256_20230423_142817
04/23 14:30:37 - mmengine - INFO - Epoch(train)   [6][ 50/118]  lr: 6.250000e-05  eta: 1:26:19  time: 0.215485  data_time: 0.088720  memory: 7279  loss: 3.896597  loss_kpt: 3.896597  acc_pose: 0.904337
04/23 14:30:48 - mmengine - INFO - Epoch(train)   [6][100/118]  lr: 6.250000e-05  eta: 1:26:07  time: 0.214174  data_time: 0.087395  memory: 7279  loss: 3.809748  loss_kpt: 3.809748  acc_pose: 0.869101
04/23 14:30:51 - mmengine - INFO - Exp name: td-reg_res50_softwingloss_8xb64-210e_wflw-256x256_20230423_142817
04/23 14:31:02 - mmengine - INFO - Epoch(train)   [7][ 50/118]  lr: 6.250000e-05  eta: 1:25:41  time: 0.215851  data_time: 0.088899  memory: 7279  loss: 3.630974  loss_kpt: 3.630974  acc_pose: 0.869101
04/23 14:31:12 - mmengine - INFO - Epoch(train)   [7][100/118]  lr: 6.250000e-05  eta: 1:25:27  time: 0.211547  data_time: 0.085165  memory: 7279  loss: 3.713780  loss_kpt: 3.713780  acc_pose: 0.918686
04/23 14:31:16 - mmengine - INFO - Exp name: td-reg_res50_softwingloss_8xb64-210e_wflw-256x256_20230423_142817
04/23 14:31:27 - mmengine - INFO - Epoch(train)   [8][ 50/118]  lr: 6.250000e-05  eta: 1:25:14  time: 0.218691  data_time: 0.091962  memory: 7279  loss: 3.726970  loss_kpt: 3.726970  acc_pose: 0.914222
04/23 14:31:38 - mmengine - INFO - Epoch(train)   [8][100/118]  lr: 6.250000e-05  eta: 1:25:02  time: 0.213352  data_time: 0.086842  memory: 7279  loss: 3.540098  loss_kpt: 3.540098  acc_pose: 0.847577
04/23 14:31:41 - mmengine - INFO - Exp name: td-reg_res50_softwingloss_8xb64-210e_wflw-256x256_20230423_142817
04/23 14:31:52 - mmengine - INFO - Epoch(train)   [9][ 50/118]  lr: 6.250000e-05  eta: 1:24:45  time: 0.213529  data_time: 0.086762  memory: 7279  loss: 3.297371  loss_kpt: 3.297371  acc_pose: 0.949617
04/23 14:31:54 - mmengine - INFO - Exp name: td-reg_res50_softwingloss_8xb64-210e_wflw-256x256_20230423_142817
04/23 14:32:03 - mmengine - INFO - Epoch(train)   [9][100/118]  lr: 6.250000e-05  eta: 1:24:33  time: 0.212006  data_time: 0.084332  memory: 7279  loss: 3.621521  loss_kpt: 3.621521  acc_pose: 0.898916
04/23 14:32:06 - mmengine - INFO - Exp name: td-reg_res50_softwingloss_8xb64-210e_wflw-256x256_20230423_142817
04/23 14:32:17 - mmengine - INFO - Epoch(train)  [10][ 50/118]  lr: 6.250000e-05  eta: 1:24:16  time: 0.217338  data_time: 0.090094  memory: 7279  loss: 3.272245  loss_kpt: 3.272245  acc_pose: 0.927296
04/23 14:32:28 - mmengine - INFO - Epoch(train)  [10][100/118]  lr: 6.250000e-05  eta: 1:24:03  time: 0.211512  data_time: 0.084138  memory: 7279  loss: 3.405219  loss_kpt: 3.405219  acc_pose: 0.907526
04/23 14:32:31 - mmengine - INFO - Exp name: td-reg_res50_softwingloss_8xb64-210e_wflw-256x256_20230423_142817
04/23 14:32:31 - mmengine - INFO - Saving checkpoint at 10 epochs

Testing result using the new config and 0.x checkpoint deeppose_res50_wflw_256x256_softwingloss-4d34f22a_20211212.pth :

04/23 14:37:41 - mmengine - WARNING - The prefix is not set in metric class NME.
Loads checkpoint by local backend from path: work_dirs/td-reg_res50_softwingloss_8xb64-210e_wflw-256x256/deeppose_res50_wflw_256x256_softwingloss-4d34f22a_20211212.pth
04/23 14:37:41 - mmengine - INFO - Load checkpoint from work_dirs/td-reg_res50_softwingloss_8xb64-210e_wflw-256x256/deeppose_res50_wflw_256x256_softwingloss-4d34f22a_20211212.pth
/home/xinli/Projects/mmpose/mmpose/datasets/transforms/common_transforms.py:70: UserWarning: Use the existing "bbox_center" and "bbox_scale". The padding will still be applied.
  warnings.warn('Use the existing "bbox_center" and "bbox_scale"'
/home/xinli/Projects/mmpose/mmpose/datasets/transforms/common_transforms.py:70: UserWarning: Use the existing "bbox_center" and "bbox_scale". The padding will still be applied.
  warnings.warn('Use the existing "bbox_center" and "bbox_scale"'
04/23 14:37:46 - mmengine - INFO - Epoch(test) [50/79]    eta: 0:00:02  time: 0.099638  data_time: 0.041459  memory: 564  
04/23 14:37:48 - mmengine - INFO - Evaluating NME...
04/23 14:37:48 - mmengine - INFO - Epoch(test) [79/79]    NME: 0.044446  data_time: 0.042075  time: 0.080631

@codecov
Copy link

codecov bot commented Apr 23, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.02 🎉

Comparison is base (7abe131) 82.00% compared to head (a84c163) 82.03%.

❗ Current head a84c163 differs from pull request most recent head 6d518bf. Consider uploading reports for the commit 6d518bf to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           dev-1.x    #2287      +/-   ##
===========================================
+ Coverage    82.00%   82.03%   +0.02%     
===========================================
  Files          232      232              
  Lines        13643    13643              
  Branches      2319     2319              
===========================================
+ Hits         11188    11192       +4     
+ Misses        1922     1914       -8     
- Partials       533      537       +4     
Flag Coverage Δ
unittests 82.03% <ø> (+0.02%) ⬆️

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

see 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Tau-J
Copy link
Collaborator

Tau-J commented Apr 23, 2023

Please also refer to topdown_heatmap to complete the list of WFLW in topdown_regression/README.md

@xin-li-67
Copy link
Contributor Author

Please also refer to topdown_heatmap to complete the list of WFLW in topdown_regression/README.md

updated in the latest commit

@Tau-J Tau-J merged commit 98d0dfa into open-mmlab:dev-1.x Apr 24, 2023
@xin-li-67 xin-li-67 deleted the face2d_softwingloss branch April 24, 2023 03:29
Tau-J pushed a commit to Tau-J/mmpose that referenced this pull request Apr 25, 2023
shuheilocale pushed a commit to shuheilocale/mmpose that referenced this pull request May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants