Mold surface curve recognition method, device, electronic equipment and storage medium
By extracting the spline curve grayscale image in the mold surface image and constructing a recognition model, the time-consuming and labor-intensive problem of the traditional mold surface curve recognition method is solved, the rapid and accurate recognition of the mold surface curve is achieved, and the recognition efficiency and efficiency of the stamping mold industry are improved. Intelligent development.
Patent Information
- Application Number
- CN202410900649.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-07-05
AI Technical Summary
The traditional mold surface curve type identification method relies on manual operation, which is time-consuming and labor-intensive, and cannot quickly and accurately identify the spline curve type on the stamping mold surface, which limits the digital and intelligent development of the stamping mold industry.
By obtaining the working area surface image of the mold to be tested and the mold surface training samples in the database, extract the spline grayscale image, and build a spline recognition model, using wavelet transform and Prewitt operator for preprocessing and edge detection, quickly Accurately identify spline types on mold surfaces.
It achieves rapid and accurate identification of mold surface curve types, improves the efficiency of mold surface curve identification, reduces the time and labor costs of manual identification, and promotes the digital and intelligent development of the stamping mold industry.
Smart Images

Figure CN118447018B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of stamping die surface recognition, and in particular to a die surface curve recognition method, device, electronic equipment and storage medium. Background Art
[0002] As the vehicle market's demand for vehicle models continues to increase towards personalization and flexibility, higher requirements are placed on body development and manufacturing companies. Flexible consumer demand has led to body design and manufacturing companies developing stamping die production lines towards flexibility and intelligence. Die surface recognition is one of the bottleneck issues that restrict the development of the stamping die industry towards digitalization and intelligence.
[0003] The spline curve on the surface of the stamping die can accurately describe the shape of the parts on the surface of the stamping die, ensure that the profile and contour of the die meet the design requirements, help improve the processing accuracy of the stamping die, and ensure the size and shape accuracy of the stamping parts. Different spline curve types can determine different stamping die profiles and processing accuracy. However, the traditional method of identifying the curve type of the die surface requires manual identification of the spline curve on the surface of the stamping die, and then identifying the type of the spline curve. The surface shape of each stamping die is different. Using manual methods to identify the curve type of the die surface for different types of stamping dies is time-consuming and labor-intensive.
[0004] Therefore, in order to solve the technical problem that the traditional mold surface curve type recognition method is time-consuming and labor-intensive due to the use of manual methods, a mold surface curve recognition method, device, electronic device and storage medium are urgently needed. Summary of the invention
[0005] The purpose of the present application is to provide a mold surface curve recognition method, device, electronic device and storage medium. By inputting the spline curve grayscale image extracted from the surface image of the working area into the spline curve recognition model, the spline curve recognition result of the mold to be tested is calculated, thereby solving the problem that the traditional mold surface curve type recognition method is time-consuming and labor-intensive due to the use of manual methods. The spline curve type of the stamping mold surface can be quickly and accurately identified, thereby improving the recognition efficiency of the mold surface curve.
[0006] In a first aspect, the present application provides a mold surface curve recognition method, comprising:
[0007] Obtaining a surface image of the working area of the mold to be tested, and obtaining a mold surface training sample in a database; the mold surface training sample includes a historical mold surface image and corresponding historical curve type information;
[0008] Extracting a spline curve of the working area surface from the working area surface image to obtain a spline curve grayscale image;
[0009] Constructing a spline curve recognition model according to the historical mold surface image and the corresponding historical curve type information;
[0010] The spline curve grayscale image is input into the spline curve recognition model, and the spline curve recognition result of the mold to be tested is calculated.
[0011] The mold surface curve recognition method provided in the present application can realize the recognition of the curve type of the mold surface. By inputting the spline curve grayscale image extracted from the surface image of the working area into the spline curve recognition model, the spline curve recognition result of the mold to be tested is calculated, thereby solving the problem that the traditional mold surface curve type recognition method is time-consuming and labor-intensive due to the use of manual methods. It can quickly and accurately identify the spline curve type of the stamping mold surface, thereby improving the recognition efficiency of the mold surface curve.
[0012] Optionally, extracting a spline curve of the working area surface from the working area surface image to obtain a spline curve grayscale image includes:
[0013] Preprocessing the working area surface image to obtain a preprocessed working area surface image;
[0014] Converting the preprocessed working area surface image into a working area surface grayscale image;
[0015] A wavelet transform algorithm is used to extract a spline curve from the grayscale image of the surface of the working area to obtain the spline curve grayscale image.
[0016] The mold surface curve recognition method provided in the present application can recognize the curve type of the mold surface. By converting the working area surface image into a grayscale image of the working area surface, the spline curve is identified from the grayscale image of the working area surface. This can quickly extract the spline curve of the mold surface to be tested, which is beneficial to improving the recognition efficiency of the mold surface curve.
[0017] Optionally, converting the preprocessed working area surface image into a working area surface grayscale image includes:
[0018] The Prewitt operator is used to perform edge detection on the surface image of the working area based on a preset grayscale mutation threshold interval to obtain a grayscale image of the surface of the working area.
[0019] Optionally, constructing a spline curve recognition model according to the historical mold surface image and the corresponding historical curve type information includes:
[0020] Extracting a historical spline curve grayscale image from the historical mold surface image;
[0021] The spline curve recognition model is constructed according to the historical spline curve grayscale image and the corresponding historical curve type information.
[0022] The mold surface curve recognition method provided in the present application can realize the recognition of the curve type of the mold surface. By extracting the historical spline curve grayscale image from the historical mold surface image, the accuracy of the spline curve recognition model can be improved, which is beneficial to improving the recognition efficiency of the mold surface curve.
[0023] Optionally, constructing the spline curve recognition model according to the historical spline curve grayscale image and the corresponding historical curve type information includes:
[0024] Constructing a preliminary spline curve recognition model corresponding to the historical spline curve grayscale image;
[0025] According to the historical spline curve grayscale image and the corresponding historical curve type information, the preliminary spline curve recognition model is trained to obtain a trained preliminary spline curve recognition model;
[0026] Based on the historical spline curve grayscale image and the corresponding historical curve type information, the trained preliminary spline curve recognition model is verified to obtain the spline curve recognition model.
[0027] Optionally, training the preliminary spline curve recognition model according to the historical spline curve grayscale image and the corresponding historical curve type information to obtain the trained preliminary spline curve recognition model includes:
[0028] Inputting the historical spline curve grayscale image into the preliminary spline curve recognition model to obtain a corresponding curve type output;
[0029] Determine a training error according to the historical spline curve grayscale image and the corresponding historical curve type information and the corresponding curve type output;
[0030] Based on the training error, the parameters of the preliminary spline curve recognition model are adjusted to obtain the optimal parameters, and the preliminary spline curve recognition model is optimized using the optimal parameters to obtain the trained preliminary spline curve recognition model.
[0031] Optionally, before inputting the historical spline curve grayscale image into the preliminary spline curve recognition model to obtain the corresponding curve type output, the method further includes:
[0032] Initialize the parameters of the preliminary spline curve recognition model.
[0033] In a second aspect, the present application provides a mold surface curve recognition device, comprising:
[0034] An acquisition module is used to acquire a surface image of a working area of a mold to be tested, and to acquire a mold surface training sample in a database; the mold surface training sample includes a historical mold surface image and corresponding historical curve type information;
[0035] An extraction module, used for extracting a spline curve of the working area surface from the working area surface image to obtain a spline curve grayscale image;
[0036] A construction module, used to construct a spline curve recognition model according to the historical mold surface image and the corresponding historical curve type information;
[0037] The calculation module is used to input the spline curve grayscale image into the spline curve recognition model to calculate and obtain the spline curve recognition result of the mold to be tested.
[0038] The mold surface curve recognition device, by inputting the spline curve grayscale image extracted from the working area surface image into the spline curve recognition model, calculates the spline curve recognition result of the mold to be tested, thereby solving the problem that the traditional mold surface curve type recognition method is time-consuming and labor-intensive due to the use of manual methods. It can quickly and accurately identify the spline curve type of the stamping mold surface, thereby improving the recognition efficiency of the mold surface curve.
[0039] In a third aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, it runs the steps in the mold surface curve recognition method described above.
[0040] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the mold surface curve recognition method described above are executed.
[0041] Beneficial effects: The mold surface curve recognition method, device, electronic device and storage medium provided in the present application, by inputting the spline curve grayscale image extracted from the surface image of the working area into the spline curve recognition model, calculates the spline curve recognition result of the mold to be tested, thereby solving the problem that the traditional mold surface curve type recognition method is time-consuming and labor-intensive due to the use of manual methods, and can quickly and accurately identify the spline curve type of the stamping mold surface, thereby improving the recognition efficiency of the mold surface curve. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A flowchart of a mold surface curve recognition method provided in an embodiment of the present application.
[0043] Figure 2A schematic diagram of the structure of a mold surface curve recognition device provided in an embodiment of the present application.
[0044] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0045] Explanation of reference numerals: 1. Acquisition module; 2. Extraction module; 3. Construction module; 4. Calculation module; 301. Processor; 302. Memory; 303. Communication bus. DETAILED DESCRIPTION
[0046] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0047] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0048] Please refer to Figure 1 , Figure 1 A mold surface curve recognition method in some embodiments of the present application is used to recognize the curve type of the mold surface, including the steps of:
[0049] Step S101, obtaining a surface image of the working area of the mold to be tested, and obtaining a mold surface training sample in a database; the mold surface training sample includes a historical mold surface image and corresponding historical curve type information;
[0050] Step S102, extracting a spline curve of the working area surface from the working area surface image to obtain a spline curve grayscale image;
[0051] Step S103, constructing a spline curve recognition model according to the historical mold surface image and the corresponding historical curve type information;
[0052] Step S104, inputting the spline curve grayscale image into the spline curve recognition model, and calculating and obtaining the spline curve recognition result of the mold to be tested.
[0053] The mold surface curve recognition method, by inputting the spline curve grayscale image extracted from the working area surface image into the spline curve recognition model, calculates the spline curve recognition result of the mold to be tested, solves the problem that the traditional mold surface curve type recognition method is time-consuming and labor-intensive due to the use of manual methods, can quickly and accurately identify the spline curve type of the stamping mold surface, and improves the recognition efficiency of the mold surface curve.
[0054] Specifically, in step S101, a surface image of the working area of the mold to be tested is obtained by a camera or other shooting tool, wherein the surface image of the working area refers to an image taken of the surface of the working area of the mold to be tested. The working area is the area in the stamping die where a force is applied to the workpiece to form the workpiece.
[0055] Specifically, a mold surface training sample is obtained from a database. The mold surface training sample includes a historical mold surface image and corresponding historical curve type information, wherein the historical mold surface image includes the historical records of the surface images of each stamping mold in the working area in the database, and the corresponding historical curve type information is the spline curve type information (including the shape, length and type of each spline curve) of the manually annotated surface image corresponding to these historical records. Any surface image of a stamping mold is extracted from the historical records in the database as a historical mold surface image, and the spline curve type information corresponding to the surface image is extracted as the historical curve type information, thereby extracting a large amount of data from the database to form a mold surface training sample, and the above-obtained data is set as a test set and a verification set for training the model, so that the trained model can identify the curve type of the mold surface. Among them, a spline curve refers to a mathematical curve used to define and describe the mold surface, contour, etc. during mold design, and the types of spline curves include Bezier curves, B-spline curves, and NURBS curves.
[0056] Specifically, in step S102, a spline curve of the working area surface is extracted from the working area surface image to obtain a spline curve grayscale image, including:
[0057] Preprocessing the working area surface image to obtain a preprocessed working area surface image;
[0058] Convert the preprocessed working area surface image into a grayscale image of the working area surface;
[0059] The wavelet transform algorithm is used to extract the spline curve from the grayscale image of the working area surface to obtain the spline curve grayscale image.
[0060] In step S102, the surface image of the working area is subjected to preprocessing operations such as denoising, cleaning and filtering (preprocessing is a prior art and will not be described in detail here) to obtain a preprocessed surface image of the working area.
[0061] The Prewitt operator is used to perform edge detection on the working area surface image through a preset grayscale mutation threshold interval, and the preprocessed working area surface image is converted into a grayscale image to obtain a grayscale image of the working area surface. Among them, the preset grayscale mutation threshold interval can be set according to actual needs, and is generally set to [-1,1]; the Prewitt operator is a prior art, and the process of using the Prewitt operator is not described in detail here. In addition, in other embodiments, other differential operator edge detection methods (such as Sobel operator, Kirsch operator and compass operator algorithms) or image grayscale processing methods (such as maximum method and average method) can be used to convert the preprocessed working area surface image into a grayscale image.
[0062] By using the wavelet transform algorithm and detecting the spline curve identification point features and their wavelet features in the grayscale image of the working area surface, the spline curve is extracted from the grayscale image of the working area surface to obtain the spline curve grayscale image.
[0063] Specifically, in step S103, a spline curve recognition model is constructed according to the historical mold surface image and the corresponding historical curve type information, including:
[0064] A historical spline curve grayscale image is extracted from the historical mold surface image;
[0065] A spline curve recognition model is constructed based on the historical spline curve grayscale image and the corresponding historical curve type information.
[0066] In step S103, a historical spline curve grayscale image is extracted from the historical mold surface image (the specific steps are shown in step S102) to construct a spline curve recognition model, so that the training data used in the spline curve recognition model during training and the test data input after training are consistent, thereby improving the accuracy of the spline curve recognition model. Among them, the spline curve recognition model can be, but is not limited to, a convolutional neural network (CNN) model or other model that can recognize curves (the convolutional neural network model or other model that can recognize curves is a prior art and is not described in detail here).
[0067] Specifically, in step S103, a spline curve recognition model is constructed according to the historical spline curve grayscale image and the corresponding historical curve type information, including:
[0068] Constructing a preliminary spline curve recognition model corresponding to the historical spline curve grayscale image;
[0069] According to the historical spline curve grayscale image and the corresponding historical curve type information, a preliminary spline curve recognition model is trained to obtain a trained preliminary spline curve recognition model;
[0070] Based on the historical spline curve grayscale image and the corresponding historical curve type information, the trained preliminary spline curve recognition model is verified to obtain the spline curve recognition model.
[0071] In step S103, a corresponding preliminary spline curve recognition model is constructed according to the historical spline curve grayscale image.
[0072] Specifically, in step S103, a preliminary spline curve recognition model is trained according to the historical spline curve grayscale image and the corresponding historical curve type information to obtain a trained preliminary spline curve recognition model, including:
[0073] Input the historical spline curve grayscale image into the preliminary spline curve recognition model to obtain the corresponding curve type output;
[0074] Determine the training error according to the historical spline curve grayscale image and the corresponding historical curve type information and the corresponding curve type output;
[0075] Based on the training error, the parameters of the preliminary spline curve recognition model are adjusted to obtain the optimal parameters, and the preliminary spline curve recognition model is optimized using the optimal parameters to obtain the trained preliminary spline curve recognition model.
[0076] In step S103, the historical curve type information corresponding to the historical spline curve grayscale image in the database is compared with the curve type output obtained by inputting the historical spline curve grayscale image into the preliminary spline curve recognition model to obtain a training error, such as the size of the difference between the historical curve type information and the corresponding data in the curve type output (for example, the length of the curve in the curve type output is inconsistent with the length of the corresponding curve in the historical curve type information), or the data of the curve type output is inconsistent with the corresponding related data in the historical curve type information (for example, the curve in the curve type output is not the same curve as the corresponding curve in the historical curve type information), etc. The training error is used to adjust the parameters of the preliminary spline curve recognition model. If the training error is the size of the difference between the historical curve type information and the corresponding data in the curve type output, the corresponding model parameters are modified to make the curve type output more accurate and obtain the optimal parameters. The preliminary spline curve recognition model is optimized through the optimal parameters to obtain the trained preliminary spline curve recognition model.
[0077] In step S103, the historical spline curve grayscale image not used for training in the database is input into the trained preliminary spline curve recognition model to obtain the corresponding curve type output, and the curve type output is used as verification data. The verification data and the historical curve type information corresponding to the historical spline curve grayscale image not used for training are compared to determine that the error is within an acceptable range (the acceptable error range is generally 0 to 3%, which can be modified according to actual needs), verify the accuracy of the trained preliminary spline curve recognition model, and obtain the spline curve recognition model.
[0078] Specifically, in step S103, before inputting the historical spline curve grayscale image into the preliminary spline curve recognition model to obtain the corresponding curve type output, the method further includes:
[0079] Initialize the parameters of the preliminary spline recognition model.
[0080] In step S103, before inputting data to train the model, the parameters of the preliminary spline curve recognition model are initialized to ensure that the model is in normal use.
[0081] Specifically, in step S104, the spline curve grayscale image is input into the spline curve recognition model. After calculation by the spline curve recognition model, the spline curve recognition result of the mold to be tested (including the shape, length and type of the spline curve) is obtained. Through the spline curve recognition result of the mold to be tested, it can be ensured that the surface and contour of the mold meet the design requirements, thereby improving the processing accuracy of the mold.
[0082] As can be seen from the above, the mold surface curve recognition method obtains the working area surface image of the mold to be tested, and obtains the mold surface training samples in the database, the mold surface training samples include historical mold surface images and corresponding historical curve type information, extracts the spline curve of the working area surface from the working area surface image, obtains the spline curve grayscale image, constructs a spline curve recognition model according to the historical mold surface image and the corresponding historical curve type information, inputs the spline curve grayscale image into the spline curve recognition model, and calculates the spline curve recognition result of the mold to be tested; thus, by inputting the spline curve grayscale image extracted from the working area surface image into the spline curve recognition model, the spline curve recognition result of the mold to be tested is calculated, which solves the problem that the traditional mold surface curve type recognition method is time-consuming and labor-intensive due to the use of manual methods, can quickly and accurately identify the spline curve type of the stamping mold surface, and improves the recognition efficiency of the mold surface curve.
[0083] refer to Figure 2 The present application provides a mold surface curve recognition device for identifying the type of curve on the mold surface, including:
[0084] Acquisition module 1 is used to acquire the surface image of the working area of the mold to be tested, and to acquire the mold surface training samples in the database; the mold surface training samples include historical mold surface images and corresponding historical curve type information;
[0085] Extraction module 2, used for extracting a spline curve of the working area surface from the working area surface image to obtain a spline curve grayscale image;
[0086] Construction module 3, used to construct a spline curve recognition model according to the historical mold surface image and the corresponding historical curve type information;
[0087] The calculation module 4 is used to input the spline curve grayscale image into the spline curve recognition model to calculate the spline curve recognition result of the mold to be tested.
[0088] The mold surface curve recognition device, by inputting the spline curve grayscale image extracted from the working area surface image into the spline curve recognition model, calculates the spline curve recognition result of the mold to be tested, thereby solving the problem that the traditional mold surface curve type recognition method is time-consuming and labor-intensive due to the use of manual methods. It can quickly and accurately identify the spline curve type of the stamping mold surface, thereby improving the recognition efficiency of the mold surface curve.
[0089] Specifically, when the acquisition module 1 is executed, a surface image of the working area of the mold to be tested is acquired through a camera or other shooting tool, wherein the surface image of the working area refers to an image taken of the surface of the working area of the mold to be tested. The working area is the area in the stamping die where a force is applied to the workpiece to form the workpiece.
[0090] Specifically, a mold surface training sample is obtained from a database. The mold surface training sample includes a historical mold surface image and corresponding historical curve type information, wherein the historical mold surface image includes the historical records of the surface images of each stamping mold in the working area in the database, and the corresponding historical curve type information is the spline curve type information (including the shape, length and type of each spline curve) of the manually annotated surface image corresponding to these historical records. Any surface image of a stamping mold is extracted from the historical records in the database as a historical mold surface image, and the spline curve type information corresponding to the surface image is extracted as the historical curve type information, thereby extracting a large amount of data from the database to form a mold surface training sample, and the above-obtained data is set as a test set and a verification set for training the model, so that the trained model can identify the curve type of the mold surface. Among them, a spline curve refers to a mathematical curve used to define and describe the mold surface, contour, etc. during mold design, and the types of spline curves include Bezier curves, B-spline curves, and NURBS curves.
[0091] Specifically, when the extraction module 2 extracts the spline curve of the working area surface from the working area surface image and obtains the spline curve grayscale image, it includes:
[0092] Preprocessing the working area surface image to obtain a preprocessed working area surface image;
[0093] Convert the preprocessed working area surface image into a grayscale image of the working area surface;
[0094] The wavelet transform algorithm is used to extract the spline curve from the grayscale image of the working area surface to obtain the spline curve grayscale image.
[0095] When the extraction module 2 is executed, it performs preprocessing operations such as denoising, cleaning and filtering on the surface image of the working area (preprocessing is a prior art and will not be described in detail here) to obtain a preprocessed surface image of the working area.
[0096] The Prewitt operator is used to perform edge detection on the working area surface image through a preset grayscale mutation threshold interval, and the preprocessed working area surface image is converted into a grayscale image to obtain a grayscale image of the working area surface. Among them, the preset grayscale mutation threshold interval can be set according to actual needs, and is generally set to [-1,1]; the Prewitt operator is a prior art, and the process of using the Prewitt operator is not described in detail here. In addition, in other embodiments, other differential operator edge detection methods (such as Sobel operator, Kirsch operator and compass operator algorithms) or image grayscale processing methods (such as maximum method and average method) can be used to convert the preprocessed working area surface image into a grayscale image.
[0097] By using the wavelet transform algorithm and detecting the spline curve identification point features and their wavelet features in the grayscale image of the working area surface, the spline curve is extracted from the grayscale image of the working area surface to obtain the spline curve grayscale image.
[0098] Specifically, when the extraction module 2 constructs the spline curve recognition model according to the historical mold surface image and the corresponding historical curve type information, it executes:
[0099] A historical spline curve grayscale image is extracted from the historical mold surface image;
[0100] A spline curve recognition model is constructed based on the historical spline curve grayscale image and the corresponding historical curve type information.
[0101] When the extraction module 2 is executed, the historical spline curve grayscale image is extracted from the historical mold surface image (the specific steps are shown in the steps executed by the extraction module 2) to construct a spline curve recognition model, so that the training data used in the spline curve recognition model during training and the test data input after training are consistent, thereby improving the accuracy of the spline curve recognition model. Among them, the spline curve recognition model can be, but is not limited to, a convolutional neural network (CNN) model or other model that can recognize curves (the convolutional neural network model or other model that can recognize curves is a prior art and is not described in detail here).
[0102] Specifically, when constructing a spline curve recognition model according to the historical spline curve grayscale image and the corresponding historical curve type information, the construction module 3 executes:
[0103] Constructing a preliminary spline curve recognition model corresponding to the historical spline curve grayscale image;
[0104] According to the historical spline curve grayscale image and the corresponding historical curve type information, a preliminary spline curve recognition model is trained to obtain a trained preliminary spline curve recognition model;
[0105] Based on the historical spline curve grayscale image and the corresponding historical curve type information, the trained preliminary spline curve recognition model is verified to obtain the spline curve recognition model.
[0106] When the construction module 3 is executed, a corresponding preliminary spline curve recognition model is constructed according to the historical spline curve grayscale image.
[0107] Specifically, when the construction module 3 trains the preliminary spline curve recognition model according to the historical spline curve grayscale image and the corresponding historical curve type information to obtain the trained preliminary spline curve recognition model, it executes:
[0108] Input the historical spline curve grayscale image into the preliminary spline curve recognition model to obtain the corresponding curve type output;
[0109] Determine the training error according to the historical spline curve grayscale image and the corresponding historical curve type information and the corresponding curve type output;
[0110] Based on the training error, the parameters of the preliminary spline curve recognition model are adjusted to obtain the optimal parameters, and the preliminary spline curve recognition model is optimized using the optimal parameters to obtain the trained preliminary spline curve recognition model.
[0111] When the construction module 3 is executed, the historical curve type information corresponding to the historical spline curve grayscale image in the database is compared with the curve type output obtained by inputting the historical spline curve grayscale image into the preliminary spline curve recognition model to obtain a training error, such as the size of the difference between the historical curve type information and the corresponding data in the curve type output (for example, the length of the curve outputted by the curve type is inconsistent with the length of the corresponding curve in the historical curve type information), or the data of the curve type output is inconsistent with the corresponding related data in the historical curve type information (for example, the curve outputted by the curve type is not the same curve as the corresponding curve in the historical curve type information), etc. The training error is used to adjust the parameters of the preliminary spline curve recognition model. If the training error is the size of the difference between the historical curve type information and the corresponding data in the curve type output, the corresponding model parameters are modified to make the curve type output more accurate, and the optimal parameters are obtained. The preliminary spline curve recognition model is optimized through the optimal parameters to obtain the trained preliminary spline curve recognition model.
[0112] When construction module 3 is executed, the historical spline curve grayscale image not used for training in the database is input into the trained preliminary spline curve recognition model to obtain the corresponding curve type output, and the curve type output is used as verification data. The verification data is compared with the historical curve type information corresponding to the historical spline curve grayscale image not used for training to determine that the error is within an acceptable range (the acceptable error range is generally 0 to 3%, which can be modified according to actual needs), and the accuracy of the trained preliminary spline curve recognition model is verified to obtain the spline curve recognition model.
[0113] Specifically, before inputting the historical spline curve grayscale image into the preliminary spline curve recognition model to obtain the corresponding curve type output, the construction module 3 executes:
[0114] Initialize the parameters of the preliminary spline recognition model.
[0115] When constructing module 3, before inputting data to train the model, the parameters of the preliminary spline curve recognition model are initialized to ensure that the model is in normal use.
[0116] Specifically, when the calculation module 4 is executed, the spline curve grayscale image is input into the spline curve recognition model. After calculation by the spline curve recognition model, the spline curve recognition result of the mold to be tested (including the shape, length and type of the spline curve) is obtained. Through the spline curve recognition result of the mold to be tested, it can be ensured that the surface and contour of the mold meet the design requirements and improve the processing accuracy of the mold.
[0117] As can be seen from the above, the mold surface curve recognition device obtains a working area surface image of the mold to be tested, and obtains a mold surface training sample in a database, the mold surface training sample includes a historical mold surface image and corresponding historical curve type information, extracts a spline curve of the working area surface from the working area surface image, obtains a spline curve grayscale image, constructs a spline curve recognition model according to the historical mold surface image and the corresponding historical curve type information, inputs the spline curve grayscale image into the spline curve recognition model, and calculates the spline curve recognition result of the mold to be tested; thus, by inputting the spline curve grayscale image extracted from the working area surface image into the spline curve recognition model, the spline curve recognition result of the mold to be tested is calculated, which solves the problem that the traditional mold surface curve type recognition method is time-consuming and labor-intensive due to the use of manual methods, can quickly and accurately identify the spline curve type of the stamping mold surface, and improves the recognition efficiency of the mold surface curve.
[0118] Please refer to Figure 3 , Figure 3 A structural schematic diagram of an electronic device provided in an embodiment of the present application, the present application provides an electronic device, including: a processor 301 and a memory 302, the processor 301 and the memory 302 are interconnected and communicate with each other through a communication bus 303 and / or other forms of connection mechanisms (not marked), the memory 302 stores a computer program executable by the processor 301, when the electronic device is running, the processor 301 executes the computer program to execute the mold surface curve recognition method in any optional implementation of the above embodiment, to achieve the following functions: obtaining a surface image of a working area of a mold to be tested, and obtaining a mold surface training sample in a database, the mold surface training sample including a historical mold surface image and corresponding historical curve type information, extracting a spline curve of the working area surface from the working area surface image, obtaining a spline curve grayscale image, constructing a spline curve recognition model according to the historical mold surface image and the corresponding historical curve type information, inputting the spline curve grayscale image into the spline curve recognition model, and calculating the spline curve recognition result of the mold to be tested.
[0119] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the mold surface curve recognition method in any optional implementation of the above embodiments is executed to achieve the following functions: obtaining a surface image of a working area of a mold to be tested, and obtaining a mold surface training sample in a database, the mold surface training sample including a historical mold surface image and corresponding historical curve type information, extracting a spline curve of the working area surface from the working area surface image, obtaining a spline curve grayscale image, constructing a spline curve recognition model based on the historical mold surface image and the corresponding historical curve type information, inputting the spline curve grayscale image into the spline curve recognition model, and calculating the spline curve recognition result of the mold to be tested. Among them, the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0120] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0121] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0122] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0123] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0124] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A mold surface curve recognition method, used to identify the curve type of the mold surface, characterized in that: Includes steps: Obtaining a surface image of the working area of the mold to be tested, and obtaining a mold surface training sample in a database; the mold surface training sample includes a historical mold surface image and corresponding historical curve type information; Extracting a spline curve of the working area surface from the working area surface image to obtain a spline curve grayscale image; Constructing a spline curve recognition model according to the historical mold surface image and the corresponding historical curve type information; Inputting the spline curve grayscale image into the spline curve recognition model, and calculating the spline curve recognition result of the mold to be tested; the spline curve recognition result includes the shape, length and type of the spline curve; Extracting a spline curve of the working area surface from the working area surface image to obtain a spline curve grayscale image includes: Preprocessing the working area surface image to obtain a preprocessed working area surface image; Using a differential operator edge detection method, based on a preset grayscale mutation threshold interval, edge detection is performed on the preprocessed working area surface image to obtain a grayscale image of the working area surface; By using a wavelet transform algorithm and detecting the spline curve identification point features and their wavelet features in the working area surface grayscale picture, a spline curve is extracted from the working area surface grayscale picture to obtain a spline curve grayscale picture.
2. The mold surface curve recognition method according to claim 1, characterized in that: According to the historical mold surface image and the corresponding historical curve type information, a spline curve recognition model is constructed, including: Extracting a historical spline curve grayscale image from the historical mold surface image; The spline curve recognition model is constructed according to the historical spline curve grayscale image and the corresponding historical curve type information.
3. The mold surface curve recognition method according to claim 2, characterized in that: According to the historical spline curve grayscale image and the corresponding historical curve type information, the spline curve recognition model is constructed, including: Constructing a preliminary spline curve recognition model corresponding to the historical spline curve grayscale image; According to the historical spline curve grayscale image and the corresponding historical curve type information, the preliminary spline curve recognition model is trained to obtain a trained preliminary spline curve recognition model; Based on the historical spline curve grayscale image and the corresponding historical curve type information, the trained preliminary spline curve recognition model is verified to obtain the spline curve recognition model.
4. The mold surface curve recognition method according to claim 3, characterized in that: According to the historical spline curve grayscale image and the corresponding historical curve type information, the preliminary spline curve recognition model is trained to obtain the trained preliminary spline curve recognition model, including: Inputting the historical spline curve grayscale image into the preliminary spline curve recognition model to obtain a corresponding curve type output; Determine a training error according to the historical spline curve grayscale image and the corresponding historical curve type information and the corresponding curve type output; Based on the training error, the parameters of the preliminary spline curve recognition model are adjusted to obtain the optimal parameters, and the preliminary spline curve recognition model is optimized using the optimal parameters to obtain the trained preliminary spline curve recognition model.
5. The mold surface curve recognition method according to claim 4, characterized in that: Before inputting the historical spline curve grayscale image into the preliminary spline curve recognition model to obtain the corresponding curve type output, the method further includes: Initialize the parameters of the preliminary spline curve recognition model.
6. A mold surface curve recognition device, used to identify the curve type of the mold surface, characterized in that: include: An acquisition module is used to acquire a surface image of a working area of the mold to be tested, and to acquire a mold surface training sample in a database; The mold surface training samples include historical mold surface images and corresponding historical curve type information; An extraction module, used for extracting a spline curve of the working area surface from the working area surface image to obtain a spline curve grayscale image; A construction module, used to construct a spline curve recognition model according to the historical mold surface image and the corresponding historical curve type information; A calculation module, used for inputting the spline curve grayscale image into the spline curve recognition model, and calculating and obtaining the spline curve recognition result of the mold to be tested; the spline curve recognition result includes the shape, length and type of the spline curve; The extraction module is used to extract the spline curve of the working area surface from the working area surface image to obtain the spline curve grayscale image, including: Preprocessing the working area surface image to obtain a preprocessed working area surface image; Using a differential operator edge detection method, based on a preset grayscale mutation threshold interval, edge detection is performed on the preprocessed working area surface image to obtain a grayscale image of the working area surface; By using a wavelet transform algorithm and detecting the spline curve identification point features and their wavelet features in the working area surface grayscale picture, a spline curve is extracted from the working area surface grayscale picture to obtain a spline curve grayscale picture.
7. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, it runs the steps in the mold surface curve recognition method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the mold surface curve recognition method according to any one of claims 1 to 5 are executed.
Citation Information
Patent Citations
Image edge detection method based on wavelet transformation
CN104424653A
Wind drift foreign matter recognition method and device based on semantic segmentation
CN112116594A
Road environment three-dimensional reconstruction method fusing high-precision map and laser sparse point cloud
CN117078870A
General basic model construction method for curve form recognition
CN117541841A
Contour line identification method and device based on bidirectional long short-term memory neural network
CN117765271A
