Weld laser line extraction method, apparatus, device, and medium
By preprocessing candidate laser weld seam images during the welding process and using a target laser line extraction model for image processing, combined with a hyperparameter optimization strategy, the problems of insufficient accuracy and robustness in weld seam laser line extraction are solved, and efficient and accurate weld seam tracking under complex welding conditions is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PIPECHINA SOUTH CHINA CO
- Filing Date
- 2026-05-18
- Publication Date
- 2026-07-14
AI Technical Summary
The accuracy and robustness of laser line extraction for weld seams in existing technologies are insufficient, affecting the accuracy of weld seam tracking and welding trajectory.
Candidate laser weld seam images obtained during the welding process are preprocessed, and a trained target laser line extraction model is used for image processing. The model hyperparameters are optimized through global and local search based on the target hyperparameter set. By combining the sample dataset, performance evaluation database, and iterative optimization strategy, the model hyperparameters are automatically configured to improve the accuracy of laser line extraction.
It significantly improves the accuracy and robustness of laser line extraction for weld seams, especially in complex welding conditions, enabling efficient and accurate determination of weld seam position and tracking control, thereby improving the precision of the welding process.
Smart Images

Figure CN122391658A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of artificial intelligence technology, and in particular to a method, apparatus, equipment and medium for laser line extraction of weld seams. Background Technology
[0002] Line laser tracking is one of the mainstream methods for weld seam tracking during the welding process. This method projects a line structured laser beam at a specific angle onto the weld seam area. Changes in the weld seam geometry cause deformation or displacement of the laser line. A camera acquires images of the laser line, and through image processing and geometric calibration, the positions of feature points such as the weld center, edges, or bevels are calculated in real time. The results are then fed back to the control system, enabling online weld seam tracking. Accurate extraction of the weld seam laser line is the core of weld seam tracking; its precision and robustness directly determine the accuracy of weld seam feature recognition and welding trajectory. Therefore, improving the accuracy of weld seam laser line extraction is crucial. Summary of the Invention
[0003] This invention provides a method, apparatus, equipment, and medium for extracting laser lines from weld seams, thereby improving the accuracy of laser line extraction from weld seams.
[0004] According to one aspect of the present invention, a method for laser line extraction of weld seams is provided, comprising: Acquire candidate line laser weld images corresponding to the target weld area, and preprocess the candidate line laser weld images to obtain the target line laser weld image; The target laser weld image is input into the trained target laser line extraction model to obtain the target laser line image corresponding to the target weld area; The model hyperparameters in the target laser line extraction model are determined based on the target hyperparameter set; the target hyperparameter set is determined by global and local search of the candidate hyperparameter set based on the sample dataset, performance evaluation database, surrogate model and iterative optimization strategy; the candidate hyperparameter set is determined by the hyperparameter solution space obtained by encoding the initial hyperparameters of the basic laser line extraction model.
[0005] According to another aspect of the present invention, a weld seam laser line extraction device is provided, comprising: The target line laser weld image determination module is used to acquire candidate line laser weld images during the welding process and preprocess the candidate line laser weld images to obtain the target line laser weld image. The target laser line image determination module is used to input the target laser weld image into the trained target laser line extraction model to obtain the target laser line image; The model hyperparameters in the target laser line extraction model are determined based on the target hyperparameter set; the target hyperparameter set is determined by global and local search of the candidate hyperparameter set based on the sample dataset, performance evaluation database, surrogate model and iterative optimization strategy; the candidate hyperparameter set is determined by the hyperparameter solution space obtained by encoding the initial hyperparameters of the basic laser line extraction model.
[0006] According to another aspect of the present invention, an electronic device is provided, comprising: One or more processors; Memory, used to store one or more programs; When one or more programs are executed by one or more processors, the one or more processors are able to execute any of the weld laser line extraction methods provided in the embodiments of the present invention.
[0007] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement any of the weld laser line extraction methods provided in the embodiments of the present invention.
[0008] This invention provides a laser line extraction scheme for weld seams. It involves acquiring candidate laser line weld seam images during the welding process and preprocessing these images to obtain target laser line weld seam images. These target laser line weld seam images are then input into a trained target laser line extraction model to obtain the target laser line image. The model hyperparameters in the target laser line extraction model are determined based on a target hyperparameter set. The target hyperparameter set is determined through global and local searches of the candidate hyperparameter set based on a sample dataset, a performance evaluation database, a surrogate model, and an iterative optimization strategy. The candidate hyperparameter set is determined by encoding the initial hyperparameters of the basic laser line extraction model to construct the hyperparameter solution space. The above scheme improves the accuracy of the determined target laser line image by inputting the preprocessed target laser weld image into the target laser line extraction model obtained after adjusting the model hyperparameters based on the target hyperparameter set. Simultaneously, by using a sample dataset, performance evaluation database, surrogate model, and iterative optimization strategy, a global and local search is performed on the candidate hyperparameter set to determine the target hyperparameter set, further improving the accuracy of the determined target hyperparameter set. Furthermore, the model hyperparameters in the basic laser line extraction model are adjusted based on the target hyperparameter set to obtain the target laser line extraction model. This achieves automated and efficient configuration of model hyperparameters, significantly improving the accuracy and robustness of target weld laser line extraction under complex welding conditions, and enhancing the accuracy of weld laser line extraction based on the target laser line extraction model.
[0009] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a flowchart of a weld laser line extraction method provided in Embodiment 1 of the present invention; Figure 2 This is a flowchart of a weld laser line extraction method provided in Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of the structure of a weld seam laser line extraction device provided in Embodiment 4 of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device for implementing a laser line extraction method for weld seams, provided in Embodiment 5 of the present invention. Detailed Implementation
[0012] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0013] Example 1 Figure 1 This is a flowchart of a weld laser line extraction method provided in Embodiment 1 of the present invention. This embodiment is applicable to the case of extracting laser line images from line laser weld images. The method can be executed by a weld laser line extraction device, which can be implemented in software and / or hardware and can be configured in an electronic device that carries the weld laser line extraction function.
[0014] See Figure 1 The method for extracting weld laser lines shown includes: S110. Acquire candidate line laser weld seam images during the welding process, and preprocess the candidate line laser weld seam images to obtain target line laser weld seam images.
[0015] Among them, the candidate line laser weld image refers to the image acquired after the workpiece weld area is irradiated by a line laser during the welding process. The target line laser weld image refers to the image obtained after preprocessing the candidate line laser weld image.
[0016] For example, the candidate line laser weld image can be preprocessed by denoising, enhancement, and normalization to obtain the target line laser weld image.
[0017] S120. Input the target laser weld image into the trained target laser line extraction model to obtain the target laser line image.
[0018] The target laser line extraction model can be used to extract the target laser line image from the target laser weld image. For example, the target laser weld image is input into the target laser line extraction model, and the corresponding target laser line image is output. The target laser line image refers to the laser line image within the target laser weld image.
[0019] For example, the model hyperparameters in the target laser line extraction model are determined based on the target hyperparameter set; the target hyperparameter set is determined by global and local search of the candidate hyperparameter set based on the sample dataset, performance evaluation database, surrogate model and iterative optimization strategy; the candidate hyperparameter set is determined by the hyperparameter solution space obtained by encoding the initial hyperparameters of the basic laser line extraction model.
[0020] The target hyperparameter set can be understood as a hyperparameter configuration scheme used to adjust the model hyperparameters. In other words, the target hyperparameter set refers to the hyperparameter configuration scheme corresponding to the model hyperparameters in the target laser line extraction model.
[0021] The proxy model can include a global proxy model and a local proxy model. The iterative optimization strategy can include a global iterative optimization strategy and a local iterative optimization strategy.
[0022] For example, the target hyperparameter set is selected from a target database determined based on the sample dataset and the candidate hyperparameter set. The candidate hyperparameter set is determined based on the hyperparameter solution space of the basic laser line extraction model.
[0023] For example, the model hyperparameters in the basic laser line extraction model can be adjusted according to the target hyperparameter set to obtain the target laser line extraction model; the target laser line extraction model can be trained according to the sample training set in the sample dataset to obtain the trained target laser line extraction model.
[0024] Specifically, the training laser weld seam images from the sample training set are input into the target laser line extraction model to obtain the predicted target laser line image. The target loss value is determined based on the predicted target laser line image and the actual training laser line images. The target laser line extraction model is then trained using the target loss value to obtain a trained target laser line extraction model. Here, the predicted target laser line image refers to the laser line prediction image output by the target laser line extraction model during training. The target loss value refers to the model loss value corresponding to the target laser line extraction model.
[0025] For example, when the number of training iterations of the target laser line extraction model reaches a preset second training iteration threshold, training is stopped, and a trained target laser line extraction model is obtained. This embodiment of the invention does not limit the size of the preset second training iteration threshold; it can be set by a technician based on experience or needs. For example, the preset second training iteration threshold can be 100.
[0026] For example, the weld position in the corresponding target weld area can be determined based on the target laser line image, and the corresponding weld tracking control command can be determined.
[0027] This invention provides a laser line extraction scheme for weld seams. It involves acquiring candidate laser line weld seam images during the welding process and preprocessing these images to obtain target laser line weld seam images. These target laser line weld seam images are then input into a trained target laser line extraction model to obtain the target laser line image. The model hyperparameters in the target laser line extraction model are determined based on a target hyperparameter set. The target hyperparameter set is determined through global and local searches of the candidate hyperparameter set based on a sample dataset, a performance evaluation database, a surrogate model, and an iterative optimization strategy. The candidate hyperparameter set is determined by encoding the initial hyperparameters of the basic laser line extraction model to construct the hyperparameter solution space. The above scheme improves the accuracy of the determined target laser line image by inputting the preprocessed target laser weld image into the target laser line extraction model obtained after adjusting the model hyperparameters based on the target hyperparameter set. Simultaneously, by using a sample dataset, performance evaluation database, surrogate model, and iterative optimization strategy, a global and local search is performed on the candidate hyperparameter set to determine the target hyperparameter set, further improving the accuracy of the determined target hyperparameter set. Furthermore, the model hyperparameters in the basic laser line extraction model are adjusted based on the target hyperparameter set to obtain the target laser line extraction model. This achieves automated and efficient configuration of model hyperparameters, significantly improving the accuracy and robustness of target weld laser line extraction under complex welding conditions, and enhancing the accuracy of weld laser line extraction based on the target laser line extraction model.
[0028] Example 2 Figure 2 This is a flowchart of a weld laser line extraction method provided in Embodiment 2 of the present invention. Based on the above embodiments, this embodiment adds the following steps: "Obtaining a sample dataset and initial hyperparameters of the basic laser line extraction model, and constructing a hyperparameter solution space based on the initial hyperparameters; wherein, the sample dataset includes a sample training set and a sample validation set; the sample training set includes training laser weld images and training laser line real images; the sample validation set includes validation laser weld images and validation laser line real images; determining candidate hyperparameter groups according to a preset combination generation method and the hyperparameter solution space, and selecting a preset number of initial hyperparameter groups from the candidate hyperparameter groups; constructing the initial hyperparameter..." An initial laser line extraction model corresponding to each group is generated and trained using a sample training set. A verification laser weld image is input into the trained initial laser line extraction model to obtain an initial verification laser line prediction image. Based on the actual verification laser line image and the initial verification laser line prediction image, the initial extraction accuracy corresponding to the corresponding initial hyperparameter group is determined. The initial hyperparameter group and the initial extraction accuracy are stored in a performance evaluation database to obtain an initial database. The initial database is iteratively updated based on candidate hyperparameter groups to obtain a target database. The target hyperparameter group is then determined from the target database to improve the determination mechanism. It should be noted that for parts not detailed in this embodiment, please refer to the descriptions in other embodiments.
[0029] See Figure 2 The method for extracting weld laser lines shown includes: S210. Obtain the sample dataset and the initial hyperparameters of the basic laser line extraction model, and construct the hyperparameter solution space based on the initial hyperparameters.
[0030] For example, the sample dataset includes a sample training set and a sample validation set; the sample training set includes training line laser weld seam images and training laser line real images; the sample validation set includes validation line laser weld seam images and validation laser line real images.
[0031] The training set can be used to train the laser line extraction model. The validation set can be used to determine the extraction accuracy of the trained laser line extraction model.
[0032] In this context, the training line laser weld image refers to the sample line laser weld image input into the laser line extraction model during training. The training laser line real image refers to the laser line label image corresponding to the training line laser weld image. The validation line laser weld image refers to the sample line laser weld image input into the laser line extraction model during validation. The validation laser line real image refers to the laser line label image corresponding to the validation line laser weld image.
[0033] The basic laser line extraction model refers to the laser line extraction model without adjusted hyperparameters. For example, the basic laser line extraction model can use an image segmentation network based on a convolutional neural network, such as the U-Net network. Initial hyperparameters refer to the hyperparameter categories and corresponding hyperparameter values corresponding to the model structure of the basic laser line extraction model. The hyperparameter values can be the possible values corresponding to the hyperparameter categories and can be set by technicians according to their needs or experience. For example, if the laser line extraction model structure includes the number of convolutional layer channels, convolutional kernel size, and activation functions, then the initial hyperparameters can include 16, 32, or 64 convolutional layer channels; 1×1, 3×3, 5×5, or 7×7 convolutional kernel sizes; and activation functions such as Sigmoid (S-shaped growth curve), ReLU (linear rectified function), and Tanh (hyperbolic tangent function).
[0034] The hyperparameter solution space refers to the global solution space corresponding to the initial hyperparameters of the basic laser line extraction model.
[0035] For example, the hyperparameter values in the initial hyperparameters are encoded to obtain the encoded initial hyperparameters; the hyperparameter solution space is constructed based on the encoded initial hyperparameters.
[0036] For example, the number of channels in a convolutional layer is directly encoded; for instance, when the number of channels is set to 16, 32, and 64, the encoded values are 16, 32, and 64, respectively. For the kernel size, index encoding is performed based on a preset size set; for example, kernel sizes such as 1×1, 3×3, 5×5, and 7×7 are encoded as 0, 1, 2, and 3, respectively. For activation functions, category encoding is performed according to a preset function list; for example, Sigmoid, ReLU, and Tanh are mapped to 0, 1, and 2, respectively. The preset size set refers to a pre-defined list used to record the encoded values corresponding to different kernel sizes. The preset function list refers to a pre-defined list used to record the encoded values corresponding to different activation functions.
[0037] Continuing the previous example, for any hyperparameter category, based on the encoded values corresponding to each hyperparameter value under that category, determine the upper and lower bound encoded values for that hyperparameter category; based on the upper bound encoded values for each hyperparameter category, determine the upper bound vector of the hyperparameter solution space; based on the lower bound encoded values for each hyperparameter category, determine the lower bound vector of the hyperparameter solution space; and based on the upper and lower bound vectors of the hyperparameter solution space, determine the hyperparameter solution space. Here, the upper bound encoded value refers to the maximum encoded value under any hyperparameter category; correspondingly, the lower bound encoded value refers to the minimum encoded value under any hyperparameter category. The upper bound vector can be understood as the set of upper bound encoded values corresponding to different hyperparameter categories. The lower bound vector can be understood as the set of lower bound encoded values corresponding to different hyperparameter categories. The hyperparameter solution space includes the upper and lower bound vectors for each hyperparameter category.
[0038] Specifically, the training set, validation set, and initial hyperparameters are obtained, and the hyperparameter solution space is constructed based on the initial hyperparameters.
[0039] S220. Based on the preset combination generation method and hyperparameter solution space, determine the candidate hyperparameter group, and select a preset number of initial hyperparameter groups from the candidate hyperparameter group.
[0040] The preset combination generation method refers to a pre-set method used to generate candidate hyperparameter sets based on the hyperparameter solution space. This embodiment of the invention does not impose any limitations on the setting of the preset combination generation method; it can be set by those skilled in the art based on experience or needs.
[0041] Here, a candidate hyperparameter set refers to a combination of hyperparameters generated based on a preset combination generation method and a hyperparameter solution space. A candidate hyperparameter set can be understood as an optional hyperparameter configuration scheme corresponding to the basic laser line extraction model. It should be noted that a candidate hyperparameter set includes any encoded value corresponding to each hyperparameter category; that is, the number of encoded values under a hyperparameter category is one.
[0042] In this embodiment of the invention, the setting of preset values is not limited in any way. These values can be set by technicians based on experience or needs, or determined through repeated experiments. The initial hyperparameter set refers to the hyperparameter set obtained by sampling the candidate hyperparameter sets.
[0043] Specifically, based on a preset combination generation method, multiple candidate hyperparameter sets are generated according to the hyperparameter solution space; the candidate hyperparameter sets are sampled to obtain a preset number of initial hyperparameter sets.
[0044] S230. Construct the initial laser line extraction model corresponding to the initial hyperparameter set, and train the initial laser line extraction model based on the sample training set.
[0045] The initial laser line extraction model refers to the laser line extraction model obtained by adjusting the model hyperparameters in the basic laser line extraction model based on the initial hyperparameter set. It should be noted that there is a one-to-one correspondence between the initial hyperparameter set and the initial laser line extraction model; that is, one initial hyperparameter set corresponds to one initial laser line extraction model.
[0046] For example, for any initial hyperparameter set, based on the basic laser line extraction model and the initial hyperparameter set, the initial laser line extraction model corresponding to the initial hyperparameter set is determined; the initial laser line extraction model corresponding to the initial hyperparameter set is trained according to the sample training set to obtain the trained initial laser line extraction model.
[0047] For example, the training laser weld seam image is input into the initial laser line extraction model to be trained, resulting in an initial training laser line prediction image. Based on the training laser line real image and the initial training laser line prediction image, the initial loss value of the initial laser line extraction model is determined. The initial laser line extraction model is then trained using the initial loss value to obtain a trained initial laser line extraction model. Here, the initial training laser line prediction image refers to the laser line prediction image output by the initial laser line extraction model during training. The initial loss value refers to the model loss value of the initial laser line extraction model.
[0048] For example, when the number of training iterations of the initial laser line extraction model reaches a preset first training iteration threshold, training is stopped, and a trained initial laser line extraction model is obtained. This embodiment of the invention does not impose any limitation on the size of the preset first training iteration threshold; it can be set by a technician based on experience or needs, or determined through repeated experiments. For example, the preset first training iteration threshold can be 5.
[0049] S240. Input the verification line laser weld image into the trained initial laser line extraction model to obtain the initial verification laser line prediction image. Based on the verification laser line real image and the initial verification laser line prediction image, determine the initial extraction accuracy corresponding to the corresponding initial hyperparameter set.
[0050] The initial validation laser line prediction image refers to the laser line prediction image output by the initial laser line extraction model during validation. The initial extraction accuracy can be used to quantify the model performance of the initial laser line extraction model corresponding to the initial hyperparameter set. The initial extraction accuracy can be understood as the accuracy of the laser line prediction image output by the initial laser line extraction model. It should be noted that the higher the initial extraction accuracy, the better the model performance of the corresponding initial laser line extraction model.
[0051] For example, the verification line laser weld image is input into the trained initial laser line extraction model to obtain the initial verification laser line prediction image; based on the initial verification laser line prediction image and the verification laser line real image, the initial extraction accuracy corresponding to the initial laser line extraction model is determined, which is the initial extraction accuracy corresponding to the corresponding initial hyperparameter set.
[0052] S250. Store the initial hyperparameter set and initial extraction accuracy in the performance evaluation database to obtain the initial database. Then, iteratively update the initial database according to the candidate hyperparameter set to obtain the target database.
[0053] The performance evaluation database is a pre-set database used to store hyperparameter sets and their corresponding extraction accuracies. The initial database is the database obtained after storing the initial hyperparameter sets and their corresponding initial extraction accuracies in the performance evaluation database.
[0054] The target database refers to the database obtained after iteratively updating the initial database. The target database stores all possible candidate hyperparameter sets that could serve as the target hyperparameter set.
[0055] In an optional embodiment, the initial database is iteratively updated according to the candidate hyperparameter groups to obtain the target database, including: for any iterative update process, determining the current global proxy model corresponding to the current iteration based on the current hyperparameter groups already stored in the database to be updated in the current iteration, the corresponding current extraction accuracy, and the preset initial global proxy model; determining non-current hyperparameter groups from the candidate hyperparameter groups, and determining the global hyperparameter group from the non-current hyperparameter groups based on the non-current hyperparameter groups and the current global proxy model; constructing the global laser line extraction model corresponding to the global hyperparameter group, and training the global laser line extraction model according to the sample training set; and verifying the laser weld seam image. The input is fed into the trained global laser line extraction model to obtain a globally verified laser line prediction image. Based on the verified laser line real image and the globally verified laser line prediction image, the global extraction accuracy of the corresponding global laser line extraction model is determined. The global hyperparameter set and the global extraction accuracy are stored in the database to be updated, resulting in the intermediate database obtained in the current iteration. Based on the intermediate database and the candidate hyperparameter set, the local hyperparameter set is determined, and the local extraction accuracy corresponding to the local hyperparameter set is determined. The local hyperparameter set and the corresponding local extraction accuracy are stored in the intermediate database, resulting in the current database obtained in the current iteration. The current database obtained in the last iteration is used as the target database.
[0056] Here, "current iteration" refers to the iterative update process at the current moment. The current iteration can be understood as the current iteration. "Database to be updated" refers to the database that needs to be updated in the current iteration. For example, if the current iteration is the first iteration, the database to be updated is the initial database; if the current iteration is not the first iteration, the database to be updated is the current database obtained from the previous iteration. The previous iteration refers to the iteration update process immediately preceding the current iteration.
[0057] Here, the current hyperparameter set refers to the hyperparameter set stored in the database to be updated. The current extraction accuracy refers to the extraction accuracy corresponding to the current hyperparameter set in the database to be updated. The initial global proxy model refers to a pre-set global proxy model. This embodiment of the invention does not impose any limitations on the initial global proxy model; it can be set by technical personnel based on experience or needs. For example, the initial global proxy model can be a radial basis function model or a Gaussian process model.
[0058] Here, the current global proxy model refers to the trained initial global proxy model corresponding to the current iteration. For example, the initial global proxy model is trained based on all the current hyperparameter sets and the corresponding current extraction accuracy stored in the database to be updated in the current iteration to obtain the current global proxy model.
[0059] Specifically, the current hyperparameter set is input into the initial global proxy model, and the current prediction accuracy corresponding to the current hyperparameter set is output. Based on the current prediction accuracy and the current extraction accuracy, the global proxy loss value is determined. The initial global proxy model is then trained using the global proxy loss value to obtain the trained initial global proxy model, which is the current global proxy model. Here, the current prediction accuracy refers to the prediction extraction accuracy output during the training of the initial global proxy model. The global proxy loss value refers to the model loss value corresponding to the initial global proxy model.
[0060] The non-current hyperparameter group refers to candidate hyperparameter groups other than the current hyperparameter group; that is, candidate hyperparameter groups not stored in the database to be updated are considered non-current hyperparameter groups. The global hyperparameter group refers to candidate hyperparameter groups selected from the non-current hyperparameter groups based on the current global proxy model.
[0061] The global laser line extraction model refers to the laser line extraction model obtained by adjusting the model hyperparameters in the basic laser line extraction model based on a global hyperparameter set. It should be noted that there is a one-to-one correspondence between the global hyperparameter set and the global laser line extraction model; that is, one global hyperparameter set corresponds to one global laser line extraction model.
[0062] The global validation laser line prediction image refers to the laser line prediction image output by the global laser line extraction model during validation. Global extraction accuracy can be used to quantify the model performance of the global laser line extraction model corresponding to the global hyperparameter set. Global extraction accuracy can be understood as the accuracy of the laser line prediction image output by the global laser line extraction model. It should be noted that the higher the global extraction accuracy, the better the model performance of the corresponding global laser line extraction model.
[0063] For example, for any set of global hyperparameters, based on the basic laser line extraction model and the set of global hyperparameters, the global laser line extraction model corresponding to the set of global hyperparameters is determined; the global laser line extraction model corresponding to the set of global hyperparameters is trained according to the sample training set; the global extraction accuracy of the trained global laser line extraction model is determined according to the sample validation set, that is, the global extraction accuracy corresponding to the corresponding set of global hyperparameters is determined.
[0064] For example, the training line laser weld seam image is input into the global laser line extraction model to be trained to obtain the global training laser line prediction image; based on the training laser line real image and the global training laser line prediction image, the global loss value of the global laser line extraction model is determined; the global laser line extraction model is trained based on the global loss value to obtain the trained global laser line extraction model. Here, the global training laser line prediction image refers to the laser line prediction image output by the global laser line extraction model during training. The global loss value refers to the model loss value of the global laser line extraction model.
[0065] For example, when the number of training iterations of the global laser line extraction model reaches a preset first training iteration threshold, training is stopped, and a trained global laser line extraction model is obtained.
[0066] For example, the verification line laser weld image is input into the trained global laser line extraction model to obtain the global verification laser line prediction image; based on the global verification laser line prediction image and the verification laser line real image, the global extraction accuracy of the global laser line extraction model is determined.
[0067] The intermediate database refers to the database obtained after storing the global hyperparameter set and the corresponding global extraction accuracy into the database to be updated.
[0068] The local hyperparameter set refers to the candidate hyperparameter set selected from the non-intermediate hyperparameter set based on the current local surrogate model. Local extraction accuracy can be used to quantify the model performance of the local laser line extraction model corresponding to the local hyperparameter set. Local extraction accuracy can be understood as the accuracy of the laser line prediction image output by the local laser line extraction model. It should be noted that the higher the local extraction accuracy, the better the model performance of the corresponding local laser line extraction model.
[0069] For example, determining the local extraction accuracy corresponding to a local hyperparameter set includes: constructing a local laser line extraction model corresponding to the local hyperparameter set; and determining the local extraction accuracy corresponding to the corresponding local hyperparameter set based on the sample dataset and the local laser line extraction model.
[0070] The local laser line extraction model refers to a laser line extraction model obtained by adjusting the model hyperparameters in the basic laser line extraction model based on a set of local hyperparameters. It should be noted that there is a one-to-one correspondence between the set of local hyperparameters and the local laser line extraction model; that is, one set of local hyperparameters corresponds to one local laser line extraction model.
[0071] For example, for any set of local hyperparameters, based on the basic laser line extraction model and the set of local hyperparameters, the local laser line extraction model corresponding to the set of local hyperparameters is determined; the local laser line extraction model corresponding to the set of local hyperparameters is trained according to the sample training set; and the local extraction accuracy of the trained local laser line extraction model is determined according to the sample validation set.
[0072] For example, a training line laser weld image is input into the local laser line extraction model to be trained, resulting in a locally trained laser line prediction image. Based on the training laser line image and the locally trained laser line prediction image, the local loss value of the local laser line extraction model is determined. The local laser line extraction model is then trained using the local loss value to obtain a trained local laser line extraction model. Here, the locally trained laser line prediction image refers to the laser line prediction image output by the local laser line extraction model during training. The local loss value refers to the model loss value of the local laser line extraction model.
[0073] For example, when the number of training iterations of the local laser line extraction model reaches a preset first training iteration threshold, training is stopped, and a trained local laser line extraction model is obtained.
[0074] For example, the verification laser weld image is input into a trained local laser line extraction model to obtain a local verification laser line prediction image; based on the local verification laser line prediction image and the verification laser line real image, the local extraction accuracy of the local laser line extraction model is determined. Here, the local verification laser line prediction image refers to the laser line prediction image output by the local laser line extraction model during verification.
[0075] The current database obtained in the current iteration refers to the database obtained after storing the local hyperparameter set and the corresponding local extraction accuracy in the intermediate database. In other words, the current database obtained in the current iteration can be understood as the latest database obtained after the current iteration update process is completed.
[0076] The current database obtained from the last iteration refers to the database obtained after the last iteration update process is completed.
[0077] Understandably, for any given iteration, based on the current hyperparameter set and current extraction accuracy in the database to be updated, the current global proxy model is determined. Based on the non-current hyperparameter set and the current global proxy model, the global hyperparameter set is determined. The global laser line extraction model is trained using the sample training set. Based on the sample validation set and the trained global laser line extraction model, the global extraction accuracy corresponding to the respective global hyperparameter set is determined. The global hyperparameter set and global extraction accuracy are stored in the database to be updated, resulting in an intermediate database. Based on the intermediate database and candidate hyperparameter sets, local hyperparameter sets are determined, and the corresponding local extraction accuracy is determined. The local hyperparameter set and local extraction accuracy are then stored in the intermediate database, resulting in the current database obtained in the current iteration. The last iteration... Using the current database obtained from the iteration as the target database, the accuracy of updating the database to be updated based on the global and local hyperparameter sets obtained from the current iteration is improved. This improves the accuracy of the target database obtained from the iterative update, and in turn, improves the accuracy of subsequent adjustments to the model hyperparameters based on the target hyperparameter sets selected from the target database. This also improves the accuracy of determining the target laser line image based on the adjusted target laser line extraction model, thus improving the model performance of the target laser line extraction model. In other words, by introducing the current global proxy model and the current local proxy model, the iterative update of the initial database is achieved. This ensures both search efficiency and global exploration capability as well as local fine-tuning capability, so as to obtain a target laser line extraction model with higher accuracy and stronger robustness in complex welding environments.
[0078] In an optional embodiment, determining the global hyperparameter group from the non-current hyperparameter group based on the non-current hyperparameter group and the current global proxy model includes: determining the corresponding non-current evaluation results based on the non-current hyperparameter group and the current global proxy model, and generating an initial population including the non-current hyperparameter group and the corresponding non-current evaluation results; determining the current mutation vector corresponding to the non-current hyperparameter group, and determining the corresponding current test vector based on the non-current hyperparameter group and the corresponding current mutation vector; updating the initial population based on the non-current hyperparameter group, the non-current evaluation results, the current test vector, and the current global proxy model to obtain a reference population, and clustering the reference hyperparameter groups in the reference population based on a preset clustering algorithm to obtain a cluster set; determining the clustering hyperparameter group corresponding to the cluster set based on the reference evaluation results corresponding to the reference hyperparameter groups in the cluster set, and determining the global hyperparameter group based on the clustering hyperparameter group.
[0079] Here, "non-current evaluation results" refers to the performance evaluation results corresponding to the non-current hyperparameter set output by the current global proxy model. For example, a non-current evaluation result can be understood as the extraction accuracy corresponding to the non-current hyperparameter set predicted by the current global proxy model. The initial population refers to the population that includes the non-current hyperparameter set and the corresponding non-current evaluation results.
[0080] For example, for any non-current hyperparameter group, the non-current hyperparameter group is input into the current global proxy model to obtain the non-current evaluation result corresponding to the non-current hyperparameter group.
[0081] Here, the current mutation vector refers to the mutation vector obtained by processing non-current hyperparameter groups using the global mutation operator based on the differential evolution algorithm. The global mutation operator can be used to determine the current mutation vector corresponding to non-current hyperparameter groups.
[0082] For example, if the global mutation operator includes a random basis vector single-difference mutation operator (DE / rand / 1), a random basis vector double-difference mutation operator (DE / rand / 2), and a current-to-best mutation operator (DE / current-to-best / 1), for any non-current hyperparameter group, the first mutation vector corresponding to the non-current hyperparameter group is determined according to the random basis vector single-difference mutation operator; the second mutation vector corresponding to the non-current hyperparameter group is determined according to the random basis vector double-difference mutation operator; the third mutation vector corresponding to the non-current hyperparameter group is determined according to the current-to-best mutation operator; and a current mutation vector including the first mutation vector, the second mutation vector, and the third mutation vector is generated.
[0083] Here, the current experimental vector refers to the experimental vector determined based on the non-current hyperparameter set and the current mutation vector. The current experimental vector can be understood as a hyperparameter set. For example, for any non-current hyperparameter set, based on the crossover operator, the current experimental vector corresponding to the non-current hyperparameter set is determined according to the non-current hyperparameter set and the current mutation vector corresponding to the non-current hyperparameter set.
[0084] Continuing from the previous example, based on the crossover operator of the differential evolution algorithm, the first experimental vector corresponding to the non-current hyperparameter group is determined according to the non-current hyperparameter group and the first mutation vector; based on the crossover operator of the differential evolution algorithm, the second experimental vector corresponding to the non-current hyperparameter group is determined according to the non-current hyperparameter group and the second mutation vector; based on the crossover operator, the third experimental vector corresponding to the non-current hyperparameter group is determined according to the non-current hyperparameter group and the third mutation vector; and a current experimental vector including the first experimental vector, the second experimental vector, and the third experimental vector is generated.
[0085] For example, the global mutation operator and crossover operator based on the differential evolution algorithm determine the corresponding current mutation vector and current trial vector according to the non-current hyperparameter set.
[0086] The reference population refers to the new population obtained after updating the initial population. This invention does not limit the preset clustering algorithm; it can be set by technicians based on experience or needs, or determined through extensive experimentation. For example, the preset clustering algorithm can be a density-based clustering algorithm, such as the DBSCAN algorithm.
[0087] Here, the reference hyperparameter set refers to the hyperparameter set included in the reference population. The cluster set refers to the set obtained after clustering the reference hyperparameter sets. The reference evaluation result refers to the evaluation result corresponding to the reference hyperparameter set included in the reference population. The cluster hyperparameter set refers to the reference hyperparameter set corresponding to the largest reference evaluation result in any cluster set.
[0088] For example, for any cluster set, the reference evaluation results corresponding to each reference hyperparameter group in the cluster set are compared, and the reference hyperparameter group corresponding to the largest reference evaluation result is taken as the cluster hyperparameter group corresponding to the cluster set.
[0089] For example, determining the global hyperparameter group based on the clustering hyperparameter group includes: determining whether there is a current hyperparameter group in the database to be updated that is the same as the clustering hyperparameter group; if not, determining whether the number of clusters in the clustering hyperparameter group is greater than a preset threshold for the number of clusters; if not, the clustering hyperparameter group can be directly used as the global hyperparameter group; if so, the clustering hyperparameter groups are sorted from largest to smallest according to the reference evaluation results corresponding to the clustering hyperparameter group, and the top preset threshold number of clustering hyperparameter groups are selected as the global hyperparameter group from the sorting results.
[0090] The number of cluster groups refers to the number of cluster hyperparameter groups. This embodiment of the invention does not impose any limitation on the preset threshold for the number of cluster groups; it can be set by technical personnel based on experience or needs.
[0091] For example, after determining whether a current hyperparameter group identical to the current hyperparameter group exists in the database to be updated, the method further includes: if it exists, deleting the clustering hyperparameter group identical to the current hyperparameter group, determining the number of remaining clustering groups; determining whether the number of remaining clustering groups is greater than a preset clustering group number threshold; if not, the remaining clustering hyperparameter groups can be directly used as global hyperparameter groups; if so, based on the reference evaluation results corresponding to the remaining clustering hyperparameter groups, sorting the remaining clustering hyperparameter groups in descending order, and selecting the first preset clustering group number threshold of remaining clustering hyperparameter groups from the sorting results as global hyperparameter groups. Here, the remaining clustering hyperparameter groups refer to the clustering hyperparameter groups remaining after deleting the clustering hyperparameter groups identical to the current hyperparameter group. The number of remaining clustering groups refers to the number of remaining clustering hyperparameter groups.
[0092] Understandably, by inputting non-current hyperparameter sets into the current global proxy model, corresponding non-current evaluation results are obtained; an initial population is generated based on the non-current hyperparameter sets and the corresponding non-current evaluation results; the current trial vector corresponding to the non-current hyperparameter sets is determined, and the initial population is updated based on the non-current hyperparameter sets, non-current evaluation results, current trial vectors, and the current global proxy model to obtain a reference population; the reference hyperparameter sets in the reference population are clustered to obtain multiple cluster sets; for any cluster set, a cluster hyperparameter set is selected based on the reference evaluation results corresponding to each reference hyperparameter set in that cluster set; the global hyperparameter set is determined based on the cluster hyperparameter sets, which improves the accuracy of the determined global hyperparameter set, that is, improves the accuracy of the global hyperparameter set determined in the target database in subsequent iterations, improves the accuracy of selecting target hyperparameter sets from the target database to adjust the basic laser line extraction model, and improves the model performance of the target laser line extraction model.
[0093] In one optional embodiment, the initial population is updated based on the non-current hyperparameter set, the non-current evaluation result, the current test vector, and the current global proxy model to obtain a reference population. This includes: determining the corresponding test evaluation result based on the current test vector and the current global proxy model; determining the updated hyperparameter set based on the non-current evaluation result corresponding to the non-current hyperparameter set and the test evaluation result corresponding to the current test vector; and updating the initial population based on the updated hyperparameter set and the corresponding updated evaluation result to obtain the reference population.
[0094] Here, the experimental evaluation result refers to the performance evaluation result corresponding to the current experimental vector output by the current global agent model. For example, the experimental evaluation result can be understood as the extraction accuracy corresponding to the current experimental vector predicted by the current global agent model. Inputting any current experimental vector into the current global agent model yields the experimental evaluation result for that current experimental vector.
[0095] For example, if the current test vector includes a first test vector, a second test vector, and a third test vector, then the first test vector is input into the current global proxy model to obtain the first evaluation result corresponding to the first test vector; the second test vector is input into the current global proxy model to obtain the second evaluation result corresponding to the second test vector; the third test vector is input into the current global proxy model to obtain the third evaluation result corresponding to the third test vector; and a current evaluation result corresponding to the current test vector, including the first evaluation result, the second evaluation result, and the third evaluation result, is generated.
[0096] Here, the first evaluation result refers to the performance evaluation result corresponding to the first test vector output by the current global agent model. For example, the first evaluation result can be understood as the extraction accuracy corresponding to the first test vector predicted by the current global agent model.
[0097] The second evaluation result refers to the performance evaluation result corresponding to the second trial vector output by the current global agent model. For example, the second evaluation result can be understood as the extraction accuracy corresponding to the second trial vector predicted by the current global agent model.
[0098] The third evaluation result refers to the performance evaluation result corresponding to the third trial vector output by the current global agent model. For example, the third evaluation result can be understood as the extraction accuracy corresponding to the third trial vector predicted by the current global agent model.
[0099] The updated hyperparameter set refers to the non-current hyperparameter set or the current experimental vector used to update the initial population. The updated evaluation result refers to the evaluation result corresponding to the updated hyperparameter set. For example, if the current experimental vector includes a first experimental vector, a second experimental vector, and a third experimental vector, then the updated hyperparameter set can be one of the non-current hyperparameter set, the first experimental vector, the second experimental vector, and the third experimental vector.
[0100] Understandably, the current test vector is input into the current global proxy model to obtain the test evaluation result corresponding to the current test vector; based on the non-current evaluation results corresponding to the non-current hyperparameter group and the corresponding test evaluation results corresponding to the current test vector, the updated hyperparameter group is determined; the initial population is updated by updating the updated hyperparameter group and the corresponding updated evaluation results to obtain the reference population, which improves the accuracy of the determined updated hyperparameter group, and thus improves the accuracy of the reference population obtained by updating the initial population.
[0101] In an optional embodiment, determining an updated hyperparameter group based on the non-current evaluation result corresponding to the non-current hyperparameter group and the corresponding experimental evaluation result corresponding to the current experimental vector includes: for any non-current hyperparameter group, comparing the experimental evaluation result of the current experimental vector corresponding to the non-current hyperparameter group with the non-current evaluation result corresponding to the non-current hyperparameter group; and determining an updated hyperparameter group from the non-current hyperparameter group and the current experimental vector corresponding to the non-current hyperparameter group based on the comparison result.
[0102] For example, any non-current hyperparameter set and the corresponding current test vector can be formed into a set. Based on the non-current evaluation results corresponding to the non-current hyperparameter sets in any set, and the test evaluation results corresponding to the current test vectors in that set, the updated hyperparameter set corresponding to that set is determined. The updated hyperparameter set can be understood as the combination with the best evaluation performance selected from the non-current hyperparameter sets and the current test vectors corresponding to the aforementioned non-current hyperparameter sets. It should be noted that one non-current hyperparameter set corresponds to one updated hyperparameter set.
[0103] For example, for any non-current hyperparameter group A, if the current test vector B associated with the non-current hyperparameter group A includes a first test vector B1, a second test vector B2, and a third test vector B3, and the first evaluation result corresponding to the first test vector B1 is P1, the second evaluation result corresponding to the second test vector B2 is P2, the third evaluation result corresponding to the third test vector B3 is P3, and the non-current evaluation result corresponding to the non-current hyperparameter group A is PA, then compare the magnitudes of P1, P2, P3, and PA. If P1 is the largest, then the first test vector B1 is used as the updated hyperparameter group, and the first evaluation result P1 is used as the updated evaluation result.
[0104] It is understandable that by determining the updated hyperparameter set for any non-current hyperparameter set based on the experimental evaluation results of the current experimental vector corresponding to the non-current hyperparameter set and the comparison results of the non-current evaluation results corresponding to the non-current hyperparameter set, the accuracy of the determined updated hyperparameter set is improved, thereby improving the accuracy of subsequent updates to the initial population based on the updated hyperparameter set.
[0105] Continuing from the previous example, if the hyperparameter set is updated to the first experimental vector B1, then the non-current hyperparameter set A in the initial population is replaced with the first experimental vector B1, and the non-current evaluation result PA corresponding to the non-current hyperparameter set A in the initial population is replaced with the first evaluation result P1 corresponding to the first experimental vector B1.
[0106] In an optional embodiment, determining a local hyperparameter group based on an intermediate database and candidate hyperparameter groups includes: selecting a sub-hyperparameter group from the intermediate hyperparameter groups stored in the intermediate database, and determining the current local proxy model corresponding to the current iteration based on the sub-hyperparameter group, the corresponding sub-extraction accuracy, and a preset initial local proxy model; determining a non-intermediate hyperparameter group from the candidate hyperparameter group, and determining a local hyperparameter group from the non-intermediate hyperparameter group based on the non-intermediate hyperparameter group and the current local proxy model.
[0107] In this invention, intermediate hyperparameter groups refer to hyperparameter groups stored in an intermediate database. Sub-hyperparameter groups refer to intermediate hyperparameter groups used to determine the current local proxy model. For example, based on the intermediate extraction accuracy, the intermediate hyperparameter groups are sorted from largest to smallest, and the top preset group number thresholds are designated as sub-hyperparameter groups. The intermediate extraction accuracy refers to the extraction accuracy corresponding to each intermediate hyperparameter group. This embodiment of the invention does not impose any limitation on the size of the preset group number threshold; it can be set by technicians based on experience or needs, or determined through extensive experimentation.
[0108] Here, sub-extraction accuracy refers to the intermediate extraction accuracy corresponding to the sub-hyperparameter set. The current local surrogate model refers to the trained initial local surrogate model corresponding to the current iteration. The initial local surrogate model is a pre-set local surrogate model. This embodiment of the invention does not impose any limitations on the initial local surrogate model; it can be set by technicians based on experience or needs. For example, the initial local surrogate model can be a radial basis function model or a Gaussian process model.
[0109] For example, the initial local proxy model is trained based on the sub-hyperparameter groups and corresponding sub-extraction accuracies stored in the intermediate database of the current iteration to obtain the current local proxy model. That is, the current local proxy model is determined based on the sub-hyperparameter groups with the highest extraction accuracy and corresponding sub-extraction accuracies in the intermediate database of the current iteration with a preset group number threshold, as well as the initial local proxy model.
[0110] Specifically, the sub-hyperparameter set is input into the initial local proxy model, and the sub-prediction accuracy corresponding to the sub-hyperparameter set is output. The local proxy loss value is determined based on the sub-prediction accuracy and the sub-extraction accuracy. The initial local proxy model is then trained based on the local proxy loss value to obtain the current local proxy model. Here, the sub-prediction accuracy refers to the prediction and extraction accuracy output during the training of the initial local proxy model. The local proxy loss value refers to the model loss value corresponding to the initial local proxy model.
[0111] Among them, the non-intermediate hyperparameter group refers to the candidate hyperparameter group other than the intermediate hyperparameter group, that is, the candidate hyperparameter group that is not stored in the intermediate database is regarded as the non-intermediate hyperparameter group.
[0112] For example, based on the non-intermediate hyperparameter set and the current local proxy model, the corresponding non-intermediate evaluation results are determined, and an original intermediate population including the non-intermediate hyperparameter set and the corresponding non-intermediate evaluation results is generated; based on the non-intermediate hyperparameter set and the current local proxy model, the original intermediate population is updated by sub-iteration to obtain the target intermediate population; based on a preset clustering algorithm, the hyperparameter sets to be clustered in the target intermediate population are clustered to obtain an intermediate set; based on the evaluation results of the hyperparameter sets to be clustered in the intermediate set, the set hyperparameter set corresponding to the intermediate set is determined; based on the set hyperparameter set, the local hyperparameter set is determined.
[0113] Here, non-intermediate evaluation results refer to the performance evaluation results corresponding to the non-intermediate hyperparameter set output by the current local proxy model. For example, non-intermediate evaluation results can be understood as the extraction accuracy corresponding to the non-intermediate hyperparameter set predicted by the current local proxy model. The original intermediate population refers to the population that includes the non-intermediate hyperparameter set and the corresponding non-intermediate evaluation results.
[0114] Here, the target intermediate population refers to the new population obtained after sub-iteration updates to the original intermediate population. The hyperparameter set to be clustered refers to the hyperparameter set within the target intermediate population. The intermediate set refers to the set of clusters obtained after clustering the hyperparameter set to be clustered. The evaluation result to be clustered refers to the evaluation result corresponding to the hyperparameter set to be clustered. The set of hyperparameters refers to the hyperparameter set to be clustered corresponding to the largest evaluation result in any intermediate set.
[0115] For example, for any intermediate set, the clustering evaluation results corresponding to each clustering hyperparameter group in the intermediate set are compared, and the clustering hyperparameter group corresponding to the largest clustering evaluation result is taken as the set hyperparameter group corresponding to the intermediate set.
[0116] For example, determining local hyperparameter groups based on ensemble hyperparameter groups includes: determining whether an intermediate hyperparameter group identical to the ensemble hyperparameter group exists in the intermediate database; if not, determining whether the number of ensemble hyperparameter groups is greater than a preset threshold for the number of cluster groups; if not, the ensemble hyperparameter group can be directly used as a local hyperparameter group; if so, the ensemble hyperparameter groups are sorted from largest to smallest according to the clustering evaluation results corresponding to the ensemble hyperparameter groups, and the top preset threshold number of ensemble hyperparameter groups are selected as local hyperparameter groups from the sorting results.
[0117] For example, after determining whether an intermediate hyperparameter group identical to the set hyperparameter group exists in the intermediate database, the method further includes: if it exists, deleting the set hyperparameter group identical to the intermediate hyperparameter group to obtain the remaining set hyperparameter groups; determining whether the number of the remaining set hyperparameter groups is greater than a preset clustering group number threshold; if not, the remaining set hyperparameter groups can be directly used as local hyperparameter groups; if so, according to the clustering evaluation results corresponding to the remaining set hyperparameter groups, sorting the remaining set hyperparameter groups in descending order, and selecting the first preset clustering group number threshold of the remaining set hyperparameter groups from the sorting results as local hyperparameter groups.
[0118] For example, for any sub-iteration update process, based on the set of hyperparameters to be iterated in the intermediate population to be updated in this sub-iteration and the local mutation operator of the differential evolution algorithm, the corresponding intermediate mutation vector is determined; based on the crossover operator, the corresponding intermediate test vector is determined based on the set of hyperparameters to be iterated and the corresponding intermediate mutation vector; the intermediate test vector is input into the current local surrogate model to obtain the corresponding intermediate evaluation result; the evaluation result corresponding to the set of hyperparameters to be iterated and the intermediate evaluation result of the corresponding intermediate test vector are compared; based on the comparison result, the sub-iteration hyperparameter set is determined from the set of hyperparameters to be iterated and the corresponding intermediate test vector; based on the sub-iteration hyperparameter set and the corresponding sub-iteration evaluation result, the intermediate population to be updated is updated to obtain the updated intermediate population of this sub-iteration; the updated intermediate population obtained in the last sub-iteration is taken as the target intermediate population.
[0119] Here, "current sub-iteration" refers to the current sub-iteration. "Intermediate population to be updated" refers to the intermediate population that needs to be updated in this sub-iteration. For example, if this sub-iteration is the first sub-iteration, then the intermediate population to be updated is the original intermediate population; if this sub-iteration is not the first sub-iteration, then the intermediate population to be updated is the updated intermediate population obtained from the previous sub-iteration. The previous sub-iteration refers to the update process of the sub-iteration immediately preceding this sub-iteration.
[0120] Here, the hyperparameter set to be iterated refers to the set of hyperparameters stored in the intermediate population to be updated. The local mutation operator can be used to determine the intermediate mutation vector corresponding to the non-intermediate hyperparameter set. For example, the local mutation operator can be DE / best / 1 (a single-difference mutation operator based on the current best individual).
[0121] Here, the intermediate mutation vector refers to the mutation vector obtained by processing the hyperparameter set to be iterated based on the local mutation operator. The intermediate test vector refers to the test vector determined based on the hyperparameter set to be iterated and the intermediate mutation vector. For example, for any hyperparameter set to be iterated, based on the crossover operator, the intermediate test vector corresponding to the hyperparameter set to be iterated is determined according to the hyperparameter set to be iterated and the intermediate mutation vector corresponding to the hyperparameter set to be iterated.
[0122] Here, the evaluation result to be iterated refers to the evaluation result corresponding to the hyperparameter set to be iterated stored in the intermediate population to be updated. The intermediate evaluation result refers to the performance evaluation result corresponding to the intermediate test vectors output by the current local agent model. For example, the intermediate evaluation result can be understood as the extraction accuracy corresponding to the intermediate test vectors predicted by the current local agent model.
[0123] Here, the sub-iteration hyperparameter set refers to the set of hyperparameters to be iterated or the intermediate test vectors used to update the intermediate population to be updated. The sub-iteration evaluation result refers to the evaluation result corresponding to the sub-iteration hyperparameter set. The target intermediate population obtained in this sub-iteration refers to the intermediate population obtained after updating the intermediate population to be updated in this sub-iteration based on the sub-iteration hyperparameter set and the corresponding sub-iteration evaluation result.
[0124] For example, for any set of hyperparameters to be iterated, the evaluation result to be iterated corresponding to the set of hyperparameters to be iterated is compared with the intermediate evaluation result of the intermediate test vector corresponding to the set of hyperparameters to be iterated. If the evaluation result to be iterated is larger, the set of hyperparameters to be iterated is taken as a sub-iteration hyperparameter set, and the evaluation result to be iterated corresponding to the set of hyperparameters to be iterated is taken as the sub-iteration evaluation result. If the intermediate evaluation result is larger, the intermediate test vector corresponding to the set of hyperparameters to be iterated is taken as a sub-iteration hyperparameter set, and the intermediate evaluation result corresponding to the intermediate test vector is taken as the sub-iteration evaluation result.
[0125] It should be noted that each iteration update process includes a complete sub-iteration update process. The stopping condition for any sub-iteration update process can be that the sub-iteration update process stops when the number of sub-iteration updates reaches a preset sub-iteration threshold. This embodiment of the invention does not impose any limitation on the size of the preset sub-iteration threshold; it can be set by a technician based on experience or needs, or determined repeatedly through numerous experiments.
[0126] Understandably, by selecting sub-hyperparameter groups with higher performance evaluation from the intermediate hyperparameter groups, along with their corresponding sub-extraction accuracies, the current local surrogate model is determined. Based on the non-intermediate hyperparameter groups and the current local surrogate model, the local hyperparameter groups are determined, thus improving the accuracy of the determined local hyperparameter groups. This, in turn, improves the accuracy of the local hyperparameter groups in the target database determined in subsequent iterations, and improves the accuracy of subsequently selecting target hyperparameter groups from the target database to adjust the basic laser line extraction model, thereby improving the model performance of the target laser line extraction model.
[0127] For example, the iterative update process stops when the number of iterations reaches a preset iteration threshold. This embodiment of the invention does not impose any limitation on the size of the preset iteration threshold; it can be set by a technician based on experience or needs, or determined repeatedly through numerous experiments.
[0128] It should be noted that any iteration update process includes a global search and a local search. The global search is implemented using the sample dataset, the database to be updated corresponding to this iteration update, the global proxy model, and the corresponding global iteration optimization strategy; the local search is implemented using the sample dataset, the intermediate database corresponding to this iteration update, the local proxy model, and the corresponding local iteration optimization strategy. In this embodiment of the invention, the sub-iteration update in any iteration update process corresponds to a local search.
[0129] The global iterative optimization strategy can be used to determine the corresponding global hyperparameter set through a global surrogate model. The local iterative optimization strategy can be used to determine the corresponding local hyperparameter set through a local surrogate model.
[0130] S260. Determine the target hyperparameter set from the target database.
[0131] For example, the hyperparameter sets stored in the target database can be used as candidate hyperparameter sets, and the extraction accuracy corresponding to the stored candidate hyperparameter sets can be used as candidate extraction accuracy. The target hyperparameter set is then determined based on the candidate extraction accuracy corresponding to each candidate hyperparameter set. Specifically, the candidate hyperparameter set corresponding to the highest candidate extraction accuracy can be used as the target hyperparameter set.
[0132] S270. Acquire candidate line laser weld seam images during the welding process, and preprocess the candidate line laser weld seam images to obtain target line laser weld seam images.
[0133] S280. Input the target laser weld image into the trained target laser line extraction model to obtain the target laser line image.
[0134] The model hyperparameters in the target laser line extraction model are determined based on the target hyperparameter set; the target hyperparameter set is determined by global and local search of the candidate hyperparameter set based on the sample dataset, performance evaluation database, surrogate model and iterative optimization strategy; the candidate hyperparameter set is determined by the hyperparameter solution space obtained by encoding the initial hyperparameters of the basic laser line extraction model.
[0135] This invention provides a laser line extraction scheme for weld seams. It involves acquiring a sample dataset and initial hyperparameters of a basic laser line extraction model, and constructing a hyperparameter solution space based on these initial hyperparameters. The sample dataset includes a training set and a validation set. The training set includes training laser weld seam images and real training laser line images. The validation set includes validation laser weld seam images and real validation laser line images. Candidate hyperparameter groups are determined based on a preset combination generation method and the hyperparameter solution space, and a preset number of initial hyperparameter groups are selected from these candidate groups. The initial laser lines corresponding to the initial hyperparameter groups are then constructed. The model is extracted and trained using a sample training set. The validated laser weld seam image is input into the trained initial laser line extraction model to obtain the initial validated laser line prediction image. Based on the validated laser line real image and the initial validated laser line prediction image, the initial extraction accuracy corresponding to the appropriate initial hyperparameter set is determined. The initial hyperparameter set and the initial extraction accuracy are stored in a performance evaluation database to obtain the initial database. The initial database is iteratively updated based on candidate hyperparameter sets to obtain the target database. The target hyperparameter set is determined from the target database, thus improving the mechanism for determining the target hyperparameter set. The above scheme determines the initial extraction accuracy by selecting an initial hyperparameter set from the constructed hyperparameter solution space and the corresponding initial laser line extraction model. The initial hyperparameter set and initial extraction accuracy are stored in a performance evaluation database to obtain an initial database. The initial database is iteratively updated to obtain a target database. A target hyperparameter set is selected from the target database, improving the accuracy of the determined target hyperparameter set. This, in turn, improves the accuracy of subsequent adjustments to the model hyperparameters in the basic laser line extraction model based on the target hyperparameter set. This avoids the low accuracy issues that occur when extracting weld laser line images using a laser line extraction model with manually determined model hyperparameters. It achieves automated adjustment of model hyperparameters, reduces manual parameter tuning costs, and improves the accuracy of subsequent determination of target laser line images based on the target laser line extraction model.
[0136] Example 3 This invention provides an optional example based on the above embodiments. It should be noted that for parts not described in detail in this invention's embodiments, please refer to the descriptions in other embodiments.
[0137] Currently, laser line extraction is mainly divided into methods based on traditional image processing and methods based on deep neural networks. Traditional image processing methods typically rely on the significant features of laser lines in terms of grayscale, brightness, and geometric shape. Laser line extraction is achieved through preprocessing, feature enhancement, and centerline localization of the original image. Typical methods include a combination of grayscale thresholding and centroid methods, sub-pixel center extraction, Steger's algorithm, and Gaussian fitting. These methods exhibit good extraction accuracy and computational efficiency under stable lighting conditions and minimal background interference. Deep neural network methods utilize models such as convolutional neural networks to learn the feature representations of laser lines under different welding conditions using a large number of samples, thereby achieving automatic laser line extraction and recognition. Compared to traditional methods, deep learning methods have stronger adaptability to noise, occlusion, and environmental changes, and exhibit higher robustness under complex conditions such as intense welding arc light and frequent spatter.
[0138] However, existing deep neural network methods in practical applications often directly use mature network models for laser line extraction and adjust network hyperparameters to adapt to specific welding scenarios. This strategy relies heavily on manual experience and repeated trial and error, resulting in low efficiency in the parameter tuning process. Furthermore, these methods typically optimize only a small number of hyperparameters, making it difficult to achieve coordinated adjustment at the overall parameter space level and failing to fully consider the coupling relationships between parameters, thus limiting the full potential of the model's performance. Therefore, there is an urgent need to research a deep neural network adaptive hyperparameter configuration method for line laser weld seam tracking to automate and improve the efficiency of the hyperparameter configuration process, adapting to complex welding conditions.
[0139] To achieve adaptive hyperparameter configuration of deep neural networks for line laser weld seam tracking, the following key technical challenges need to be addressed: how to efficiently and collaboratively optimize all or most of the hyperparameters of a selected model within a deep convolutional neural network, fully considering the coupling relationships between parameters; how to simultaneously consider global exploration capabilities to avoid getting trapped in local optima and local fine-tuning capabilities to accelerate convergence during the hyperparameter search process, thereby ensuring the stability and convergence effect of the optimization process; and how to achieve rapid evaluation of the performance of different hyperparameter combinations while minimizing the number of complete training and validation iterations during hyperparameter optimization, thereby improving overall optimization efficiency.
[0140] This invention addresses the problems of insufficient adaptability of deep neural network models under different welding conditions, reliance on manual experience for hyperparameter configuration, low parameter tuning efficiency, and difficulty in balancing overall performance in line laser-based weld seam tracking. This invention proposes a deep neural network-based line laser weld seam tracking method and system based on hyperparameter adaptive optimization. This invention unifies the encoding of hyperparameters in the deep neural network architecture and introduces a hyperparameter adaptive optimization mechanism combining a surrogate model and an evolutionary optimization algorithm. Under the constraint of a limited number of real evaluations, it achieves collaborative optimization of hyperparameters in multi-dimensional and multi-type network architectures. This method can balance global exploration capabilities and local fine-tuning capabilities while ensuring search efficiency, thereby obtaining a laser line extraction model with higher accuracy and stronger robustness in complex welding environments. Through the above technical solution, the aim is to achieve automated, efficient, and engineered hyperparameter configuration of deep neural networks in weld seam tracking tasks, reduce manual parameter tuning costs, improve the stability and reliability of the model under complex conditions such as strong arc light and spatter interference, and provide key technical support for online weld seam tracking in intelligent welding equipment.
[0141] To enable deep neural networks to better adapt to line laser weld seam tracking tasks, this invention proposes a novel line laser weld seam tracking system. Its core is a weld seam laser line extraction method based on hyperparameter adaptive deep neural networks. By introducing a hyperparameter adaptive deep neural network optimization method as the core algorithm, high-precision tracking of weld seam features is achieved.
[0142] The line laser weld seam tracking system proposed in this invention mainly comprises two parts: offline deep network adaptive optimization and real-time weld seam tracking. In the offline deep network adaptive optimization stage, the weld seam image acquisition module acquires line laser weld seam images during the welding process. After preprocessing, a dataset for model performance evaluation is constructed. Based on this dataset, a hyperparameter adaptive deep neural network optimization method is used to optimize the hyperparameters of the laser line extraction model, and the obtained optimal laser line extraction model is stored. In the real-time weld seam tracking stage, the system acquires and preprocesses line laser weld seam images in real time. Line laser extraction is achieved using the optimized laser line extraction model, and based on this, key weld seam features are identified. Then, weld seam position information is calculated, and corresponding tracking control commands are output.
[0143] For example, a line laser weld seam tracking system includes a line laser weld seam image acquisition module, an image preprocessing module, a sample dataset construction module, a laser line extraction model optimization module, an optimal laser line extraction model storage module, a line laser extraction module, a weld seam feature recognition module, and a weld seam position calculation and tracking control module.
[0144] For example, the offline deep network adaptive optimization part may include a line laser weld seam tracking system including a line laser weld seam image acquisition module, an image preprocessing module, a sample dataset construction module, a laser line extraction model optimization module, and an optimal laser line extraction model storage module; the real-time weld seam tracking part may include a line laser weld seam image acquisition module, an image preprocessing module, a line laser extraction module, a weld seam feature recognition module, and a weld seam position calculation and tracking control module.
[0145] For example, the line laser weld seam image acquisition module is connected to the image preprocessing module; the image preprocessing module is connected to the sample dataset construction module and the line laser extraction module respectively; the sample dataset construction module is connected to the laser line extraction model optimization module; the laser line extraction model optimization module is connected to the optimal laser line extraction model storage module; the optimal laser line extraction model storage module is connected to the line laser extraction module; the line laser extraction module is connected to the weld seam feature recognition module; and the weld seam feature recognition module is connected to the weld seam position calculation and tracking control module.
[0146] The line laser weld seam tracking system can be used to optimize the hyperparameters of the laser line extraction model, determine the target laser line image corresponding to the target weld seam region based on the optimized laser line extraction model, and determine the weld seam position and weld seam tracking control commands based on the target laser line image. The line laser weld seam image acquisition module can be used to acquire candidate line laser weld seam images corresponding to the target weld seam region, as well as a sample dataset. The image preprocessing module can be used to preprocess the candidate line laser weld seam images, as well as the training and verification line laser weld seam images. The sample dataset construction module can be used to construct a sample dataset including preprocessed training line laser weld seam images and corresponding real training laser line images, as well as preprocessed verification line laser weld seam images and corresponding real verification laser line images.
[0147] The laser line extraction model optimization module can be used to determine the target hyperparameter set based on the sample dataset and the initial hyperparameters of the laser line extraction model, and then fine-tune the model hyperparameters according to the target hyperparameter set to obtain the optimized laser line extraction model. The optimal laser line extraction model storage module can be used to store the optimized laser line extraction model.
[0148] The linear laser extraction module can be used to input the preprocessed target linear laser weld image into the laser line extraction model to obtain the target laser line image. The weld feature recognition module can be used to identify weld features in the target laser line image. The weld position calculation and tracking control module can be used to determine the weld position based on the identified weld features and output weld tracking control commands.
[0149] For example, the core innovation of this invention lies in proposing a hyperparameter adaptive deep neural network optimization method for laser line extraction models during weld seam tracking. This method mainly includes seven steps: hyperparameter encoding, initial sampling, global proxy model construction, ensemble differential global optimization, local proxy model construction, local optimization based on differential evolution algorithm, and result output.
[0150] S301. Hyperparameter Encoding: The initial hyperparameters of the basic laser line extraction model are uniformly encoded into an optimizable parameter vector, that is, the initial hyperparameters are encoded to obtain the encoded initial hyperparameters.
[0151] For example, to uniformly optimize initial hyperparameters, different types of initial hyperparameters are first encoded. For instance, the number of channels in a convolutional layer is directly encoded; for example, when the number of channels is set to 16, 32, and 64, the encoded values are 16, 32, and 64, respectively. For the kernel size, indexing is performed based on a pre-defined set of candidate sizes; for example, kernel sizes such as 1×1, 3×3, 5×5, and 7×7 are numbered 0, 1, 2, and 3 respectively. For activation functions, category encoding is performed according to a list of candidate functions; for example, Sigmoid, ReLU, and Tanh are mapped to 0, 1, and 2, respectively. Through this encoding method, different types of initial hyperparameters can be uniformly represented as parameter vectors composed of n variables, thus forming the hyperparameter solution space of the laser line extraction model. For example, the hyperparameter solution space S can be determined using the following formula: S=[UB,LB]; ; ; Where S represents the hyperparameter solution space; UB represents the upper bound vector of the hyperparameter solution space; and LB represents the lower bound vector of the hyperparameter solution space. This represents the upper bound encoding value corresponding to the nth hyperparameter category; This represents the lower bound encoding value corresponding to the nth hyperparameter category.
[0152] S302. Initial sampling: Generate candidate hyperparameter sets in the encoded hyperparameter solution space, extract initial hyperparameter sets from the candidate hyperparameter sets, determine the initial extraction accuracy corresponding to the initial hyperparameter sets, and store the initial hyperparameter sets and the corresponding initial extraction accuracy in the performance evaluation database to obtain the initial database.
[0153] For example, within the hyperparameter solution space S, N candidate hyperparameter groups are first generated using a pre-defined combination generation method. Based on Latin hypercube sampling, a preset number of initial hyperparameter groups are sampled from the candidate hyperparameter groups to achieve uniform coverage of the solution space. For each initial hyperparameter group, a corresponding initial laser line extraction model is constructed, and the initial laser line extraction model is quickly trained using a sample training set. During training, Dice Loss is used as the loss function, and the Adam optimizer is used to update the network parameters, with a learning rate set to 1×10⁻⁶. -4 To reduce computational time overhead, each initial laser line extraction model is trained for only 5 epochs. After training, the performance of the initial laser line extraction model is evaluated using a sample validation set, and the initial extraction accuracy obtained during the validation phase is used as the performance evaluation result of the corresponding initial hyperparameter set. The initial hyperparameter set and the corresponding initial extraction accuracy are stored in the performance evaluation database to obtain the initial database.
[0154] S303. Construct the current global proxy model: Based on the current hyperparameter set and the corresponding current extraction accuracy in the database to be updated in the current iteration, as well as the preset initial global proxy model, determine the current global proxy model.
[0155] For example, in the process of hyperparameter optimization, it is necessary to repeatedly evaluate a large number of candidate hyperparameter sets, while directly training and testing the actual model would incur significant time overhead. To improve search efficiency, surrogate models can be introduced to replace most of the expensive real evaluation processes. Commonly used surrogate models include radial basis function (RBF) models and Gaussian process (GP) models. These two types of models, with their good function approximation capabilities, can effectively learn the nonlinear mapping relationship between the hyperparameter space and the model performance index.
[0156] S304, Integrated Differential Global Search: With the assistance of the current global proxy model, various mutation operators are used to search for excellent hyperparameter regions, and the relevant non-current hyperparameter groups are evaluated for real performance and stored in the database to be updated in the current iteration to obtain an intermediate database.
[0157] For example, based on the current global agent model, an integrated differential global search method is proposed to explore optimal solution regions in the hyperparameter solution space S. Specifically, in the initial stage, the method first constructs an initial population. , Where X represents the initial population; m represents the number of non-current hyperparameter groups; and D is the number of variables in any non-current hyperparameter group, i.e., the dimension of the optimization problem. This represents the i-th non-current hyperparameter group; Indicates non-current hyperparameter group The results are not the current evaluation results. Then, the differential evolution algorithm (DE) is used as the core optimization algorithm. In order to explore the solution space as much as possible, multiple mutation operators are considered for the search during the optimization process, including: (1) DE / rand / 1, which has strong global exploration ability based on random basis vectors and single difference mutation: ; in, Indicates non-current hyperparameter group The corresponding first mutation vector; , and All are random individuals, i.e., unless the current hyperparameter set is used. Other non-current hyperparameter groups; The rounding function is used to ensure the discreteness of non-current hyperparameter sets; F represents the scaling factor.
[0158] For example, (2) expands the search range through double difference mutation, which is suitable for DE / rand / 2 in a strong multimodal optimization environment: ; in, Indicates non-current hyperparameter group The corresponding second mutation vector; and All are random individuals, i.e., unless the current hyperparameter set is used. Other non-current hyperparameter groups besides these.
[0159] For example, (3) introduces an optimal solution guidance mechanism to achieve a better balance between exploration and development in DE / current-to-best / 1: ; in, Indicates non-current hyperparameter group The corresponding third mutation vector; This represents the non-current hyperparameter set corresponding to the largest non-current evaluation result in the initial population.
[0160] For example, the components in the current experimental vector are determined using the crossover operator based on the non-current hyperparameter set and the current mutation vector: ; in, Indicates non-current hyperparameter group The j component in the corresponding k-th current test vector; Indicates non-current hyperparameter group The j component in the corresponding k-th current mutation vector; Indicates non-current hyperparameter group The j component in the equation; k=1,2,3, if k=1, then Represents the first mutation vector. Let k represent the first trial vector; if k=2, then Represents the second mutation vector. Let k represent the second trial vector; if k=3, then Represents the third mutation vector. This represents the third trial vector; CR belongs to [0,1], representing the crossover probability, which determines... from The probability of inheriting each component; A random integer between 1 and D, to ensure At least from To obtain a component; rand(0,1) represents a random decimal between 0 and 1.
[0161] For example, the selection operator compares the non-current evaluation results of any non-current hyperparameter set with the first evaluation results of the first trial vector, the second evaluation results of the second trial vector, and the third evaluation results of the third trial vector corresponding to that non-current hyperparameter set, retaining the better performers for the next generation, thereby driving the population to converge towards a better region. The selection process uses the current global surrogate model instead of all true evaluations, and the updated hyperparameter set can be determined using the following formula: ; in, Indicates non-current hyperparameter group The corresponding update hyperparameter group; This represents the experimental evaluation result; here, arg represents the experimental vector corresponding to the largest evaluation result.
[0162] For example, the initial population is updated based on the updated hyperparameter set and the corresponding update evaluation results to obtain a reference population; DBSCAN is used to cluster the reference hyperparameter set in the reference population to obtain multiple cluster sets: ; Where C represents the superset that includes all cluster sets; This represents the Mth cluster set; Indicates the reference population; This represents the h-th reference hyperparameter group in the M-th cluster set.
[0163] For example, the optimal individual is selected from each cluster set, i.e., the clustering hyperparameter set corresponding to any cluster set is determined: ; in, This represents the clustering hyperparameter set corresponding to the Mth cluster set; This indicates the reference evaluation result corresponding to the reference hyperparameter set.
[0164] For example, delete clustering hyperparameter groups that are the same as the current hyperparameter groups in the database to be updated, and extract K better clustering hyperparameter groups from the deleted clustering hyperparameter groups as global hyperparameter groups; construct a global laser line extraction model corresponding to the global hyperparameter groups, and determine the global extraction accuracy corresponding to the global hyperparameter groups based on the global laser line extraction model; store the global laser line extraction model and the global extraction accuracy in the database to be updated to obtain an intermediate database.
[0165] S305. Construct the current local proxy model: After completing the global search, select the best M sub-hyperparameter groups and the corresponding sub-extraction accuracy from the intermediate database to construct the current local proxy model.
[0166] For example, a local proxy model is constructed for the selected potentially excellent hyperparameter regions to improve the prediction accuracy of the current local proxy model.
[0167] S306. Agent-assisted local optimization: The current local agent model is optimized using an intermediate database, and the obtained optimal solution is evaluated realistically.
[0168] For example, with the assistance of the current local proxy model, differential evolution is used to achieve fine optimization of the non-intermediate hyperparameter set, and the optimal solution is evaluated for real performance and stored in the intermediate database. That is, the local extraction accuracy of the local hyperparameter set is determined, and the local hyperparameter set and the corresponding local extraction accuracy are stored in the intermediate database to obtain the current database obtained in the current iteration.
[0169] For example, to achieve fast convergence, the DE / best / 1 mutation operator can be used: ; in, This represents the intermediate mutation vector corresponding to the z-th hyperparameter group to be iterated; This represents the set of hyperparameters to be iterated that corresponds to the largest evaluation result in the intermediate population to be updated. and All are random individuals, that is, other hyperparameter groups to be iterated except for the z-th hyperparameter group to be iterated.
[0170] S307, Result Output Module: The algorithm repeats S303 to S306 with a preset number of actual hyperparameter evaluations T (i.e., a preset iteration threshold) as the stopping condition. When the number of iterations reaches the preset iteration threshold, the optimization process terminates, and the optimal hyperparameter configuration scheme in the target database, i.e., the target hyperparameter set, is output.
[0171] For example, consider a basic laser line extraction model consisting of two encoding layers, one bottleneck layer, and two decoding layers. The encoding stage comprises two convolutional layers and corresponding activation functions for feature extraction; the bottleneck layer consists of one convolutional layer and an activation function for representing low-resolution features; the decoding stage comprises two convolutional layers and corresponding activation functions, and upsampling is used to restore feature resolution. Finally, the prediction result is output after a 1×1 convolution and a sigmoid activation function. This model structure involves 15 optimizable architectural hyperparameter variables, forming the hyperparameter solution space for subsequent optimization searches. Using the method provided in this embodiment of the invention, 15 architecture hyperparameters in the basic laser line extraction model are optimized to obtain the target laser line extraction model. Both the target laser line extraction model and the unoptimized laser line extraction model employ the same training strategy in S302, training for 100 epochs using the same sample training set. This allows for the evaluation of the application effect in welding scenarios with arc interference, specifically the laser line image X corresponding to the target laser line extraction model and the laser line image Y corresponding to the unoptimized laser line extraction model. By comparing laser line images X and Y, it can be concluded that the target laser line extraction model optimized by the method proposed in this embodiment can stably and accurately extract line laser features under arc interference conditions. In contrast, while the unoptimized laser line extraction model can achieve line laser extraction, the results still contain a significant amount of stray noise, especially under strong light interference conditions. The above comparison results demonstrate that the method and system proposed in this embodiment of the invention have good effectiveness and robustness in complex welding environments.
[0172] The technical solution provided in this invention is applicable to line laser weld seam tracking systems for real-time identification and positioning of weld seams. Regarding hyperparameter optimization of deep convolutional neural network models, this invention is not only applicable to U-Net and its variants, but can also be extended to other deep convolutional neural networks used for image segmentation or feature extraction, thereby achieving overall coordinated optimization of architectural hyperparameters such as the number of deep network channels, kernel size, and activation function. Furthermore, the technical solution provided in this invention can be applied to line laser weld seam tracking scenarios under conditions such as arc interference, welding spatter, drastic lighting changes, and complex backgrounds, and is suitable for various materials, bevel types, and welding process conditions. Without changing the core optimization idea, the method provided in this invention can also be extended to adaptive configuration of hyperparameters of deep neural network models in other industrial vision inspection and recognition tasks.
[0173] For example, with the rapid development of intelligent manufacturing and welding automation technologies, the requirements for weld seam tracking accuracy and system stability in welding processes are constantly increasing. Traditional model design and parameter tuning methods relying on human experience are no longer sufficient to meet engineering application needs. This invention provides a reusable and scalable model optimization technology path for welding vision systems by introducing a proxy-assisted evolutionary optimization method into the hyperparameter configuration process of the laser line extraction model in a line laser weld seam tracking system. At the engineering application level, the technical solution provided by this invention can significantly improve the recognition accuracy and robustness of line laser weld seam tracking systems under complex working conditions, reduce on-site debugging and maintenance costs, and enhance the adaptability of welding equipment to complex environments, showing potential for widespread application in fields such as pipeline welding and heavy equipment manufacturing. At the technological development level, the technical solution provided by this invention offers an effective hyperparameter adaptive optimization approach for the engineering application of deep neural networks in industrial scenarios, which is of positive significance for promoting the practical implementation of deep learning technology in intelligent welding and other industrial vision fields, possessing good industrial application value and promotion prospects.
[0174] This invention addresses the problems of reliance on manual experience, low optimization efficiency, and insufficient adaptability in hyperparameter configuration of laser line extraction models during line laser weld seam tracking. It proposes a deep neural network hyperparameter adaptive optimization method and system based on surrogate-assisted evolutionary optimization. This method uniformly encodes various architecture hyperparameters such as the number of deep network channels, convolutional kernel size, and activation function. With the assistance of a surrogate model, it combines integrated differential evolutionary global search and local fine-tuning to achieve efficient exploration and coordinated adjustment of the hyperparameter space. This significantly reduces the number of real training and validation iterations while improving hyperparameter search efficiency and result stability. Applying this method to the laser line extraction model effectively improves the accuracy and robustness of line laser feature extraction under complex welding conditions, reduces manual parameter adjustment and on-site deployment costs, and enhances the adaptability of the line laser weld seam tracking system to complex environments such as arc interference, welding spatter, and lighting changes, thereby achieving stable and reliable weld seam tracking results.
[0175] Example 4 Figure 3 This is a schematic diagram of a weld laser line extraction device provided in Embodiment 4 of the present invention. This embodiment is applicable to the extraction of laser line images from line laser weld images. This method can be executed by a weld laser line extraction device, which can be implemented in software and / or hardware and can be configured in an electronic device that carries the weld laser line extraction function.
[0176] like Figure 3 As shown, the device includes: a target line laser weld seam image determination module 310 and a target laser line image determination module 320. Among them, The target line laser weld seam image determination module 310 is used to acquire candidate line laser weld seam images during the welding process and preprocess the candidate line laser weld seam images to obtain the target line laser weld seam image. The target laser line image determination module 320 is used to input the target laser weld image into the trained target laser line extraction model to obtain the target laser line image; The model hyperparameters in the target laser line extraction model are determined based on the target hyperparameter set; the target hyperparameter set is determined by global and local search of the candidate hyperparameter set based on the sample dataset, performance evaluation database, surrogate model and iterative optimization strategy; the candidate hyperparameter set is determined by the hyperparameter solution space obtained by encoding the initial hyperparameters of the basic laser line extraction model.
[0177] This invention provides a laser line extraction scheme for weld seams. It involves acquiring candidate laser line weld seam images during the welding process and preprocessing these images to obtain target laser line weld seam images. These target laser line weld seam images are then input into a trained target laser line extraction model to obtain the target laser line image. The model hyperparameters in the target laser line extraction model are determined based on a target hyperparameter set. The target hyperparameter set is determined through global and local searches of the candidate hyperparameter set based on a sample dataset, a performance evaluation database, a surrogate model, and an iterative optimization strategy. The candidate hyperparameter set is determined by encoding the initial hyperparameters of the basic laser line extraction model to construct the hyperparameter solution space. The above scheme improves the accuracy of the determined target laser line image by inputting the preprocessed target laser weld image into the target laser line extraction model obtained after adjusting the model hyperparameters based on the target hyperparameter set. Simultaneously, by using a sample dataset, performance evaluation database, surrogate model, and iterative optimization strategy, a global and local search is performed on the candidate hyperparameter set to determine the target hyperparameter set, further improving the accuracy of the determined target hyperparameter set. Furthermore, the model hyperparameters in the basic laser line extraction model are adjusted based on the target hyperparameter set to obtain the target laser line extraction model. This achieves automated and efficient configuration of model hyperparameters, significantly improving the accuracy and robustness of target weld laser line extraction under complex welding conditions, and enhancing the accuracy of weld laser line extraction based on the target laser line extraction model.
[0178] Optionally, the target hyperparameter set is determined based on the following means: A hyperparameter solution space construction module is used to acquire a sample dataset and initial hyperparameters of the basic laser line extraction model, and construct a hyperparameter solution space based on the initial hyperparameters; wherein, the sample dataset includes a sample training set and a sample validation set; the sample training set includes training line laser weld seam images and training laser line real images; the sample validation set includes validation line laser weld seam images and validation laser line real images; The initial hyperparameter set determination module is used to determine candidate hyperparameter sets according to a preset combination generation method and the hyperparameter solution space, and select a preset number of initial hyperparameter sets from the candidate hyperparameter sets; An initial model training module is used to construct an initial laser line extraction model corresponding to the initial hyperparameter set, and to train the initial laser line extraction model based on the sample training set. The initial extraction accuracy determination module is used to input the verification line laser weld image into the trained initial laser line extraction model to obtain the initial verification laser line prediction image, and determine the initial extraction accuracy corresponding to the corresponding initial hyperparameter set based on the verification laser line real image and the initial verification laser line prediction image. The target database determination module is used to store the initial hyperparameter set and the initial extraction accuracy into the performance evaluation database to obtain the initial database, and to iteratively update the initial database according to the candidate hyperparameter set to obtain the target database; The target hyperparameter set determination module is used to determine the target hyperparameter set from the target database.
[0179] Optionally, the target database determination module includes: The current global proxy model determination unit is used to determine the current global proxy model corresponding to the current iteration for any iteration update process, based on the current hyperparameter set and the corresponding current extraction accuracy stored in the database to be updated for the current iteration, as well as the preset initial global proxy model. A global hyperparameter determination unit is used to determine non-current hyperparameter groups from the candidate hyperparameter groups, and to determine a global hyperparameter group from the non-current hyperparameter groups based on the non-current hyperparameter groups and the current global proxy model; A global model training unit is used to construct a global laser line extraction model corresponding to the global hyperparameter set, and to train the global laser line extraction model based on the sample training set. The global extraction accuracy determination unit is used to input the verification line laser weld image into the trained global laser line extraction model to obtain the global verification laser line prediction image, and determine the global extraction accuracy of the corresponding global laser line extraction model based on the verification laser line real image and the global verification laser line prediction image. An intermediate database determination unit is used to store the global hyperparameter set and the global extraction accuracy into the database to be updated, thereby obtaining the intermediate database obtained in the current iteration. The local extraction accuracy determination unit is used to determine a local hyperparameter group based on the intermediate database and the candidate hyperparameter group, and to determine the local extraction accuracy corresponding to the local hyperparameter group. The current database determination unit is used to store the local hyperparameter set and the corresponding local extraction accuracy into the intermediate database to obtain the current database obtained in the current iteration; The target database determination unit is used to take the current database obtained in the last iteration as the target database.
[0180] Optionally, the global hyperparameter determination unit includes: The initial population determination subunit is used to determine the corresponding non-current evaluation results based on the non-current hyperparameter set and the current global proxy model, and generate an initial population including the non-current hyperparameter set and the corresponding non-current evaluation results; The current test vector determination subunit is used to determine the current mutation vector corresponding to the non-current hyperparameter group, and to determine the corresponding current test vector based on the non-current hyperparameter group and the corresponding current mutation vector; The cluster set determines the sub-unit, which is used to update the initial population based on the non-current hyperparameter group, the non-current evaluation result, the current test vector and the current global proxy model to obtain a reference population, and to cluster the reference hyperparameter group in the reference population based on a preset clustering algorithm to obtain a cluster set; The global hyperparameter group determination subunit is used to determine the clustering hyperparameter group corresponding to the clustering set based on the reference evaluation results corresponding to the reference hyperparameter group in the clustering set, and to determine the global hyperparameter group based on the clustering hyperparameter group.
[0181] Optionally, the cluster set determines the sub-units, including: The test evaluation result determination unit is used to determine the corresponding test evaluation result based on the current test vector and the current global agent model; The update hyperparameter set determination unit is used to determine the update hyperparameter set based on the non-current evaluation result corresponding to the non-current hyperparameter set and the test evaluation result corresponding to the current test vector. A reference population determination unit is used to update the initial population based on the updated hyperparameter set and the corresponding update evaluation results to obtain a reference population.
[0182] Optionally, the updated hyperparameter set is determined from the unit, specifically for: For any non-current hyperparameter group, compare the experimental evaluation result of the current experimental vector corresponding to the non-current hyperparameter group with the non-current evaluation result corresponding to the non-current hyperparameter group. Based on the comparison results, the updated hyperparameter set is determined from the non-current hyperparameter set and the current test vector corresponding to the non-current hyperparameter set.
[0183] Optionally, the local extraction accuracy determination unit is specifically used for: Select a sub-hyperparameter group from the intermediate hyperparameter groups stored in the intermediate database, and determine the current local proxy model corresponding to the current iteration based on the sub-hyperparameter group, the corresponding sub-extraction accuracy, and the preset initial local proxy model. A non-intermediate hyperparameter group is determined from the candidate hyperparameter group, and a local hyperparameter group is determined from the non-intermediate hyperparameter group based on the non-intermediate hyperparameter group and the current local proxy model.
[0184] The weld laser line extraction device provided in this embodiment of the invention can execute the weld laser line extraction method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing each weld laser line extraction method.
[0185] In the technical solution of this invention, the collection, storage, use, processing, transmission, provision and disclosure of candidate line laser weld seam images, sample datasets and initial hyperparameters, etc., all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0186] Example 5 Figure 4 This is a schematic diagram of an electronic device for implementing a laser line extraction method for weld seams, provided in Embodiment 5 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0187] like Figure 4As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0188] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0189] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the weld seam laser line extraction method.
[0190] In some embodiments, the weld laser line extraction method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the weld laser line extraction method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the weld laser line extraction method by any other suitable means (e.g., by means of firmware).
[0191] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0192] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0193] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0194] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0195] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0196] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0197] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0198] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for laser line extraction of weld seams, characterized in that, include: Acquire candidate line laser weld seam images during the welding process, and preprocess the candidate line laser weld seam images to obtain target line laser weld seam images; Candidate line laser weld seam image, candidate line laser weld seam image, target line laser weld seam image. The target line laser weld seam image is input into the trained target laser line extraction model to obtain the target laser line image; The model hyperparameters in the target laser line extraction model are determined based on the target hyperparameter set; the target hyperparameter set is determined by global and local search of the candidate hyperparameter set based on the sample dataset, performance evaluation database, surrogate model and iterative optimization strategy; the candidate hyperparameter set is determined by the hyperparameter solution space obtained by encoding the initial hyperparameters of the basic laser line extraction model.
2. The method according to claim 1, characterized in that, The target hyperparameter set is determined based on the following method: Obtain a sample dataset and initial hyperparameters for the basic laser line extraction model, and construct a hyperparameter solution space based on the initial hyperparameters; wherein, the sample dataset includes a sample training set and a sample validation set; the sample training set includes training laser weld seam images and training laser line real images; the sample validation set includes validation laser weld seam images and validation laser line real images; Based on the preset combination generation method and the hyperparameter solution space, candidate hyperparameter groups are determined, and a preset number of initial hyperparameter groups are selected from the candidate hyperparameter groups. Construct an initial laser line extraction model corresponding to the initial hyperparameter set, and train the initial laser line extraction model based on the sample training set; The verification line laser weld image is input into the trained initial laser line extraction model to obtain the initial verification laser line prediction image. Based on the verification laser line real image and the initial verification laser line prediction image, the initial extraction accuracy corresponding to the corresponding initial hyperparameter set is determined. The initial hyperparameter set and the initial extraction accuracy are stored in the performance evaluation database to obtain the initial database. The initial database is then iteratively updated according to the candidate hyperparameter set to obtain the target database. Determine the target hyperparameter set from the target database.
3. The method according to claim 2, characterized in that, The step of iteratively updating the initial database based on the candidate hyperparameter set to obtain the target database includes: For any iteration update process, based on the current hyperparameter set and the corresponding current extraction accuracy stored in the database to be updated in the current iteration, as well as the preset initial global proxy model, determine the current global proxy model corresponding to the current iteration. Determine non-current hyperparameter groups from the candidate hyperparameter groups, and determine global hyperparameter groups from the non-current hyperparameter groups based on the non-current hyperparameter groups and the current global proxy model; Construct a global laser line extraction model corresponding to the global hyperparameter set, and train the global laser line extraction model based on the sample training set; The verification line laser weld image is input into the trained global laser line extraction model to obtain the global verification laser line prediction image. Based on the verification laser line real image and the global verification laser line prediction image, the global extraction accuracy of the corresponding global laser line extraction model is determined. The global hyperparameter set and the global extraction accuracy are stored in the database to be updated to obtain the intermediate database obtained in the current iteration; Based on the intermediate database and the candidate hyperparameter groups, a local hyperparameter group is determined, and the local extraction accuracy corresponding to the local hyperparameter group is determined. The local hyperparameter set and the corresponding local extraction accuracy are stored in the intermediate database to obtain the current database obtained in the current iteration; The current database obtained from the last iteration is used as the target database.
4. The method according to claim 3, characterized in that, The step of determining the global hyperparameter group from the non-current hyperparameter group based on the non-current hyperparameter group and the current global proxy model includes: Based on the non-current hyperparameter set and the current global proxy model, determine the corresponding non-current evaluation results and generate an initial population including the non-current hyperparameter set and the corresponding non-current evaluation results; Determine the current mutation vector corresponding to the non-current hyperparameter group, and determine the corresponding current experimental vector based on the non-current hyperparameter group and the corresponding current mutation vector; Based on the non-current hyperparameter set, the non-current evaluation result, the current test vector, and the current global proxy model, the initial population is updated to obtain a reference population. Then, based on a preset clustering algorithm, the reference hyperparameter set in the reference population is clustered to obtain a cluster set. Based on the reference evaluation results corresponding to the reference hyperparameter group in the cluster set, the clustering hyperparameter group corresponding to the cluster set is determined, and based on the clustering hyperparameter group, the global hyperparameter group is determined.
5. The method according to claim 4, characterized in that, The step of updating the initial population based on the non-current hyperparameter set, the non-current evaluation result, the current trial vector, and the current global proxy model to obtain a reference population includes: Based on the current test vector and the current global agent model, determine the corresponding test evaluation results; Based on the non-current evaluation results corresponding to the non-current hyperparameter set and the corresponding current test vector, determine the updated hyperparameter set; Based on the updated hyperparameter set and the corresponding update evaluation results, the initial population is updated to obtain a reference population.
6. The method according to claim 5, characterized in that, The step of determining the updated hyperparameter set based on the non-current evaluation result corresponding to the non-current hyperparameter set and the corresponding current test vector's test evaluation result includes: For any non-current hyperparameter group, compare the experimental evaluation result of the current experimental vector corresponding to the non-current hyperparameter group with the non-current evaluation result corresponding to the non-current hyperparameter group. Based on the comparison results, the updated hyperparameter set is determined from the non-current hyperparameter set and the current test vector corresponding to the non-current hyperparameter set.
7. The method according to claim 3, characterized in that, The step of determining the local hyperparameter set based on the intermediate database and the candidate hyperparameter set includes: Select a sub-hyperparameter group from the intermediate hyperparameter groups stored in the intermediate database, and determine the current local proxy model corresponding to the current iteration based on the sub-hyperparameter group, the corresponding sub-extraction accuracy, and the preset initial local proxy model. A non-intermediate hyperparameter group is determined from the candidate hyperparameter group, and a local hyperparameter group is determined from the non-intermediate hyperparameter group based on the non-intermediate hyperparameter group and the current local proxy model.
8. A laser line extraction device for weld seams, characterized in that, include: The target line laser weld image determination module is used to acquire candidate line laser weld images during the welding process and preprocess the candidate line laser weld images to obtain the target line laser weld image. The target laser line image determination module is used to input the target laser weld image into the trained target laser line extraction model to obtain the target laser line image; The model hyperparameters in the target laser line extraction model are determined based on the target hyperparameter set; the target hyperparameter set is determined by global and local search of the candidate hyperparameter set based on the sample dataset, performance evaluation database, surrogate model and iterative optimization strategy; the candidate hyperparameter set is determined by the hyperparameter solution space obtained by encoding the initial hyperparameters of the basic laser line extraction model.
9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement a weld laser line extraction method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements a weld laser line extraction method as described in any one of claims 1-7.