## 2 Data and Methodology
### Model Architecture  
Figure 3 illustrates the convolutional neural network (CNN)-based model architecture employed in this research. This architecture is designed to facilitate representation learning through a diffusion process, in addition to performing the primary task of segmentation. The segmentation task is executed using computationally synthesized images along with their corresponding masks. Meanwhile, the representation learning aspect enables  
Figure 1: Three manually annotated image–mask pairs were utilized for data synthesis. We developed two training sets by synthesizing computationally annotated images using manually annotated images from the left (\(I_{\eta}\)) and the middle (\(I_{\zeta}\)), producing 8000 images based on \(I_{\eta}\) and 8000 images based on \(I_{\zeta}\). Hereafter, we refer to the 8000 images developed based on \(I_{\eta}\) as dataset \(\mathbb{D}_{\eta}\). We refer to the set comprising the whole 16,000 images as \(\mathbb{D}_{\eta+\zeta}\). Additionally, we created a validation set by synthesizing 4000 images, with 2000 from the image on the right (\(I_{\tau}\)) and 2000 images based on \(I_{\zeta}\). Hereafter, we refer to this set of 4000 images as \(\mathbb{D}_{\zeta+\tau}\). Dataset \(\mathbb{D}_{\zeta+\tau}\) was made to allow for a balanced representation of wheat field images from the early and late growth stages. All computationally annotated samples were synthesized following the methodology described by [PERSON] et al. [7]. Figure 2: Examples of computationally synthesized images and their corresponding segmentation masks. adaptation to real images using solely unannotated data, thereby reducing the reliance on manual annotation. We use an encoder to develop a joint representation of both synthesized and real images. Additionally, the model architecture comprises an image decoder and a mask decoder. The former is designed to reconstruct the image from the output of the encoder, thereby enforcing learning features from real images. On the other hand, the mask decoder is tasked with developing a segmentation mask given the output of the encoder. In implementing the encoder and decoders, we leveraged residual building blocks [24], each comprising two pairs of convolution and GroupNorm layers, supported by the Swish activation function [25] and integrated skip connections. Figure 4 shows a residual building block. Figure 4: A ResNet block comprises three groups of operations, including convolution, GroupNorm layers, and the Swish activation function for nonlinearity. It also incorporates skip connections to enhance feature propagation. Figure 3: Schematic representation of the model architecture. The encoder focuses on developing a joint image representation for both synthesized and real images, while the mask decoder aims at generating segmentation masks and the image decoder aims at reconstructing the real images, forcing the encoder to adapt to the real images. Figure 5 illustrates the encoder, consisting of one convolutional layer followed by \(12\) ResNet building blocks organized in six levels. Additionally, two skip-connection-free ResNet blocks serve as the network bottleneck. Moreover, down-sampling operations are performed after each pair of ResNet blocks using a convolution layer with a kernel size of three and a stride of two. The Swish activation function [25] is also consistently applied as the non-linearity across the encoder layers. Synthetic images undergo a series of image augmentations [26]; then, they are fed into the encoder. The outputs of the encoder are subsequently passed to a mask decoder to generate accurate masks corresponding to the input images. To calculate the segmentation error, we use a linear combination of binary cross entropy (BCE) loss [27] and Dice loss [27] (see Equation (8)).