## 2 Materials and Methods
### Method
#### 2.2.3 Extraction of Prior Information from EMIDEC Dataset  
In this work, a pathology-specific data augmentation algorithm is proposed. Synthetic myocardial infarction cases are generated from images of healthy patients. Afterwards, these newly created images are added to the training set and fed to the segmentation models, with the goal of helping them to learn that the MI scar, if present, is part of the myocardium and should be segmented as such.  
The algorithm feeds itself from some prior information in terms of type, location, area, and intensity to generate cases that are as realistic as possible. These priors are extracted from the pathological cases of the EMIDEC dataset such as:  
Figure 2: DualUNet architecture for multi-modal cardiac MRI segmentation.  
**Type:** From an algorithmic point of view, the myocardial infarction was constrained to have two types: it either crosses the whole myocardium (transmural MI, called TMI hereinafter) or not (non-transmural MI, called NTMI hereinafter). Figure 3 shows an example of the masks for these two types of MI.  
**Location:** To understand the typical location of MI, all images from the EMIDEC dataset were divided into four equal parts, or \"quadrants\", corresponding to a modified version of the \"Bull's Eye Plot\" proposed by [PERSON] et al. (2018). Considering these 4 quadrants for the basal, mid, and apical localizations, although there is a higher prevalence of the MI in the first quadrant at basal and mid slices, we found that the variation is rather subtle, which means that the difference is not big enough to establish a location pattern of the MI structure robustly. Hence, it was decided to keep the location prior to the algorithm as a random variable that can take values between 1 and 4 with equal probability.  
**Size:** The size prior was defined in terms of the percentage of MI scar with respect to the myocardium area, whose mean was \(0.208\pm 0.114\). In order to account for outliers with bigger scars, the size prior to the MI was defined as a portion of the total myocardium that ranges from 10% to 50%, with an equal probability of selection.  
**Intensity:** Once the myocardium mask is generated using the priors mentioned above, perturbation must be performed on the MRI to generate the synthetic image. The intensity of the MI area was defined as the mean intensity of the left ventricle cavity plus a prior knowledge value. This value is sampled from a generated normal distribution whose mean is the average of the differences between the maximum intensity value of the MI (red contour in Figure 4) minus the mean value of the left ventricle cavity (blue contour in Figure 4) across the entire pathological cases on EMIDEC dataset. The selection of a normal distribution is performed to ensure a consistent MI shape in terms of intensity, and the starting value is selected as the mean intensity of the left ventricle since it was also found that the MI is always brighter.  
Figure 4: Example of pathological case on EMIDEC dataset [3]. The red and blue contours correspond to the MI and left ventricle cavity, respectively.  
Figure 3: Examples of transmural and non-transmural MI. Dark gray: left ventricle cavity; light gray: myocardium; white: myocardial infarction.