## 2 Data and Methodology
### Model Architecture
\[\mathcal{L}_{BCE}=-\frac{1}{B\times N}\sum_{j=1}^{B}\sum_{i=1}^{N} (y_{i}\log(\hat{y_{i}})+(1-y_{i})\log(1-\hat{y_{i}}))\] \[\mathcal{L}_{Dice}=1-\frac{2}{B}\sum_{j=1}^{B}\Biggl{(}\frac{|M_{j }^{\mathrm{s}}\cap\hat{M}_{j}^{\mathrm{s}}|}{|M_{j}^{\mathrm{s}}|+|\hat{M}_{j }^{\mathrm{s}}|}\Biggr{)}\] \[\mathcal{L}_{Sg}=\lambda_{BCE}\times\mathcal{L}_{BCE}+\lambda_{ Dice}\times\mathcal{L}_{Dice} \tag{8}\]  
where \(y_{i}\) is the true label of the pixel \(i\), with a value of \(1\) if the pixel belongs to a wheat head and \(0\) otherwise. \(\hat{y_{i}}\) represents the model prediction of whether pixel \(i\) is from a wheat head. \(N\) is the number of pixels per image, and \(B\) is the batch size. \(M_{j}^{\mathrm{s}}\) is the ground truth mask for the synthetic image \(I_{j}^{\mathrm{s}}\), and \(\hat{M}_{j}^{\mathrm{s}}\) is the model prediction for \(I_{j}^{\mathrm{s}}\). We also generate noise-augmented images by applying Gaussian noise to the real image \(I_{j}\) over \(t\) (\(1\leq t\leq T\)) timesteps, as detailed in Equation (7). These noise-augmented images are subsequently routed through the encoder, followed by the image decoder, aiming to reconstruct the original images. The error for this branch is calculated by comparing the original image with the reconstructed image using a linear combination of MSE [28], SSIM [29], and a perceptual loss function [30]. The perceptual loss function calculates the mean absolute error between the pretrained ResNet18 output feature maps for the original image \(I_{j}\) and the reconstructed image \(\hat{I_{j}}\). We used the  
Figure 5: Encoder model architecture designed by combining convolutional layers, ResNet blocks, and GroupNorm layers. Also, in each of the two decoding streams, we utilize concatenation instead of addition. _ResNet18_Weights.IMAGEENT1K_V1_ weights from the Torchvision Python package [31]. We used the feature maps generated by the convolutional layer before the final average pooling layer of the ResNet18 model. \[\mathcal{L}_{MSE}=\frac{1}{B\times N}\sum_{j=1}^{B}\sum_{i=1}^{N}(x_{ji}-\hat{x} _{ji})^{2}\]  
\[\mathcal{L}_{SSIM}(I_{j},\hat{I}_{j})=1-\frac{(2\mu_{I_{j}}\mu_{I_{j}}+c_{1})( 2\sigma_{I_{j}\hat{I}_{j}}+c_{2})}{(\mu_{\hat{I}_{j}}^{2}+\mu_{\hat{I}_{j}}^{2} +c_{1})(\sigma_{\hat{I}_{j}}^{2}+\sigma_{\hat{I}_{j}}^{2}+c_{2})}\]  
Figure 2:0  
Figure 2:1  
where \(B\) is batch size; \(N\) is the number of pixels in an image \(I_{j}\); \(x_{ji}\) is the actual value of the \(i\)-th pixel of \(I_{j}\); \(\hat{x}_{ji}\) is the predicted value for the \(i\)-th pixel of \(I_{j}\); \(\mu_{I_{j}}\) and \(\mu_{\hat{I}_{j}}\) are the mean intensity values of images \(I_{j}\) and \(\hat{I}_{j}\), respectively; \(\sigma_{\hat{I}_{j}}^{2}\) and \(\sigma_{\hat{I}_{j}}^{2}\) are the variances of images \(I_{j}\) and \(\hat{I}_{j}\), respectively; \(\sigma_{\hat{I}_{j}\hat{I}_{j}}\) is the covariance between images \(I_{j}\) and \(\hat{I}_{j}\); and \(c_{1}\) and \(c_{2}\) are constants introduced to stabilize the division. \(\theta(I_{j})\) and \(\theta(\hat{I}_{j})\) are ResNet18 features extracted from images \(I_{j}\) and \(\hat{I}_{j}\), respectively. These losses focus on variations between the reconstructed image and the original noise-free image from different perspectives: MSE loss focuses on pixel-level variations, SSIM loss focuses on local variations, and perceptual loss focuses on high-level global variations. The reconstruction loss is calculated as a linear combination of these loss functions, as described in Equation (9), where \(\lambda_{MSE}\), \(\lambda_{SSIM}\), and \(\lambda_{Perceptual}\) are constant values and model hyperparameters.