## 1 Introduction  
External radiation therapy is a widely used curative treatment option for patients with prostate cancer [1]. In radiotherapy, the optimization of the tumor local control and the minimization of the radiation toxicities are highly linked to the accuracy of the definition of the target volume and the OARs [2]. The treatment planning procedure is conventionally based on 3D anatomical information obtained via computed tomography (CT) scans. Nevertheless, because of its superior soft tissue contrast, MR imaging has been used in radiotherapy treatment planning for several years [3]. The better quality of MR images improves the organs' delineation and reduces the contouring uncertainty [4; 5]. Especially for prostate cancer, an MR-only workflow has become more and more common [6; 7; 8]. In addition, the recent integration of magnetic resonance imager (MRI) on linear accelerators (LINAC) for magnetic resonance-guided radiotherapy (MRgRT) allows the direct use of MR images for the planning and the guidance of treatment. Indeed, because it is a non-ionizing imaging device, MR images can be acquired continuously during the treatment to monitor the radiation activation (gating process), and the on-board MR image quality enables the online replanning of the treatment by considering the daily position and shape of the organs (adaptive radiotherapy process). MR-Linacs technology represents a higher cost than classical Linacs; nevertheless, it promises improving the clinical outcomes of prostate cancer [9; 10]. First, reduced toxicity has been pointed out [11]. In this context, the MRIdian (ViewRay Inc., Oakwood, OH, USA) MR-Linac system has been clinically used in our institution since June 2019. It combines a 6 MV Flattening Filter-Free (FFF) LINAC with a 0.35 T MR imaging system [12]. Nevertheless, with this device, only manual segmentation is possible on the MR planning images. Manual delineation has been described as a tedious process, increasing the workload of radiation oncologists [13]. The segmentations are also subject to intra- and inter-operator variabilities due to different delineation expertise and subjective evaluation from radiation oncologists. Automatic segmentation techniques, on the other hand, have been developed during recent decades in medical imaging for an accurate and efficient analysis of images. It can produce reliable and precise results in a shorter time frame, improving the speed and accuracy of diagnosis and treatment planning [14; 15; 16; 17]. These issues have been addressed, and a plethora of automatic segmentation techniques have been proposed in the literature in both CT and MR imaging modalities [13; 18; 19]. Atlas-based, deep learning, and other image-processing techniques have been developed in the last two decades [20; 21]. Atlas-based methods have shown acceptable accuracy for the segmentation of OARs. However, most of the results require a significant amount of time from the radiation oncologist to correct regions that contain small areas, imaging artifacts, deformable organs, or organs near the target volume [22]. Due to the issues with atlas-based methods, researchers focused on multi-atlas segmentation (MAS), where multiple atlases are used as prior knowledge instead of individual atlases [23]. However, even multi-atlas methods have limitations, the most notable being the need for considerable computational resources [24]. Currently, a common trend in healthcare is the development of deep neural networks for automatic detection, classification, and segmentation. Deep learning techniques are capable of learning task-specific features without the need for hand-engineered features. Convolutional neural networks (CNNs) are a branch of deep learning that gain complex information from training samples, which is essential for successfully delineating anatomical structures. Specifically in MR imaging, researchers have shown great interest in alleviating MRgRT workflow [19].