The data utilized in this study came from 195 TNBC and HER2 + BC hematoxylin and eosin (H&E)-stained WSIs, and it included 1037 ROIs annotated with tissue compartments and TILs. This evidence concerns the gene ERBB2 and breast cancer.