3D model similarity comparison method
By converting the 3D model into a multi-dimensional vector expression and building a cube, extracting and upgrading the dimensional feature vectors, and calculating the difference values between models, the problem of information loss in the feature extraction process of 3D model similarity comparison algorithm in the prior art is solved, and the retrieval quality and user experience are improved.
Patent Information
- Application Number
- CN202510087545.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-01-17
AI Technical Summary
The existing 3D model similarity comparison algorithm will lead to the loss of some global information during feature extraction, especially for the poor extraction of surface differences in the model, which will affect the user experience.
By converting the 3D model format into a multi-dimensional vector expression and building a cube containing a 3D model, extracting the initial features of the model tensor and performing classification dimensionality upgrades, obtaining the dimensionality upgrade feature vector, and calculating the modulus lengths between vectors of different models to obtain the difference value.
This method can collect global information of the model more comprehensively, avoid the lack of information during feature extraction, and improve the search quality of 3D models containing internal structures or assembly structures, especially in super-large models.
Smart Images

Figure CN119942157A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of model design, and in particular to a 3D model similarity comparison method. Background Art
[0002] In the industrial design of manufacturing, such as vehicle design, the retrieval and retrieval steps of 3D models contain a large number of similar models. Efficient retrieval and comparison of 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 discovered at least the following problems: most of the 3D model similarity comparison algorithms that are widely used now are based on screenshots of 3D models from all angles, and feature extraction is performed on the screenshots to form a feature sequence of the model to obtain the differences between different models. In terms of feature extraction, the algorithm has experienced the progress from traditional methods to AI, but the essence is to convert 3D problems into 2D for processing. This simplifies the problem to a certain extent, but it also leads to the loss of some global information. For some difficult-to-capture features, such as the extraction of differences in the inner surface of the model, it loses versatility and the user experience is not good. Summary of the invention
[0004] In order to alleviate the above problems, the present application provides a 3D model similarity comparison method, including: Convert the 3D model format into a multi-dimensional vector expression, and construct a cube containing the 3D model; Convert the 3D model format to obtain a triangular face expression of the surface, calculate the geometric center of all triangular facets, and determine the position of each triangular facet in the cube to construct a cube corresponding to the 3D model; Based on the pixel position relationship between each triangular face and the cube, a model tensor expression of the 3D model is obtained; Extracting the initial features of the model tensor and performing classification and dimensionality upgrading to obtain the dimensionality-elevated feature vector of the 3D model; Based on the dimension-increased feature vector, the modulus lengths between vectors of different models are calculated to obtain the difference values between the different models.
[0005] Optionally, the step of converting the 3D model format into a multi-dimensional vector expression and constructing a cube containing the 3D model includes: Convert the 3D model format to obtain a triangular patch expression of the surface, and obtain the maximum length of the 3D model in three directions; Constructing a cube corresponding to the 3D model, wherein the side length of the cube is a preset ratio of the maximum length, and calculating the geometric centers of all triangular facets; The preset ratio is greater than 1 and / or the preset ratio is less than 2.
[0006] Optionally, based on the pixel position relationship between each triangular facet and the cube, the step of obtaining a model tensor expression of the 3D model includes: For each triangle patch’s geometric center coordinates, determine its pixel position in the cube; Based on the pixel positions corresponding to the triangular patch, a target matrix corresponding to the triangular patch coordinate values is established to obtain a model tensor expression of the 3D model.
[0007] Optionally, the step of determining the pixel position of each triangular facet in the cube by using the geometric center coordinates of the triangular facet includes: Determining the pixel granularity of the cube according to the side length and resolution of the cube; The three-dimensional position coordinates of the geometric center are obtained, and the three-dimensional coordinate values of the pixel points corresponding to the triangular facet are calculated in combination with the pixel granularity.
[0008] Optionally, 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 also includes: Get the position coordinates of the geometric center , assuming that the side length of the cube is L and the resolution is N, then the pixel granularity is L / N, and the formula for determining the three-dimensional coordinate value of the pixel point corresponding to the triangular face is:
[0009]
[0010]
[0011]
[0012] in is the maximum coordinate value of the first dimension of the 3D model, is the minimum maximum value of the coordinates 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, c are the three-dimensional coordinate position indexes of the tensor dimension respectively, and the coordinate position of the first pixel is a=b=c=0.
[0013] Optionally, the step of establishing a target matrix corresponding to the coordinate values of the triangular facet based on the pixel positions corresponding to the triangular facet to obtain a model tensor expression of the 3D model includes: Based on the pixel position relationship between each triangular face and the cube, a three-dimensional pixel matrix with a preset resolution is established, which is a sparse matrix with the coordinate value of the pixel point where each triangular face is located as 1 and the remaining values as 0.
[0014] Optionally, the step of extracting the initial features of the model tensor and performing classification and dimensionality upgrading to obtain the dimension-upgraded feature vector of the 3D model includes: Based on a preset three-dimensional convolutional neural network model, feature extraction is performed on the model tensor, and the full connection layer and activation function are applied to classify and upgrade the initial features to obtain the upgraded dimension feature vector of the 3D model.
[0015] Optionally, the step of extracting features from the model tensor based on a preset three-dimensional convolutional neural network model includes: In the process of three-dimensional convolution multiplication, a step size is applied to record the tensor. After the first convolution calculation of the model tensor value, the number of all 0s experienced during the convolution translation is recorded, and a minimum scaling step size is recorded at this position; For each subsequent convolution or pooling calculation, adjust the minimum scaling step value of the convolution layer and / or pooling layer according to the preset strategy; The pixel values that are not all zero and the pixel values outside the minimum scaling step at these positions are convolved and the rest are filled with zero.
[0016] Optionally, the step of adjusting the minimum scaling step value of the convolution layer and / or pooling layer according to a preset strategy for each subsequent convolution or pooling calculation includes: Record a minimum zoom step size according to the following expression:
[0017] For each subsequent convolution calculation, the minimum scaling step is adjusted according to the following expression:
[0018] And / or, for each subsequent pooling calculation, adjust the minimum scaling step size according to the following expression:
[0019] in is a minimum zoom 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.
[0020] Optionally, the step of calculating the modulus lengths between vectors of different models based on the dimension-upgraded feature vector and obtaining the difference values between different models includes: Calculating the distance between feature vectors of different models based on the dimensionally increased feature vectors of the 3D model, analyzing a group of training models through a neural network model to obtain the closest model, and comparing it with the closest model annotated manually; According to the comparison results, the parameters of the neural network model are adjusted using the maximum likelihood estimation loss function; the difference values between different models are calculated using the neural network model to complete the similarity ranking between 3D models.
[0021] The present application provides a 3D model similarity comparison method, which 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 face expression of the surface, calculates the geometric center of all triangular faces, and determines the position of each triangular face in the cube to construct the cube corresponding to the 3D model; obtains the model tensor expression of the 3D model based on the pixel position relationship between each triangular face and the cube; extracts the initial features of the model tensor and performs classification and dimension upgrading to obtain the dimension-upgraded feature vector of the 3D model; calculates the modulus length between vectors of different models based on the dimension-upgraded feature vector to obtain the difference value between different models. It can collect the global information of the model more comprehensively, effectively avoid the information loss in the feature extraction process, improve the retrieval quality for the search method of 3D models with internal structures or assembly structures, has a good effect in super large model collections, and improves user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor.
[0023] Figure 1 This is a flow chart of a 3D model similarity comparison method according to an embodiment of the present application.
[0024] The realization of the purpose, functional features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. The above-mentioned drawings have shown clear embodiments of this application, which will be described in more detail later. These drawings and textual descriptions are not intended to limit the scope of the concept of this application in any way, but to illustrate the concept of this application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0025] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0026] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the 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 by their explanation in the specific embodiment or further combined with the context of the specific embodiment.
[0027] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in this article, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this article, 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 can be interpreted as "at the time of..." or "when..." or "in response to determination". Furthermore, as used in this article, the singular forms "one", "one" and "the" are intended to also include plural forms, unless there is an opposite indication in the context. It should be further understood that the terms "comprising", "including" indicate that there are described features, steps, operations, elements, components, projects, kinds, and / or groups, but do not exclude the existence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and / or groups. The terms "or", "and / or", "including at least one of the following" etc. used in this application can be interpreted as inclusive, or mean any one or any combination. For example, “comprising at least one of the following: A, B, C” means “any of the following: A; B; C; A and B; A and C; B and C; A and B and C”, and for another example, “A, B or C” or “A, B and / or C” means “any 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 will only occur when a combination of elements, functions, steps or operations are inherently mutually exclusive in some manner.
[0028] It should be understood that, although the various steps in the flowchart in the embodiment of the present application are displayed in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and it can be performed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0029] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0030] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0031] This application provides a 3D model similarity comparison method. Figure 1 This is a flow chart of a 3D model similarity comparison method according to an embodiment of the present application.
[0032] like Figure 1 As shown, in one embodiment, the 3D model similarity comparison method includes: S10: Convert the 3D model format to obtain a triangular facet expression of the surface, calculate the geometric center of all triangular facets, and determine the position of each triangular facet in the cube to construct a cube corresponding to the 3D model.
[0033] A triangular face is a two-dimensional geometric figure consisting of three vertices and three edges. Each edge connects two vertices, eventually forming a closed triangle. Triangular faces are usually used to describe the surface of a three-dimensional object. Complex shapes can be constructed by combining a large number of adjacent triangular faces. In a three-dimensional point cloud, the basic principle of many surface reconstruction methods is to reconstruct the triangular faces of the object surface by triangulation. For example, for a solid part closed in a 3D space, a standardized 3D format model uses face units to record model information. According to the ISO-12303 standard, B-spline curves are used to describe different types of face units. Optionally, all faces in the standardized model are tessellated to obtain a triangular face expression of the surface. The degree of surface tessellation (the number of triangular faces) is proportional to the degree of tessellation.
[0034] S20: Based on the pixel position relationship between each triangular facet and the cube, a model tensor expression of the 3D model is obtained.
[0035] A three-dimensional vector is called a tensor. For example, the way to obtain the model tensor is to project the surface of the standard model into a cube of a fixed size at a certain resolution. Corresponding to the 2D picture, the length, width and height of the cube are divided into N parts (N is the number of pixels), and N^3 small cubes are obtained, which are called the smallest unit of the model tensor. That is, "pixel". The pixel position can be determined by the index of the pixel tensor dimension. For example, for the geometric center coordinates of each triangular facet, determine which pixel position of the cube it is located at.
[0036] S30: extracting the initial features of the model tensor and performing classification and dimensionality upgrading to obtain the dimensionality-elevated feature vector of the 3D model.
[0037] A multidimensional vector is a vector that consists of elements in more than one dimension. In 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. Similarly, in three-dimensional space, a vector can be represented as (x, y, z). Furthermore, multidimensional vectors can also be vectors that exist in higher-dimensional spaces, such as four-dimensional, five-dimensional, or even more-dimensional vectors. Multidimensional vectors have a wide range of applications in many fields. In computer science, multidimensional vectors are used in graphics processing, machine learning algorithms, and data analysis. Multidimensional 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 becomes more complicated. In addition, multidimensional vectors have the concepts of length and direction. The length of a vector can be obtained by calculating its modulus, while the direction is determined by the components of the vector. Exemplarily, the image can be converted into a 2D vector matrix by referring to the coordinate value of the pixelation of a 2D image; the 3D model is projected in the same direction in 2D to obtain vector data, and this operation can convert the standard model into a 3D vector matrix. The way to obtain the 3D model tensor is to project the surface of the standard model into a cube of a fixed size at a certain resolution. Exemplarily, the initial features of the image can be extracted through a convolutional neural network, and the initial features can be classified and upgraded by applying a fully connected layer and an activation function, so as to obtain a dimensional upgraded feature vector of a 3D model.
[0038] S40: Based on the dimension-increased feature vector, the modulus lengths between vectors of different models are calculated to obtain difference values between different models.
[0039] Exemplarily, based on the pixelation of 3D models, features can be generated for all 3D models through a neural network model, and the feature vector distance can be obtained by calculating the module length difference value, so that the similarity between 3D models can be sorted according to the size of the difference value.
[0040] This embodiment converts the 3D model format into a multi-dimensional vector expression and constructs a cube containing the 3D model; based on the dimensionality-increased feature vector, the modulus length between vectors of different models is calculated to obtain the difference value between different models, thereby being able to collect the global information of the model more comprehensively, effectively avoiding information loss in the feature extraction process, and improving the retrieval quality for the search method of 3D models with internal structures or assembly structures.
[0041] Optionally, the step of converting the 3D model format into a multi-dimensional vector expression and constructing a cube containing the 3D model includes: Convert the 3D model format to obtain a triangular patch expression of the surface, and obtain the maximum length of the 3D model in three directions; Constructing a cube corresponding to the 3D model, wherein the side length of the cube is a preset ratio of the maximum length, and calculating the geometric centers of all triangular facets; The preset ratio is greater than 1 and / or the preset ratio is less than 2.
[0042] Exemplarily, all the patches in the standardized model are tessellated to obtain triangular patch expressions of the surface, and then multi-dimensional vector expressions are realized based on the triangular patches. The degree of tessellation (i.e., the number of triangular patches) is proportional to the degree of pixel tessellation. Optionally, the maximum variable length of the triangular patch is smaller than L / N, and is smaller than 1 pixel, so that a triangular patch spans at most two pixels.
[0043] Exemplarily, the 3D model format is converted from a standardized expression to a multi-dimensional vector expression of a three-dimensional picture, and the picture is obtained by performing a 2D projection of the 3D model in the same direction. This operation actually converts the standard model into a 3D vector matrix, so it can be referred to as a "model tensor". The surface of the standard model is projected into a cube of a fixed size at a certain resolution, and the side length of the cube is determined to be the maximum length of the dimension of the model in the three-dimensional direction. 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 to be 120% of the maximum length of the dimension of the model in the three-dimensional direction.
[0044] Optionally, based on the pixel position relationship between each triangular facet and the cube, the step of obtaining a model tensor expression of the 3D model includes: For each triangle patch’s geometric center coordinates, determine its pixel position in the cube; Based on the pixel positions corresponding to the triangular patch, a target matrix corresponding to the triangular patch coordinate values is established to obtain a model tensor expression of the 3D model.
[0045] Exemplarily, all the facets in the standardized model are tessellated to obtain a triangular facet expression of the surface. The maximum variable length of the triangular facet should be less than L / N, and the division should be smaller than 1 pixel, so that a triangular facet spans at most two pixels. Next, the geometric center of all triangular facets can be calculated, and the geometric center coordinates of each triangular facet can be determined to determine the pixel position of the cube. Based on the three-dimensional coordinate position index of the tensor dimension, the formula of the pixel corresponding to the triangular facet is determined, and the pixel position can be determined by the index of the pixel tensor dimension. A target matrix corresponding to the triangular facet coordinate value is established, so that the corresponding coordinate value of the triangular facet is set to 1, and the remaining values are set to 0. A sparse matrix is formed, which is equivalent to the process of dyeing the pixels black and white, and the model tensor expression of the corresponding 3D model can be obtained.
[0046] Optionally, the step of determining the pixel position of each triangular facet in the cube by using the geometric center coordinates of the triangular facet includes: Determining the pixel granularity of the cube according to the side length and resolution of the cube; The three-dimensional position coordinates of the geometric center are obtained, and the three-dimensional coordinate values of the pixel points corresponding to the triangular facet are calculated in combination with the pixel granularity.
[0047] The way to obtain the model tensor is to project the face of the standard model into a cube of fixed size at a certain resolution. For a 2D image, the length, width and height of the cube can be equally divided into N parts (N is the number of pixels), and N^3 small cubes are obtained, which are called the smallest unit of the model tensor. That is, "pixel". The geometric center coordinates of each triangular face are , determine which pixel position of the cube it is located at . Where a, b, and c are the three-dimensional coordinate position indexes of the tensor dimensions respectively.
[0048] Optionally, 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 also includes: Get the position coordinates of the geometric center , assuming that the side length of the cube is L and the resolution is N, then the pixel granularity is L / N, and the formula for determining the three-dimensional coordinate value of the pixel point corresponding to the triangular face is:
[0049]
[0050]
[0051]
[0052] in is the maximum coordinate value of the first dimension of the 3D model, is the minimum maximum value of the coordinates 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, c are the three-dimensional coordinate position indexes of the tensor dimension respectively, and the coordinate position of the first pixel is a=b=c=0.
[0053] For example, the geometric center coordinates of each triangle are , determine which pixel position of the cube it is located at . Where a, b, and c are the three-dimensional coordinate position indexes 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, the pixel granularity is L / N. Based on the formula of the pixel corresponding to the triangular patch, the above operation is performed on each patch to establish a sparse matrix of size N*N*N, so that the model tensor expression of the corresponding 3D model can be obtained.
[0054] Optionally, the step of establishing a target matrix corresponding to the coordinate values of the triangular facet based on the pixel positions corresponding to the triangular facet to obtain a model tensor expression of the 3D model includes: Based on the pixel position relationship between each triangular face and the cube, a three-dimensional pixel matrix with a preset resolution is established, which is a sparse matrix with the coordinate value of the pixel point where each triangular face is located as 1 and the remaining values as 0.
[0055] Exemplarily, the above operation is performed on each facet, and based on the above formula, a matrix of size N*N*N is established, with the corresponding coordinate values of the triangular facets set to 1 and the remaining values set to 0, which is equivalent to dyeing the pixels black and white to obtain a sparse matrix, and the model tensor expression of the corresponding 3D model can be obtained.
[0056] Optionally, the step of extracting the initial features of the model tensor and performing classification and dimensionality upgrading to obtain the dimension-upgraded feature vector of the 3D model includes: Based on a preset three-dimensional convolutional neural network model, feature extraction is performed on the model tensor, and the full connection layer and activation function are applied to classify and upgrade the initial features to obtain the upgraded dimension feature vector of the 3D model.
[0057] For example, after the initial feature extraction of the model tensor (initial feature extraction of the visible picture) is performed through the convolutional neural network CNN, the initial features are classified and dimensionally upgraded using the fully connected layer and activation function to obtain a dimensionally upgraded feature vector of the 3D model. This step aims to establish associations between multiple features, and the principle is the same as feature extraction and classification of 2D pictures. The difference is that since the 3D convolution scans all 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.
[0058] Optionally, the step of extracting features from the model tensor based on a preset three-dimensional convolutional neural network model includes: In the process of three-dimensional convolution multiplication, a step size is applied to record the tensor. After the first convolution calculation of the model tensor value, the number of all 0s experienced during the convolution translation is recorded, and a minimum scaling step size is recorded at this position; For each subsequent convolution or pooling calculation, adjust the minimum scaling step value of the convolution layer and / or pooling layer according to the preset strategy; The pixel values that are not all zero and the pixel values outside the minimum scaling step at these positions are convolved and the rest are filled with zero.
[0059] Although the obtained model tensor is 3D, since only the pixels passing through the surface are assigned values, in fact, during the process of multiplication with 3D convolution, the values of most positions in the 3D space are fixed to 0, that is, there is no output. For example, a stride record tensor can be applied to record the number of all 0s experienced during the convolution translation after the first convolution calculation. Assuming the initial stride is 1, in the first calculation, if the model tensor value corresponding to the convolution kernel at a certain position index (a, b, c) is not all 0, and after that, it is translated in 3 directions The steps are all 0 tensors, and are greater than 1, then a minimum zoom step can be recorded at this position For each subsequent convolution and / or pooling, each subsequent layer calculation only needs to calculate the sparse number of convolutions of the index (pixel numerical index) whose values are not all 0 and the convolutions outside the minimum scaling step of these positions, and the rest are automatically filled with 0. For 3D models, when the initial model tensor resolution is high, this can effectively reduce the amount of calculation and improve the calculation efficiency.
[0060] Optionally, the step of adjusting the minimum scaling step value of the convolution layer and / or pooling layer according to a preset strategy for each subsequent convolution or pooling calculation includes: Record a minimum zoom step size according to the following expression:
[0061] For each subsequent convolution calculation, the minimum scaling step is adjusted according to the following expression:
[0062] And / or, for each subsequent pooling calculation, adjust the minimum scaling step size according to the following expression:
[0063] in 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.
[0064] For example, assuming that the initial stride is 1, in the first calculation, if the model tensor value corresponding to the convolution kernel at a certain position index(a,b,c) is not all 0, and then it is translated in three directions The steps are all 0 tensors, and are greater than 1, then a minimum zoom step can be recorded at this position . Each subsequent convolution and / or pooling can be calculated according to the above expression.
[0065] After the improved convolutional neural network CNN performs initial feature extraction on the model tensor (initial feature extraction on the visible images), the fully connected layer and activation function are used to classify and upgrade the initial features to obtain an upgraded feature vector of the 3D model. This step aims to establish associations between multiple features, and the principle is the same as feature extraction and classification of 2D images. The difference is that since the 3D convolution scans all 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.
[0066] Optionally, the step of calculating the modulus lengths between vectors of different models based on the dimension-upgraded feature vector and obtaining the difference values between different models includes: Calculating the distance between feature vectors of different models based on the dimensionally increased feature vectors of the 3D model, analyzing a group of training models through a neural network model to obtain the closest model, and comparing it with the closest model annotated manually; According to the comparison results, the parameters of the neural network model are adjusted using the maximum likelihood estimation loss function; the difference values between different models are calculated using the neural network model to complete the similarity ranking between 3D models.
[0067] For example, the dimension-raising feature is a dimension-raising feature vector of a 3D model obtained by inference of the fully connected layer, and the dimension of the vector is usually within 100. The difference value between different models is obtained by calculating the modulus between vectors. The distance between two points is the modulus difference value, which represents the distance between the two models. The modulus between vectors is the calculation of the square difference, which is the distance of the dimension-raising feature vector.
[0068] Find the closest model through the modulus length, compare the closest model with the labeled model, maximize the loss function, and optimize the parameters of the neural network model. The closest model obtained by a set of training models through the network (neural network model) can be compared with the closest model manually labeled, and the loss function can be used to evaluate the effect of the neural network model:
[0069] Where H is the loss function value, is the distance between the model feature vector and the feature vector of the closest annotated model.
[0070] By maximizing the loss function and making the loss function value closer and closer to 0, the parameters of the neural network model can be obtained. After the neural network model training is completed, the network (neural network model) and model pre-processing (model pre-processing refers to the previous pixelization process) can be used to extract and generate features for all 3D models, and the feature vector distance can be obtained by calculating the difference in module length. According to the size of the difference value, the task of sorting the similarity between 3D models is completed.
[0071] The present application provides a 3D model similarity comparison method, which 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 face expression of the surface, calculates the geometric center of all triangular faces, and determines the position of each triangular face in the cube to construct the cube corresponding to the 3D model; obtains the model tensor expression of the 3D model based on the pixel position relationship between each triangular face and the cube; extracts the initial features of the model tensor and performs classification and dimension upgrading to obtain the dimension-upgraded feature vector of the 3D model; calculates the modulus length between vectors of different models based on the dimension-upgraded feature vector to obtain the difference value between different models. It can collect the global information of the model more comprehensively, effectively avoid the information loss in the feature extraction process, improve the retrieval quality for the search method of 3D models with internal structures or assembly structures, has a good effect in super large model collections, and improves user experience.
[0072] It should be noted that in the present application, step codes such as S10, S20, etc. are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence. When implementing the step, those skilled in the art may execute S20 first and then S10, etc., but these should all be within the scope of protection of the present application.
[0073] In the system embodiment provided in the present application, all technical features of any of the above-mentioned method embodiments may be included, and the expanded and explained contents of the specification are basically the same as those of the above-mentioned method embodiments, and will not be repeated here.
[0074] The embodiment of the present application further provides a computer program product, which includes a computer program code. When the computer program code runs on a computer, the computer executes the methods in the above various possible implementation modes.
[0075] An embodiment of the present application 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 a device equipped with the chip executes the methods in various possible implementation modes as described above.
[0076] It is understood that the above scenarios are only examples and do not constitute a limitation on the application scenarios of the technical solutions provided in the embodiments of the present application. The technical solutions of the present application can also be applied to other scenarios. For example, it is known to those skilled in the art that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0077] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0078] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.
[0079] The units in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.
[0080] In the present application, the same or similar terminology concepts, technical solutions and / or application scenario descriptions are generally described in detail only the first time they appear. When they appear again later, they are generally not repeated for the sake of brevity. When understanding the technical solutions and other contents of the present application, for the same or similar terminology concepts, technical solutions and / or application scenario descriptions that are not described in detail later, reference can be made to the previous related detailed descriptions.
[0081] In the present application, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0082] The various technical features of the technical solution of the present application can be arbitrarily combined. In order to make the description concise, 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, they should be considered to be within the scope of the present application.
[0083] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A 3D model similarity comparison method, characterized in that: include: Convert the 3D model format into a multi-dimensional vector expression, and construct a cube containing the 3D model; Convert the 3D model format to obtain a triangular face expression of the surface, calculate the geometric center of all triangular facets, and determine the position of each triangular facet in the cube to construct a cube corresponding to the 3D model; Based on the pixel position relationship between each triangular face and the cube, a model tensor expression of the 3D model is obtained; Extracting the initial features of the model tensor and performing classification and dimensionality upgrading to obtain the dimensionality-elevated feature vector of the 3D model; Based on the dimension-increased feature vector, the modulus lengths between vectors of different models are calculated to obtain the difference values between the different models.
2. A 3D model similarity comparison method according to claim 1, characterized in that: The steps of converting the 3D model format into a multi-dimensional vector expression and constructing a cube containing the 3D model include: Convert the 3D model format to obtain a triangular patch expression of the surface, and obtain the maximum length of the 3D model in three directions; Constructing a cube corresponding to the 3D model, wherein the side length of the cube is a preset ratio of the maximum length, and calculating the geometric centers of all triangular facets; 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: Based on the pixel position relationship between each triangular facet and the cube, the step of obtaining the model tensor expression of the 3D model includes: For each triangle patch’s geometric center coordinates, determine its pixel position in the cube; Based on the pixel positions corresponding to the triangular patch, a target matrix corresponding to the triangular patch coordinate values is established to obtain a model tensor expression 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 of each triangle in the cube for the geometric center coordinates of each triangle comprises: Determining the pixel granularity of the cube according to the side length and resolution of the cube; The three-dimensional position coordinates of the geometric center are obtained, and the three-dimensional coordinate values of the pixel points corresponding to the triangular facet are calculated in combination with the pixel granularity.
5. A 3D model similarity comparison method according to claim 4, characterized in that: 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 also includes: Get the position coordinates of the geometric center , assuming that the side length of the cube is L and the resolution is N, then the pixel granularity is L / N, and the formula for determining the three-dimensional coordinate value of the pixel point corresponding to the triangular face is: in is the maximum coordinate value of the first dimension of the 3D model, is the minimum maximum value of the coordinates 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, c are the three-dimensional coordinate position indexes of the tensor dimension respectively, and the coordinate position of the first pixel is a=b=c=0.
6. A 3D model similarity comparison method according to claim 4, characterized in that: The step of establishing a target matrix corresponding to the coordinate values of the triangular facet based on the pixel positions corresponding to the triangular facet to obtain the model tensor expression of the 3D model includes: Based on the pixel position relationship between each triangular face and the cube, a three-dimensional pixel matrix with a preset resolution is established, which is a sparse matrix with the coordinate value of the pixel point where each triangular face is located as 1 and the remaining values as 0.
7. 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 dimension upgrading to obtain the dimension-upgraded feature vector of the 3D model comprises: Based on a preset three-dimensional convolutional neural network model, feature extraction is performed on the model tensor, and the full connection layer and activation function are applied to classify and upgrade the initial features to obtain the upgraded dimension feature vector of the 3D model.
8. A 3D model similarity comparison method according to claim 7, characterized in that: The step of extracting features from the model tensor based on the preset three-dimensional convolutional neural network model includes: In the process of three-dimensional convolution multiplication, a step size is applied to record the tensor. After the first convolution calculation of the model tensor value, the number of all 0s experienced during the convolution translation is recorded, and a minimum scaling step size is recorded at this position; For each subsequent convolution or pooling calculation, adjust the minimum scaling step value of the convolution layer and / or pooling layer according to the preset strategy; The pixel values that are not all zero and the pixel values outside the minimum scaling step at these positions are convolved and the rest are filled with zero.
9. A 3D model similarity comparison method according to claim 8, characterized in that: The step of adjusting the minimum scaling step value of the convolution layer and / or the pooling layer according to a preset strategy for each subsequent convolution or pooling calculation includes: Record a minimum zoom step size according to the following expression: For each subsequent convolution calculation, the minimum scaling step is adjusted according to the following expression: And / or, for each subsequent pooling calculation, adjust the minimum scaling step size according to the following expression: in is a minimum zoom 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.
10. A 3D model similarity comparison method according to claim 1, characterized in that: The step of calculating the modulus lengths between vectors of different models based on the dimension-upgraded feature vector and obtaining the difference values between different models includes: Calculating the distance between feature vectors of different models based on the dimensionally increased feature vectors of the 3D model, analyzing a group of training models through a neural network model to obtain the closest model, and comparing it with the closest model annotated manually; According to the comparison results, the parameters of the neural network model are adjusted using the maximum likelihood estimation loss function; the difference values between different models are calculated using the neural network model to complete the similarity ranking between 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
Data processing method and device, electronic equipment, storage medium and program product
CN116912431A
Facial three-dimensional model visualization method and apparatus, electronic device, and storage medium
WO2022262201A1