## 3 Proposed Methods
### Proposed Pose Estimation Network
Through the second MLP, the integrated feature module is then refined and expanded to a feature map of size \(2048\times 7\times 7\), which is the same size as the original feature map from the ResNet50. Our second modification consists of two modules, the Guided Cost Volume Excitation (GCE [29]) module and the Context and Geometry Fusion (CGF [30]) module, as shown in Figure 5. The main purpose of adding two modules is to fuse the feature map from the original ResNet50 and the features from the VUF sub-network. Through the two modules, the features from ResNet50 are excited to predict the angular pose of an object. Following the GCE module, a Convolutional Block Attention Module (CBAM [31]) is applied to extract key features from the excited features and the original features. CBAM provides more attention to the key features; consequently, it enhances the pose estimation performance. These features are then processed through the CGF module, which generates a spatial attention weight. Finally, CBAM is applied again to the feature, and then it is used as input for the predictor. Figure 5: Architecture of our proposed pose estimation network. In addition to the new sub-network and module employment, we enhance the proposed network by introducing a new loss function. Conventionally, the cross entropy loss function in Equation (5) computes the uniform loss between the prediction and the ground truth. For instance, when predicting an _Azimuth_ angle with a GT angle of \(0^{\circ}\), the prediction of \(15^{\circ}\) differs significantly from \(225^{\circ}\) in terms of angle difference. However, the cross entropy calculates both losses as the same magnitude. To address this issue, we propose a quaternion-based loss function. Quaternion is a generalized form of a complex number comprising three real components and one imaginary component, as shown in Equation (10). To employ the quaternion-based loss function, we convert the rotation angles from PoseContrast and the ground truth (GT) into quaternions using Equations (11)-(14). Here, _Azimuth_ is denoted as \(\alpha\), _Elevation_ as \(e\), and _Inplane rotation_ as \(i\). Equation (15) shows the quaternion loss function, with the parameter \(\alpha\) empirically set to 3. Given the importance of accurately predicting the bin index, we formulate the final loss function by integrating the quaternion loss into the existing loss function. \[Q(a,e,i)=w+xi+yj+zk \tag{10}\]  
\[x=\cos\Big{(}\frac{a}{2}\Big{)}\cdot\cos\Big{(}\frac{e}{2}\Big{)}\cdot\sin \Big{(}\frac{i}{2}\Big{)}-\sin\Big{(}\frac{a}{2}\Big{)}\cdot\sin\Big{(}\frac{e }{2}\Big{)}\cdot\cos\Big{(}\frac{i}{2}\Big{)} \tag{11}\]  
\[y=\cos\Big{(}\frac{a}{2}\Big{)}\cdot\sin\Big{(}\frac{e}{2}\Big{)}\cdot\cos \Big{(}\frac{i}{2}\Big{)}+\sin\Big{(}\frac{a}{2}\Big{)}\cdot\cos\Big{(}\frac{e }{2}\Big{)}\cdot\sin\Big{(}\frac{i}{2}\Big{)} \tag{12}\]  
\[z=\sin\Big{(}\frac{a}{2}\Big{)}\cdot\cos\Big{(}\frac{e}{2}\Big{)}\cdot\cos \Big{(}\frac{i}{2}\Big{)}-\cos\Big{(}\frac{a}{2}\Big{)}\cdot\sin\Big{(}\frac{ e}{2}\Big{)}\cdot\sin\Big{(}\frac{i}{2}\Big{)} \tag{13}\]  
\[w=\cos\Big{(}\frac{a}{2}\Big{)}\cdot\cos\Big{(}\frac{e}{2}\Big{)}\cdot\cos \Big{(}\frac{i}{2}\Big{)}+\sin\Big{(}\frac{a}{2}\Big{)}\cdot\sin\Big{(}\frac{ e}{2}\Big{)}\cdot\sin\Big{(}\frac{i}{2}\Big{)} \tag{14}\]  
\[Quaternion\ Loss(Predected,GT)=\alpha\times\Big{\{}1-\big{(}Q(Predicted(a,e,i)) \cdot Q(GT(a,e,i))\big{)}^{2}\Big{\}} \tag{15}\]  
The quaternion-based loss function solves the issue of uniform loss between predicted and GT bin indices in the cross entropy loss function. For example, when the GT bin index is 0 and the predicted bin index is 1 (\(15^{\circ}\)) or 15 (\(225^{\circ}\)), the network is trained with different loss values. On the contrary, when the predicted bin is 23 (\(335^{\circ}\)) or 1 (\(15^{\circ}\)), the same loss value is obtained because they are equidistant from the GT.