peal.teachers.segmentation_mask_teacher¶
A teacher that judges counterfactuals with ground-truth segmentation masks.
Teachers are PEAL’s sources of feedback on counterfactuals. This one uses the dataset’s hint masks (a binary mask of the region that legitimately carries the class, e.g. the object rather than the background) to decide whether the attribution map of a counterfactual concentrates on the right region. It is the automatic stand-in for a human annotator in CFKD experiments on datasets with segmentation hints.
Classes
Teacher that scores attribution maps against segmentation hints. |