mmpose icon indicating copy to clipboard operation
mmpose copied to clipboard

[Fix] Fix a visualization bug and refine dataset browser

Open Ben-Louis opened this issue 3 years ago • 3 comments

Motivation

Modification

  1. fix a bug about visualizer's dataset_meta. When testing with multiple GPUs, there are multiple processes but only one visualizer. The visualizer.dataset_meta is manually set to None occasionally in some processes in test_loop. This may lead to AttributeError in other processes when getting items from visualizer.dataset_meta.
  2. refine dataset browser
    • use file_client to read image instead of mmcv.imread
    • keep bbox_file in dataset configs. Thus the visualization results match the images model receives indeed.

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.

Ben-Louis avatar Sep 19 '22 12:09 Ben-Louis

from __future__ import annotations may have compatibility issues on python 3.6. Please consider using a string like 'BufferManager' for type hints within the class itself.

ly015 avatar Sep 19 '22 14:09 ly015

Codecov Report

Base: 70.34% // Head: 70.37% // Increases project coverage by +0.03% :tada:

Coverage data is based on head (3edf57d) compared to base (60c62fc). Patch coverage: 69.23% of modified lines in pull request are covered.

:exclamation: Current head 3edf57d differs from pull request most recent head 7f1e8cb. Consider uploading reports for the commit 7f1e8cb to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           dev-1.x    #1668      +/-   ##
===========================================
+ Coverage    70.34%   70.37%   +0.03%     
===========================================
  Files          203      203              
  Lines        11558    11564       +6     
  Branches      2019     2021       +2     
===========================================
+ Hits          8130     8138       +8     
+ Misses        3083     3078       -5     
- Partials       345      348       +3     
Flag Coverage Δ
unittests 70.37% <69.23%> (+0.03%) :arrow_up:

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

Impacted Files Coverage Δ
mmpose/apis/webcam/utils/buffer.py 0.00% <0.00%> (ø)
mmpose/engine/hooks/visualization_hook.py 75.40% <75.00%> (-0.46%) :arrow_down:
mmpose/visualization/local_visualizer.py 72.39% <75.00%> (-0.74%) :arrow_down:
mmpose/datasets/transforms/common_transforms.py 83.19% <0.00%> (ø)
mmpose/codecs/utils/refinement.py 98.52% <0.00%> (+1.47%) :arrow_up:
mmpose/structures/utils.py 32.55% <0.00%> (+9.30%) :arrow_up:

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

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Sep 20 '22 02:09 codecov[bot]

from __future__ import annotations may have compatibility issues on python 3.6. Please consider using a string like 'BufferManager' for type hints within the class itself.

Solved. The corresponding unittest is add in #1662

Ben-Louis avatar Sep 20 '22 03:09 Ben-Louis