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 annotation accuracy display in the UI #7652

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

SpecLad
Copy link
Contributor

@SpecLad SpecLad commented Mar 21, 2024

Motivation and context

The current formula the UI uses to calculate accuracy is incorrect. The denominator is supposed to be the total sample count, but ds_count + gt_count - valid_count is not the same value. To illustrate:

  ****      ***.        *...         ****
  ****      ***.        .*..         ****
  ****      ***.        ..*.         ****
  ....      ***.        ....         ***.

ds_count  gt_count  valid_count  total_count (expected)

Each value is the sum of the values in the confusion matrix marked by *. The current formula essentially adds values that are off the diagonal twice.

Instead of trying to derive the total count from other values, just transmit the correct value from the server and use it in the UI.

How has this been tested?

Manual testing.

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • [ ] I have updated the documentation accordingly
  • [ ] I have added tests to cover my changes
  • [ ] I have linked related issues (see GitHub docs)
  • [ ] I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@SpecLad SpecLad marked this pull request as ready for review March 21, 2024 13:47
@SpecLad SpecLad requested review from zhiltsov-max and removed request for bsekachev, nmanovic and Marishka17 March 21, 2024 13:47
The current formula the UI uses to calculate accuracy is incorrect. The denominator
is supposed to be the total sample count, but ds_count + gt_count - valid_count
is not the same value. To illustrate:

      ****      ***.        *...         ****
      ****      ***.        .*..         ****
      ****      ***.        ..*.         ****
      ....      ***.        ....         ***.

    ds_count  gt_count  valid_count  total_count (expected)

Each value is the sum of the values in the confusion matrix marked by `*`.
The current formula essentially adds values that are off the diagonal twice.

Instead of trying to derive the total count from other values, just transmit
the correct value from the server and use it in the UI.
Copy link

codecov bot commented Mar 21, 2024

Codecov Report

Merging #7652 (0d195c4) into develop (fc54c47) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #7652   +/-   ##
========================================
  Coverage    83.44%   83.44%           
========================================
  Files          373      373           
  Lines        39725    39726    +1     
  Branches      3741     3741           
========================================
+ Hits         33148    33150    +2     
+ Misses        6577     6576    -1     
Components Coverage Δ
cvat-ui 79.24% <ø> (ø)
cvat-server 87.32% <100.00%> (+<0.01%) ⬆️

@zhiltsov-max zhiltsov-max merged commit 7e2f9d3 into cvat-ai:develop Mar 21, 2024
34 checks passed
@SpecLad SpecLad deleted the fix-accuracy-display branch March 22, 2024 10:32
@cvat-bot cvat-bot bot mentioned this pull request Apr 2, 2024
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