I am using fatai v2 for classifying lands using satellite imageries, and I am struggling with plotting confusion matrix for my test dataset using fastai.
This is the code I used:
learn = unet_learner(dls,resnet34, metrics=accuracy, self_attention=True, act_cls=Mish)
lr=5.248074739938602e-05
learn.fit_flat_cos(1000, slice(lr))
interp = SegmentationInterpretation.from_learner(learn)
losses,idxs = interp.top_losses()
top_losses, top_idxs = interp.top_losses()
but when I run this line for plotting confusion matrix:
mean_cm, single_img_cm = interp._generate_confusion()
it shows an error that interp doesn't have _generate_confusion().
AttributeError: 'SegmentationInterpretation' object has no attribute '_generate_confusion'
I upgraded fastai to the latest version, but it is not working. Can anybody help me to find a code for plotting the confusion matrix for image segmentation models?