A 3D model similarity comparison method
By converting the 3D model into triangular facet expression and using three-dimensional convolutional neural network to extract features, the problem of global information loss in existing algorithms is solved, and more efficient 3D model similarity comparison is achieved, improving user experience.
Patent Information
- Application Number
- CN202510087545.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-01-17
AI Technical Summary
The existing 3D model similarity comparison algorithms have global information loss during feature extraction, especially the extraction of surface differences in the model is not comprehensive enough, resulting in poor user experience.
The 3D model format is converted into the triangular surface expression of the surface, the geometric center of the triangular surface is calculated and the cube is constructed. The model tensor expression is obtained based on the pixel position relationship, the initial features are extracted and the dimension is increased through a three-dimensional convolutional neural network, and the modular lengths between vectors of different models are calculated to obtain the difference value.
More comprehensively collecting global information of the model, improving the search quality of 3D models containing internal structures or assembly structures, and improving retrieval efficiency and user experience.
Smart Images

Figure CN119942157B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of model design, and particularly to a method for comparing the similarity of 3D models. Background Art
[0002] In the industrial design of the manufacturing industry, such as vehicle design, the retrieval and extraction steps of 3D models contain a large number of similar models. Efficiently retrieving and comparing the required models is an urgent problem to be solved. In some application software, similarity comparison can help designers and engineers quickly find similar design elements, thereby improving design efficiency and quality.
[0003] During the research process of conceiving and forming this application, the applicant found at least the following problems. Most of the widely used 3D model similarity comparison algorithms are based on screenshots of each perspective of the 3D model, extracting features from the screenshots to form the feature sequences of the models to obtain the differences between different models. In terms of feature extraction, the algorithm has evolved from traditional methods to AI, but in essence, it still transforms the 3D problem into a 2D problem for processing. This simplifies the problem to a certain extent, but at the same time, it also leads to the loss of some global information. For some features that are difficult to intercept, such as the extraction of the differences on the inner surface of the model, the generality is lost, and the user experience is not good. Summary of the Invention
[0004] To alleviate the above problems, this application provides a method for comparing the similarity of 3D models, including:
[0005] Converting the 3D model format to obtain a triangular facet representation of the surface, calculating the geometric centers of all triangular facets, and determining the positions of each triangular facet in a cube to construct the cube corresponding to the 3D model;
[0006] Based on the pixel position relationship between each triangular facet and the cube, obtaining the model tensor representation of the 3D model;
[0007] Extracting the initial features of the model tensor and performing classification and dimensionality elevation to obtain the dimensionality-elevated feature vector of the 3D model;
[0008] Based on the dimensionality-elevated feature vector, calculating the vector norms between different models to obtain the difference values between different models.
[0009] Optionally, the step of converting the 3D model format into a multi-dimensional vector representation and constructing a cube containing the 3D model includes:
[0010] Converting the 3D model format to obtain a triangular facet representation of the surface, and obtaining the maximum length value in the three-dimensional direction of the 3D model;
[0011] Construct a cube corresponding to the described 3D model, where the side length of the cube is a preset ratio of the maximum value of the length, and calculate the geometric centers of all triangular patches;
[0012] where the preset ratio is greater than 1 and / or the preset ratio is less than 2.
[0013] Optionally, in the step of obtaining the model tensor expression of the 3D model based on the pixel position relationship between each triangular patch and the cube, it includes:
[0014] For the geometric center coordinates of each triangular patch, determine its pixel position in the cube;
[0015] Based on the pixel position corresponding to the triangular patch, establish a target matrix corresponding to the coordinate values of the triangular patch to obtain the model tensor expression of the 3D model.
[0016] Optionally, the step of determining the pixel position of the geometric center coordinates of each triangular patch in the cube includes:
[0017] According to the side length and resolution of the cube, determine the pixel granularity of the cube;
[0018] Obtain the three-dimensional position coordinates of the geometric center, and combine the pixel granularity to calculate the three-dimensional coordinate values of the pixel points corresponding to the triangular patch.
[0019] Optionally, before the step of obtaining the three-dimensional position coordinates of the geometric center and combining the pixel granularity to calculate the three-dimensional coordinate values of the pixel points corresponding to the triangular patch, it also includes:
[0020] Obtain the position coordinates of the geometric center , if the side length of the cube is L and the resolution is N, then the pixel granularity size is L / N, and the formula for determining the three-dimensional coordinate values of the pixel points corresponding to the triangular patch is:
[0021]
[0022]
[0023]
[0024]
[0025] where is the maximum coordinate value of the first dimension of the 3D model, is the minimum coordinate value of the first dimension of the 3D model, is the maximum coordinate value of the second dimension of the 3D model, is the minimum coordinate value of the second dimension of the 3D model, is the maximum coordinate value of the third dimension of the 3D model, is the minimum coordinate value of the third dimension of the 3D model. a, b, and c are the three-dimensional coordinate position indices of the tensor dimension respectively, and a = b = c = 0 at the coordinate position of the first pixel.
[0026] Optionally, in the step of establishing a target matrix corresponding to the coordinate values of the triangular patch based on the pixel positions corresponding to the triangular patch to obtain the model tensor expression of the 3D model, it includes:
[0027] Based on the pixel position relationship between each triangular patch and the cube, establish a three-dimensional pixel matrix with a preset resolution, which is a sparse matrix with the coordinate value of the pixel point where each triangular patch is located being 1 and the rest being 0.
[0028] Optionally, the step of extracting the initial features of the model tensor and performing classification and dimensionality increase to obtain the dimensionality-increased feature vector of the 3D model includes:
[0029] Perform feature extraction on the model tensor based on a preset three-dimensional convolutional neural network model, and apply a fully connected layer and an activation function to perform classification and dimensionality increase on the initial features to obtain the dimensionality-increased feature vector of the 3D model.
[0030] Optionally, the step of performing feature extraction on the model tensor based on a preset three-dimensional convolutional neural network model includes:
[0031] During the process of three-dimensional convolutional multiplication, apply a step size recording tensor to record the number of all zeros experienced during convolutional translation after the first convolutional calculation of the model tensor numerical value, and record a minimum scaling step size at this position;
[0032] For each subsequent convolutional or pooling calculation, adjust the numerical value of the minimum scaling step size of the convolutional layer and / or pooling layer according to a preset strategy;
[0033] Perform convolutional calculation on the pixel numerical values that are not all zero and the pixel numerical values outside the minimum scaling step size of these positions, and fill the rest with zeros.
[0034] Optionally, before and including the step of adjusting the numerical value of the minimum scaling step size of the convolutional layer and / or pooling layer according to a preset strategy for each subsequent convolutional or pooling calculation:
[0035] Record a minimum scaling step size according to the following expression:
[0036]
[0037] Adjust the minimum scaling step size according to the following expression for each subsequent convolutional calculation:
[0038]
[0039] and / or, adjust the minimum scaling step according to the following expression during each subsequent pooling calculation:
[0040]
[0041] where is a minimum scaling step, is the number of all-zero tensors in the first dimension, is the number of all-zero tensors in the second dimension, is the number of all-zero tensors in the third dimension.
[0042] Optionally, the steps of calculating the modulus length between vectors of different models based on the upsampled feature vectors and obtaining the difference values between different models and the steps before that include:
[0043] Calculate the distance between the feature vectors of different models based on the upsampled feature vectors of the 3D models, obtain the closest model analyzed by a neural network model for a set of training models, and compare it with the closest model manually labeled;
[0044] According to the comparison result, adjust the parameters of the neural network model using the loss function of maximum likelihood estimation; to calculate the difference values between different models using the neural network model and complete the similarity ranking of 3D models.
[0045] A 3D model similarity comparison method provided by the present application converts the 3D model format to obtain a triangular patch expression of the surface, calculates the geometric centers of all triangular patches, and determines the positions of each triangular patch in the cube to construct the cube corresponding to the 3D model; based on the pixel position relationship between each triangular patch and the cube, obtain the model tensor expression of the 3D model; extract the initial features of the model tensor and perform classification upsampling to obtain the upsampled feature vectors of the 3D model; based on the upsampled feature vectors, calculate the modulus length between vectors of different models and obtain the difference values between different models. It can collect more comprehensive global information of the model, effectively avoid information loss in the feature extraction process, improve the retrieval quality for the search methods of 3D models with internal structures or assembly structures, have good effects in a super-large model set, and improve the user experience. Description of the Drawings
[0046] The accompanying drawings herein are incorporated into and form a part of the specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. To more clearly illustrate the technical solutions of the embodiments of the present application, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.
[0047] Figure 1 It is a flowchart of a 3D model similarity comparison method according to an embodiment of the present application.
[0048] The realization of the purpose of the present application, functional features and advantages will be further described in conjunction with the embodiments with reference to the accompanying drawings. Through the above-mentioned accompanying drawings, the specific embodiments of the present application have been shown, and more detailed descriptions will be given hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Detailed Embodiments
[0049] Here, the exemplary embodiments will be described in detail, and the examples are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0050] It should be noted that in this document, the term "comprising", "including" or any other variation thereof is intended to cover a non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or device comprising such element. In addition, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined based on their explanations in the specific embodiments or further in combination with the context of the specific embodiments.
[0051] It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining". Furthermore, as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should be further understood that the terms "comprising", "including" indicate the presence of the stated features, steps, operations, elements, components, items, kinds, and / or groups, but do not preclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups. The terms "or", "and / or", "including at least one of the following" and the like used in the present application may be interpreted inclusively, or mean any one or any combination. For example, "including at least one of the following: A, B, C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C", and again, "A, B or C" or "A, B and / or C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C". An exception to this definition occurs only when the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.
[0052] It should be understood that although the steps in the flowcharts in the embodiments of the present application are shown sequentially as indicated by the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless there is a clear indication in the present disclosure, the execution of these steps is not strictly limited in order and may be executed in other orders. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, and their execution order is not necessarily sequential, but may be executed alternately or in turn with at least some of the other steps or sub-steps or stages of the other steps.
[0053] Depending on the context, the words "if", "when" as used herein may be interpreted as "when" or "while" or "in response to determining" or "in response to detecting". Similarly, depending on the context, the phrase "if determined" or "if detected (stated condition or event)" may be interpreted as "when determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)".
[0054] It should be understood that the specific embodiments described herein are merely for explaining the present application and are not used to limit the present application.
[0055] The present application provides a method for comparing the similarity of 3D models. Figure 1 It is a flowchart of the method for comparing the similarity of 3D models according to an embodiment of the present application.
[0056] As Figure 1 shown, in one embodiment, the method for comparing the similarity of 3D models includes:
[0057] S10: Convert the 3D model format to obtain a triangular patch representation of the surface, calculate the geometric centers of all triangular patches, and determine the positions of each triangular patch in the cube to construct the cube corresponding to the 3D model.
[0058] A triangular patch is a two-dimensional geometric figure composed of three vertices and three edges. Each edge connects two vertices, and finally forms a closed triangle. Triangular patches are usually used to describe the surface of three-dimensional objects. By combining a large number of adjacent triangular patches, complex shapes can be constructed. In three-dimensional point clouds, the basic principle of many surface reconstruction methods is to reconstruct the triangular surface of an object through triangulation. Exemplarily, for a closed solid part in 3D space, the standardized 3D format model uses patch units to record model information. According to the ISO-12303 standard, B-spline curves are used to describe different types of patch units. Optionally, all patches in the standardized model are subdivided to obtain a triangular patch representation of the surface. The degree of surface subdivision (the number of triangular patches) is in a proportional relationship with the degree of subdivision.
[0059] S20: Based on the pixel position relationship between each triangular patch and the cube, obtain the model tensor representation of the 3D model.
[0060] A three-dimensional vector is called a tensor. Exemplarily, the way to obtain the model tensor is to project the faces of the standard model onto a cube of a fixed size at a certain resolution. Corresponding to a 2D picture, the length, width, and height of the cube are evenly divided into N parts (N is the number of pixels) respectively, obtaining N^3 small cubes, which are called the minimum units of the model tensor, that is, "pixels". The pixel position can be determined through the index of the pixel tensor dimension. Exemplarily, for the geometric center coordinates of each triangular patch, determine which pixel position it is located in the cube.
[0061] S30: Extract the initial features of the model tensor and perform classification and dimensionality increase to obtain the dimensionality-increased feature vector of the 3D model.
[0062] A multi-dimensional vector is a vector composed of elements in more than one dimension. In a two-dimensional space, a vector can be represented as (x, y), where x and y are the components of the vector in the horizontal and vertical directions respectively. Similarly, in a three-dimensional space, a vector can be represented as (x, y, z). Further, multi-dimensional vectors can also be those vectors existing in higher-dimensional spaces, such as four-dimensional, five-dimensional or even more-dimensional vectors. Multi-dimensional vectors have a wide range of applications in many fields. In computer science, multi-dimensional vectors are used in graphics processing, machine learning algorithms, and data analysis. Multi-dimensional vectors have some unique properties. They can perform basic operations such as addition, subtraction, and scalar multiplication. These operations are also applicable in multiple dimensions, but the calculation process will become more complex. In addition, multi-dimensional vectors also have the concepts of length and direction. The length can be obtained by calculating the modulus of the vector, and the direction is determined by the components of the vector. Exemplarily, by referring to the method of taking coordinate values for pixelating a 2D picture, the picture can be converted into a 2D vector matrix; for a 3D model, 2D projections in the same direction are obtained to get vector data, and this operation can convert the standard model into a 3D vector matrix. The method of obtaining the tensor of a 3D model is to project the faces of the standard model onto a cube of a fixed size with a certain resolution. Exemplarily, through a convolutional neural network, initial feature extraction can be performed on a picture, and a fully connected layer and an activation function are applied to classify and dimensionally ascend the initial features, and a dimensionally ascended feature vector of a 3D model can be obtained.
[0063] S40: Based on the dimensionally ascended feature vector, calculate the modulus length between the vectors of different models to obtain the difference value between different models.
[0064] Exemplarily, based on the processing of pixelating a 3D model, through a neural network model, feature generation can be performed on all 3D models, and by calculating the modulus length difference value, the feature vector distance can be obtained, so that according to the size of the difference value, the similarity ranking between 3D models can be realized.
[0065] In this embodiment, by converting the 3D model format into a multi-dimensional vector expression and constructing a cube containing the 3D model; based on the dimensionally ascended feature vector, calculating the modulus length between the vectors of different models to obtain the difference value between different models, the global information of the model can be collected more comprehensively, effectively avoiding information loss in the feature extraction process, and improving the retrieval quality for the search methods of 3D models with internal structures or assembly structures.
[0066] Optionally, the step of converting the 3D model format into a multi-dimensional vector expression and constructing a cube containing the 3D model includes:
[0067] Convert the 3D model format to obtain a triangular facet expression of the surface, and obtain the maximum length value in the three-dimensional directions of the 3D model;
[0068] Construct a cube corresponding to the described 3D model, with the side length of the cube being a preset ratio of the maximum value of the length, and calculate the geometric centers of all triangular patches;
[0069] Wherein the preset ratio is greater than 1 and / or the preset ratio is less than 2.
[0070] Exemplarily, perform surface subdivision on all patches in the standardized model to obtain a triangular patch representation of the surface, and then implement a multi-dimensional vector representation based on the triangular patches. The degree of surface subdivision (i.e., the number of triangular patches) is in a proportional correlation with the degree of pixel subdivision. Optionally, the maximum side length of the triangular patch should be less than L / N, smaller than 1 pixel, so that one triangular patch spans at most two pixels.
[0071] Exemplarily, convert the 3D model format from a standardized representation to a multi-dimensional vector representation of a three-dimensional picture. Refer to obtaining a picture by performing a 2D projection on the 3D model in the same direction. This operation is actually converting the standard model into a 3D vector matrix, so it can be referred to as a "model tensor". Project the faces of the standard model onto a cube of a fixed size at a certain resolution, and determine the side length of the cube as the maximum length of the dimensions in the three-dimensional directions of the model. Exemplarily, the preset ratio is greater than 1 and / or the preset ratio is less than 2. Preferably, the side length of the cube can be determined as 120% of the maximum value of the dimensions in the three-dimensional directions of the model.
[0072] Optionally, in the step of obtaining the model tensor representation of the 3D model based on the pixel position relationship between each triangular patch and the cube, it includes:
[0073] For the geometric center coordinates of each triangular patch, determine its pixel position in the cube;
[0074] Based on the pixel position corresponding to the triangular patch, establish a target matrix corresponding to the coordinate values of the triangular patch to obtain the model tensor representation of the 3D model.
[0075] Exemplarily, all patches in the standardized model are subdivided to obtain a triangular patch representation of the surface. The maximum side length of the triangular patches should be less than L / N and smaller than 1 pixel, so that one triangular patch spans at most two pixels. Next, the geometric centers of all triangular patches can be calculated, and for the geometric center coordinates of each triangular patch, determine which pixel position in the cube it is located in. Based on the three-dimensional coordinate position index of the tensor dimension, determine the formula for the pixel corresponding to the triangular patch, and the pixel position can be determined through the index of the pixel tensor dimension. Establish the target matrix corresponding to the coordinate values of the triangular patches, so that the sparse matrix with the coordinate values of the triangular patches set to 1 and the remaining values set to 0, which is equivalent to the process of black and white dyeing of the pixels, and the model tensor representation of the corresponding 3D model can be obtained.
[0076] Optionally, the step of determining the pixel position of each triangular patch in the cube based on its geometric center coordinates includes:
[0077] Determine the pixel granularity of the cube according to the side length and resolution of the cube;
[0078] Obtain the three-dimensional position coordinates of the geometric center, and calculate the three-dimensional coordinate values of the pixel corresponding to the triangular patch in combination with the pixel granularity.
[0079] The way to obtain the model tensor is to project the faces of the standard model onto a cube of a fixed size at a certain resolution. For the corresponding 2D picture, the length, width, and height of the cube can be evenly divided into N parts (N is the number of pixels) respectively, obtaining N^3 small cubes, which are called the minimum units of the model tensor, that is, "pixels". For the geometric center coordinates of each triangular patch determine which pixel position in the cube it is located in where a, b, and c are the three-dimensional coordinate position indices of the tensor dimension respectively.
[0080] Optionally, before the step of obtaining the three-dimensional position coordinates of the geometric center and calculating the three-dimensional coordinate values of the pixel corresponding to the triangular patch in combination with the pixel granularity, it further includes:
[0081] Obtain the position coordinates of the geometric center If the side length of the cube is L and the resolution is N, then the pixel granularity size is L / N. The formula for determining the three-dimensional coordinate values of the pixel corresponding to the triangular patch is:
[0082]
[0083]
[0084]
[0085]
[0086] Wherein is the maximum coordinate value of the first dimension of the 3D model, is the minimum coordinate value of the first dimension of the 3D model, is the maximum coordinate value of the second dimension of the 3D model, is the minimum coordinate value of the second dimension of the 3D model, is the maximum coordinate value of the third dimension of the 3D model, is the minimum coordinate value of the third dimension of the 3D model. a, b, and c are the three-dimensional coordinate position indices of the tensor dimension respectively. For the coordinate position of the first pixel, a = b = c = 0.
[0087] Exemplarily, for the geometric center coordinates of each triangular patch , determine which pixel position of the cube it is located in . Wherein a, b, and c are the three-dimensional coordinate position indices of the tensor dimension respectively. The coordinate position of the first pixel of a is the origin, and a = b = c = 0. Assuming the side length of the cube is L and the resolution is N, then the pixel granularity size is L / N. Based on the formula of the pixel corresponding to the triangular patch, perform the above operations on each patch to establish a sparse matrix of size N*N*N, so as to obtain the model tensor expression corresponding to the 3D model.
[0088] Optionally, in the step of establishing the target matrix corresponding to the coordinate values of the triangular patch based on the pixel position corresponding to the triangular patch to obtain the model tensor expression of the 3D model, it includes:
[0089] Based on the pixel position relationship between each triangular patch and the cube, establish a three-dimensional pixel matrix with a preset resolution, which is a sparse matrix with the coordinate value of the pixel point where each triangular patch is located being 1 and the rest being 0.
[0090] Exemplarily, perform the above operations on each patch, calculate based on the above formula, establish a sparse matrix of size N*N*N, set the coordinate value corresponding to the triangular patch to 1 and the rest to 0, which is equivalent to dyeing the pixels black and white to obtain a sparse matrix, and the model tensor expression corresponding to the 3D model can be obtained.
[0091] Optionally, the step of extracting the initial features of the model tensor and performing classification and dimensionality increase to obtain the dimensionality-increased feature vector of the 3D model includes:
[0092] Based on a preset three-dimensional convolutional neural network model, perform feature extraction on the model tensor, and apply a fully connected layer and an activation function to perform classification and dimensionality increase on the initial features to obtain the dimensionality-increased feature vector of the 3D model.
[0093] Exemplarily, after initial feature extraction of the model tensor through a convolutional neural network CNN (initial feature extraction of the visible picture), a fully connected layer and an activation function are applied to classify and dimensionally elevate the initial features, obtaining a dimensionally elevated feature vector of a 3D model. This step aims to establish the association between multiple features, and the principle is the same as that of feature extraction and classification for 2D pictures. The difference is that since the 3D convolution sweeps through all the spatial points of the 3D model, it more effectively extracts the internal features and 3D features of the model, providing more information for the feature combination of the fully connected layer.
[0094] Optionally, the step of performing feature extraction on the model tensor based on the preset three-dimensional convolutional neural network model includes:
[0095] During the process of three-dimensional convolution multiplication, a step record tensor is applied to record the number of all zeros experienced during convolution translation after the first convolution calculation of the model tensor values, and a minimum scaling step is recorded at this position.
[0096] During each subsequent convolution or pooling calculation, the minimum scaling step value of the convolutional layer and / or pooling layer is adjusted according to a preset strategy.
[0097] Convolution calculations are performed on the pixel values that are not all zero and the pixel values outside the minimum scaling step at these positions, and the rest are filled with zeros.
[0098] Although the obtained model tensor is 3D, since only the pixels passing through the surface are assigned values, in fact, during the process of multiplying with the 3D convolution, the values at most positions in the 3D space are fixed to 0, that is, there is no output. Exemplarily, a step record tensor can be applied to record the number of all zeros experienced during convolution translation after the first convolution calculation. Assume that the initial stride is 1. During the first calculation, if the model tensor values corresponding to the convolution kernel at a certain position index(a,b,c) are not all zero, and after that, when it is translated within the number of steps in 3 directions are all zero tensors, and are all greater than 1, then a minimum scaling step can be recorded at this position . For each subsequent convolution and / or pooling, and for each layer calculation later, only the convolution of the sparse number of indices (pixel value exponents) with non-zero values and the convolution outside the minimum scaling step at these positions need to be calculated, and the rest are automatically filled with zeros. For a 3D model, when the resolution of the model tensor is relatively high in the early stage, this can effectively reduce the amount of calculation and improve the calculation efficiency.
[0099] Optionally, the steps before and including the step of adjusting the minimum scaling step value of the convolutional layer and / or pooling layer according to a preset strategy during each subsequent convolution or pooling calculation include:
[0100] Record a minimum scaling step according to the following expression:
[0101]
[0102] During each subsequent convolution calculation, adjust the minimum scaling step according to the following expression:
[0103]
[0104] And / or, during each subsequent pooling calculation, adjust the minimum scaling step according to the following expression:
[0105]
[0106] Where is a minimum scaling step, is the number of all-zero tensors in the first dimension, is the number of all-zero tensors in the second dimension, is the number of all-zero tensors in the third dimension.
[0107] Exemplarily, assume that the initial stride is 1. During the first calculation, if the numerical value of the model tensor corresponding to the convolution kernel at a certain position index(a, b, c) is not all 0, and after that, when it is translated within the number of strides in 3 directions and all are all-zero tensors, and are all greater than 1, then a minimum scaling step can be recorded at this position. For each subsequent convolution and / or pooling, the calculation can be performed according to the above expression.
[0108] After initial feature extraction of the model tensor through the improved convolutional neural network CNN (initial feature extraction of the visible picture), apply a fully connected layer and an activation function to classify and dimensionally elevate the initial features to obtain a dimensionally elevated feature vector of a 3D model. This step aims to establish the association between multiple features, and the principle is the same as that of feature extraction and classification for 2D pictures. The difference is that since the 3D convolution sweeps through all the spatial points of the 3D model, it more effectively extracts the internal features and 3D features of the model, providing more information for the feature combination of the fully connected layer.
[0109] Optionally, the steps of calculating the norm between vectors of different models based on the dimensionally elevated feature vector and obtaining the difference value between different models and the steps before that include:
[0110] Calculate the distance between the feature vectors of different models based on the dimensionally elevated feature vector of the 3D model, obtain the closest model of a set of training models analyzed by the neural network model, and compare it with the closest model manually labeled;
[0111] According to the comparison result, the parameters of the neural network model are adjusted using the loss function of maximum likelihood estimation; to calculate the difference value between different models using the neural network model, and complete the similarity ranking between 3D models.
[0112] Exemplarily, the dimensionality - raised feature is obtained through the inference of the fully - connected layer to get a dimensionality - raised feature vector of a 3D model. The dimension of this vector is usually within 100. The difference value between different models is obtained by calculating the norm between vectors. The distance between two points is the norm difference value, representing the distance between two models. Among them, the norm between vectors is the calculation of the square difference, which is the distance of the dimensionality - raised feature vector.
[0113] Find the closest model through the norm, compare the closest model with the annotated model, maximize the loss function, and optimize the parameters of the neural network model. The closest model obtained by passing a set of training models through the network (neural network model) can be compared with the closest model manually annotated, and the loss function is used to evaluate the effect of the neural network model:
[0114]
[0115] where \(H\) is the value of the loss function, is the distance between the model feature vector and the feature vector of the closest annotated model.
[0116] By maximizing the loss function to make the value of the loss function closer and closer to 0, the parameters of the neural network model can be obtained. After the neural network model is trained, using this network (neural network model) and model pre - processing (model pre - processing refers to the previous pixelization process), feature extraction can be generated for all 3D models, and the distance of the feature vector can be obtained through the calculation of the norm difference value. According to the size of the difference value, the task of similarity ranking between 3D models is completed.
[0117] A 3D model similarity comparison method provided by this application converts the 3D model format into a multi-dimensional vector expression and constructs a cube containing the 3D model; converts the 3D model format to obtain a triangular patch expression of the surface, calculates the geometric center of all triangular patches, and determines the position of each triangular patch in the cube to construct the cube corresponding to the 3D model; based on the pixel position relationship between each triangular patch and the cube, obtains the model tensor expression of the 3D model; extracts the initial features of the model tensor and performs classification and dimensionality increase to obtain the dimensionality-increased feature vector of the 3D model; based on the dimensionality-increased feature vector, calculates the modulus length between vectors of different models to obtain the difference value between different models. It can collect the global information of the model more comprehensively, effectively avoid information loss in the feature extraction process, improve the retrieval quality for the search methods of 3D models with internal structures or assembly structures, have a good effect in a super-large model set, and improve the user experience.
[0118] It should be noted that in this application, step codes such as S10 and S20 are used. The purpose is to more clearly and briefly express the corresponding content, and it does not constitute a substantial limitation in order. Those skilled in the art may execute S20 first and then S10 during specific implementation, etc., but these should all be within the protection scope of this application.
[0119] In the system embodiment provided by this application, it may include all the technical features of any of the above method embodiments. The content of the specification expansion and explanation is basically the same as that of the above method embodiments, and will not be elaborated here.
[0120] This application embodiment also provides a computer program product. The computer program product includes computer program code. When the computer program code runs on a computer, it causes the computer to execute the methods in the above various possible implementation manners.
[0121] This application embodiment also provides a chip, including a memory and a processor. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the device equipped with the chip executes the methods in the above various possible implementation manners.
[0122] It can be understood that the above scenarios are only examples and do not constitute a limitation on the application scenarios of the technical solutions provided by this application embodiment. The technical solutions of this application can also be applied to other scenarios. For example, as known to those of ordinary skill in the art, with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided by this application embodiment are equally applicable to similar technical problems.
[0123] The above serial numbers of the embodiments of this application are only for description and do not represent the advantages and disadvantages of the embodiments.
[0124] The steps in the method of the embodiments of the present application can be adjusted in sequence, combined, and deleted according to actual needs.
[0125] The units in the device of the embodiments of the present application can be combined, divided, and deleted according to actual needs.
[0126] In the present application, for the description of the same or similar term concepts, technical solutions, and / or application scenarios, generally only the first occurrence is described in detail. When it appears repeatedly later, for the sake of brevity, it is generally not described again. When understanding the technical solutions and other contents of the present application, for the same or similar term concepts, technical solutions, and / or application scenario descriptions that are not described in detail later, reference can be made to the relevant detailed descriptions before.
[0127] In the present application, the descriptions of the various embodiments have their own emphases. For the parts not described in detail or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0128] The technical features of the technical solutions of the present application can be combined arbitrarily. For the sake of concise description, not all possible combinations of the various technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope recorded in the present application.
[0129] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structural or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be included in the patent protection scope of the present application by the same token.
Claims
1. A 3D model similarity comparison method, characterized in that, Including: Converting the 3D model format to obtain a triangular facet representation of the surface, calculating the geometric centers of all triangular facets, and determining the positions of each triangular facet in the cube to construct the cube corresponding to the 3D model; Based on the pixel position relationship between each triangular facet and the cube, establishing a three-dimensional pixel matrix with a preset resolution, using a sparse matrix with the coordinate value of the pixel point where each triangular facet is located as 1 and the rest as 0 as the target matrix, and obtaining the model tensor representation of the 3D model; Extracting the initial features of the model tensor and performing classification and dimensionality increase to obtain the dimensionality-increased feature vector of the 3D model; Based on the dimensionality-increased feature vector, calculating the norm length between vectors of different models to obtain the difference value between different models; The steps of converting the 3D model format to obtain a triangular facet representation of the surface, calculating the geometric centers of all triangular facets, and determining the positions of each triangular facet in the cube to construct the cube corresponding to the 3D model include: Converting the 3D model format to obtain a triangular facet representation of the surface, and obtaining the maximum length value in the three-dimensional direction of the 3D model; Constructing a cube corresponding to the 3D model, where the side length of the cube is a preset ratio of the maximum length value, and calculating the geometric centers of all triangular facets.
2. The 3D model similarity comparison method according to claim 1, characterized in that, The steps of converting the 3D model format to obtain a triangular facet representation of the surface, calculating the geometric centers of all triangular facets, and determining the positions of each triangular facet in the cube to construct the cube corresponding to the 3D model include: Where the preset ratio is greater than 1 and / or the preset ratio is less than 2.
3. A 3D model similarity comparison method according to claim 1, characterized in that, In the step of establishing a three-dimensional pixel matrix with a preset resolution based on the pixel position relationship between each triangular facet and the cube, using a sparse matrix with the coordinate value of the pixel point where each triangular facet is located as 1 and the rest as 0 as the target matrix, and obtaining the model tensor representation of the 3D model, it includes: For the geometric center coordinates of each triangular facet, determining its pixel position in the cube; Based on the pixel position corresponding to the triangular facet, establishing the target matrix corresponding to the coordinate value of the triangular facet to obtain the model tensor representation of the 3D model.
4. A 3D model similarity comparison method according to claim 3, characterized in that, The step of determining the pixel position in the cube for the geometric center coordinates of each triangular facet includes: According to the side length and resolution of the cube, determining the pixel granularity of the cube; Obtaining the three-dimensional position coordinates of the geometric center, and calculating the three-dimensional coordinate values of the pixel points corresponding to the triangular facet in combination with the pixel granularity.
5. A 3D model similarity comparison method according to claim 4, characterized in that, Before the step of obtaining the three-dimensional position coordinates of the geometric center and calculating the three-dimensional coordinate values of the pixel points corresponding to the triangular facet in combination with the pixel granularity, it also includes: Obtain the position coordinates of the geometric center , assuming the side length of the cube is L and the resolution is N, then the pixel granularity size is L / N. The formula for determining the three-dimensional coordinate values of the pixel points corresponding to the triangular patches is as follows: wherein is the maximum coordinate value of the first dimension of the 3D model, is the minimum coordinate value of the first dimension of the 3D model, is the maximum coordinate value of the second dimension of the 3D model, is the minimum coordinate value of the second dimension of the 3D model, is the maximum coordinate value of the third dimension of the 3D model, is the minimum coordinate value of the third dimension of the 3D model, and a, b, and c are the three-dimensional coordinate position indices of the tensor dimension, and a = b = c = 0 in the coordinate position of the first pixel.
6. A 3D model similarity comparison method according to claim 1, characterized in that, The step of extracting the initial features of the model tensor and performing classification and dimensionality increase to obtain the dimensionality-increased feature vector of the 3D model includes: Performing feature extraction on the model tensor based on a preset three-dimensional convolutional neural network model, and applying a fully connected layer and an activation function to perform classification and dimensionality increase on the initial features to obtain the dimensionality-increased feature vector of the 3D model.
7. A 3D model similarity comparison method according to claim 6, characterized in that, The step of performing feature extraction on the model tensor based on a preset three-dimensional convolutional neural network model includes: During the process of three-dimensional convolution multiplication, apply a stride record tensor to record the number of all zeros experienced during convolution translation after the first convolution calculation of the model tensor values, and record a minimum scaling stride at this position; During each subsequent convolution or pooling calculation, adjust the minimum scaling stride value of the convolutional layer and / or pooling layer according to a preset strategy; Perform convolution calculations on pixel values that are not all zero and pixel values outside the minimum scaling stride at these positions, and fill the rest with zeros.
8. A 3D model similarity comparison method according to claim 7, characterized in that, The step of adjusting the minimum scaling stride value of the convolutional layer and / or pooling layer according to a preset strategy during each subsequent convolution or pooling calculation and the previous steps include: Record a minimum scaling stride according to the following expression: Adjust the minimum scaling stride according to the following expression during each subsequent convolution calculation: And / or, adjust the minimum scaling stride according to the following expression during each subsequent pooling calculation: wherein is a minimum scaling step size, is the number of all-zero tensors in the first dimension, is the number of all-zero tensors in the second dimension, is the number of all-zero tensors in the third dimension.
9. A 3D model similarity comparison method according to claim 1, characterized in that The step of calculating the modulus length between vectors of different models based on the upsampled feature vector to obtain the difference value between different models and the previous steps include: Calculate the distance between feature vectors of different models based on the upsampled feature vector of the 3D model, obtain the closest model obtained by analyzing a set of training models through a neural network model, and compare it with the closest model manually labeled; According to the comparison result, use the loss function of maximum likelihood estimation to adjust the parameters of the neural network model; to calculate the difference value between different models using the neural network model and complete the similarity ranking of 3D models.
Citation Information
Patent Citations
Three-dimensional indoor model retrieval method based on deep learning
CN112115291A
Three-dimensional model feature extraction method using patch convolution
CN113570692A