CN113554012A - Primitive model classification method, system, equipment and storage medium in three-dimensional engineering - Google Patents
Primitive model classification method, system, equipment and storage medium in three-dimensional engineering Download PDFInfo
- Publication number
- CN113554012A CN113554012A CN202111105749.9A CN202111105749A CN113554012A CN 113554012 A CN113554012 A CN 113554012A CN 202111105749 A CN202111105749 A CN 202111105749A CN 113554012 A CN113554012 A CN 113554012A
- Authority
- CN
- China
- Prior art keywords
- primitive
- model
- service
- models
- classification
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/10—Geometric CAD
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Geometry (AREA)
- Pure & Applied Mathematics (AREA)
- Mathematical Optimization (AREA)
- Mathematical Analysis (AREA)
- Computer Hardware Design (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Computational Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention belongs to the technical field of computer vision, and particularly relates to a method, a system, equipment and a storage medium for classifying primitive models in three-dimensional engineering. The method comprises the following steps: s1, acquiring a three-dimensional model of a primitive model to be classified, and determining the service type of the three-dimensional model and the type and the number of the primitive model; s2, judging the type of the service type of the three-dimensional model, and splitting the two classified service types; s3, classifying the primitive model of the three-dimensional model according to the two classification service types, and determining the service type of the primitive model; and S4, combining the primitive models to construct a business model according to the business types of the primitive models. The invention can classify scattered primitive models caused by non-standard design in the three-dimensional model into the service model, thereby automatically repairing the non-standard design three-dimensional model and facilitating the expansion of subsequent design tasks and service operation.
Description
Technical Field
The invention belongs to the technical field of computer vision, and particularly relates to a method, a system, equipment and a storage medium for classifying primitive models in three-dimensional engineering.
Background
With the continuous development and deep application of three-dimensional design technology, more and more zero engineering designs are designed and stored in the form of three-dimensional models. In industrial CAD/CAE design, a design project often includes a plurality of three-dimensional models with business significance, for example, a substation design project includes a plurality of concrete foundations, a plurality of trusses, a plurality of herringbone columns, and the like. In a canonical design, any three-dimensional model that has business significance should be complete and independent of other three-dimensional models. In practice, however, due to the non-normative design, such three-dimensional models often exist in the form of a plurality of scattered small models or even basic primitives (cuboids, spheres, cylinders, polygonal columns, etc.) (hereinafter primitive models refer to such scattered small models), for example as shown in fig. 1 and 2, fig. 1 representing a standard herringbone pillar design and fig. 2 representing an irregular herringbone pillar design.
As shown in fig. 3, when there are many cases in a project due to the non-standard design, it is difficult to discriminate which business model each of a plurality of primitive models belongs to. For the subsequent treatment of the irregular design, the scattered primitive models are grouped again and classified into a specific business model, and usually, the business model can only be modified manually by business personnel, which consumes a great deal of manpower and time. Particularly where two or more business models are adjoined, there is uncertainty for business personnel and even experts in distinguishing which business model a particular primitive model belongs to. As shown in fig. 4, at the position where two truss models are adjacent to one herringbone column model, it is difficult to distinguish which business model the primitive model belongs to. At present, the problem is generally treated by adopting a manual discrimination mode, and a mature and quick solution is not provided.
Disclosure of Invention
In order to solve the problem that service models are difficult to distinguish by scattered primitive models caused by non-standard design in three-dimensional engineering in the prior art, the invention provides a method, a system, equipment and a storage medium for classifying the primitive models in the three-dimensional engineering, wherein the scattered primitive models are classified into the service models, so that the non-standard design is automatically repaired, and the subsequent design task and the service operation are conveniently expanded.
The invention is realized by adopting the following technical scheme:
a primitive model classification method in three-dimensional engineering comprises the following steps:
acquiring a three-dimensional model of a primitive model to be classified, and determining the service type of the three-dimensional model and the type and the number of the primitive model;
judging the class of the service type of the three-dimensional model, and splitting the three-dimensional model into two classified service types when the three-dimensional model is a multi-classified service type;
classifying the primitive model of the three-dimensional model according to the two classification service types, and determining the service type of the primitive model;
and combining all the primitive models to construct a service model according to the service types of the primitive models.
Further, performing two-classification splitting on the service types of the primitive model, and using a One-vs-One multi-classification strategy to split the L multi-classification service types of the three-dimensional model into L (L-1)/2 two-classification service types; the service type of the primitive model is determined by the two classification service types through a voting mechanism, and the method for determining the service type of the primitive model by the voting mechanism comprises the following steps:
judging the number of the service types according to the obtained service type categories of the three-dimensional model, wherein when the number L =2 of the service types, the service types of the three-dimensional model are two-category service types; when the number L of the service types is more than 2, the service type of the three-dimensional model is a multi-classification service type, and the multi-classification service type of the three-dimensional model is divided into L (L-1)/2 two-classification service types;
and sequentially judging the service type of the primitive model in each two classified service types, wherein the type with the largest ticket number is the service type of the primitive model.
Further, the method for judging the service type of the primitive model in each of the two classified service types includes:
acquiring primitive models, the shortest distance between the primitive models, service types and the probability distribution of the service types of the primitive models, and constructing a graph structure;
and utilizing a maximum flow/minimum cut algorithm to cut the constructed graph structure to obtain the service type of the primitive model.
Further, according to the obtained primitive models, the shortest distance between the primitive models, the service types and the probability distribution of the service types of the primitive models, a graph structure G is constructed as follows:
v is a vertex set, and E is an inter-vertex connecting edge set; the vertex set comprises primitive nodes, source points and end points, the primitive nodes correspond to the primitive models of the three-dimensional model one by one, and the source points and the end points correspond to two service types in the two classified service types; the inter-vertex connecting edge set comprises connecting edges among primitive nodes and connecting edges between the primitive nodes and a source point or a destination point; and a weight parameter exists on the connecting edge between the vertexes, and the weight parameter is 0, which represents no edge connection.
Further, the method for calculating the weight parameter on the connecting edge between the vertexes includes:
(a) calculating the weight SmoothCost of the connecting edge between the pixel nodes:
wherein the content of the first and second substances,representing the node of the i-th primitive,n is a positive integer greater than 1;representing the j-th primitive node,k is a positive integer greater than 1;representing primitive nodesAnd primitive nodeThe shortest distance of (d); EPS is a distance constant, and a value is taken according to engineering application, wherein the distance constant is defined as a positive real number close to 0;
(b) calculating the weight DataCost of the connection edge of the primitive node and the source point or the destination point:
wherein the content of the first and second substances,representing the node of the i-th primitive,n is a positive integer larger than 1, lambda represents a weight parameter, lambda is an influence factor of the probability that the ith primitive node belongs to the service type on the weight DataCost of the connecting edge of the primitive node and a source point or an end point, is any decimal number between 0 and 1, can be adjusted according to an application scene, the default value is 1, S represents the source point, T represents the end point,representing the probability that the ith primitive node belongs to a traffic type,indicating the probability that the ith primitive node belongs to another traffic type.
Further, the probability that the ith primitive node belongs to a service typeAnd the probability that the ith primitive node belongs to another traffic typeThe calculating method comprises the following steps:
wherein the content of the first and second substances,which represents the primitive of the j-th type,k is a positive integer greater than 1,representing the probability that the ith primitive node belongs to the jth primitive,indicating that there is a probability that the jth primitive belongs to the source point service type,indicating that the probability that the jth primitive belongs to the end point service type exists.
Further, the probability that the ith primitive node belongs to the jth primitiveFor geometric classification of primitive models, the classification method comprises the following steps:
calculating various geometric characteristics of the primitive model, and arranging according to the geometric characteristics in a size sequence; intercepting or zero filling according to a fixed length to form a characteristic vector of each primitive model;
acquiring feature vectors-classification labels of existing primitive models stored in a database, and training to obtain a classifier;
and inputting the formed feature vector of each primitive model into a classifier to obtain the probability of the j-th primitive to which the primitive model belongs, the probability of the service type of the source point to which the primitive model belongs and the probability of the service type of the destination point to which the primitive model belongs.
Further, the feature vector calculation method of each primitive model is as follows:
acquiring size data of the primitive model, wherein the size data comprises a length L, a width W and a height H;
obtaining a list of the area of each shape area of the primitive model convex hull, wherein the list of the area of each shape area isTaking the k values with the largest area to form a vectorZero padding is performed when the number of the shape area surfaces is not enough;
obtaining an area list of each shape area surface of the primitive model, wherein the area list of each shape area surfaceTaking the maximum value of the area to form a vectorWhen the number of the triangular faces is not enough, zero is filled;
acquiring the average curvature R of each curved surface of the primitive model;
Further, a calculation formula for obtaining the probability that the primitive model belongs to the jth primitive through the classifier is as follows:
obtaining the probability that the primitive model belongs to the source point service type through the classifierThe calculation formula of (2) is as follows:
obtaining the probability that the primitive model belongs to the end point service type through the classifierThe calculation formula of (2) is as follows:
the invention also comprises a primitive model classification system in the three-dimensional engineering, wherein the primitive model classification system in the three-dimensional engineering classifies scattered primitive models into service models by adopting the primitive model classification method in the three-dimensional engineering; the primitive model classification system in the three-dimensional engineering comprises a three-dimensional model obtaining module, a multi-classification splitting module, a primitive classification module and a service model building module.
The three-dimensional model obtaining module is used for obtaining a three-dimensional model of the primitive model to be classified and determining the service type of the three-dimensional model and the type and the number of the primitive model.
The multi-classification splitting module is used for judging the class of the service type of the three-dimensional model and splitting the three-dimensional model into two classification service types when the three-dimensional model is of the multi-classification service type.
And the primitive classification module is used for classifying the primitive model of the three-dimensional model according to the two classification service types and determining the service type of the primitive model.
And the business model building module is used for combining all the primitive models to build a business model according to the business types of the primitive models.
The invention also comprises a computer device which comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps of the primitive model classification method in the three-dimensional engineering when loading and executing the computer program.
The invention also comprises a storage medium which stores a computer program, and the computer program is loaded by a processor and executed to realize the steps of the primitive model classification method in the three-dimensional engineering.
The technical scheme provided by the invention has the following beneficial effects:
the technical scheme provided by the invention can classify scattered primitive models caused by the irregular design in the three-dimensional model into the service model, thereby automatically repairing the irregular design three-dimensional model and facilitating the expansion of subsequent design tasks and service operation. The method not only can reduce the waste of human resources, but also can divide a plurality of classified service types into two classified service types, input each primitive model into a trained classifier, and further provide a relatively professional classification result when repairing, determine the service type of each primitive model, so that the service model can be constructed according to each primitive model of which the service type is to be determined, the manual screening mode is not needed for processing, the service type of scattered primitive models can be conveniently distinguished, and further the non-standard design can be automatically repaired.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
FIG. 1 is a diagram of a primitive model of a standard herringbone column design of a three-dimensional model in three-dimensional engineering,
FIG. 2 is a diagram of a primitive model for a three-dimensional model of an irregular standard herringbone post design in three-dimensional engineering.
Fig. 3 is a schematic structural diagram of an example of irregular design applied to a power transformation engineering part in the three-dimensional engineering in fig. 1 and 2.
Fig. 4 is a schematic structural diagram of the junction between two truss models and a single column model of the three-dimensional engineering shown in fig. 1 and 2.
FIG. 5 is a flowchart of a method for classifying primitive models in three-dimensional engineering according to an embodiment of the present invention.
Fig. 6 is a flowchart illustrating a voting mechanism determining a service type of a primitive model in a method for classifying the primitive model in three-dimensional engineering according to an embodiment of the present invention.
Fig. 7 is a schematic diagram of a method for classifying primitive models in three-dimensional engineering according to an embodiment of the present invention, applied to an irregular design in electrical three-dimensional engineering.
Fig. 8 is a schematic diagram illustrating generation of a graph structure in a method for classifying primitive models in three-dimensional engineering according to an embodiment of the present invention.
Fig. 9 is a schematic diagram illustrating a graph structure in a method for classifying primitive models in three-dimensional engineering according to an embodiment of the present invention.
Fig. 10 is a schematic diagram illustrating a merging effect of split primitive models in the method for classifying primitive models in three-dimensional engineering according to the embodiment of the present invention.
Fig. 11 is a schematic diagram illustrating a partition of a graph structure cut 1 in a method for classifying primitive models in three-dimensional engineering according to an embodiment of the present invention.
Fig. 12 is a schematic diagram illustrating a division of a graph structure cutting 2 in the method for classifying primitive models in three-dimensional engineering according to the embodiment of the present invention.
Fig. 13 is a schematic diagram illustrating a division of graph structure segmentation 3 in the method for classifying primitive models in three-dimensional engineering according to the embodiment of the present invention.
FIG. 14 is a block diagram of a system for classifying primitive models in three-dimensional engineering according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
According to the method for classifying the primitive models in the three-dimensional engineering, provided by the invention, scattered primitive models are classified into the service models, so that the irregular design is automatically repaired, and the subsequent design task and the service operation are conveniently expanded. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Specifically, the embodiments of the present application will be further explained below with reference to the drawings.
As shown in fig. 5, an embodiment of the present invention provides a method for classifying primitive models in three-dimensional engineering, which is used to classify scattered primitive models into business models; the method comprises the following steps:
s1: and acquiring a three-dimensional model of the primitive model to be classified, and determining the service type of the three-dimensional model and the type and the number of the primitive models.
S2: and judging the class of the service type of the three-dimensional model, and splitting the three-dimensional model into two classified service types when the three-dimensional model is a multi-classified service type.
S3: and classifying the primitive model of the three-dimensional model according to the two classification service types, and determining the service type of the primitive model.
S4: and combining all the primitive models to construct a service model according to the service types of the primitive models.
In this embodiment, it is assumed that the three-dimensional model for obtaining the primitive model to be classified is an irregular project, the irregular project is composed of N and M scattered primitives, and there are L types of service. The process of the standardized design project is to classify the N primitives to obtain the specific service types of the N primitives; and then according to the classification result, combining the primitives into a service model and adding service labels.
In One embodiment of the invention, the service types of the primitive model are divided into two classes, and an One-vs-One multi-class strategy is utilized to divide the L multi-class service types of the three-dimensional model into L (L-1)/2 two-class service types; and determining the service type of the primitive model by the two classification service types through a voting mechanism. Namely: in the embodiment, a One-vs-One multi-classification strategy is utilized to divide N primitives into L-class classification problems of the service model, the classification problems are divided into L (L-1)/2 two classification problems, and then the service types of the primitives are determined according to voting.
Referring to fig. 6, the method for determining the service type of the primitive model by the voting mechanism includes:
judging the number of the service types according to the obtained service type categories of the three-dimensional model, wherein when the number L =2 of the service types, the service types of the three-dimensional model are two-category service types; when the number L of the service types is more than 2, the service type of the three-dimensional model is a multi-classification service type, and the multi-classification service type of the three-dimensional model is divided into L (L-1)/2 two-classification service types;
and sequentially judging the service type of the primitive model in each two classified service types, wherein the type with the largest ticket number is the service type of the primitive model.
Examples of sequentially judging the service type of the primitive model in each of the two classified service types are as follows: if there is a service type of L =3, the three-classification problem of the primitive i is split into 3 two-classification problems, that is, whether the primitive i is of type 1 or type 2, type 1 or type 3, or type 2 or type 3. Suppose that the three-time classification results are that the primitive i is type 1, the primitive i is type 3, and the primitive i is type 3. It is clear that primitive i is the most type 3 ticket-count, and is therefore classified as type 3.
In an embodiment of the present invention, the method for determining the service type of the primitive model in each of the two classified service types includes: acquiring primitive models, the shortest distance between the primitive models, service types and the probability distribution of the service types of the primitive models, and constructing a graph structure; and utilizing a maximum flow/minimum cut algorithm to cut the constructed graph structure to obtain the service type of the primitive model.
In this embodiment, according to the obtained primitive models, the shortest distance between the primitive models, the service type, and the probability distribution of the service type of the primitive models, the graph structure G is constructed as follows:
v is a vertex set, and E is an inter-vertex connecting edge set; the vertex set comprises primitive nodes, source points and end points, the primitive nodes correspond to the primitive models of the three-dimensional model one by one, and the source points and the end points correspond to two service types in the two classified service types; the inter-vertex connecting edge set comprises connecting edges among primitive nodes and connecting edges between the primitive nodes and a source point or a destination point; and a weight parameter exists on the connecting edge between the vertexes, and the weight parameter is 0, which represents no edge connection.
The graph structure G is constructed by adopting the method for the two classification methods that N and K primitives are divided into two service types; the method for calculating the weight parameter on the connecting edge between the vertexes comprises the following steps: (a) calculating the weight SmoothCost of the connecting edge between the pixel nodes:
wherein the content of the first and second substances,representing the node of the i-th primitive,n is a positive integer greater than 1;representing the j-th primitive node,k is a positive integer greater than 1;representing primitive nodesAnd primitive nodeThe shortest distance of (d); EPS is a distance constant, and a value is taken according to engineering application, wherein the distance constant is defined as a positive real number close to 0;
(b) calculating the weight DataCost of the connection edge of the primitive node and the source point or the destination point:
wherein the content of the first and second substances,representing the node of the i-th primitive,n is a positive integer larger than 1, lambda represents a weight parameter, lambda is an influence factor of the probability that the ith primitive node belongs to the service type on the weight DataCost of the connecting edge of the primitive node and a source point or an end point, is any decimal number between 0 and 1, can be adjusted according to an application scene, the default value is 1, S represents the source point, T represents the end point,representing the probability that the ith primitive node belongs to a traffic type,indicating the probability that the ith primitive node belongs to another traffic type。
In this embodiment, the probability that the ith primitive node belongs to a service typeAnd the probability that the ith primitive node belongs to another traffic typeThe calculating method comprises the following steps:
wherein the content of the first and second substances,which represents the primitive of the j-th type,k is a positive integer greater than 1,representing the probability that the ith primitive node belongs to the jth primitive,indicating that there is a probability that the jth primitive belongs to the source point service type,indicating that the probability that the jth primitive belongs to the end point service type exists.
In this embodiment, the probability that the ith primitive node belongs to the jth primitiveFor geometric classification of primitive modelsThe class method comprises the following steps:
calculating various geometric characteristics of the primitive model, and arranging according to the geometric characteristics in a size sequence; intercepting or zero filling according to a fixed length to form a characteristic vector of each primitive model;
and acquiring the feature vector-classification label of the existing primitive model stored in the database, and training to obtain the classifier. Wherein, a Classifier is trained according to feature vector-classification labels (such as cylinders, cuboids, prisms and the like) of a primitive model in the existing engineering, and the Classifier can be a Support Vector Machine (SVM) or a fully connected neural network (FCN).
And inputting the formed feature vector of each primitive model into a classifier to obtain the probability of the j-th primitive to which the primitive model belongs, the probability of the service type of the source point to which the primitive model belongs and the probability of the service type of the destination point to which the primitive model belongs.
In this embodiment, the feature vector calculation method of each primitive model is as follows:
acquiring size data of the primitive model, wherein the size data comprises a length L, a width W and a height H;
obtaining a list of the area of each shape area of the primitive model convex hull, wherein the list of the area of each shape area isTaking the k values with the largest area to form a vectorZero padding is performed when the number of the shape area surfaces is not enough;
obtaining an area list of each shape area surface of the primitive model, wherein the area list of each shape area surfaceTaking the maximum value of the area to form a vectorWhen the number of the triangular faces is not enough, zero is filled;
acquiring the average curvature R of each curved surface of the primitive model;
The feature vector of each primitive model is constructed by calculating various geometric features of the primitive model, such as the length, width and height of an AABB bounding box, the area of each triangular surface of a convex hull, the area of each triangular surface of a-shape, average curvature and the like, then arranging the geometric features according to the size sequence, and intercepting or filling zero according to fixed length.
The specific primitive feature vector calculation method is as follows:
setting the length, width and height of the pixel AABB bounding box as L, W, H;
the area list of each triangle of the primitive convex hull isTaking the k values with the largest area to form a vectorWhen the number of the triangular faces is not enough, zero is filled;
the area list of the triangular surfaces of the primitive a-shape is set asTaking the maximum value of the area to form a vectorWhen the number of the triangular faces is not enough, zero is filled;
setting the average curvature of each curved surface of the primitive as R;
In this embodiment, the probability that the primitive model belongs to the jth primitive is obtained by the classifierIs calculated byThe formula is as follows:
obtaining the probability that the primitive model belongs to the source point service type through the classifierThe calculation formula of (2) is as follows:
the calculation formula for obtaining the probability that the primitive model belongs to the end point service type through the classifier is as follows:
and finally, dividing the graph G by adopting the existing maximum flow/minimum division algorithm to obtain the service types of the primitives, and combining the primitives to construct a service model according to the specific service types of the primitives.
Taking a binary implementation as an example, referring to fig. 7, taking a certain irregular design in three-dimensional electrical engineering as an example, the whole design is composed of 10 scattered primitive models, including 3 primitive types (cylinder, cube, flat cushion) and 2 component types (herringbone column, foundation).
The implementation steps of the invention are as follows:
1) constructing a graph structure G according to the primitive models, the shortest distance among the primitive models, the service types and the probability distribution of the service types of the primitive models;
as shown in fig. 8, the vertex geometry of the graph structure G is composed of 10 primitive nodes, S source points, and T destination points, and there are edge connections between vertices and weight parameters on the edges.
Firstly, calculating the weight SmoothCost of the connecting edge between the graphic element nodes
Taking the edge connection between the primitive model 1 and the primitive model 2 as an example, the shortest distance between the primitive model 1 and the primitive model 2 is 0, and is smaller than the designated distance parameter EPS, the EPS takes a positive real number close to 0, and according to a calculation formula of a weight SmoothCost of the connection edge between primitive nodes:
the calculation can obtain:
since the shortest distance between the primitive models 1 and 3 is much longer than the EPS, the distance between the primitive models is much longer than the distance between the primitive models 3 and 1
Therefore, an edge exists between the pixel node 1 and the pixel node 2, and the weight parameter is 1; there is no edge between primitive node 1 and primitive node 3. The weight calculation of the connecting edges between the nodes of other primitives is analogized, and the result is shown in fig. 8.
Secondly, calculating the weight DataCost of the connection edge between the primitive node and the source point/destination point
Firstly, the trained Classifier obtains the geometric type classification probability of each primitiveAs shown in table 1 below:
TABLE 1
Secondly, according to the statistics of the existing engineering data, the classification probability of the service types of various primitive types is obtained, and the following table 2 shows:
TABLE 2
Finally, taking the edge connection between the primitive node 1 and the source point as an example, the weight is calculated as follows:
weighting parameterThen, thenAnd other edge connections are calculated in the same way, and the result is shown in FIG. 8.
And (4) dividing the graph structure by using a maximum flow/minimum division method to obtain the classification of the components to which the primitives belong so as to obtain the primitive composition relation of the components.
According to the maximum flow/minimum cut algorithm, the energy function of the cut isWhereinRepresenting the edge connection weight sum of the primitive node and the source point after cutting and the primitive node and the end point after cutting;and representing the weight sum of the connecting edges of the cut primitive nodes. Taking the graph structure shown in fig. 8 as an example, according to the maximum flow/minimum cut algorithm, the edge connections of 1-S, 3-S, 5-7, 6-8 and 10-T are cut off, the energy function is optimized,. The obtained segmentation result is shown in fig. 9 and 10, and the edge combining effect of the split primitive is correct.
Referring to fig. 10, 11 and 12, the following table 3 shows the segmentation results of the three graphs, i.e., cut 1, cut 2 and cut 3, and it is clear that the construction and splitting effect according to the energy minimization method is the best.
TABLE 3
In the present invention, a multi-classification embodiment is taken as an example. Assuming that 3 types of service exist, the class service types of the N primitives can be classified into 3 × 3-1/2 =3 two classification problems according to One-vs-One multi-classification strategy, wherein the two classification problems are respectivelyAnd、and、andthree times and two classifications, two classification methods.
Hypothesis primitiveIn thatAndin the classification ofIn aAndin the classification ofIn aAndin the classification of. ThenIs divided intoIs 2, is divided intoIs 1, is divided intoThe number of times of (2) is 0, and as can be seen from the voting mechanism,the final classification type is。
In an embodiment of the present invention, referring to fig. 14, a primitive model classification system in three-dimensional engineering is further disclosed, wherein the primitive model classification system in three-dimensional engineering classifies scattered primitive models into service models by using the primitive model classification method in three-dimensional engineering; the primitive model classification system in the three-dimensional engineering comprises a three-dimensional model obtaining module 201, a multi-classification splitting module 202, a primitive classification module 203 and a business model building module 204.
The three-dimensional model obtaining module 201 is configured to obtain a three-dimensional model of a primitive model to be classified, and determine a service type of the three-dimensional model, and a type and a number of the primitive model.
The multi-classification splitting module 202 is configured to determine the class of the service type of the three-dimensional model, and split the three-dimensional model into two classification service types when the three-dimensional model is a multi-classification service type.
The primitive classification module 203 is configured to classify the primitive models of the three-dimensional model according to two classification service types, and determine a service type of the primitive model.
The service model building module 204 is configured to combine the primitive models to build a service model according to the service types of the primitive models.
In an embodiment of the present invention, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment of the present invention, a storage medium is also provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory.
In summary, the technical scheme provided by the invention can classify scattered primitive models caused by non-standard design in the three-dimensional model into the service model, so that the three-dimensional model with non-standard design is automatically repaired, and the subsequent design task and service operation can be conveniently expanded. The method not only can reduce the waste of human resources, but also can divide a plurality of classified service types into two classified service types, input each primitive model into a trained classifier, and further provide a relatively professional classification result when repairing, determine the service type of each primitive model, so that the service model can be constructed according to each primitive model of which the service type is to be determined, the manual screening mode is not needed for processing, the service type of scattered primitive models can be conveniently distinguished, and further the non-standard design can be automatically repaired.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.
Claims (10)
1. A primitive model classification method in three-dimensional engineering comprises the following steps:
acquiring a three-dimensional model of a primitive model to be classified, and determining the service type of the three-dimensional model and the type and the number of the primitive model;
judging the class of the service type of the three-dimensional model, and splitting the three-dimensional model into two classified service types when the three-dimensional model is a multi-classified service type;
classifying the primitive model of the three-dimensional model according to the two classification service types, and determining the service type of the primitive model;
and combining all the primitive models to construct a service model according to the service types of the primitive models.
2. The method for classifying primitive models in three-dimensional engineering according to claim 1, wherein: performing two-classification splitting on the service types of the primitive model, and using an One-vs-One multi-classification strategy to split the L multi-classification service types of the three-dimensional model into L (L-1)/2 two-classification service types; the service type of the primitive model is determined by the two classification service types through a voting mechanism, and the method for determining the service type of the primitive model by the voting mechanism comprises the following steps:
judging the number of the service types according to the obtained service type categories of the three-dimensional model, wherein when the number L =2 of the service types, the service types of the three-dimensional model are two-category service types; when the number L of the service types is more than 2, the service type of the three-dimensional model is a multi-classification service type, and the multi-classification service type of the three-dimensional model is divided into L (L-1)/2 two-classification service types;
and sequentially judging the service type of the primitive model in each two classified service types, wherein the type with the largest ticket number is the service type of the primitive model.
3. The method for classifying primitive models in three-dimensional engineering according to claim 2, wherein: the method for judging the service type of the primitive model in each two-classification service type comprises the following steps:
acquiring primitive models, the shortest distance between the primitive models, service types and the probability distribution of the service types of the primitive models, and constructing a graph structure;
dividing the constructed graph structure by using a maximum flow/minimum cut algorithm to obtain the service type of the primitive model;
wherein the graph structure G constructed is:
v is a vertex set, and E is an inter-vertex connecting edge set; the vertex set comprises primitive nodes, source points and end points, the primitive nodes correspond to the primitive models of the three-dimensional model one by one, and the source points and the end points correspond to two service types in the two classified service types; the inter-vertex connecting edge set comprises connecting edges among primitive nodes and connecting edges between the primitive nodes and a source point or a destination point; and a weight parameter exists on the connecting edge between the vertexes, and the weight parameter is 0, which represents no edge connection.
4. The method for classifying primitive models in three-dimensional engineering according to claim 3, wherein: the method for calculating the weight parameter on the connecting edge between the vertexes comprises the following steps:
(a) calculating the weight SmoothCost of the connecting edge between the pixel nodes:
wherein the content of the first and second substances,representing the node of the i-th primitive,n is a positive integer greater than 1;representing the j-th primitive node,k is a positive integer greater than 1;representing primitive nodesAnd primitive nodeThe shortest distance of (d); EPS is a distance constant, and a value is taken according to engineering application, wherein the distance constant is defined as a positive real number close to 0;
(b) calculating the weight DataCost of the connection edge of the primitive node and the source point or the destination point:
wherein the content of the first and second substances,representing the node of the i-th primitive,n is a positive integer greater than 1, λ is a weight parameter, the default value is 1, S is a source point, T is an end point,representing the probability that the ith primitive node belongs to a traffic type,indicating the probability that the ith primitive node belongs to another traffic type.
5. The method for classifying primitive models in three-dimensional engineering according to claim 4, wherein: probability that the ith primitive node belongs to a service typeAnd the probability that the ith primitive node belongs to another traffic typeThe calculating method comprises the following steps:
wherein the content of the first and second substances,which represents the primitive of the j-th type,k is a positive integer greater than 1,representing the probability that the ith primitive node belongs to the jth primitive,indicating that there is a probability that the jth primitive belongs to the source point service type,indicating that the probability that the jth primitive belongs to the end point service type exists.
6. The method for classifying primitive models in three-dimensional engineering according to claim 5, wherein: probability that the ith primitive node belongs to the jth primitiveFor geometric classification of primitive models, the classification method comprises the following steps:
calculating various geometric characteristics of the primitive model, and arranging according to the geometric characteristics in a size sequence; intercepting or zero filling according to a fixed length to form a characteristic vector of each primitive model;
acquiring feature vectors-classification labels of existing primitive models stored in a database, and training to obtain a classifier;
and inputting the formed feature vector of each primitive model into a classifier to obtain the probability of the j-th primitive to which the primitive model belongs, the probability of the service type of the source point to which the primitive model belongs and the probability of the service type of the destination point to which the primitive model belongs.
7. The method for classifying primitive models in three-dimensional engineering according to claim 6, wherein: the feature vector calculation method of each primitive model is as follows:
acquiring size data of the primitive model, wherein the size data comprises a length L, a width W and a height H;
obtaining a list of the area of each shape area of the primitive model convex hull, wherein the list of the area of each shape area isTaking the k values with the largest area to form a vectorZero padding is performed when the number of the shape area surfaces is not enough;
obtaining an area list of each shape area surface of the primitive model, wherein the area list of each shape area surfaceTaking the maximum value of the area to form a vectorWhen the number of the triangular faces is not enough, zero is filled;
acquiring the average curvature R of each curved surface of the primitive model;
The calculation formula for obtaining the probability that the primitive model belongs to the jth primitive through the classifier is as follows:
obtaining the probability that the primitive model belongs to the source point service type through the classifierThe calculation formula of (2) is as follows:
obtaining the probability that the primitive model belongs to the end point service type through the classifierThe calculation formula of (2) is as follows:
8. a primitive model classification system in three-dimensional engineering is characterized in that: the system for classifying primitive models in three-dimensional engineering classifies scattered primitive models into service models by adopting the method for classifying primitive models in three-dimensional engineering of any one of claims 1 to 7; the primitive model classification system in the three-dimensional engineering comprises:
the three-dimensional model acquisition module is used for acquiring a three-dimensional model of a primitive model to be classified and determining the service type of the three-dimensional model and the type and the number of the primitive model;
the multi-classification splitting module is used for judging the class of the service type of the three-dimensional model and splitting the three-dimensional model into two classification service types when the three-dimensional model is of a multi-classification service type;
the primitive classification module is used for classifying the primitive model of the three-dimensional model according to the two classification service types and determining the service type of the primitive model; and
and the business model building module is used for combining all the primitive models to build a business model according to the business types of the primitive models.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the steps of the method of any one of claims 1 to 7 are implemented when the computer program is loaded and executed by the processor.
10. A storage medium storing a computer program, characterized in that the computer program, when loaded and executed by a processor, implements the steps of the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111105749.9A CN113554012B (en) | 2021-09-22 | 2021-09-22 | Primitive model classification method, system, equipment and storage medium in three-dimensional engineering |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111105749.9A CN113554012B (en) | 2021-09-22 | 2021-09-22 | Primitive model classification method, system, equipment and storage medium in three-dimensional engineering |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113554012A true CN113554012A (en) | 2021-10-26 |
CN113554012B CN113554012B (en) | 2022-01-11 |
Family
ID=78106481
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111105749.9A Active CN113554012B (en) | 2021-09-22 | 2021-09-22 | Primitive model classification method, system, equipment and storage medium in three-dimensional engineering |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113554012B (en) |
Citations (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102915448A (en) * | 2012-09-24 | 2013-02-06 | 西北工业大学 | AdaBoost-based 3D (three-dimensional) model automatic classification method |
CN106327506A (en) * | 2016-08-05 | 2017-01-11 | 北京三体高创科技有限公司 | Probability-partition-merging-based three-dimensional model segmentation method |
CN106599940A (en) * | 2016-11-25 | 2017-04-26 | 东软集团股份有限公司 | Picture character identification method and apparatus thereof |
CN107315989A (en) * | 2017-05-03 | 2017-11-03 | 天方创新(北京)信息技术有限公司 | For the text recognition method and device of medical information picture |
CN108052703A (en) * | 2017-11-22 | 2018-05-18 | 南京航空航天大学 | Fast Collision Detection Algorithm based on hybrid hierarchy bounding box |
CN108280430A (en) * | 2018-01-24 | 2018-07-13 | 陕西科技大学 | A kind of flow image-recognizing method |
CN108960288A (en) * | 2018-06-07 | 2018-12-07 | 山东师范大学 | Threedimensional model classification method and system based on convolutional neural networks |
CN109389050A (en) * | 2018-09-19 | 2019-02-26 | 陕西科技大学 | A kind of flow chart connection relationship recognition methods |
CN110503054A (en) * | 2019-08-27 | 2019-11-26 | 广东工业大学 | The processing method and processing device of text image |
CN110659639A (en) * | 2019-09-24 | 2020-01-07 | 北京字节跳动网络技术有限公司 | Chinese character recognition method and device, computer readable medium and electronic equipment |
CN110705536A (en) * | 2019-09-24 | 2020-01-17 | 北京字节跳动网络技术有限公司 | Chinese character recognition error correction method and device, computer readable medium and electronic equipment |
CN110838105A (en) * | 2019-10-30 | 2020-02-25 | 南京大学 | Business process model image identification and reconstruction method |
CN111368757A (en) * | 2020-03-09 | 2020-07-03 | 广联达科技股份有限公司 | Machine learning-oriented column large sample building drawing layer classification method and system |
CN111651826A (en) * | 2020-06-09 | 2020-09-11 | 吉林建筑大学 | Building information model technology-based building industrialization system |
WO2021015840A1 (en) * | 2019-07-22 | 2021-01-28 | Raytheon Company | Cross-modality automatic target recognition |
CN112287773A (en) * | 2020-10-10 | 2021-01-29 | 国家电网有限公司 | Primary wiring diagram primitive identification method based on convolutional neural network |
CN112651323A (en) * | 2020-12-22 | 2021-04-13 | 山东山大鸥玛软件股份有限公司 | Chinese handwriting recognition method and system based on text line detection |
CN112766236A (en) * | 2021-03-10 | 2021-05-07 | 拉扎斯网络科技(上海)有限公司 | Text generation method and device, computer equipment and computer readable storage medium |
CN112926119A (en) * | 2021-03-05 | 2021-06-08 | 厦门泛卓信息科技有限公司 | Building model compression processing method, device, equipment and medium |
CN113052023A (en) * | 2021-03-12 | 2021-06-29 | 深圳小库科技有限公司 | CAD drawing analysis method, device, equipment and storage medium |
CN113345089A (en) * | 2021-05-31 | 2021-09-03 | 西北农林科技大学 | Regularization modeling method based on power tower point cloud |
-
2021
- 2021-09-22 CN CN202111105749.9A patent/CN113554012B/en active Active
Patent Citations (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102915448A (en) * | 2012-09-24 | 2013-02-06 | 西北工业大学 | AdaBoost-based 3D (three-dimensional) model automatic classification method |
CN106327506A (en) * | 2016-08-05 | 2017-01-11 | 北京三体高创科技有限公司 | Probability-partition-merging-based three-dimensional model segmentation method |
CN106599940A (en) * | 2016-11-25 | 2017-04-26 | 东软集团股份有限公司 | Picture character identification method and apparatus thereof |
CN107315989A (en) * | 2017-05-03 | 2017-11-03 | 天方创新(北京)信息技术有限公司 | For the text recognition method and device of medical information picture |
CN108052703A (en) * | 2017-11-22 | 2018-05-18 | 南京航空航天大学 | Fast Collision Detection Algorithm based on hybrid hierarchy bounding box |
CN108280430A (en) * | 2018-01-24 | 2018-07-13 | 陕西科技大学 | A kind of flow image-recognizing method |
CN108960288A (en) * | 2018-06-07 | 2018-12-07 | 山东师范大学 | Threedimensional model classification method and system based on convolutional neural networks |
CN109389050A (en) * | 2018-09-19 | 2019-02-26 | 陕西科技大学 | A kind of flow chart connection relationship recognition methods |
WO2021015840A1 (en) * | 2019-07-22 | 2021-01-28 | Raytheon Company | Cross-modality automatic target recognition |
CN110503054A (en) * | 2019-08-27 | 2019-11-26 | 广东工业大学 | The processing method and processing device of text image |
CN110705536A (en) * | 2019-09-24 | 2020-01-17 | 北京字节跳动网络技术有限公司 | Chinese character recognition error correction method and device, computer readable medium and electronic equipment |
CN110659639A (en) * | 2019-09-24 | 2020-01-07 | 北京字节跳动网络技术有限公司 | Chinese character recognition method and device, computer readable medium and electronic equipment |
CN110838105A (en) * | 2019-10-30 | 2020-02-25 | 南京大学 | Business process model image identification and reconstruction method |
CN111368757A (en) * | 2020-03-09 | 2020-07-03 | 广联达科技股份有限公司 | Machine learning-oriented column large sample building drawing layer classification method and system |
CN111651826A (en) * | 2020-06-09 | 2020-09-11 | 吉林建筑大学 | Building information model technology-based building industrialization system |
CN112287773A (en) * | 2020-10-10 | 2021-01-29 | 国家电网有限公司 | Primary wiring diagram primitive identification method based on convolutional neural network |
CN112651323A (en) * | 2020-12-22 | 2021-04-13 | 山东山大鸥玛软件股份有限公司 | Chinese handwriting recognition method and system based on text line detection |
CN112926119A (en) * | 2021-03-05 | 2021-06-08 | 厦门泛卓信息科技有限公司 | Building model compression processing method, device, equipment and medium |
CN112766236A (en) * | 2021-03-10 | 2021-05-07 | 拉扎斯网络科技(上海)有限公司 | Text generation method and device, computer equipment and computer readable storage medium |
CN113052023A (en) * | 2021-03-12 | 2021-06-29 | 深圳小库科技有限公司 | CAD drawing analysis method, device, equipment and storage medium |
CN113345089A (en) * | 2021-05-31 | 2021-09-03 | 西北农林科技大学 | Regularization modeling method based on power tower point cloud |
Non-Patent Citations (3)
Title |
---|
PASCAL LAUBE等: "《Evaluation of features for SVM-based classification of geometric primitives in point clouds》", 《2017 FIFTEENTH IAPR INTERNATIONAL CONFERENCE ON MACHINE VISION APPLICATIONS (MVA)》 * |
王益等: "《智能变电站仿真三维可视化组件装配技术研究》", 《电力系统保护与控制》 * |
白云: "《三维几何形体拓扑结构和存储结果的优化设计》", 《苏州城建环保学院学报》 * |
Also Published As
Publication number | Publication date |
---|---|
CN113554012B (en) | 2022-01-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109859190B (en) | Target area detection method based on deep learning | |
US11544900B2 (en) | Primitive-based 3D building modeling, sensor simulation, and estimation | |
Yu et al. | Soft clustering on graphs | |
Bassier et al. | Automated classification of heritage buildings for as-built BIM using machine learning techniques | |
Wiseman et al. | Circumspectly crash of autonomous vehicles | |
Lee et al. | Perceptual organization of 3D surface points | |
KR101930940B1 (en) | Apparatus and method for analyzing image | |
Zhiheng et al. | PyramNet: Point cloud pyramid attention network and graph embedding module for classification and segmentation | |
CN110674685B (en) | Human body analysis segmentation model and method based on edge information enhancement | |
CN110378297A (en) | A kind of Remote Sensing Target detection method based on deep learning | |
CN109359534B (en) | Method and system for extracting geometric features of three-dimensional object | |
CN113572742A (en) | Network intrusion detection method based on deep learning | |
CN110807362A (en) | Image detection method and device and computer readable storage medium | |
CN111368636A (en) | Object classification method and device, computer equipment and storage medium | |
Zhou et al. | Enhance the recognition ability to occlusions and small objects with Robust Faster R-CNN | |
US11810250B2 (en) | Systems and methods of hierarchical implicit representation in octree for 3D modeling | |
CN109726725A (en) | The oil painting writer identification method of heterogeneite Multiple Kernel Learning between a kind of class based on large-spacing | |
CN114387608B (en) | Table structure identification method combining convolution and graph neural network | |
CN115482387A (en) | Weak supervision image semantic segmentation method and system based on multi-scale class prototype | |
Lee et al. | Deep learning approach in multi-scale prediction of turbulent mixing-layer | |
JP3602659B2 (en) | Feature extraction method and feature extraction device from gray value document image | |
CN110929726B (en) | Railway contact network support number plate identification method and system | |
CN113554012B (en) | Primitive model classification method, system, equipment and storage medium in three-dimensional engineering | |
CN117036706A (en) | Image segmentation method and system based on multi-modal dialogue language model | |
Monfardini et al. | Graph neural networks for object localization |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |