CN110245249B - Three-dimensional CAD model intelligent retrieval method based on double-layer depth residual error network - Google Patents

Three-dimensional CAD model intelligent retrieval method based on double-layer depth residual error network Download PDF

Info

Publication number
CN110245249B
CN110245249B CN201910401751.7A CN201910401751A CN110245249B CN 110245249 B CN110245249 B CN 110245249B CN 201910401751 A CN201910401751 A CN 201910401751A CN 110245249 B CN110245249 B CN 110245249B
Authority
CN
China
Prior art keywords
view
network
dimensional cad
cad model
residual error
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.)
Active
Application number
CN201910401751.7A
Other languages
Chinese (zh)
Other versions
CN110245249A (en
Inventor
周光辉
张超
邹梁
成玮
杨雄军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Jiaotong University
Original Assignee
Xian Jiaotong University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Xian Jiaotong University filed Critical Xian Jiaotong University
Priority to CN201910401751.7A priority Critical patent/CN110245249B/en
Publication of CN110245249A publication Critical patent/CN110245249A/en
Application granted granted Critical
Publication of CN110245249B publication Critical patent/CN110245249B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • G06F16/532Query formulation, e.g. graphical querying

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a three-dimensional CAD model intelligent retrieval method based on a double-layer depth residual error network. The method comprises the steps of obtaining entity views/wire frame views of enterprise historical three-dimensional CAD models and conducting data preprocessing to manufacture training data sets 1 and 2, further using the data sets 1 for parameter training of filtering networks, using the data sets 2 for parameter training of sequencing networks, and storing the trained networks as h5 files. And calling the trained double-layer depth residual error network, and enabling a user to accurately retrieve the similar three-dimensional CAD model through the entity view, the wire frame view, the engineering drawing, the engineering sketch and the like of the three-dimensional CAD model. The intelligent retrieval method for the three-dimensional CAD model has the characteristics of flexible retrieval input, short retrieval time, high retrieval precision and the like, and provides effective support for intelligent retrieval and efficient reuse of massive three-dimensional CAD models of enterprises.

Description

Three-dimensional CAD model intelligent retrieval method based on double-layer depth residual error network
Technical Field
The invention belongs to the technical field of intelligent information of advanced manufacturing technology, and particularly relates to a three-dimensional CAD model intelligent retrieval method based on a double-layer depth residual error network.
Background
According to statistics, during the development of new products in an enterprise, about 40% of parts can adopt the existing design, about 40% of parts can be finished by modifying the existing design, and only about 20% of parts need the brand new design. Therefore, the existing success cases proven by engineering practice in the enterprise are reused in about 80% of the product part development process, so that the quality and reliability of the product can be greatly improved, and about 60% of the product development time is reduced, thereby greatly reducing the development cost of new products in the enterprise and improving the market competitiveness of the enterprise. With the vigorous development and wide application of CAD technology, enterprises accumulate massive three-dimensional CAD models, and the models and the knowledge carried by the models provide abundant case resources for the research and development of new products. The existing three-dimensional CAD model of an enterprise and knowledge such as embedded process files, tool fixtures, product operation plans and the like are reused in the research and development process of new products, so that the quality and the research and development efficiency of the products can be improved, the research and development period of the products can be shortened, the study of enterprise personnel can be promoted, the innovation of the enterprise personnel can be promoted, and the innovation capability and the core competitiveness of the enterprise can be improved. However, due to the lack of effective three-dimensional CAD model retrieval tools, enterprises can sleep in the enterprise database, and thus cannot play a role in the new product development process.
Aiming at the problems, the academic community develops a great deal of research on the retrieval and reuse of the three-dimensional CAD model and obtains certain beneficial effects. At present, research on three-dimensional CAD model retrieval at home and abroad mainly focuses on representing the model by semantic descriptors, shape descriptors, geometric structure descriptors and the like; and further, the purpose of searching the three-dimensional CAD model is achieved by calculating the similarity or difference between the input descriptor and the descriptor corresponding to the three-dimensional CAD model in the database. Although the method can obtain a relatively accurate retrieval result, the implementation difficulty of the method is high due to the complex construction of the descriptor; secondly, for enterprise employees, the descriptors are complex and difficult to understand, and the practicability is poor; finally, such methods require traversing the similarity of all descriptors in the calculation database to the input descriptors, resulting in longer retrieval times, and the retrieval times increase as the number of three-dimensional CAD models in the enterprise database increases. Therefore, enterprises still need a three-dimensional CAD model retrieval method with flexible and convenient input, strong practicability and high accuracy.
In essence, three-dimensional CAD model views (such as solid view, wire-frame view, engineering drawing, engineering sketch, etc.) are an ideal choice for three-dimensional CAD model search input as important media for enterprise employee expression and communication of product research and development ideas. Meanwhile, the three-dimensional CAD model view contains rich geometric structure and shape information of the model, and can be used for representing the model and distinguishing the model from other three-dimensional CAD models. On the other hand, with the wide application of deep learning in the image recognition field (such as face recognition, handwritten word recognition and the like), especially, the deep residual network achieves higher accuracy than manual recognition in tasks such as ImageNet image classification, detection and positioning, and the like, which marks that the deep learning has made breakthrough progress in the image recognition field.
Disclosure of Invention
The invention aims to solve the technical problem that the defects in the prior art are overcome, and provides an intelligent three-dimensional CAD model retrieval method based on a double-layer depth residual error network, which provides support for retrieval and reuse of massive three-dimensional CAD models of enterprises.
The invention adopts the following technical scheme:
a three-dimensional CAD model intelligent retrieval method based on a double-layer depth residual error network adopts the depth residual error network as a basic frame to construct the double-layer depth residual error network comprising a filter network FilterNet and a sequencing network RankNet, wherein the filter network FilterNet is used for preliminarily eliminating three-dimensional CAD models irrelevant to input when the three-dimensional CAD models are retrieved, and the sequencing network RankNet is used for sequencing the three-dimensional CAD models relevant to input according to the similarity and outputting the three-dimensional CAD models to a user; acquiring entity views/wire frame views of an enterprise historical three-dimensional CAD model and preprocessing data to manufacture a training data set 1 and a training data set 2, then using the data set 1 for parameter training of a filter network FilterNet, using the data set 2 for parameter training of a sequencing network RankNet, and storing the trained network as an h5 file; and calling the trained double-layer depth residual error network, and realizing accurate retrieval of the similar three-dimensional CAD model through the entity view, the wire frame view, the engineering drawing and the engineering sketch of the three-dimensional CAD model.
Specifically, the overall structure of the depth residual error network comprises a view preprocessing module, a residual error module and a post-processing module, wherein the residual error module o (x) is:
O(x)=max(0,F(x,{Wi})+Wsx)
where x is the output of the previous network, F (x, { W)i}) is residual learning, WiAs weight parameter of residual module, Wsx is an identity map, WsIs a square matrix for matching x and F (x, { W)i}).
Specifically, the solid view is defined as a view obtained after coloring a strip line of the three-dimensional CAD model, the wireframe view is defined as a view obtained after eliminating a hidden line from the three-dimensional CAD model, and the three-dimensional CAD model based on the solid view and the wireframe view is characterized in that:
Figure GDA0003063480280000031
wherein
Figure GDA0003063480280000032
(
Figure GDA0003063480280000033
U is the total number of models in the training data set) represents a given three-dimensional CAD model, which belongs to the class of models cw
Figure GDA0003063480280000034
W is the model class of the training data set,
Figure GDA0003063480280000035
a set of physical views representing the model,
Figure GDA0003063480280000036
and a wire frame view set representing the model, wherein the number of the solid view and the wire frame view is n, and the pixel size is k multiplied by l.
Specifically, the preprocessing includes scaling, gray scale transformation and normalization, and the obtained entity view and the wire frame view are scaled as follows:
Figure GDA0003063480280000037
wherein, [ x ]0 y0 1]As a point on a solid or wire-frame view, [ x ]1 y1 1]The corresponding point on the new view obtained after the view is scaled, and the pixel size of the new view is p × q;
the scaled view is subjected to gray scale transformation by a weighting method as follows:
Figure GDA0003063480280000038
v is a pixel matrix after view gray level conversion, VR、VG、VBPixel matrixes corresponding to three color channels of red, green and blue before view transformation are provided, and the dimensions of the pixel matrixes are p × q;
the data set was normalized as follows:
Figure GDA0003063480280000041
Figure GDA0003063480280000042
where m is 2 × n × U, the total number of views.
Specifically, the preprocessed view is divided into a training data set 1 according to the type of the model to which the view belongs, and the expression is as follows:
Figure GDA0003063480280000043
wherein the content of the first and second substances,
Figure GDA0003063480280000044
representing the model class as cwA collection of views of a three-dimensional CAD model (e.g., a hydraulic pump), and all the views in the collection are labeled cw
Specifically, the data set 1 is imported into a filter network FilterNet and parameters of the network are trained, when the filter network FilterNet reaches a set training iteration number K, the training process is finished, the trained filter network FilterNet is stored as a filternet.h5 file, a softmax loss function is adopted in the filter network FilterNet parameter training process to evaluate the error between input and output, and the expression is as follows:
Figure GDA0003063480280000045
wherein n is the number of minimum batch input views,
Figure GDA0003063480280000046
enter the tag value, y, of the ith view of the view for the minimum batch(i)Forward propagating the output value of the view through the depth residual error network;
during the training period of the network parameter W, the improved depth residual error network adopts a random gradient descent algorithm to optimize a loss function, and the expression of the random gradient descent method is as follows:
Figure GDA0003063480280000047
Wi+1:=Wi+vi+1
wherein i is an iteration index, τ is momentum, v is a momentum variable, μ is weight loss, and ε is a learning rate.
Specifically, the preprocessed view is divided into a training data set 2 according to the belonged model, and the expression is as follows:
Figure GDA0003063480280000051
wherein the content of the first and second substances,
Figure GDA0003063480280000052
representation model
Figure GDA0003063480280000053
A set of all views, and the labels of the views in the set are all
Figure GDA0003063480280000054
Specifically, a sorting network RankNet network parameter is initialized by using a filter network FilterNet network parameter, a data set 2 is led into the sorting network RankNet and the parameter of the network is trained; adopting a center-softmax loss function to evaluate the error between input and output in the training process of the RankNet network parameters of the sequencing network, wherein the expression is as follows:
Figure GDA0003063480280000055
wherein x isiRepresenting depth features of the ith minimum batch (mini-batch) input view of the RankNet full-link output, and the view belongs to a three-dimensional CAD model
Figure GDA0003063480280000056
Is shown in the drawing (a) of (b),
Figure GDA0003063480280000057
representing three-dimensional CAD models
Figure GDA0003063480280000058
The center of the depth feature for all views, λ represents the weight between the center penalty and the softmax penalty; during training of the RankNet network parameters W of the sequencing network, a random gradient descent algorithm is adopted to optimize a loss function.
Further, when the average training accuracy of the ranking network RankNet for continuous 200 iterations is improved to be smaller than a threshold value gamma, the training process is ended, and the trained ranking network RankNet is stored as a RankNet. h5 file; the average training accuracy improvement expression of the ranking network RankNet for continuous 200 iterations is as follows:
Figure GDA0003063480280000059
wherein A isiRepresenting the training accuracy of RankNet after the ith iteration; the training termination judgment conditions are as follows:
Figure GDA00030634802800000510
specifically, firstly, preprocessing an input view, and then calculating a similarity expression of a three-dimensional CAD model in a database by the trained double-layer depth residual error network through the input N views, wherein the similarity expression comprises the following expression:
Figure GDA00030634802800000511
Figure GDA0003063480280000061
wherein, FpAnd RsOutput matrices, W, for the ith view, for the Filter network Filter and the ranking network RankNet, respectivelypIs an identity matrix for matching FpAnd RsThe dimension (c) of (a) is,
Figure GDA0003063480280000063
it is shown that the matrix is dot-multiplied,
Figure GDA0003063480280000062
and pushing the M three-dimensional CAD models with the highest similarity with the input view as a retrieval result to the user.
Compared with the prior art, the invention has at least the following beneficial effects:
the invention discloses a three-dimensional CAD model intelligent retrieval method based on a double-layer depth residual error network, which adopts the depth residual error network as a basic frame to construct the double-layer depth residual error network, and comprises an upper layer filter network and a lower layer sorting network, wherein the upper layer filter network is used for preliminarily eliminating three-dimensional CAD models irrelevant to input when the three-dimensional CAD models are retrieved, and the lower layer sorting network is used for further sorting the three-dimensional CAD models relevant to input according to the similarity and outputting the three-dimensional CAD models to a user. The network integration is beneficial to reducing the retrieval time of the three-dimensional CAD model and improving the retrieval accuracy; the method comprises the steps of obtaining entity views/wire frame views of historical three-dimensional CAD models of enterprises, preprocessing data to manufacture a training data set 1 and a training data set 2, further using the training data set 1 for parameter training of an upper filtering network, using the training data set 2 for parameter training of a lower sequencing network, saving the trained networks as h5 files, calling the trained double-layer depth residual error network when retrieving the three-dimensional CAD models, and enabling a user to accurately retrieve similar three-dimensional CAD models by inputting the views of the entity views, the wire frame views, engineering drawings, engineering sketches and the like of the three-dimensional CAD models. The three-dimensional CAD model intelligent retrieval method based on the double-layer depth residual error network has the characteristics of flexible retrieval input, short retrieval time, high retrieval precision and the like, and provides effective support for intelligent retrieval and efficient reuse of massive three-dimensional CAD models of enterprises.
Furthermore, the view acquisition of the three-dimensional CAD model is divided into two steps, firstly, a new model is formed after coloring the strip edge line of the three-dimensional CAD model, n virtual cameras are reasonably arranged in the space where the model is located, and n solid views of the model are automatically acquired by adopting a Blender software tool; and secondly, forming a new model after removing hidden lines from the three-dimensional CAD model, and acquiring n line frame views of the model by adopting the same method as the method for acquiring the entity views. The purpose of simultaneously obtaining the entity view and the wire frame view is to obtain information of the three-dimensional CAD model as much as possible from a plurality of space angles of two different display states of the three-dimensional CAD model, so that the comprehension capability of the double-layer depth residual error network on the three-dimensional CAD model is improved, the flexible input during the three-dimensional CAD model retrieval is further supported, and the retrieval accuracy is improved.
Further, the entity view and the wire frame view are preprocessed through scaling, gray level transformation and normalization processing, wherein the scaling converts the entity view and the wire frame view into pictures with uniform sizes, so that parameter training of a double-layer depth residual error network is supported; the gray scale transformation reduces the dimension of the three-dimensional RGB pixel matrix to a one-dimensional gray scale pixel matrix, thereby reducing the parameter training time of the double-layer residual error network; the normalization part can improve the convergence speed and the training accuracy of the depth residual error network.
Furthermore, when the upper network parameters are trained by adopting the training data set 1, errors between input and output are evaluated by adopting a softmax loss function, and the loss function is optimized by a random gradient descent algorithm.
Furthermore, the lower-layer sequencing network parameters are initialized by utilizing the upper-layer filtering network parameters, when the lower-layer network parameters are trained by further adopting the training data set 2, a center-softmax loss function is adopted to estimate the error between input and output, and the loss function is optimized by a random gradient descent algorithm.
Furthermore, when the three-dimensional CAD model is retrieved, the trained double-layer depth residual error network is called, and a user can accurately retrieve the similar three-dimensional CAD model by inputting the views of the entity view, the wire frame view, the engineering drawing, the engineering sketch and the like of the three-dimensional CAD model, so that the retrieved three-dimensional CAD model is directly used or indirectly used in the research and development of new products of enterprises through modification, the research and development period is further shortened, the research and development cost is reduced, and the enterprise benefit is improved.
In conclusion, the three-dimensional CAD model retrieval method adopts three-dimensional CAD model views (such as solid view, wire frame view, engineering drawing, engineering sketch and the like) understood and familiar by enterprise staff as the input of the three-dimensional CAD model retrieval, and realizes the intelligent retrieval of the three-dimensional CAD model by calling the trained double-layer depth residual error network.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
FIG. 1 is a schematic diagram of a three-dimensional CAD model retrieval frame based on a double-layer depth residual error network;
FIG. 2 is a diagram of a two-layer depth residual error network structure;
FIG. 3 is a schematic diagram of a portion of a three-dimensional CAD model contained in a data set;
FIG. 4 is a schematic diagram of the solid view and wire-frame view acquisition of a three-dimensional CAD model.
FIG. 5 is a schematic diagram of a FilterNet training process;
FIG. 6 is a schematic diagram of a RankNet training process;
FIG. 7 is a schematic diagram of an intelligent retrieval case of a three-dimensional CAD model based on multiple views;
fig. 8 is a schematic diagram of an intelligent search and evaluation case of the three-dimensional CAD model.
Detailed Description
The invention provides a three-dimensional CAD model intelligent retrieval method based on a double-layer depth residual error network, which takes a three-dimensional CAD model view as the retrieval input of the three-dimensional CAD model, thereby introducing the depth residual error network, and adopts the depth residual error network as a basic frame to construct the double-layer depth residual error network comprising a filter network and a sequencing network; acquiring entity views/wireframe views of an enterprise historical three-dimensional CAD model and preprocessing data to manufacture a training data set 1 and a training data set 2, then using the data set 1 for parameter training of a filter network, using the data set 2 for parameter training of a sequencing network, and storing the trained network as an h5 file; and calling the trained double-layer depth residual error network, and realizing accurate retrieval of the similar three-dimensional CAD model through the entity view, the wire frame view, the engineering drawing and the engineering sketch of the three-dimensional CAD model. The intelligent retrieval method for the three-dimensional CAD model has the characteristics of flexible retrieval input, short retrieval time, high retrieval precision and the like, and provides effective support for intelligent retrieval and efficient reuse of massive three-dimensional CAD models of enterprises.
The invention discloses a three-dimensional CAD model intelligent retrieval method based on a double-layer depth residual error network, which comprises the following steps:
s1, constructing a double-layer deep learning network by using a deep residual error network as a basic frame;
referring to fig. 1, the two-layer deep learning network includes an upper filtering network (hereinafter, referred to as FilterNet) and a lower ranking network (hereinafter, referred to as RnakNet). The three-dimensional CAD model searching method comprises the steps of selecting a three-dimensional CAD model, selecting a RankNet, and outputting the three-dimensional CAD model to a user, wherein the FilterNet is used for preliminarily eliminating the three-dimensional CAD model irrelevant to input when the three-dimensional CAD model is searched, and the RankNet is used for further sorting the three-dimensional CAD model relevant to input according to the similarity and outputting the three-dimensional CAD model relevant to input to the user. Both FilterNet and RankNet use a deep residual network as a basic architecture.
The overall structure of the depth Residual error network comprises a view preprocessing module, a Residual error module (ResBlock) and a post-processing module, wherein the expression of the Residual error module is as follows:
O(x)=max(0,F(x,{Wi})+Wsx)
where x is the output of the upper layer network, O (x) is the output of the residual module, F (x, { W)i}) as residual learning (W)iWeight parameter for residual block), Wsx is an identity map (W)sIs a square matrix for matching x and F (x, { W)i) }).
S2, acquiring a plurality of entity views and wire frame views of the three-dimensional CAD model through the virtual camera, and fully characterizing the model;
the solid view is defined as a view obtained after coloring a strip edge line of the three-dimensional CAD model, the wire frame view is defined as a view obtained after eliminating a hidden line of the three-dimensional CAD model, and the expression of the representation of the three-dimensional CAD model based on the solid view and the wire frame view is as follows:
Figure GDA0003063480280000091
wherein
Figure GDA0003063480280000092
(
Figure GDA0003063480280000093
U is the total number of models in the training data set) represents a given three-dimensional CAD model, which belongs to the class of models cw(
Figure GDA0003063480280000094
W is the model class of the training data set),
Figure GDA0003063480280000095
a set of physical views representing the model,
Figure GDA0003063480280000096
represents the sameThe number of the wire frame view set, the entity view and the wire frame view of the model is n, and the pixel size is k multiplied by l.
S3, preprocessing the entity view and the wire frame view through scaling, gray level transformation and normalization;
the double-layer depth residual error network parameter training needs to input pictures with uniform sizes, so that the obtained entity view and the obtained wire frame view are scaled, and the expression is as follows:
Figure GDA0003063480280000097
wherein, [ x ]0 y0 1]As a point on a solid or wire-frame view, [ x ]1 y1 1]The corresponding point on the new view obtained after scaling the view is scaled, and the pixel size of the new view is p × q.
The color of the view has no substantial effect on the three-dimensional CAD model retrieval, so that the scaled view is subjected to gray scale transformation by a weighting method, and the expression is as follows:
Figure GDA0003063480280000101
v is a pixel matrix after view gray level conversion, VR、VG、VBThe method comprises the steps of converting a view into a pixel matrix corresponding to three color channels of red (R), green (G) and blue (B), wherein the dimensions of the pixel matrix are p × q.
The convergence rate and the training accuracy of the double-layer depth residual error network can be improved by the data set normalization processing, and the expression of the data set normalization is as follows:
Figure GDA0003063480280000102
Figure GDA0003063480280000103
where m is 2 × n × U, the total number of views.
S4, dividing the preprocessed view into a training data set 1 and a training data set 2 according to the type and the model of the preprocessed view;
s401, dividing the preprocessed view into a training data set 1 according to the type of the model to which the view belongs, wherein the expression is as follows:
Figure GDA0003063480280000104
wherein the content of the first and second substances,
Figure GDA0003063480280000105
representing the model class as cwA collection of views of a three-dimensional CAD model (e.g., a hydraulic pump), and all the views in the collection are labeled cw
S402, dividing the preprocessed view into a training data set 2 according to the model to which the view belongs, wherein the expression is as follows:
Figure GDA0003063480280000106
wherein the content of the first and second substances,
Figure GDA0003063480280000107
representation model
Figure GDA0003063480280000108
A set of all views, and the labels of the views in the set are all
Figure GDA0003063480280000109
S5, importing the data set 1 obtained in the step S4 into a FilterNet and training parameters of a network;
in the process of training the parameters of the FilterNet network, a softmax loss function is adopted to evaluate the error between input and output, and the expression is as follows:
Figure GDA0003063480280000111
wherein n is the number of minimum batch (mini-batch) input views,
Figure GDA0003063480280000112
enter the tag value, y, of the ith view of the view for the minimum batch(i)The output values after forward propagation through the depth residual network for this view.
During the training period of the network parameter W, the improved depth residual error network adopts a random gradient descent algorithm to optimize a loss function, and the expression of the random gradient descent method is as follows:
Figure GDA0003063480280000113
Wi+1:=Wi+vi+1
wherein i is an iteration index, τ is momentum, v is a momentum variable, μ is weight loss, and ε is a learning rate.
S6, when the Filter Net reaches the set training iteration number K, finishing the training process, and storing the trained Filter Net as a Filter Net. h5 file;
s7, importing the data set 2 obtained in the step S4 into RankNet and training parameters of the network;
adopting a center-softmax loss function to evaluate the error between input and output in the RankNet network parameter training process, wherein the expression is as follows:
Figure GDA0003063480280000114
wherein x isiRepresenting depth features of the ith minimum batch (mini-batch) input view of the RankNet full-link output, and the view belongs to a three-dimensional CAD model
Figure GDA0003063480280000115
Is shown in the drawing (a) of (b),
Figure GDA0003063480280000116
representing three-dimensional CAD models
Figure GDA0003063480280000117
The center of the depth feature for all views, λ, represents the weight between the center penalty and the softmax penalty.
During training of the RankNet network parameters W, a random gradient descent algorithm in S5 is adopted to optimize the loss function.
S8, when the average training accuracy of RankNet iteration for 200 continuous times is improved to be smaller than a threshold value gamma, finishing the training process, and storing the trained RankNet as a RankNet. h5 file;
the average training accuracy improvement expression of RankNet continuous 200 iterations is as follows:
Figure GDA0003063480280000121
wherein A isiRepresenting the training accuracy of RankNet after the ith iteration.
The training termination judgment conditions are as follows:
Figure GDA0003063480280000122
s9, calling the trained FilterNet and RankNet, and enabling a user to accurately retrieve the similar three-dimensional CAD model through the views of the entity view, the wire frame view, the engineering drawing, the engineering sketch and the like of the three-dimensional CAD model;
firstly, preprocessing an input view according to the view preprocessing method in the step S3; then, the similarity expression of the three-dimensional CAD model in the database is calculated by the FilterNet and the RankNet through the input N views as follows:
Figure GDA0003063480280000123
Figure GDA0003063480280000124
wherein, FpAnd RsOutput matrices, W, for the ith view, for Filter and RankNet, respectivelypIs an identity matrix for matching FpAnd RsThe dimension (c) of (a) is,
Figure GDA0003063480280000126
it is shown that the matrix is dot-multiplied,
Figure GDA0003063480280000125
and pushing the M three-dimensional CAD models with the highest similarity with the input view as a retrieval result to the user.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 2, both FilterNet and RankNet use a depth residual network (ResNet18) formed by stacking 5 residual modules as a basic frame, where the last layer of FilterNet is a softmax layer for calculating which type of model in a database is most relevant to an input view, and preliminarily filter out three-dimensional CAD models with low relevance to the input view according to model type relevance (i.e., probability that the view output by the softmax layer belongs to a certain type); and the final layer of the RankNet is a center-softmax layer, and is used for further calculating the similarity between the input view and the related three-dimensional CAD models and pushing the most similar 10 three-dimensional CAD models to the user according to the similarity level sequence.
Referring to FIG. 3, the training data set contains 560 three-dimensional CAD models in total for 56 model classes, each class containing 10 three-dimensional CAD models. Referring to fig. 4, the virtual cameras are arranged according to 26 view positions commonly used in the solid works three-dimensional engineering drawing tool, the blend software is used to automatically obtain 26 solid views with a pixel size of 256 × 256 of each three-dimensional CAD model, and the blend software is used to automatically obtain 26 wire frame views with a pixel size of 256 × 256 of each three-dimensional CAD model. And preprocessing the solid view and the wire frame view through scaling, gray scale transformation and normalization to obtain a gray scale view with the pixel size of 224 multiplied by 224. The grayscale views are divided into a training data set 1 according to the class of the model to which the model belongs, each class in the data set 1 includes 520 grayscale views, and the label of each grayscale view is the class name or number of the class. Dividing the grayscale views into a training data set 2 according to the models to which the grayscale views belong, wherein each model in the data set 2 comprises 52 grayscale views, and the label of each grayscale view is the name or number of the model.
Importing a training data set 1 into a FilterNet to carry out network parameter training; training iteration times are set to K which is 200000 times; the hyper-parameters of the network are set as: τ is 0.9, μ is 0.00001, when the iteration number i is not more than 100000, ∈ is 0.01, when i is more than 100000, ∈ is 0.0001, and the minimum batch (mini-batch) input view number n is 32; when the training iteration number reaches a set value K, the training iteration is terminated, and the trained FilterNet is stored as a 'FilterNet.h 5' file; referring to FIG. 5, the training accuracy E of FilterNett0.9980, verification accuracy Ev0.9594, the loss function L is less than 0.16, and higher training precision and testing precision are achieved.
Loading the network parameters (except all network parameters of the softmax layer) of the FilterNet to RankNet, and importing a training data set 2 into the RankNet to carry out network parameter training; when the network parameters are trained, the weight between the center loss and the softmax loss is set as: λ is 0.1, and the RankNet training termination condition is set as: γ is 0.0001; the network hyper-parameter setting is consistent with the FilterNet; average training criterion when RankNet continuously iterates for 200 timesWhen the improvement rate is smaller than a threshold value gamma, finishing the training process, and storing the trained RankNet as a 'RankNet. h 5' file; please refer to fig. 6, the training accuracy E of RankNett0.9971, verification accuracy Ev0.9416, the loss function L is less than 0.28, and higher training precision and testing precision are achieved.
Referring to fig. 7, when a three-dimensional CAD model needs to be retrieved, the trained FilterNet and RankNet are called, and a user can input views such as an entity view, a wire frame view, an engineering drawing, an engineering sketch and the like of the three-dimensional CAD model to accurately retrieve a similar three-dimensional CAD model, and the retrieval time is stabilized at about 0.85 second. In order to evaluate the effectiveness of the proposed method, the proposed method is evaluated by using an average rank reciprocal (MRR for short), and the expression is as follows:
Figure GDA0003063480280000141
wherein M is the total number of the three-dimensional CAD models pushed to the user by RankNet; rank if the ith search result is similar to the input viewiOtherwise, it is 0.
Referring to fig. 8, MRR using the entity view is greater than 0.898, and when the search view is 3, MRR can reach 0.923; MRR > 0.852 using a wire frame view, MRR may reach 0.909 when the search view is 3. The experiment shows that the three-dimensional CAD model retrieval method based on the double-layer deep convolutional neural network has the advantages of flexible input, short retrieval time, high retrieval accuracy and the like.
The above-mentioned contents are only for illustrating the technical idea of the present invention, and the protection scope of the present invention is not limited thereby, and any modification made on the basis of the technical idea of the present invention falls within the protection scope of the claims of the present invention.

