# Point-Graph Neural Network Based Novel Visual Positioning System for Indoor Navigation
## 3 Proposed Method
### Point-GNN for 3D Object Pose Estimation  
This section explains the pose estimation of the object box. The input of the proposed system is a point cloud created using a 3D sensor, such as ToF or LiDAR, of a mobile phone camera or other mobile platforms. We improved the existing point-GNN, which is used for detecting objects using point clouds. Moreover, it is a single-step detection method that maintains the irregularity of the point cloud using a graphical representation. A general GNN reuses graph edges in all layers, prevents repetitive grouping and sampling of points, and improves vertex features by aggregating them along the edges. In the (\(t+1\))th iteration, each vertex function is updated in the same format as indicated in Equation (1) of Section 2.1, where \(e^{t}\) and \(v^{t}\) denote the edge and vertex features of the \({}^{t}\) th iteration, respectively. The function \(f^{t}\) (. )computes the edge feature between two vertices. Furthermore, \(\rho(. )\) is a set function that aggregates edge features for each vertex, and \(g^{t}(. )\) updates the vertex function using the aggregated edge function. Subsequently, the GNN outputs the vertex features or repeats the process in the next iteration. \[ \begin{split} v_{i}^{t+1}=g^{t}\Big{(}\rho\Big{(}\Big{\{}e_{ij}^{t }\Big{|}\;(i,\;j)\in E\Big{\}}\Big{)},\;v_{i}^{t}\Big{)}\\ e_{ij}^{t}=f^{t}\Big{(}v_{i}^{t},\;v_{j}^{t}\Big{)}\end{split}  \tag{2}\]  
In the case of object detection, the GNN includes the information on the object to which the vertex belongs and rearranges the state of the graph vertex. The state of the vertex is refined using the state of the neighboring vertex, and the relative coordinates of the neighboring network are used as input to \(f^{t}(. )\) for edge feature extraction. As indicated in Equation (3), relative coordinates are calculated using the key-point vertex \(x_{j}\) and the neighboring vertex \(x_{i}\) selected by the fixed-radius algorithm. The relative coordinates induce transformation invariance for the global movement of the point cloud. The point cloud of \(N\) points can be defined as a set \(P=\{p_{1},\ldots,p_{N}\}\), where \(p_{i}=(x_{i},s_{i})\) is a point with both 3D coordinates \(x_{i}\in R^{3}\) and the state value \(s_{i}\in R^{k}\) the color RGB that represents the point property. \[s_{i}^{t+1}=g^{t}\Big{(}\rho\Big{(}\Big{\{}f^{t}\;\Big{(}x_{j}-x_{i},\;s_{j}^{t }\Big{)}\;\Big{|}\;(i,\;j)\in E\Big{\}}\Big{)},\;s_{i}^{t}\Big{)} \tag{3}\]  
Object detection of point-GNN estimates the center point of the object box and the 7-DoF format of the length, height, width, and yaw values, where box = (\(x,y,z,l,h,w,\theta\)). However, to estimate the pose of an object using the unfixed camera origin in a 3D indoor space, 9-DoF of the object must be estimated. Therefore, we improved two modules in the point-GNN. First, to estimate the pose of the object, the functions of estimating the pitch and roll values were improved in addition to that estimating the yaw value. The bounding box of the object was estimated as box = (\(x,y,z,l,h,w,\phi,\theta,\psi\)) in 9-DoF using the improved point-GNN. Herein, the center coordinates (\(x,y,z\)) of the object represent the center position of the bounding box; the size of the object (\(l\), \(h,w\)) represents the box length, height, and width in the X-, Y-, and Z-axes rotations, respectively; \(\phi\), \(\theta\), and \(\psi\) denote the pitch, yaw, and roll angles, respectively. We encoded the bounding box with vertex coordinates (\(x_{v}\), \(y_{v}\), \(z_{v}\)) as indicated in Equation (4), where \(l_{m}\), \(h_{m}\), \(w_{m}\), \(\theta_{0}\), and \(\theta_{m}\) represent the constant scale factors. The localization branch predicts the encoded bounding box as \(\delta\text{box}=(\delta x,\,\delta y,\,\delta z,\,\delta l,\,\delta h,\delta w,\,\delta\phi,\delta\theta,\delta\psi)\) for each class. \[