## 1 Introduction
By providing intrafractional MR images of tumor regions with sufficient soft tissue contrast concurrently with irradiation, linac-MR has the potential to achieve non-invasive intrafractional tumor-tracked radiotherapy (nifeRT). During nifeRT, the treatment beam can follow the mobile tumor based on the intrafractional MR images, by adaptively adjusting its shape and position via MLC control. The feasibility of nifeRT using linac-MR was demonstrated by [PERSON] et al. [21] through tracking and irradiating a phantom undergoing simulated tumor motions. Similarly, other feasibility studies have shown the possibility of magnetic resonance imaging (MRI)-guided tumor tracking for improving tumor localization and sparing of healthy tissues [22; 23]. For nifeRT using linac-MR, the first step is to detect the shape and position of the tumor in each MR image. Currently, common clinical practice requires a certified expert (e.g., radiation oncologist) to manually detect and contour the tumor and the organs during the MR simulation session performed prior to treatment. However, it is not feasible for a human expert to continually contour images at the fast imaging rate of linac-MR (>4 frames/s) for the duration of treatment. To address this, a previous study by [PERSON] et al. [24] developed an artificial neural network-based autocontouring algorithm (pulse-coupled neural network), which achieved -90% contouring accuracy compared to experts' manual contours for lung cancer patients. However, this was not achieved for other sites such as the liver and prostate. For both of these sites, autocontouring becomes challenging as both the low image contrast and unclear boundary between the tumor and tissue background make it difficult for the algorithm to learn details of the tumor's shape. The aim of this pilot study is to address this issue by employing (1) a deep neural network and (2) hyperparameter optimization (HPO) powered by the Covariance Matrix Adaptation Evolution Strategy (CMA-ES) [25], in our autocontouring algorithm. Semantic image segmentation, which refers to the process of transforming raw medical images into clinically relevant, spatially structured information, such as outlining tumor boundaries, is the most widely investigated medical image processing task, with numerous segmentation algorithms published in the field of biomedical image segmentation each year [26; 27]. One of the first deep learning-based segmentation algorithms was a fully convolutional network (FCN) [28], which includes only convolutional layers that enable it to take an image of arbitrary size and generate a segmentation map of the same size [29]. However, by following the design principle of classification networks, global context information is not taken into account in an efficient way, potentially ignoring useful scene-level context [29; 30]. [PERSON] et al. [31] proposed U-Net, which is built upon an FCN for medical image segmentation. U-Net uses concatenations in a symmetric network architecture to combine global context information from shallower layers and semantic information from deeper layers to improve segmentation details. For tumor segmentation, U-Net-based architectures are extensively used and modified to improve segmentation performance [32; 33]. As there now exist numerous segmentation algorithms, various public challenges and benchmarks have been organized in the past for lung, liver, and prostate tumor segmentation to serve as the standard for comparative assessment of segmentation algorithms [26; 32; 33]. In order for a segmentation algorithm to achieve optimal performance for a given task, it is essential to properly tune the hyperparameters that determine its network architecture and control the training process. Some commonly used HPO methods include grid search, random search, and Bayesian optimization [34]. Since grid search and random search have no means of directing the search towards better solutions, they may not lead to the best solutions and require a long execution time.