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

Discrepancy between values with metrics and detectron2 cocoeval #1164

Closed
23pointsNorth opened this issue Jul 29, 2022 · 2 comments · Fixed by #1832
Closed

Discrepancy between values with metrics and detectron2 cocoeval #1164

23pointsNorth opened this issue Jul 29, 2022 · 2 comments · Fixed by #1832
Labels
bug / fix Something isn't working help wanted Extra attention is needed
Milestone

Comments

@23pointsNorth
Copy link
Contributor

23pointsNorth commented Jul 29, 2022

🐛 Bug

Training a model with detectron2 and evaluating it with the built-in cocoeval results in different mAP estimates for both box and segm metric cases.

To Reproduce

  1. Train model with detectron2
  2. Use CocoEval to generate mAP, mAR, etc
  3. Use torchmetrics to calculate mAP, mAR, etc
  4. Compare for a detection and segmentation models

Expected behavior

The values generated to be the same given both use underlying pycocotools (at least for segm). Or up to some floating point precision.

See below for box case:

metricName torchmetrics Detectron2 Cocoeval (x100)
map 0.6738 66.01083445431875
map_50 0.9600 97.36921342328598
map_75 0.8268 83.13779622663151
map_small 0.5943 64.11872772143319
map_medium 0.6192 64.02383668112452
map_large 0.8431 77.85958548685628
mar_1 0.7376
mar_10 0.7394
mar_100 0.7394
mar_small 0.6466
mar_medium 0.7293
mar_large 0.8795
map_per_class 0.6738 NaN, NaN, NaN, NaN, 66.01083
mar_100_per_class 0.7394

Environment

  • TorchMetrics version 9.3 (pip)
@23pointsNorth 23pointsNorth added bug / fix Something isn't working help wanted Extra attention is needed labels Jul 29, 2022
@github-actions
Copy link

Hi! thanks for your contribution!, great first issue!

@SkafteNicki SkafteNicki added this to the v0.11 milestone Sep 14, 2022
@Borda Borda modified the milestones: v0.11, v0.10 Oct 19, 2022
@Borda Borda modified the milestones: v0.10, v0.11 Nov 18, 2022
@SkafteNicki SkafteNicki modified the milestones: v0.11, v0.12 Nov 22, 2022
@MihailMihaylov97
Copy link

I have also encountered the same issue. Is that bug fix in the agenda?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug / fix Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@23pointsNorth @Borda @SkafteNicki @MihailMihaylov97 and others