## 3 Proposed Method
### Codebook Combination  
After the feature extraction stage, the approximate k-means algorithm is used to generate two codebooks with the same scale. After the quantization of the ANN algorithm is completed, our method combines two codes to reduce the quantization error and improve the recall. The advantage of codebook combination is that more candidate features can be used, which reduces the error generated by the quantization process to a certain extent. Since our method uses the same feature to generate codebooks, the correlation between codebooks, that is, crossover between codebooks, is inevitable. As a result, when calculating the similarity distance, the features of the intersection will be repeatedly calculated, which reduces the retrieval accuracy. The codebook crossover problem is shown in Figure 4. For a given feature, it is quantified into a visual word in two codebooks. Then, the indexes of the two visual words \(A\) and \(B\) are respectively determined in the two index files. \(A\cap B\) in Figure 4 represents the crossover problem between two sets. Figure 4: Codebook correlation problem. Figure 3: The DSP-SIFT feature extraction process. In order to solve this problem, we introduce the Bayes merging algorithm. The algorithm is defined as follows: For a given \(N\) codebooks, the feature \(x\) of the model \(Q\) to be retrieved is quantized into \(N\) visual words, and the index of \(N\) sets corresponding to \(x\) is also determined, such as \(\{A_{i}\}_{i=1}^{N}\). If feature \(y\) falls in \(n^{th}\) intersections which are in all set \(\{A_{i}\}_{i=1}^{N}\), then the conditional probability of \(x\) and \(y\) matching is defined as:  
\[w(x,y)=p(y\in T_{x}|y\in A_{1}\cap A_{2}\cap\ldots\cap A_{N}) \tag{2}\]  
where \(T_{x}\) represents a feature set similar to feature \(x\) in a model similar to the model \(Q\) which is retrieved. Let \(F_{x}\) be the inverse of \(T_{x}\), then \(T_{x}\) and \(F_{x}\) satisfy the following formula:  
\[p(y\in T_{x})+p(y\in F_{x})=1 \tag{3}\]  
substituting [PERSON] rule into Equation (3), we can obtain:  
\[p(T_{x}|A\cap B)=\frac{p(A\cap B|T_{x})\cdot p(T_{x})}{p(A\cap B)}=\frac{p(A \cap B|T_{x})\cdot p(T_{x})}{p(A\cap B|T_{x})\cdot p(T_{x})+p(A\cap B|F_{x}) \cdot p(F_{x})} \tag{4}\]  
where \(A\cap B\) represent \(y\in A\cap B\), \(T_{x}\) represents \(y\in T_{x}\), \(F_{x}\) represents \(y\in F_{x}\). Finishing Equation (4), the probability of intersection between codebooks after matching can be obtained:  
\[p(T_{x}|A\cap B)=\left(1+\frac{p(A\cap B|F_{x})}{p(A\cap B|T_{x})}.\frac{p(F_{ x})}{p(T_{x})}\right)^{-1} \tag{5}\]  
in the final matching stage, the Bayes merging algorithm matching equation is defined as:  
\[f(x,y)=\left\{\begin{array}{ll}\mathit{nw}(x,y),&\quad if\ y\in\cap^{n},\ n\geq 2\\ \sum_{i=1}^{n}\delta_{v_{x}^{(n)},\,\,\,\,\,\,\,\,\,\,\,\,\,F-measure (\(F\)): \(F\) is the weighted harmonic average of precision and recall, and is a commonly used retrieval metrics in information retrieval systems. \(F\) can be defined as (taking the first 20 search results in the experiment): \[F=2\times\frac{precision\times recall}{precision+recall}\] (8)
3. \(NN,FT,ST\): The evaluation methods of these three evaluation standards are similar. Searching the first \(K\) test results, the proportion of the same category as the retrieved object is tested. Suppose there are \(|C|\) objects in the category where the search object is located, and if \(K=1\), it is \(NN\). \(K=|C|-1\) represents \(FT\). \(K=2\times(|C|-1)\) represents \(ST\). The final result of the three evaluation metrics is the average of the retrieval results of all objects in the datasets. 4. \(DCG\): \(DCG\) describes the location information of the relevant result in the search result. The higher the relevant result in the search ranking, the greater its weight. The value is between 0 and 1. The larger the value, the better the search result. The definition of \(DCG\) is as follows: \[DCG_{1}=G_{1};\;\;DCG_{i}=DCG_{i-1}+\frac{G}{\lg_{2}(i)},\quad if\;i>1\] (9)
5.