# Deep Neural Networks for HER2 Grading of Whole Slide Images with Subclasses Levels
## 2 Materials  
### Whole Slide Images  
The Whole Slide Images (WSIs) used in this study were generated in the AIDPATH project ([[http://www.aidpath.eu](http://www.aidpath.eu)]([http://www.aidpath.eu](http://www.aidpath.eu)), accessed on 20 February 2024 ). The dataset consists of 306 WSIs obtained from 153 breast cancer cases at three medical centres, namely Nottingham University Hospital (NHS Trust), Servicio de Salud de Castilla-La Mancha (SESCAM), and Servicio Andaluz de Salud (SAS), as follows:  
* NHS: 86 cases of invasive breast carcinomas with 172 WSI.
* SESCAM: 52 cases of invasive ductal carcinomas with 104 WSI.
* SAS: 15 cases of invasive and in situ ductal carcinomas with 30 WSI.  
All the slides have the clinical outcome: HER2 negative, positive and equivocal together with the IHC score (0, 1, 2+ or 3+). Table 2 shows the allocation of the 306 WSIs according to their respective score. The distribution of WSIs per class is proportional, with an average of 76 WSIs per class. In order to guarantee the quality of the labels when building the groundtruth in our dataset we carried out a consensus process involving multiple pathologists to score the HER2 images. Pathologists provided the groundtruth at NHS Trust, SESCAM and SAS during standard and quality-measured routine. Each case was reviewed by at least two specialists. The most challenging cases, as well as those lacking agreement, were reviewed by five specialists from the three institutions. If there was a difference in the scoring, the mode was employed. The analysis revealed that there was variability in the scores of the samples in 40% of the cases.  
The 86 cases from NHS were used in the HER2 challenge contest [16] as well as other research works [5; 13; 14; 15; 17; 19; 22]. All the WSIs were acquired at 40\(\times\) magnification. The source of the digital scanning is a Hamamatsu NanoZoomer C960 (TIF format) for NHS Trust and a Leica DM-4000 (SVS format) for SESCAM and SAS. All the images have an average resolution of 90,000 \(\times\) 50,000 pixels and 1 GB file size in a proprietary format.  
For the purposes of training and evaluating the classification models, 70% of the entire set of WSIs were used for training, while 20% were selected for validation and 10% of the WSIs were specifically chosen as a hold-out test set. The WSIs were partitioned into patches to replicate the pathologist's diagnosis, as previously stated. Therefore, all the datasets  
\begin{table}
\begin{tabular}{c c c c c} \hline
**Total** & **0** & **1** & **2+** & **3+** \\ \hline
306 & 78 & 74 & 76 & 78 \\ \hline \end{tabular}
\end{table}
Table 2: Score-based distribution of the 306 WSIs.  
consist of patches of size 64 \(\times\) 64 pixels that have been extracted from the original slides. These patches are extracted from the left to the right and from the top to the bottom of the image. A stride of 64 pixels is used in both the height and width directions, ensuring that the patches do not overlap.  
In the experiments conducted for training and validation, the existing data is augmented and transformed to investigate its intriguing characteristics and obtain more representative datasets. This process enhances the accuracy of the trained models.