google-deepmind / google-deepmind/multi_object_datasets

Segmentation metrics is nan when n_true_groups == 1

Aperta
#2 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
290
Fork
27
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hello. According to the comment:
```
# The case where n_true_groups == n_pred_groups == 1 needs to be
# special-cased (to return 1) as the above formula gives a divide-by-zero.
# This might not work when true_mask has values that do not sum to one:
```
I understand `both_single_cluster` is handling this corner case.

What I am confused is this function: https://github.com/deepmind/multi_object_datasets/blob/master/segmentation_metrics.py#L97. It seems to me it makes sense when it is applied to ground truth masks as `_all_equal(true_group_ids)` , but when it is applied to `_all_equal(pred_group_ids)`, the prediction slot for object may not necessarily be "the first slot" as suggested by `values[..., :1]`.

May I ask if it is corner case missing in this implementation?

Thank you!

More specifically, your code first finds the argmax of the tensor with shape [bs, n_pixels, n_classes] over the last axis. Assume n_classes == 3, then because my prediction for object is in slot 3, I believe that argmax will return two values, `3` for the pixels with objects and `1` for pixels exclude the object, as argmax returns 1 by default if all values are equal. It seems to me that this will lead to a wrong condition in your ARI value.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia in segmentation_metrics.py intorno alla riga 97 e segui both_single_cluster, _all_equal(true_group_ids) e _all_equal(pred_group_ids). Riproduci il caso n_classes == 3 con la predizione dell’oggetto nel terzo slot, quindi confronta il comportamento risultante di ARI con la condizione attesa per un singolo cluster. Il lavoro è completato quando il caso limite è confermato o smentito e il comportamento rilevante è coperto da un controllo di regressione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
computer-vision
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.