# Trackerless 3D Freehand Ultrasound Reconstruction: A Review
## 3 Results
### Loss Functions  
Most studies employed mean squared error (MSE) loss over a sequence of N frames, as defined in Equation (2).  
\[\text{MSE}(t_{x},t_{y},t_{z},\theta_{x},\theta_{y},\theta_{z})=\frac{1}{N}\sum_ {k=1}^{n}\left(\vec{p}\left(T_{k}(i\to j)^{\text{pred}},T_{k}(i\to j)^{\text{GT} }\right)\right)^{2} \tag{2}\]  
In this equation, the matrix \(\left(\vec{p}(A)\right)^{2}\) computes the element-wise squared difference between each corresponding translation and rotation parameter of the predicted \(T_{k}(i\to j)^{\text{pred}}\) and ground truth \(T_{k}(i\to j)^{\text{GT}}\) transformation matrices for each pair (k) of successive US frames \((i\to j)\). The MSE penalizes larger errors more heavily and is therefore valued for its reduced sensitivity to noise during minor frame-to-frame transformations, compared to the mean absolute error (MAE).  
However, relying solely on the MSE [23; 25] tends to result in the model memorizing general movement patterns of the clinician's probe rather than detecting subtle nuances or variations. To address this issue, several studies incorporated a correlation-based loss in addition to MSE, focusing on the correlation among each transformation parameter (6 DOFs) rather than the mean trajectory. Specifically, a case-wise correlation loss (\(\text{L}_{\text{cc}}\)) as outlined in Equation (3) was adopted [16; 23; 25; 26], based on a Pearson correlation loss, sometimes combined with the MAE [19; 20; 21].  
\[\text{L}_{\text{cc}}(t_{x},t_{y},t_{z},\theta_{x},\theta_{y},\theta_{z})=\frac{ 1}{N}\sum_{k=1}^{n}\frac{Cov(T_{k}(i\to j)^{\text{pred}},T_{k}(i\to j)^{\text{ GT}})}{\sigma\left(T_{k}(i\to j)^{\text{pred}}\right)\sigma(T_{k}(i\to j)^{\text{ GT}})} \tag{3}\]  
Here, the correlation coefficients are quantified for each DOF through the covariance \((Cov)\) of the predicted and ground truth transformation parameter normalized by the product of their standard deviation \((\sigma)\). The case-wise correlation loss stabilizes training and smooths trajectories by emphasizing global correlations among transformation parameters. By preventing overfitting to common scanning styles it enhances generalization, increasing the sensitivity of the model for varying speeds and motions. Further refinements include the introduction of a motion-weighted regularization to the \(\text{L}_{\text{cc}}\) and MSE, adjusting the regularization strength based on the motion speed to address discrepancies in slower movements more effectively [20].  
Additional loss functions were based on consistency to further increase robustness. [PERSON] et al. [17] was the first to introduce a consistency loss across two US frames, employing techniques such as flipping and inverse prediction to ensure consistent output regardless of input orientation changes. [PERSON] et al. [21] expanded this concept at a sequence level, creating flipped subsequences, and utilized this as a self-consistency strategy (SCS) through online learning and adaptive optimization of the model. [PERSON] et al. [20] applied similar strategies, specifically adopting frame-level contextual consistency (FCC) and path-level similarity constraints (PSCs). [PERSON] et al. [22] developed a multi-transformation loss based on MSE to ensure consistency between predictions across multiple frame intervals. Lastly, [PERSON] et al. [26] implemented a margin loss, rooted in contrastive feature learning, which enhances the model's discriminative power by forcing the feature generator to produce similar features for frames with similar transformation parameters, and distinct representations for samples with discrepancies in their transformation parameters.