Claims (10)

1. A three-dimensional CAD model intelligent retrieval method based on a double-layer depth residual error network is characterized in that the depth residual error network is used as a basic frame, the double-layer depth residual error network comprising a filter network FilterNet and a sorting network RankNet is constructed, the filter network FilterNet preliminarily excludes three-dimensional CAD models irrelevant to input when used for three-dimensional CAD model retrieval, and the sorting network RankNet is used for sorting the three-dimensional CAD models relevant to input according to similarity and outputting the three-dimensional CAD models to a user; acquiring entity views/wire frame views of an enterprise historical three-dimensional CAD model and preprocessing data to manufacture a training data set 1 and a training data set 2, then using the data set 1 for parameter training of a filter network FilterNet, using the data set 2 for parameter training of a sequencing network RankNet, and storing the trained network as an h5 file; and calling the trained double-layer depth residual error network, and realizing accurate retrieval of the similar three-dimensional CAD model through the entity view, the wire frame view, the engineering drawing and the engineering sketch of the three-dimensional CAD model.
2. The intelligent retrieval method for three-dimensional CAD models based on double-layer depth residual error network as claimed in claim 1, wherein the overall structure of the depth residual error network comprises a view preprocessing module, a residual error module and a post-processing module, wherein the residual error module O (x) is:
O(x)=max(0,F(x,{Wi})+Wsx)
where x is the output of the previous network, F (x, { W)i}) is residual learning, WiAs weight parameter of residual module, Wsx is an identity map, WsIs a square matrix for matching x and F (x, { W)i}).
3. The intelligent retrieval method for the three-dimensional CAD model based on the double-layer depth residual error network as recited in claim 1, wherein the solid view is defined as the view obtained after coloring the strip edge of the three-dimensional CAD model, the wire frame view is defined as the view obtained after eliminating the hidden line of the three-dimensional CAD model, and the three-dimensional CAD model based on the solid view and the wire frame view is characterized in that:
Figure FDA0003044278880000011
wherein,
Figure FDA0003044278880000012
Represents a given three-dimensional CAD model,
Figure FDA0003044278880000013
u is the total number of training data set models, and the class of the model is cw
Figure FDA0003044278880000018
C={c1,…,cw,…,cWW is the model category of training data aggregation,
Figure FDA0003044278880000014
representation model
Figure FDA0003044278880000015
The set of entity views of (a) is,
Figure FDA0003044278880000016
representation model
Figure FDA0003044278880000017
The number of the solid view and the wireframe view is n, and the pixel size is k × l.
4. The intelligent retrieval method for the three-dimensional CAD model based on the double-layer depth residual error network as recited in claim 1, wherein the preprocessing comprises scaling, gray level transformation and normalization, and the obtained entity view and wire frame view are scaled as follows:
Figure FDA0003044278880000021
wherein, [ x ]0 y0 1]Is a point on a solid view or a wire-frame view, and the pixel size of the view is k × l [, ]x1 y1 1]The corresponding point on the new view obtained after the view is scaled, and the pixel size of the new view is p × q;
the scaled view is subjected to gray scale transformation by a weighting method as follows:
Figure FDA0003044278880000022
v is a pixel matrix after view gray level conversion, VR、VG、VBPixel matrixes corresponding to three color channels of red, green and blue before view transformation are provided, and the dimensions of the pixel matrixes are p × q;
the data set was normalized as follows:
Figure FDA0003044278880000023
Figure FDA0003044278880000024
where m is 2 × n × U, V is a pixel matrix after view gray level conversion, and V is a total view numberiAnd the pixel matrix after the gray level transformation is the ith view in the view set.
5. The intelligent retrieval method for the three-dimensional CAD model based on the double-layer depth residual error network as recited in claim 1, characterized in that the preprocessed view is divided into a training data set 1 according to the type of the model, and the expression is as follows:
Figure FDA0003044278880000025
wherein the content of the first and second substances,
Figure FDA0003044278880000026
representing the model class as cwC, and the labels of all the views in the set are cw
6. The three-dimensional CAD model intelligent retrieval method based on the double-layer depth residual error network is characterized in that a data set 1 is imported into a filter network FilterNet and parameters of the network are trained, when the filter network FilterNet reaches a set training iteration number K, the training process is finished, the trained filter network FilterNet is stored as a FilterNet. h5 file, a softmax loss function is adopted in the filter network FilterNet parameter training process to evaluate errors between input and output, and the expression is as follows:
Figure FDA0003044278880000031
wherein n is the number of minimum batch input views,
Figure FDA0003044278880000032
enter the tag value, y, of the ith view of the view for the minimum batch(i)Forward propagating the output value of the view through the depth residual error network;
during the training period of the network parameter W, the improved depth residual error network adopts a random gradient descent algorithm to optimize a loss function, and the expression of the random gradient descent method is as follows:
Figure FDA0003044278880000033
Wi+1:=Wi+vi+1
wherein v isiAs a gradient descent factor, WiIs the weight parameter of the residual module, tau is the momentum, v is the momentum variable, mu is the weight loss, epsilon is the learning rate.
7. The intelligent retrieval method for the three-dimensional CAD model based on the double-layer depth residual error network as recited in claim 1, characterized in that the preprocessed view is divided into a training data set 2 according to the model to which the view belongs, and the expression is as follows:
Figure FDA0003044278880000034
wherein the content of the first and second substances,
Figure FDA0003044278880000035
representation model
Figure FDA0003044278880000036
A set of all views, and the labels of the views in the set are all
Figure FDA0003044278880000037
8. The three-dimensional CAD model intelligent retrieval method based on double-layer depth residual error network of claim 1 or 7, characterized in that, the sorting network RankNet network parameters are initialized by using the filter network FilterNet network parameters, the data set 2 is imported into the sorting network RankNet and the parameters of the network are trained; adopting a center-softmax loss function to evaluate the error between input and output in the training process of the RankNet network parameters of the sequencing network, wherein the expression is as follows:
Figure FDA0003044278880000041
wherein L iscAs a center loss function, LSIs the softmax loss function, n is the number of minimum batch input views, xiRepresenting the depth characteristic of the ith minimum batch input view of the RankNet full-connection layer output, wherein the view belongs to a three-dimensional CAD model
Figure FDA0003044278880000042
Is shown in the drawing (a) of (b),
Figure FDA0003044278880000043
representing three-dimensional CAD models
Figure FDA0003044278880000044
The center of the depth feature for all views, λ represents the weight between the center penalty and the softmax penalty; during training of the RankNet network parameters W of the sequencing network, a random gradient descent algorithm is adopted to optimize a loss function.
9. The three-dimensional CAD model intelligent retrieval method based on double-layer depth residual error network of claim 8, characterized in that when the average training accuracy of the ranking network RankNet for 200 continuous iterations is improved by less than threshold value γ, the training process is ended, and the trained ranking network RankNet is stored as a RankNet. h5 file; the average training accuracy improvement expression of the ranking network RankNet for continuous 200 iterations is as follows:
Figure FDA0003044278880000045
wherein A isiRepresenting the training accuracy of RankNet after the ith iteration; the training termination judgment conditions are as follows:
Figure FDA0003044278880000046
10. the intelligent retrieval method for the three-dimensional CAD model based on the double-layer depth residual error network as recited in claim 1, characterized in that, firstly, the input view is preprocessed, and then the trained double-layer depth residual error network calculates the similarity expression of the three-dimensional CAD model in the database through the input N views as follows:
Figure FDA0003044278880000047
Figure FDA0003044278880000048
wherein, FpAnd RsOutput matrices, W, for the ith view, for the Filter network Filter and the ranking network RankNet, respectivelypIs an identity matrix for matching FpAnd RsThe dimension (c) of (a) is,
Figure FDA0003044278880000052
it is shown that the matrix is dot-multiplied,
Figure FDA0003044278880000051
and pushing the M three-dimensional CAD models with the highest similarity with the input view as a retrieval result to the user.
CN201910401751.7A 2019-05-15 2019-05-15 Three-dimensional CAD model intelligent retrieval method based on double-layer depth residual error network Active CN110245249B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910401751.7A CN110245249B (en) 2019-05-15 2019-05-15 Three-dimensional CAD model intelligent retrieval method based on double-layer depth residual error network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910401751.7A CN110245249B (en) 2019-05-15 2019-05-15 Three-dimensional CAD model intelligent retrieval method based on double-layer depth residual error network

