'AUC-ROC precision-to-recall curve for image segmentation with one-hot encoding

I have an array Y_test of shape mx128x128x2 containing labeled images of size 128x128x2 using one-hot encoding for a binary semantic segmentation problem (m is the number of samples in my dataset). Also, I have an array Y_pred containing my model predictions, of shape mx128x128x2 also in a one-hot encoding representation.

How can I establish the AUC-ROC curve for my model ?

Thanks in advance !



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source