mit-quest / necstlab-damage-segmentation

MIT License
5 stars 6 forks source link

one hot confusion matrix-based metrics not working in tf2 #62

Open rak5216 opened 4 years ago

rak5216 commented 4 years ago

trace back to tf1 vs. tf2 upgrade #48

rak5216 commented 4 years ago

Here is my proof that (as you sniffed out) there is a subtle issue in the 1H code only for class0, and that for class metrics 1H = non1H and therefore i can optimize by non1H iou until we fix the code: image

rak5216 commented 4 years ago

this is where it happens in tf.keras https://github.com/tensorflow/tensorflow/blob/e5bf8de410005de06a7ff5393fafdf832ef1d4ad/tensorflow/python/keras/utils/metrics_utils.py#L341-L343

but i believe issue is on our end with 1H implementation somehow in metrics_utils.py