You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There, the things and stuffs are enumerated by enumerate(things), but these values are objects of Set class that is "unordered collection". So the order of the resulting lists and the cat_id_to_continuous_id also has unpredictable order.
Expected behavior
The output classes are ordered by things and stuffs, and numerically sorted within each.
Ex. with things=[4, 1], stuffs=[3, 2], the output classes are ordered by [1, 4, 2, 3].
I guessed the expected behavior from the implementation because I could not find a description of the order of output classes.
Environment
TorchMetrics version (and how you installed TM, e.g. conda, pip, build from source): build the master branch
Python & PyTorch Version (e.g., 1.0): '1.5.0dev'
Any other relevant information such as OS (e.g., Linux): Linux (Ubuntu 22.04)
Additional context
The text was updated successfully, but these errors were encountered:
🐛 Bug
PanopticQuality can return per class score when
return_per_class=True
argument is given.But the order of the output classes is unpredictable.
To Reproduce
Three examples should return identical scores but actually the order has been changed.
(Note that it is not sure if this can be reproduced in a different environment as described below)
Internally, the order of the classes are determined by the value of
cat_id_to_continuous_id
the values are defined here:torchmetrics/src/torchmetrics/functional/detection/_panoptic_quality_common.py
Lines 139 to 157 in 4ecfde7
There, the
things
andstuffs
are enumerated byenumerate(things)
, but these values are objects ofSet
class that is "unordered collection". So the order of the resulting lists and thecat_id_to_continuous_id
also has unpredictable order.Expected behavior
The output classes are ordered by
things
andstuffs
, and numerically sorted within each.Ex. with
things=[4, 1], stuffs=[3, 2]
, the output classes are ordered by[1, 4, 2, 3]
.I guessed the expected behavior from the implementation because I could not find a description of the order of output classes.
Environment
conda
,pip
, build from source): build the master branchAdditional context
The text was updated successfully, but these errors were encountered: