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] Include images without instance into bottom-up datasets for validation #1936

Merged
merged 2 commits into from
Feb 1, 2023

Conversation

Ben-Louis
Copy link
Collaborator

Motivation

The initial implementation of bottom-up datasets fails to take into account images lacking instance annotations, thus deviating from the standard evaluation protocol and resulting in an inflated accuracy score.

Modification

  1. Modify _load_annotations in BaseCocoStyleDataset, MpiiDataset, MpiiTrbDataset and CocoWholeBodyDataset to support returning both instance list and image list
  2. Modify BaseCocoStyleDataset._get_bottomup_data_infos to add images without instance into data_list_bu
  3. Update CocoMetric to adapt the above modifications
  4. Update unittests

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 Ben-Louis requested a review from ly015 January 16, 2023 07:20
@codecov
Copy link

codecov bot commented Jan 16, 2023

Codecov Report

Base: 80.22% // Head: 80.28% // Increases project coverage by +0.05% 🎉

Coverage data is based on head (b09419b) compared to base (cec0a04).
Patch coverage: 90.00% of modified lines in pull request are covered.

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

Additional details and impacted files
@@             Coverage Diff             @@
##           dev-1.x    #1936      +/-   ##
===========================================
+ Coverage    80.22%   80.28%   +0.05%     
===========================================
  Files          209      209              
  Lines        12417    12464      +47     
  Branches      2100     2105       +5     
===========================================
+ Hits          9962    10007      +45     
- Misses        2004     2005       +1     
- Partials       451      452       +1     
Flag Coverage Δ
unittests 80.28% <90.00%> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
mmpose/evaluation/metrics/coco_metric.py 95.95% <25.00%> (-0.98%) ⬇️
mmpose/datasets/datasets/body/mpii_dataset.py 65.57% <83.33%> (+1.28%) ⬆️
mmpose/datasets/datasets/body/mpii_trb_dataset.py 92.10% <84.61%> (-1.84%) ⬇️
mmpose/datasets/__init__.py 100.00% <100.00%> (ø)
mmpose/datasets/dataset_wrappers.py 93.61% <100.00%> (+8.16%) ⬆️
.../datasets/datasets/base/base_coco_style_dataset.py 89.28% <100.00%> (+0.75%) ⬆️
...asets/datasets/hand/coco_wholebody_hand_dataset.py 100.00% <100.00%> (ø)
mmpose/datasets/transforms/common_transforms.py 85.21% <0.00%> (-0.71%) ⬇️
mmpose/apis/webcam/nodes/base_visualizer_node.py 100.00% <0.00%> (ø)
mmpose/apis/webcam/utils/buffer.py 91.66% <0.00%> (+0.14%) ⬆️
... and 11 more

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 at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Ben-Louis added a commit to Ben-Louis/mmpose that referenced this pull request Jan 16, 2023
Ben-Louis added a commit to Ben-Louis/mmpose that referenced this pull request Jan 16, 2023
@ly015 ly015 merged commit 6e8fbfe into open-mmlab:dev-1.x Feb 1, 2023
Ben-Louis added a commit to Ben-Louis/mmpose that referenced this pull request Feb 7, 2023
ly015 pushed a commit to ly015/mmpose that referenced this pull request Feb 21, 2023
@Ben-Louis Ben-Louis deleted the fix-bottom-up-dataset branch March 29, 2023 17:33
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