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] Fix inconsistent float precision between mmdet and mmcv #9570

Merged
merged 4 commits into from
Jan 9, 2023
Merged

[Fix] Fix inconsistent float precision between mmdet and mmcv #9570

merged 4 commits into from
Jan 9, 2023

Conversation

jamiechoi1995
Copy link
Contributor

In coco.py and lvis.py, the float precision of bbox mAP of eval_result of evaluate() function is .3f,
However, in the float precision when printing log in mmcv is .4f,
see:
https://github.com/open-mmlab/mmcv/blob/ea173c9f07f0abf6873d2b7d786fb6411843cf00/mmcv/runner/hooks/logger/text.py#L178-L179

This PR suggests using the same .4f float precision. Another solution is not to limit the float precision in eval_result.

Fix #9569

@ZwwWayne ZwwWayne changed the base branch from master to dev January 5, 2023 10:38
@jamiechoi1995 jamiechoi1995 marked this pull request as draft January 6, 2023 06:33
@RangiLyu RangiLyu marked this pull request as ready for review January 6, 2023 08:57
@codecov
Copy link

codecov bot commented Jan 6, 2023

Codecov Report

Base: 64.15% // Head: 64.12% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (da30df3) compared to base (94afcdc).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #9570      +/-   ##
==========================================
- Coverage   64.15%   64.12%   -0.03%     
==========================================
  Files         362      362              
  Lines       29604    29604              
  Branches     5036     5036              
==========================================
- Hits        18991    18984       -7     
- Misses       9604     9614      +10     
+ Partials     1009     1006       -3     
Flag Coverage Δ
unittests 64.10% <0.00%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
mmdet/datasets/coco.py 58.22% <ø> (ø)
mmdet/datasets/lvis.py 15.43% <0.00%> (ø)
mmdet/models/detectors/cornernet.py 94.87% <0.00%> (-5.13%) ⬇️
mmdet/models/dense_heads/corner_head.py 68.33% <0.00%> (-1.39%) ⬇️

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.

@ZwwWayne ZwwWayne merged commit 334e70f into open-mmlab:dev Jan 9, 2023
@jamiechoi1995 jamiechoi1995 deleted the jamiechoi1995-patch-fix_float_precision branch January 10, 2023 08:52
thmegy pushed a commit to thmegy/mmdetection that referenced this pull request May 5, 2023
…mlab#9570)

* [Fix] Fix inconsistent float precision between mmdet and mmcv in coco.py

* [Fix] Fix inconsistent float precision between mmdet and mmcv in lvis.py

* Fix pytest in test_panoptic_dataset.py
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.

[Bug] Inconsistent float precision in training log
3 participants