Publications (2)

Publication Number Publication Date
CN110245249A CN110245249A (en) 2019-09-17
CN110245249B true CN110245249B (en) 2021-08-13

Family

ID=67884019

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910401751.7A Active CN110245249B (en) 2019-05-15 2019-05-15 Three-dimensional CAD model intelligent retrieval method based on double-layer depth residual error network

Country Status (1)

Country Link
CN (1) CN110245249B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111914112B (en) * 2020-07-07 2023-05-23 西安交通大学 Part CAD model reuse method based on point cloud classification network
CN113609555B (en) * 2021-07-16 2023-10-20 黄河勘测规划设计研究院有限公司 Hydraulic metal structure design method based on big data technology
CN114119930B (en) * 2022-01-27 2022-10-28 广州中望龙腾软件股份有限公司 Three-dimensional model correction method and device based on deep learning and storage medium
CN115238591B (en) * 2022-08-12 2022-12-27 杭州国辰智企科技有限公司 Dynamic parameter checking and driving CAD automatic modeling engine system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122396A (en) * 2017-03-13 2017-09-01 西北大学 Three-dimensional model searching algorithm based on depth convolutional neural networks
CN108427729A (en) * 2018-02-23 2018-08-21 浙江工业大学 Large-scale picture retrieval method based on depth residual error network and Hash coding

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10678256B2 (en) * 2017-09-28 2020-06-09 Nec Corporation Generating occlusion-aware bird eye view representations of complex road scenes

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122396A (en) * 2017-03-13 2017-09-01 西北大学 Three-dimensional model searching algorithm based on depth convolutional neural networks
CN108427729A (en) * 2018-02-23 2018-08-21 浙江工业大学 Large-scale picture retrieval method based on depth residual error network and Hash coding

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A view-based 3D CAD model reuse framework enabling product lifecycle;Chao Zhang等;《ELSEVIER》;20181113;全文 *
基于残差网络的三维模型检索算法;李荫民;《计算机科学》;20190331;第46卷(第3期);全文 *

