# Two-Dimensional Ultra Light-Weight Infant Pose Estimation with Single Branch Network
## 2 Materials and Methods
### Implementation Details
#### 2.3.2 Ground-Truths  
To compute the loss term \(\mathcal{L}^{t}\) as delineated in Equation (1) within the training regimen, we establish a ground truth for the confidence map \(\mathcal{J}^{*}\) by leveraging the body joint labels associated with the 2D data. This process aims to imbue the confidence map with precise body joint localization information across designated pixels. Specifically, for each human entity discernible within the image, multiple confidence maps \(\mathcal{J}^{*}_{m,n}\) are generated, wherein the ideal manifestation encompasses a solitary confidence peak denoting the corresponding joint match. If multiple individuals are present within the image frame, the expectation is for the generation of distinct confidence peaks \(\overline{P}_{m,n}\) within the confidence maps for each visible body part \(m\) of each person \(n\). The confidence map \(\mathcal{J}^{*}_{m,n}\) generated for each person \(n\) is constructed such that \(\overline{P}_{m,n}\) represents the position of the pixel coinciding with the body joint \(m\) of person \(k\) in the image. Subsequently, the value of pixel \(p\) in the confidence map is defined as,  
\[\mathcal{J}^{*}_{m,n}(p)=\exp\Big{(}-\frac{\left\|p-\overline{P}_{m,n}\right\| _{2}^{2}}{\sigma^{2}}\Big{)} \tag{4}\]  
The confidence map adopts the structure of a Gaussian normal distribution, where \(\sigma\) represents the radius--a coefficient regulating the spread of the Gaussian peak. The network's output confidence map is a predictive aggregation of the individual confidence maps \(\mathcal{J}^{*}_{m,n}\) via a max operator,  
\[\mathcal{J}^{*}_{m}(p)=\max_{n}\mathcal{J}^{*}_{m,n}(p) \tag{5}\]  
The confidence map is synthesized by combining the confidence maps corresponding to each joint by the above equation. This is implemented by taking the maximum value when overlaying the gradient circles (confidence maps) on top of each other. In other words, when the Gaussian distributions corresponding to two joints intersect, we take the value at point \(p\) as \(max(G_{1}(p),G_{2}(p))\). Part Affinity Fields  
In the scenario where two gradient circles of confidence maps intersect, we opt to compute the maximum value over the union of the two gradient circles instead of averaging. This approach is warranted as there are still distinct body joints present, and it is imperative to distinctly discern the two vertices corresponding to the respective confidence maps. In the amalgamation of identified joints into a cohesive virtual skeletal framework emblematic of human posture, the intricate task lies in accurately discerning the association of joints belonging to the same anatomical entity amidst potential misalignments between joints of distinct individuals. This challenge finds resolution through the employment of Part Affinity Fields (PAFs). PAF encapsulates essential positional and directional attributes for each limb, delineating the segment between two successive body joints. The genesis of PAFs stems from the meticulous analysis of supplementary linking cues between adjacent body joints, resulting in a finely-grained 2D vector representation for each limb. Within this representation, each vector is anchored at a pixel denoting a specific limb, collectively portraying the directional orientation from one joint terminus to the other. Thus, each limb is meticulously associated with its corresponding PAF map. Limb c is defined by 2 body joints, \(m_{1}\) and \(m_{2}\), corresponding with ground-truth position \(\overline{P}_{m1,n}\) and \(\overline{P}_{m2,n}\) of person n in the image. Point \(p\) is one of the supplementary linking cues if it lies on limb \(c\). In this context, the value at the point \(L^{*}_{c,n}(p)\) denotes the vector pointing from joint \(m_{1}\) to \(m_{2}\) for a given limb \(c\). All points not associated with limb \(c\) are assigned zero. \[L^{*}_{c,n}(p)= \begin{cases}\vec{u}&\text{if $p$ lies on limb $c,n$}\\ 0&\text{otherpoint}\end{cases}