How to calculate class-wise pixel accuracy of Semantic Segmentation Model?

I want to calculate class-wise pixel accuracy of my semantic segmentation model. Currently, I am computing MIoU using sklearn metrics (as shown in code snippet below). I shall be grateful I anyone help me out.