Skip to content

Issues with compute_confusion_matrix metric #1244

@Nic-Ma

Description

@Nic-Ma

Describe the bug
There are 2 minor issues in compute_confusion_matrix metric:

  1. If reduction mode is SUMBATCH, should not do SUM on not_nans, otherwise we don't know which class is nan when computing the final result.
  2. If compute_sample is False, should return the confusion matrix elements of current batch directly, then compute the final metric value for the whole epoch. Current implementation computes metric for every batch, if batch size changed, the metric value will be different.
    So in summary, should have 2 modes:
    (1) Compute metric for every sample image first, then average or sum the whole epoch to get the final result.
    (2) Keep the confusion matrix elements of every image, then average or sum the whole epoch, then compute metric.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions