## 2 Basic Methods  
### Siamese Network  
In the context of comparing two images, [PERSON] [15] introduced the Siamese network (SN) in 1993 to authenticate whether the signature on a check corresponds to the signature stored by the bank. The Siamese network framework is illustrated in Figure 1. It involves obtaining two feature vectors, \(h(x_{1\_1},x_{1\_2})\) and \(h(x_{2\_1},x_{2\_2})\), by feeding two preprocessed images, \(\text{X}_{1}\) and \(\text{X}_{2}\), through a shared-weight feature extraction network. The L2 (Euclidean) distance between these two vectors is then calculated to derive the similarity value. During this process, the inputs are individually mapped by two neural networks into a new space, resulting in a representation of the inputs in that space. The similarity between the two inputs is assessed through the computation of the contrastive loss. In this study, applied to bone stick images, matched bone stick images are considered to exhibit the highest similarity, labeled as 1, representing positive samples. Conversely, non-matchedbone stick images are regarded as having the lowest similarity, labeled as 0, indicating negative samples. The training objective is to minimize the distance between matched bone specimens and maximize the distance between non-matched images.  
Meanwhile, this paper proposes the use of a Siamese network equipped with a Contrastive Loss function. This type of loss function effectively captures the degree of matching to the sample and is well-suited for training models in feature extraction. The definition is shown in Equation (1).  
\[L=\frac{1}{2N}{\sum_{m=1}^{N}yd^{2}+(1-y)max(m-d,0)^{2}} \tag{1}\]  
\[d(x_{1},x_{2})=\left\|x_{1}-x_{2}\right\|_{2}=\sqrt{{\sum_{i=1}^{P}}(x_{1i}-x_ {2i})^{2}} \tag{2}\]  
In this context, \(x_{1}\) and \(x_{2}\) represent two samples, while \(y\) denotes the label for the input sample pairs. A value of \(y=1\) indicates a match between the two samples, and \(y=0\) signifies a non-match. The threshold m is used to determine whether two input samples belong to the same category. We only consider distance values of dissimilar feature Euclidean distances within the range of 0 to \(m\). \(N\) represents the number of samples. Equation (2) defines the Euclidean distance between the features \(x_{1}\) and \(x_{2}\) of two samples. The Siamese network aims to minimize the distance between sample pairs when they belong to the same category and increase the distance between sample pairs otherwise. Therefore, the contrastive loss function is employed to achieve the objectives of the Siamese network.  
The utilization of Siamese networks primarily addresses two key challenges related to the rejoining of bone sticks [16]. Firstly, it tackles the issue of limited training data within the same category. The training dataset utilized in this study predominantly comprises images of bone sticks. Specifically, each upper segment of a bone stick corresponds to a lower image segment. Secondly, when new category data emerge, there is no necessity for retraining; the model can perform predictions directly.  
Figure 1: Siamese network. “a” refers to the similarity value between input images X1 and X2.