## 2 Materials and Methods  
### Dataset  
Early gastric cancer is typically classified as T-stage 1, indicating that the tumor has invaded the mucosal or submucosal layers of the gastric wall. T-stage 4 gastric cancer indicates that the tumor has penetrated the serous layer and invaded significant organs, such as the spleen, transverse colon, liver, diaphragm, pancreas, abdominal wall, adrenal gland, kidney, small intestine, and retroperitoneum. The accurate staging of gastric cancer is crucial for determining the appropriate treatment plan for each patient. This study aimed to improve the performance of the gastric endoscopy diagnostic system through augmentation techniques, and two datasets were utilized to validate the performance of the proposed augmentation method.  
The T-stage 1 and T-stage 4 data used in this study were obtained from the AI Hub [18], which provides gastric cancer diagnosis medical images using the tumor-node-metastasis (TNM) staging classification, presented in its 8 th edition, of the American Joint Committee on Cancer (AJCC) as a standard for gastric cancer staging [19]. The data were extracted and purified from The Catholic University of Korea, Seoul St. Mary's Hospital electronic medical record (EMR) and picture archiving communication system (PACS), and patient consent and approval were obtained from the Institutional Review Board (IRB). The dataset was verified through three procedures: data collection officers, commentators, and researchers in charge of the participating institutions.  
Consequently, an average of 14.5 images were collected per patient for both the T-stage 1 and T-stage 4 datasets. Images obtained from the same patient inherently exhibit similarity. Consequently, we adopted a strategy of partitioning patients into training, validation, and test cohorts to mitigate the risk of assessing the model's performance using substantially similar images. The patient distribution was executed through a random process, which was implemented to bolster the model's overall reliability. In addition, because the number of patients in T-stage 1 and T-stage 4 differed significantly, images of learning patients in T-stage 1 were randomly extracted to match those in T-stage 4. The distribution of the original dataset is presented in Table 1.  
Normal and early gastric cancer gastroscopy data were collected by the Department of Gastroenterology at the National Gyeongsang University Hospital in the Republic of Korea. All data were validated by internal medicine specialists and histological examinations were performed to improve the data quality. All data were collected after obtaining patient consent and approval from the IRB. On average, 6.25 images were collected per patient from this dataset. In addition, the patient composition was randomly distributed without duplication in the training, validation, and test datasets. Table 2 presents the distribution of the original dataset.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & & **T-Stage 1** & **T-Stage 4** \\ \hline \multirow{3}{*}{People} & Training & 199 & 35 \\  & Validation & 13 & 13 \\  & Test & 13 & 13 \\ \hline \multicolumn{2}{c}{People Total} & 215 & 61 \\ \hline \multirow{3}{*}{Images} & Training & 512 & 512 \\  & Validation & 190 & 195 \\  & Test & 197 & 207 \\ \hline \multicolumn{2}{c}{Image Total} & 899 & 914 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Original dataset of T-stage 1 and T-stage 4 gastric endoscopy.