Also Published As

Publication number Publication date
CN110245249A (en) 2019-09-17

Similar Documents

Publication Publication Date Title
CN110245249B (en) Three-dimensional CAD model intelligent retrieval method based on double-layer depth residual error network
CN109960737B (en) Remote sensing image content retrieval method for semi-supervised depth confrontation self-coding Hash learning
CN108921822A (en) Image object method of counting based on convolutional neural networks
CN109241317A (en) Based on the pedestrian's Hash search method for measuring loss in deep learning network
CN109948029A (en) Based on the adaptive depth hashing image searching method of neural network
CN103942571B (en) Graphic image sorting method based on genetic programming algorithm
CN108446312B (en) Optical remote sensing image retrieval method based on deep convolution semantic net
CN111652273B (en) Deep learning-based RGB-D image classification method
US11841839B1 (en) Preprocessing and imputing method for structural data
CN110309835B (en) Image local feature extraction method and device
CN106339753A (en) Method for effectively enhancing robustness of convolutional neural network
CN107169106A (en) Video retrieval method, device, storage medium and processor
CN110019652A (en) A kind of cross-module state Hash search method based on deep learning
CN109871892A (en) A kind of robot vision cognitive system based on small sample metric learning
CN111178312B (en) Face expression recognition method based on multi-task feature learning network
CN107506362B (en) Image classification brain-imitation storage method based on user group optimization
CN113034506B (en) Remote sensing image semantic segmentation method and device, computer equipment and storage medium
Ma et al. Research on fish image classification based on transfer learning and convolutional neural network model
CN113920516A (en) Calligraphy character skeleton matching method and system based on twin neural network
CN109840550A (en) A kind of mobile subscriber's application preferences recognition methods based on deep neural network
Rika et al. A novel hybrid scheme using genetic algorithms and deep learning for the reconstruction of portuguese tile panels
CN102024029B (en) Local visual attention-based color image retrieving method
CN110110120B (en) Image retrieval method and device based on deep learning
CN113469238A (en) Self-supervision learning method for solving puzzle task based on CRNN
CN112434740A (en) Depth learning-based Qin tomb warriors fragment classification method

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