## 2 Materials and Methods
### Image Pre-Processing and Python Pipeline  
CE-CT images were exported from the MIM software in DICOM format for the VOI delineation and exported to Python (version 3.9.13) for the pre-processing operations necessary to arrange the data in a suitable format for the four pre-trained CNNs available in Python [18]. The database was divided with balanced output for each classification investigated (i.e., EAOC vs. NEOC or OC vs. control) in 70% training, 20% testing, and 10% validation. The training dataset was augmented by rotating each CE-CT scan of 30, 45, 90, 325 degrees with respect to the cranio-caudal (CC) axis and axial slices were obtained in each VOI. To guarantee the convergence of CNN models, greyscale images were rescaled by dividing each pixel by 255, which was the maximum permitted value in each pixel. Each delineated VOI available on the augmented CE-CT dataset was resized to a \(224\times 224\times 128\) or to a \(299\times 299\times 128\) matrix. Each axial slice with a \(224\times 224\) matrix was used as input in three pre-trained CNNs (i.e., VGG19 [19], ResNet50 [20], and DenseNetI21 [21]), while the axial slice with a \(299\times 299\) matrix was used as input for the Xception CNN [18]. All CNNs were pre-trained with the same dataset, _ImageNet_[22]. Each axial slice was associated with a binary classification according to the endpoint investigated. In our dataset, the EROC vs. NEOC class distribution was as follows: 59 samples for the positive class and 95 samples for the negative class, with a 1:1.6 ratio indicating moderated unbalancing. Furthermore, the EROC + NEOC vs. non-tumoral class distribution was as follows: 154 samples for the positive class and 84 samples for the negative class, with a ratio of 1.8:1, indicating moderated unbalancing. To address the potential class imbalance, we used an undersampling option during the training phase of each CNN algorithm for class balancing. Furthermore, in addition to accuracy, AUC, and F1-score, we evaluated the confusion matrix for the EAOC vs. NEOC class and tumoral (EAOC or NEOC) vs. non-tumoral class to assess the model performance. The selected CNNs were trained using a massive dataset to distinguish between 1000 different types of objects [22]. We modified the last four layers to allow for a binary classification while freezing all the other layers to preserve the network's complexity for image classification. The implemented architecture leverages a pre-trained CNN (e.g., VGG19) as a feature extractor, followed by a GlobalAveragePooling2D layer to reduce spatial dimensions. It includes a Dense layer with 128 neurons, a Dropout layer with L1 penalization to prevent overfitting, and a final Dense layer with one neuron having a sigmoid activation function for binary classification. Each CNN was trained for 100 epochs, with a patience of 50 epochs. The modified architecture combines transfer learning and task-specific layers for robust image classification; see Figure 2 as an example for the VGG-19 CNN. Since the CNNs were not able to classify the whole VOI, we customized the CNN architecture to analyze each slice of the VOI. The CNN-predicted results were used as input for the ML algorithms, which were our final meta-classifier to produce a final single classification of the whole VOI. Finally, three different ML algorithms, available in _keras_, i.e., K-Nearest Neighbor (KNN), Random Forest (RF), and Gradient Boosting (GB) classifier were used to predict the two classifications. Each ML model was trained using a 5-fold cross-validation, both in fine-tuning and actual training. A grid search approach was used to identify the best combination of hyper-parameters. Since each algorithm has its peculiar kind of hyper  
Figure 2: The modified architecture for the VGG-19 CNN, which consists in the replacement of the last four layers to force the classification from 1000 to 2 groups.