## 1 Introduction
Bayesian optimization is known to perform well for optimizing continuous hyperparameters. However, it is sequential by nature, and thus, it is often too slow for practical use in large-scale neural networks and is more suitable for small function evaluation budgets (i.e., the number of iterations searching for optimal hyperparameters may be limited due to excessive computing time; for example, <10 times the number of hyperparameters being optimized) [34; 35]. CMA-ES is considered as a state-of-the-art optimizer for continuous black-box functions, which may prevent premature convergence and lead to fast convergence by step size control and covariance matrix adaptation, as well as support parallel evaluations of solutions [34]. [PERSON] et al. [36] showed that CMA-ES performed best among more than 100 classic and modern optimizers for various black-box functions with moderate to large evaluation budgets. Compared to various state-of-the-art Bayesian optimization methods such as Tree Parzen Estimator (TPE) and Sequential Model-Based Algorithm Configuration (SMAC), CMA-ES can be more powerful, especially in the regime of parallel evaluations [34]. In a study by [PERSON] et al. [37], optimizing three hyperparameters using CMA-ES showed superior performance over TPE and SMAC for segmenting cell nuclei in prostate tissue images. In this work, HPO with CMA-ES has been implemented to improve the contouring accuracy of a U-Net-based autocontouring algorithm for challenging anatomic sites. For each patient, our algorithm generates patient-specific hyperparameters and trainable parameters using the same patient's cine MR images. Patient-specific HPO was chosen because, in clinical practice, a single physician is typically responsible for a patient's treatment, and each physician defines target volumes based on their individual experience and clinical judgment. In niteRT, our aim is to precisely replicate a specific physician's contouring style for each patient, rather than generating generalized or consensus-based contours. This level of personalization is likely essential for clinical acceptance of the real-time autocontouring feature in niteRT. In clinic, the patient's cine MR images are to be acquired during the MR simulation session prior to the actual treatment using the same imaging sequence and patient setup as in the treatment. The contouring performance of the algorithm for various liver, prostate, and lung cancer patients is presented and compared to that of the standardized segmentation methods. The main contributions of our work are the following:  
* Patient-specific HPO was performed, tailoring the hyperparameters for each patient dataset to achieve the best possible autocontouring performance. * The first application of CMA-ES for optimizing the hyperparameters of a U-Net-based autocontouring algorithm is presented. * The proposed algorithm is the first tumor autocontouring algorithm specifically applicable to the intrafractional MR images of liver and prostate cancer patients for niteRT. * The proposed algorithm achieved the best overall performance among standardized segmentation algorithms such as U-Net [31] and nnU-Net [27]. * A total of 47 in vivo MR image sets were acquired to evaluate the algorithm, which achieved comparable contouring performance to that of human experts.