# Generative Image Steganography via Encoding Pose Keypoints
## 3 The Proposed Method
### Generation of Human Pose Keypoint Sequences
#### 3.1.3 Secret-Driven Sequence Generation  
After training the sequence generation model, we use the secret information to drive the model to generate the sequence of human pose keypoints. The sequence generation process includes the following steps:  
1. Generating the encrypted bitstream: Acquire the bitstream \(M\) of the secret information; obtain the \(Key\) held jointly by both communication parties; the encrypted bitstream \(M^{\prime}=\{m_{1},\,m_{2},\,\ldots,\,m_{n}\}\) is obtained through the operation \(M\oplus Key\).
2. Obtaining the initial elements of the sequence: The trained sequence generation model can only generate sequences that statistically match the true data distribution, so the initial elements of the sequence greatly affect the choice of subsequent elements. Therefore, this paper selects the initial elements of the sequence based on the distribution of the initial coordinates of the true data. Figure 2 shows the heat map of the initial coordinates of the true data in the image plane. This step constructs an initial element candidate set \(Set_{1}\) based on the coordinates with higher heat in the graph and establishes a mapping relationship between the elements in this set and the binary encoding. Subsequently, a binary string of length \(L_{1}\) is intercepted from \(M^{\prime}\), and the initial element \(s_{1}\) is selected based on the mapping relationship and added to the sequence \(S\). The calculation formula for \(L_{i}\) is: \[L_{i}=\log_{2}[\text{size}(Set_{i})]\] (4)
3. Generating candidate sets: In this paper, by constructing the index candidate set of the \(i\)-th element, secret information is embedded in the selection of the index. As described in Section 3.1.2, the first \(i-1\) elements in the keypoint index sequence \(S\) are input into the model successively. At time \(i\), the output of the model is the conditional probability distribution of \(s_{i}\), expressed as \(\Pr(s_{i}\,|s_{1},s_{2},\,\ldots,\,s_{i-1})\); next, the probabilities of all legal indexes of \(s_{i}\) are sorted in descending order, and then the indexes with a probability lower than the preset threshold \(\tau_{i}\) are eliminated. The remaining indexes initially constitute the candidate set \(Set_{i}\); subsequently, to establish a mapping relationship with the binary encoding \(Bin_{i}=\{b_{1},\,b_{2},\,\ldots,\,b_{K}\}\), the top \(K=2^{L_{i}}\) indexes with the highest probability are selected as the final candidate set \(Set_{i}=\{e_{1},\,e_{2},\,\ldots,\,e_{K}\}\). It should be noted that \(L_{i}\) represents the ultimate embeddable hiding capacity of the constructed candidate set \(Set_{i}\), which can be calculated by Formula (3). To elaborate on this step, assume that the number of indexes in the initial candidate set is 10. Using Formula (3), it can calculate \(L=3\). Therefore, the final candidate set will retain only the top \(K=8\) indexes with the highest probabilities. Assign a binary code to each index in sequence so that the set \(=\{e_{1},\,e_{2},\,\ldots,\,e_{8}\}\) corresponds to the binary code \(Bin=\{000,\,001,\,\ldots,\,111\}\).
4. Secret-driven index selection: After generating the candidate set \(Set_{i}\) and establishing the mapping relationship in Step 3, intercept a binary string of length from \(M^{\prime}\) (if the length of \(M^{\prime}\) is more than 0 and less than \(L_{i}\), zeros are padded at the beginning), select the index as the element \(s_{i}\) according to the mapping relationship, and add \(s_{i}\) to the sequence \(S\).  
Repeat Steps 3 and 4 until the index sequence \(S\) is fully constructed. Transform this sequence into the coordinate sequence \(P\) in accordance with Formula (1), and thereby, the connectivity graph of human body keypoints can be plotted based on sequence \(P\). Figure 3 exemplifies the specific steps to present the sequence generation process more intuitively.