[0063] Example 2
[0064] The solution in Embodiment 1 will be described in detail below in conjunction with specific calculation formulas and examples, as detailed below:
[0065] 201: Obtain a 2D view set V of objects in the database;
[0066] This method mainly applies retrieval technology based on image comparison, that is, 3D models are collected from multiple perspectives to form 2D view sets, and mature 2D technologies are used to extract features of objects. Therefore, each 3D model is represented by multiple views, so the view set can be expressed as Where v i Represents the view set of the i-th object; D represents the feature dimension of the view; f k Represents the k-th perspective of an object; N represents the number of 3D models; M represents the number of views of each 3D model; Indicates the scope of each object's view collection.
[0067] 202: Perform standardized preprocessing on the view set to make the view sizes of all 3D models consistent;
[0068] In order to facilitate subsequent feature extraction, the data will be pre-processed in a standardized manner to make the size of the view set data consistent. In the embodiment of the present invention, the 2D view size s×s is uniformly set to 25×25 for description, but when specific When implemented, the implementation method of the present invention does not impose any restrictions on the size specification of the view and the scale conversion method.
[0069] At the same time, when the view set is large and the size of each view is too large, it is recommended to choose the data size reasonably, which can prevent the disaster of dimensionality and increase the data processing rate to get the best results.
[0070] 203: Use the supervised incremental slow feature analysis method to extract the incremental slow feature of the view set, and at the same time obtain the order of the incremental slow feature change size, and obtain the incremental slow feature library of the 3D model according to the sorting result;
[0071] Incremental slow feature analysis method [7] It mainly includes two kinds, (1) unsupervised incremental slow feature analysis; (2) supervised incremental slow feature analysis. Unsupervised incremental slow feature analysis refers to putting all sample sequences together, learning the incremental slow feature function to obtain the incremental slow feature model, and then classifying all models; while supervised incremental slow feature analysis refers to Different sample sequences are respectively subjected to the learning of the incremental slow feature function to directly obtain different models. The embodiment of the present invention uses the supervised incremental slow feature analysis method to obtain the supervised incremental slow feature.
[0072] Among them, the steps of the supervised incremental slow feature analysis method are as follows:
[0073] 1) Enter a 3D model v d 2D view of, denoted as x(k)=[x 1 (k),…,x D (k)) T;
[0074] Among them, x(k) is the 2D model data of the kth view of a 3D model, that is, the kth view of a 3D model; x D (k) is the D-th dimension feature of the 2D model of a perspective; T represents matrix transposition, the value range of k is [1, M], and M represents the number of views used to describe each 3D model.
[0075] 2) Perform non-linear expansion of input data x(k) to generate expanded data;
[0076] h(x)=[x 1 ,...,X D ,x 1 x 1 ,x 1 x 2 ,...,X D x D ] To generate extended data h(x(k)):
[0077] h(x(k))=[x 1 (k),…,x D (k),x 1 (k)x 1 (k),x 1 (k)x 2 (k),…,x D (k)x D (k))(1)
[0078] Among them, h(x) is the nonlinear expansion function; x D (k) is the D-dimensional feature of the k-th view of a 3D model; D is the feature dimension of each 2D view; h(x(k)) is the extended data of the k-th view.
[0079] 3) Find the zero mean u(k) of the extended data h(x(k)), and then obtain the eigenvector v of the covariance matrix of the input data through intuitive non-covariance incremental principal component analysis (CCIPCA) d (k);
[0080] u ( k ) = h ( x ( k ) ) - h ‾ ( x ( k ) ) - - - ( 2 )
[0081] Among them, h(x(k)) is the extended data of the k-th view; Is the average value of the k-th view extended data, u(k) is the zero mean value of the k-th view data. v d (k) is the eigenvector of the covariance matrix of the input data, that is, the eigenvector of the d-th principal component covariance matrix of the k-th view, and its eigenvalue is λ d (k), feature vector v d (k) and eigenvalue λ d (k) Meet the following formula:
[0082] E[u(k)u(k) T ]v d (k)=λ d (k)v d (k)(3)
[0083] Among them, the feature vector v d (k) is orthogonal, and the eigenvalue satisfies λ 1 (k)≥λ 2 (k)≥...≥λ d (k). Through the calculation of formula (2), the zero mean value u(k) of the input data of each view can be obtained, then formula (3) can be rewritten as:
[0084] λ d (k)v d (k)=E[(u(k)·v d (k))u(k))(4)
[0085] Where v d (k) is the eigenvector of the covariance matrix of the d-th principal component of the k-th view, the value range of d is [1, J], J represents the number of eigenvectors of the principal component covariance matrix, u 1 (k) is the first input data x of the kth view 1 The zero mean of (k).
[0086] Initialize v d (k)=u 1 (k)=u(k), η represents the learning rate of the slow feature, this experiment defines η=0.005, during the specific experiment, it can be adjusted according to the experimental situation. The final intuitive principal component without covariance can be calculated iteratively by formulas (5) and (6):
[0087] v d ( k ) = ( 1 - η ) v d ( k - 1 ) + η [ u d ( k ) v d ( k - 1 ) | | v d ( k - 1 ) | | u d ( k ) ] - - - ( 5 )
[0088] u d ( k ) = u d + 1 ( k ) + ( u d T ( k ) v d ( k ) | | v d ( k ) | | ) v d ( k ) | | v d ( k ) | | - - - ( 6 )
[0089] Where v d (k-1) is the eigenvector of the covariance matrix of the d-th principal component of the k-1th view, that is, the kth view is related to the eigenvector of the previous view, that is, the k-1th view; u d (k) is the zero mean value of the d-th dimension feature data of the k-th view data; u d+1 (k) is the zero mean value of the d+1 dimension feature data of the kth view, that is, the zero mean value of the latter one dimension feature data of each view, that is, the zero mean value of the d+1 dimension feature data, and the current feature data The zero mean value is related to the zero mean value of the d-th feature data.
[0090] 4) For the eigenvector v of the covariance matrix d (k) Perform whitening and dimensionality reduction to obtain principal components: z(k)=V(k)F(k)u(k);
[0091] Among them, z(k) is the principal component of the k-th view of a 3D model, creating a diagonal matrix λ d (k) is the eigenvector v of the covariance matrix d (k) characteristic value; Use formula (5) to obtain, that is, the eigenvector v of the covariance matrix of a J-dimensional 2D view d The sum of (k), J≤D, that is, the number of principal component feature vectors J is less than the feature dimension D of the input view.
[0092] 5) Obtain the differential signal through the principal component z(k) of the kth view of a 3D model and the principal component z(k-1) of the k-1th view The formula is as follows:
[0093] z · ( k ) = z ( k ) - z ( k - 1 ) - - - ( 7 )
[0094] among them, Is the difference signal of the principal component of the k-th view of a 3D model; z(k-1) is the principal component of the k-1th view of a 3D model.
[0095] 6) According to the differential signal The first eigenvalue of the eigenvector of the covariance matrix λ 1 (k), the first minor component C of the k-th view of the 3D model 1 (k), get the minor component C of the k-th view of the 3D model d (k), through the minor component analysis (MCA) of the 3D model, obtain the incremental slow feature estimate w d (k);
[0096] initialization For each d=1,...,J, let Then, use formulas (8) and (9) to update the minor components:
[0097] C d ( k ) = C 1 ( k ) + λ 1 ( k ) X d = 1 J w d ( k ) w d T ( k ) C 1 ( k ) - - - ( 8 )
[0098] w d ( k ) = 1.5 w d ( k - 1 ) - ηC d ( k ) w d ( k - 1 ) - η ( w d T ( k - 1 ) w d ( k - 1 ) ) w d ( k - 1 ) - - - ( 9 )
[0099] among them, Principal component differential signal for the kth view of a 3D model The transposition; C 1 (k) is the first minor component of the k-th view of a 3D model; C d (k) is the d-th minor component of the k-th view of a 3D model; λ 1 (k) The first eigenvalue of the eigenvector of the principal component covariance matrix; w d (k) is the d-th incremental slow feature estimation of the k-th view of a 3D model, Is w d (k) the transposition; w d (k-1) is the d-th incremental slow feature estimation of the k-1th view of a 3D model; Is w d The transposition of (k-1), that is, the incremental slow feature estimation of each view of each 3D model is related to the incremental slow feature estimation of the previous view.
[0100] 7) Estimate w from the principal component z(k) of each view and the incremental slow feature of each view d (k) Acquire multiple slow incremental features and the sort of the change size of the incremental slow features, and the final output of the incremental slow feature is as follows:
[0101] y(k)=z(k)W(k)(10)
[0102] among them, That is, the J incremental slow feature estimates of a view w d The sum of (k), y(k) is the final incremental slow feature output. Repeat step 1) to step 7), input all 3D models, and obtain the slow feature library of 3D models. In this experiment, set the number of incremental slow features J=400, then each 3D model will obtain 400 incremental slow features, but in specific experiments, the selection of the number of incremental slow features is set by the experimenter.
[0103] 204: Use the nearest neighbor algorithm to search and match the incremental slow feature library of the 3D model, and obtain and output objects similar to the candidate model.
[0104] Randomly select a 2D view as the candidate model Q from the incremental slow feature library of the 3D model, and then select a 2D view as the input model P. The retrieval task matches the candidate model Q with the input model P, and finally selects the 3D model Find objects similar to the candidate model Q in the incremental slow feature library. Commonly used methods of model matching include nearest neighbor algorithm, Hausdorff distance, and weighted bipartite graph matching.
[0105] Without loss of generality, the nearest neighbor algorithm (Nearestneighbor, NN) is used for registration, that is, the ratio of the nearest neighbor feature point distance of the sample feature point to the second nearest neighbor feature point distance is used to match the feature points. The nearest neighbor feature point refers to the feature point with the shortest Euclidean distance from the sample feature point, and the second nearest neighbor feature point refers to the feature point with the Euclidean distance slightly longer than the nearest neighbor distance. Using the nearest neighbor to second nearest neighbor ratio to match feature points can achieve good results, so as to achieve stable matching. The specific steps are as follows:
[0106] Apply the following formula (11) to process the incrementally slow feature learning data, and calculate the feature point distance between different 2D images:
[0107]
[0108] Where y i And y j Two different 2D images representing a 3D model, S 1 (y i ,y j ) Represents a 2D image y i And y j The similarity between For y i Feature mapping function, For y j Feature mapping function. According to S 1 (y i ,y j ), using formula (12) to calculate the similarity of different 3D models, that is, the smallest feature point distance.
[0109] S 2 ( P , Q ) = m i n 1 i n , 1 j m S 1 ( y i , y j ) - - - ( 12 )
[0110] Among them, S 2 (P,Q) represents the similarity between model P and Q, n represents the number of 2D views of 3D model P, m represents the number of 2D views of 3D model Q, because the previous database is preprocessed, so n is equal to m . The retrieval model with the highest similarity can be calculated with the following formula:
[0111] Q * =argmaxS 2 (Q i ,P)(13)
[0112] Among them, Q * Represents the retrieval model with the highest similarity, Q i Represents a candidate model, P is the input model, S 2 (Q i ,P) represents the similarity between the candidate model and the input model [8]. Finally, the matching probabilities of the query target and all models in the multi-view model library are sorted in descending order to obtain the final retrieval result. In summary, the embodiment of the present invention reduces the difficulty of non-rigid model feature extraction through the above steps 201 to step 204, improves the stability and accuracy of feature extraction, and provides good conditions for subsequent 3D model retrieval to ensure The search results are more efficient and accurate.