Multimodal industrial quality inspection method and apparatus
By freezing the backbone parameters of the initial multimodal large model, determining the low-rank matrix and gradient sensitivity to select the target activation layer, the problem of high resource consumption during the fine-tuning of the multimodal large model is solved, and the fine-tuning efficiency and adaptability in industrial quality inspection scenarios are improved.
Patent Information
- Application Number
- CN202611354298.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-02
- Publication Date
- 2026-11-20
AI Technical Summary
Existing industrial quality inspection methods suffer from high resource consumption and a lack of differentiated fine-tuning of network layers during the fine-tuning of multimodal large models, resulting in insufficient fine-tuning efficiency and adaptability of multimodal large models in industrial quality inspection scenarios.
By freezing the backbone parameters of the initial multimodal large model, the low-rank matrices corresponding to the visual encoding branch, text encoding branch, and cross-modal fusion branch are determined, and the gradient sensitivity of each network layer is determined according to the multimodal joint loss function, thereby selecting the target activation layer. The model is then fine-tuned and trained using a multimodal industrial sample set.
It reduces the number of parameters that need to be updated during fine-tuning training, improves the fine-tuning efficiency and adaptability of multimodal large models in industrial quality inspection scenarios, and realizes efficient resource utilization and differentiated fine-tuning.
Smart Images

Figure CN123141971A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer vision technology, and in particular to a multimodal industrial quality inspection method and apparatus. Background Technology
[0002] As the steel industry moves towards intelligent manufacturing, machine vision-based surface defect detection is gradually being applied to the quality inspection of industrial products such as strip steel, medium and heavy plates, and bars.
[0003] However, existing industrial quality inspection methods have shortcomings. On the one hand, existing multimodal large models typically have a large parameter scale. When adapting models to specific industrial quality inspection scenarios, full fine-tuning of model parameters can incur significant computational and storage resource overhead. On the other hand, fixed low-rank configurations are difficult to adapt to the feature learning requirements of industrial defects with varying degrees of complexity. Furthermore, in industrial quality inspection, the image branch needs to capture the subtle textures of micron-level cracks and pitting clusters, while the text / numerical branch records production line number, steel grade, and rolling process parameters (numerical). Existing methods typically only perform simple splicing of information from different modalities, lacking fine-tuning strategies for the differences in features between different modalities, resulting in insufficient mining of process parameter information.
[0004] Therefore, it is of great significance to solve the technical problems of large resource consumption and lack of differentiated fine-tuning of network layers in the fine-tuning of multimodal large models in existing industrial quality inspection methods, and to improve the fine-tuning efficiency and adaptability of multimodal large models in industrial quality inspection scenarios. Summary of the Invention
[0005] This application provides a multimodal industrial quality inspection method and apparatus to solve the technical problems of large resource consumption and lack of differentiated fine-tuning of network layers in the fine-tuning process of existing industrial quality inspection methods for multimodal large models, thereby improving the fine-tuning efficiency and adaptability of multimodal large models in industrial quality inspection scenarios.
[0006] In a first aspect, this application provides a multimodal industrial quality inspection method, the method comprising: The multimodal industrial data to be inspected is input into the target multimodal large model to obtain the defect prediction results output by the target multimodal large model; The target multimodal large model is obtained by fine-tuning an initial multimodal large model; the initial multimodal large model includes a visual encoding branch, a text encoding branch, and a cross-modal fusion branch; the fine-tuning training process includes: With the backbone parameters of the initial multimodal large model frozen, the low-rank matrices corresponding to the visual coding branch, text coding branch, and cross-modal fusion branch are determined respectively; Based on the multimodal joint loss function, the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch and cross-modal fusion branch is determined, and the target activation layer is selected from each network layer based on the gradient sensitivity and the number of training steps. Based on the target activation layer, each low-rank matrix, and the multimodal industrial sample set, the initial multimodal large model is fine-tuned and trained to obtain the target multimodal large model.
[0007] Optionally, according to the multimodal industrial quality inspection method of this application, determining the low-rank matrices corresponding to the visual coding branch, text coding branch, and cross-modal fusion branch respectively includes: Based on the number of training steps, determine the target rank value of the low-rank matrix corresponding to the visual encoding branch; The rank value of the low-rank matrix corresponding to the text encoding branch is kept at a first fixed value; The rank value of the low-rank matrix corresponding to the cross-modal fusion branch is kept at a second fixed value; Wherein, the first fixed value is less than the second fixed value.
[0008] Optionally, according to the multimodal industrial quality inspection method of this application, determining the target rank value of the low-rank matrix corresponding to the visual coding branch based on the number of training steps includes: If the number of training steps is less than or equal to a first preset step threshold, the target rank value is determined to be the initial rank value. When the number of training steps is greater than the first preset step threshold and the number of training steps is less than or equal to the second preset step threshold, the rank value is incremented based on the initial rank value according to the first preset step size to obtain the first candidate rank value, and the first candidate rank value is determined as the target rank value. When the number of training steps is greater than the second preset step threshold and the number of training steps is less than or equal to the third preset step threshold, the rank value is incremented based on the first candidate rank value according to the second preset step size to obtain the second candidate rank value, and the second candidate rank value is determined as the target rank value; the second candidate rank value is less than or equal to the preset rank value threshold.
[0009] Optionally, according to the multimodal industrial quality inspection method of this application, determining the gradient sensitivity of each network layer in the visual coding branch, text coding branch, and cross-modal fusion branch based on the multimodal joint loss function includes: The multimodal joint loss function is constructed based on the classification loss function, the defect localization loss function, and the comparison loss function; Based on the multimodal joint loss function, determine the gradient change information of each network layer; Based on the gradient change information and parameter importance information of each network layer, the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch and cross-modal fusion branch is determined; The parameter importance information is used to characterize the degree of influence of the network layer parameters on the defect prediction results.
[0010] Optionally, according to the multimodal industrial quality inspection method of this application, the step of selecting the target activation layer from each network layer based on the gradient sensitivity and training steps includes: Based on the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch, and cross-modal fusion branch, a first sensitive network layer, a second sensitive network layer, and a third sensitive network layer are determined from each network layer. The third sensitive network layer is identified as the target frozen layer, and the target frozen layer is kept in a frozen state. If the number of training steps is less than or equal to the first preset activation threshold, the first sensitive network layer is determined as the target activation layer; When the number of training steps is greater than the first preset activation threshold and less than or equal to the second preset activation threshold, the first sensitive network layer is kept in an active state, and the network layers in the second sensitive network layer are gradually determined as the target activation layer according to the increase of the number of training steps. The first sensitive network layer includes a shallow network layer of the visual coding branch and a cross-attention network layer of the cross-modal fusion branch. The second sensitive network layer includes the intermediate network layer of the visual coding branch; The third sensitive network layer includes all network layers in the text encoding branch except for the embedding layer.
[0011] Optionally, according to the multimodal industrial quality inspection method of this application, the method further includes: Based on the low-rank matrix corresponding to the target activation layer, determine the low-rank increment matrix, and perform singular value decomposition on the low-rank increment matrix to obtain the singular value set. According to a preset ratio, each target singular value is determined from the set of singular values; Each target singular value is retained, and all other singular values in the singular value set except for each target singular value are set to zero, resulting in an updated singular value set. Reconstruct the low-rank increment matrix based on the updated set of singular values; Based on the sparsity and sparsity coefficients of the reconstructed low-rank increment matrix, the sparsity constraint loss is determined, and based on the orthogonality and orthogonality coefficients between the columns of the reconstructed low-rank increment matrix, the orthogonality regularization loss is determined. The initial multimodal large model is fine-tuned and trained based on the multimodal joint loss function, the sparse constraint loss, and the orthogonal regularization loss.
[0012] Optionally, according to the multimodal industrial quality inspection method of this application, prior to the fine-tuning training process, the method further includes: Construct a hyperparameter search space corresponding to fine-tuning training; the hyperparameter search space includes the search range of the initial rank value, the search range of the preset rank value threshold, the search range of the first preset step size, the search range of the second preset step size, the search range of the sparse coefficients, the search range of the orthogonal coefficients, and the search range of the sensitivity threshold. Based on the multimodal industrial sample set, an evaluation function is constructed, and the evaluation function is iteratively calculated within the hyperparameter search space to obtain the target hyperparameter configuration; Based on the target hyperparameter configuration, configure the initial rank value, preset rank value threshold, first preset step size, second preset step size, sparse coefficient, orthogonality coefficient, and sensitivity threshold in the fine-tuning training process.
[0013] Optionally, according to the multimodal industrial quality inspection method of this application, each group of samples in the multimodal industrial sample set includes industrial image samples, process parameter samples, and defect annotation information; The process parameter sample includes steel grade data and / or rolling process numerical data; The defect labeling information is used to characterize the type and location of defects on the steel surface.
[0014] Secondly, this application also provides a multimodal industrial quality inspection device, the device comprising: The output module is used to input the multimodal industrial data to be inspected into the target multimodal large model and obtain the defect prediction results output by the target multimodal large model. The target multimodal large model is obtained by fine-tuning an initial multimodal large model; the initial multimodal large model includes a visual encoding branch, a text encoding branch, and a cross-modal fusion branch; the fine-tuning training process includes: With the backbone parameters of the initial multimodal large model frozen, the low-rank matrices corresponding to the visual coding branch, text coding branch, and cross-modal fusion branch are determined respectively; Based on the multimodal joint loss function, the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch and cross-modal fusion branch is determined, and the target activation layer is selected from each network layer based on the gradient sensitivity and the number of training steps. Based on the target activation layer, each low-rank matrix, and the multimodal industrial sample set, the initial multimodal large model is fine-tuned and trained to obtain the target multimodal large model.
[0015] Thirdly, this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the multimodal industrial quality inspection method as described in the first aspect above.
[0016] Fourthly, this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the multimodal industrial quality inspection method as described in the first aspect above.
[0017] The multimodal industrial quality inspection method and apparatus provided in this application, by freezing the backbone parameters of the initial multimodal large model, determines the low-rank matrices corresponding to the visual encoding branch, text encoding branch, and cross-modal fusion branch, respectively. This allows the method and apparatus to achieve model adaptation for industrial quality inspection scenarios by updating only a small number of low-rank parameters while retaining the existing pre-training capabilities of the initial multimodal large model, thus reducing the number of parameters that need to be updated during fine-tuning training. Furthermore, by determining the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch, and cross-modal fusion branch according to the multimodal joint loss function, and combining the gradient sensitivity with the number of training steps to select the target activation layer, thereby... This method and apparatus selectively determine the network layers involved in low-rank parameter updates based on the sensitivity of different network layers and the current training progress, avoiding the use of identical fine-tuning methods for each network layer throughout the fine-tuning training process. Then, the initial multimodal large model is fine-tuned and trained using the target activation layer, each low-rank matrix, and a multimodal industrial sample set. Finally, the target multimodal large model is used to predict defects in the multimodal industrial data to be inspected. This method and apparatus solve the technical problems of high resource consumption and lack of differentiated fine-tuning of network layers in existing industrial quality inspection methods during the fine-tuning of multimodal large models, improving the fine-tuning efficiency and adaptability of multimodal large models in industrial quality inspection scenarios. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating the multimodal industrial quality inspection method provided in this application.
[0020] Figure 2 This is an example diagram of the multimodal industrial quality inspection method provided in this application.
[0021] Figure 3 This is a schematic diagram of the structure of the multimodal industrial quality inspection device provided in this application.
[0022] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0024] Figure 1 This is a flowchart illustrating the multimodal industrial quality inspection method provided in this application, such as... Figure 1 As shown, the method may include: Step 110: Input the multimodal industrial data to be inspected into the target multimodal large model to obtain the defect prediction results output by the target multimodal large model; The target multimodal large model is obtained by fine-tuning the initial multimodal large model; the initial multimodal large model includes a visual encoding branch, a text encoding branch, and a cross-modal fusion branch; the fine-tuning training process includes: With the backbone parameters of the initial multimodal large model frozen, determine the low-rank matrices corresponding to the visual coding branch, text coding branch, and cross-modal fusion branch, respectively; Based on the multimodal joint loss function, the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch and cross-modal fusion branch is determined, and the target activation layer is selected from each network layer based on the gradient sensitivity and the number of training steps. Based on the target activation layer, each low-rank matrix, and the multimodal industrial sample set, the initial multimodal large model is fine-tuned and trained to obtain the target multimodal large model.
[0025] It should be noted that the implementing entity of the aforementioned multimodal industrial quality inspection method can be a computer device with computing and data processing capabilities, which has the ability to process multimodal industrial data, fine-tune and train a large multimodal model, and predict defects based on the target large multimodal model obtained through fine-tuning and training. This computer device can be, for example, an industrial control computer, an edge computing device, a server, or other electronic equipment capable of running a large multimodal model; this application does not specifically limit its capabilities in this regard.
[0026] Specifically, multimodal industrial data refers to industrial objects to be inspected that represent different information dimensions. For example, multimodal industrial data may include visual modal data, text modal data, and numerical modal data. This application does not specifically limit this.
[0027] The industrial products subject to quality inspection refer to industrial products that require quality testing. For example, industrial products subject to quality inspection can be steel products such as strip steel, medium and heavy plates, and bars; they can also be industrial products such as lithium battery separators, photovoltaic cells, and automotive body panels. This application does not make specific limitations in this regard.
[0028] Defect prediction results refer to the prediction results determined by the target multimodal large model based on the multimodal industrial data to be inspected, used to characterize the defect situation of the industrial object to be inspected. For example, defect prediction results may include predictions of whether defects exist; predictions of defect types; and predictions characterizing the spatial distribution of defects. This application does not specifically limit these aspects.
[0029] A target multimodal large model refers to a multimodal large model that, after being fine-tuned and trained for a target industrial quality inspection scenario, is used to jointly process multimodal industrial data to be inspected and output defect prediction results. For example, the target multimodal large model can be a multimodal large model obtained by fine-tuning and training a CLIP (Contrastive Language-Image Pre-Training) model; it can also be a multimodal large model obtained by fine-tuning and training a ViLT (Vision-and-Language Transformer) model; or it can be a multimodal large model obtained by fine-tuning and training a customized multimodal large model formed by combining visual encoding networks, text encoding networks, and feature fusion networks. This application does not specifically limit this.
[0030] The initial multimodal large model refers to a multimodal large model whose pre-trained parameters have been obtained before fine-tuning training for a target industrial quality inspection scenario. For example, the initial multimodal large model can be a multimodal large model obtained by pre-training on general image data and general text data; it can also be a multimodal large model obtained by pre-training on general data and industrial domain data; or it can be a specialized multimodal large model pre-trained on industrial domain data. This application does not specifically limit it in this regard.
[0031] Fine-tuning training refers to the process of adjusting some trainable parameters in the initial multimodal large model by using data related to the industrial quality inspection scenario, while retaining the existing pre-training capabilities of the initial multimodal large model, so that the initial multimodal large model can be adapted to the target industrial quality inspection scenario.
[0032] The visual encoding branch refers to the network branch in the initial multimodal large model used for feature extraction and feature encoding of visual data. For example, the visual encoding branch can use ViT (Vision Transformer); it can also use networks capable of feature extraction from visual modal data, such as ResNet (Residual Neural Network), EfficientNet (Efficient Neural Network), and Swin Transformer (Shifted Window Transformer). This application does not specifically limit this.
[0033] The text encoding branch refers to the network branch in the initial multimodal large model used for feature extraction and encoding of text data, or data that has been encoded and can be processed by the text encoding network. For example, the text encoding branch can use DistilBERT (Distilled Bidirectional Encoder Representations from Transformers); it can also use BERT (Bidirectional Encoder Representations from Transformers), or other networks capable of semantic feature extraction. This application does not impose specific limitations on this.
[0034] A cross-modal fusion branch refers to a network branch in the initial multimodal large model used to establish the correlation between features of different modalities and to fuse these features. For example, a cross-modal fusion branch can adopt a Transformer fusion structure; it can also adopt a cross-attention structure, a collaborative attention structure, or other fusion structures that can achieve interaction between features of different modalities. This application does not make specific limitations in this regard.
[0035] The backbone parameters refer to the original model parameters obtained after pre-training the initial multimodal large model. For example, the backbone parameters may include the original weight parameters in the visual encoding branch, the original weight parameters in the text encoding branch, and the original weight parameters in the cross-modal fusion branch. This application does not specifically limit them.
[0036] Freezing the backbone parameters means keeping the initial backbone parameters of the large multimodal model from being updated during fine-tuning training. It's important to note that freezing the backbone parameters does not mean the corresponding network structure is not involved in forward feature calculation; rather, it means that the backpropagation results are not used to update the corresponding backbone parameters during fine-tuning training.
[0037] A low-rank matrix refers to a trainable matrix that represents the initial parameter increments of a large multimodal model in a low-dimensional parametric form. For example, a low-rank matrix can be the matrix used to form low-rank parameter increments in a LoRA (Low-Rank Adaptation) structure; it can also be a trainable matrix used to form low-rank parameter increments in other parameter-efficient fine-tuning structures. This application does not impose specific limitations on this.
[0038] The multimodal joint loss function is used to comprehensively evaluate the objective function of the training error of the initial multimodal large model when performing the current industrial quality inspection task on multimodal industrial samples. The multimodal joint loss function can simultaneously reflect multiple optimization objectives related to the industrial quality inspection task, enabling different modal features to be learned under a unified training objective constraint. This application does not impose specific limitations on this.
[0039] Each network layer refers to a network structural unit that performs feature transformation in the visual encoding branch, text encoding branch, or cross-modal fusion branch. For example, each network layer can be a convolutional network layer; it can also be an attention network layer, a feedforward network layer, or other network layers that perform feature mapping. This application does not impose specific limitations on this.
[0040] Gradient sensitivity reflects the relative impact of changes in the trainable parameters of different network layers on the multimodal joint loss function under the current training state. Higher gradient sensitivity indicates that the corresponding network layer has a higher adjustment requirement for the current training process; lower gradient sensitivity indicates that the corresponding network layer has a lower adjustment requirement for the current training process. This application does not impose specific limitations on this.
[0041] Training steps refer to the progress of training iterations already performed during fine-tuning training. For example, completing one batch of data for one training process can be counted as one training step; alternatively, completing a parameter update based on a preset number of samples can also be counted as one training step. This application does not impose specific limitations on this.
[0042] The target activation layer refers to the network layer selected from the initial multimodal large model's network layers based on gradient sensitivity and the number of training steps. This layer allows its corresponding low-rank matrix to participate in parameter updates during the current training phase. The backbone parameters of the target activation layer remain frozen, while its corresponding low-rank matrix can be updated based on the fine-tuning training results. As the number of training steps changes, the selected target activation layer can change accordingly.
[0043] A multimodal industrial sample set refers to the dataset used to perform fine-tuning training on an initial large multimodal model. For example, a multimodal industrial sample set can be a pre-constructed training dataset for a target industrial quality inspection scenario; it can also be a training dataset obtained through data augmentation based on existing industrial training data. This application does not impose specific limitations on this.
[0044] Specifically, an initial multimodal large model is obtained. This initial multimodal large model employs a network structure consisting of a visual encoding branch, a text encoding branch, and a cross-modal fusion branch. The visual encoding branch extracts visual features corresponding to the surface of steel products; the text encoding branch extracts information features related to the steel production process; and the cross-modal fusion branch establishes the correlation between visual features and other modal features, and fuses the features from different modalities. For example, the visual encoding branch can use ViT-B / 16 pre-trained on ImageNet and mixed industrial image data, the text encoding branch can use DistilBERT pre-trained on general text, and the cross-modal fusion branch can use a Transformer fusion layer.
[0045] Subsequently, after fine-tuning training begins, the backbone parameters of each branch in the initial multimodal large model are frozen, ensuring that the backbone parameters formed during the pre-training phase for the visual encoding branch, text encoding branch, and cross-modal fusion branch remain unchanged. The low-rank matrices corresponding to the visual encoding branch, text encoding branch, and cross-modal fusion branch are then determined respectively. For example, for a network layer in the initial multimodal large model configured with a low-rank matrix, its output features can be shown in Equation (1): Formula (1) in, This represents the features output by the current network layer; This indicates that the current network layer has already obtained the backbone weight matrix in the initial multimodal large model and has remained frozen during the fine-tuning training process; This represents the input features of the current network layer; Indicates the number of training steps. At that time, the first low-rank matrix corresponding to the current network layer is used to process the input features. Perform low-rank feature transformation; Indicates the number of training steps. At that time, the second low-rank matrix corresponding to the current network layer is used to process the input features. Further transformations are required; Together they form the low-rank matrix pair corresponding to the current network layer.
[0046] During fine-tuning training, multimodal training data for the current training step is sequentially acquired from the multimodal industrial sample set and input into the initial multimodal large model. The visual encoding branch encodes features of the input visual modality information, the text encoding branch encodes features of the text modality information, and the cross-modal fusion branch associates and fuses the features output by the visual encoding branch and the text encoding branch. Based on the fused features, the prediction processing corresponding to the current industrial quality inspection task is performed.
[0047] Subsequently, as training continues, a multimodal joint loss function is determined based on the predictions at the current training step. The gradient sensitivity of each network layer in the visual encoding branch, text encoding branch, and cross-modal fusion branch is then determined based on this loss function. This allows us to obtain the relative sensitivity of different network layers to the current fine-tuning process. Combining the current training step number and the gradient sensitivity of each network layer, the network layers in the visual encoding branch, text encoding branch, and cross-modal fusion branch are selected to determine the target activation layer for the current training stage. For the target activation layer, the corresponding backbone parameters are kept frozen, and the low-rank matrix corresponding to the target activation layer participates in the parameter update for the current training stage.
[0048] Furthermore, based on the selected target activation layer, the low-rank matrix corresponding to the visual encoding branch, the low-rank matrix corresponding to the text encoding branch, the low-rank matrix corresponding to the cross-modal fusion branch, and the multimodal industrial sample set, the initial multimodal large model is continuously fine-tuned. When the fine-tuning training meets the training termination condition, the fine-tuning training is stopped, and the model after fine-tuning training is determined as the target multimodal large model.
[0049] The multimodal industrial quality inspection method provided in this application determines the low-rank matrices corresponding to the visual encoding branch, text encoding branch, and cross-modal fusion branch while freezing the backbone parameters of the initial multimodal large model. This allows the method to adapt the model to industrial quality inspection scenarios by updating only a small number of low-rank parameters while retaining the existing pre-training capabilities of the initial multimodal large model, thus reducing the number of parameters that need to be updated during fine-tuning training. Furthermore, by determining the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch, and cross-modal fusion branch according to the multimodal joint loss function, and combining the gradient sensitivity with the number of training steps to select the target activation layer, the method achieves the desired results. This method selectively determines the network layers involved in low-rank parameter updates based on the sensitivity of different network layers and the current training progress, avoiding the use of identical fine-tuning methods for each network layer throughout the fine-tuning training process. Then, it fine-tunes the initial multimodal large model using the target activation layer, each low-rank matrix, and a multimodal industrial sample set. Finally, it uses the target multimodal large model to predict defects in the multimodal industrial data to be inspected. This method solves the technical problems of high resource consumption and lack of differentiated fine-tuning of network layers in existing industrial quality inspection methods during the fine-tuning of multimodal large models, improving the fine-tuning efficiency and adaptability of multimodal large models in industrial quality inspection scenarios.
[0050] In one embodiment, each set of samples in the multimodal industrial sample set includes industrial image samples, process parameter samples, and defect annotation information; The process parameter sample includes steel grade data and / or rolling process numerical data; Defect labeling information is used to characterize the type and location of defects on the steel surface.
[0051] Specifically, industrial image samples refer to image data obtained by image acquisition of the surface of steel products, used to reflect the visual characteristics of the steel product surface. For example, industrial image samples can be surface images of hot-rolled strip steel; they can also be surface images of cold-rolled strip steel, medium-thick plates, or bars; they can also be steel surface images acquired using visible light imaging, multispectral imaging, or other industrial imaging methods. This application does not impose specific limitations on this.
[0052] It is understood that the steel surface defects that can be presented in industrial image samples can be determined according to the type of steel product. For example, for hot-rolled strip steel, steel surface defects may include surface cracks, pitting, scratches, roll marks, indented iron oxide scale, scabs, and edge cracks; for cold-rolled strip steel, steel surface defects may include holes, adhesion marks, and vibration marks; for medium and heavy plates, steel surface defects may include indented oxide scale and inclusions. This application does not specifically limit these defects.
[0053] Process parameter samples refer to data corresponding to industrial image samples, used to reflect the properties of steel products or the state of steel product production processes.
[0054] Steel grade data refers to data used to characterize the steel grade or material grade of steel products. For example, steel grade data can be Q235B; it can also be 304 or other steel grade corresponding to the steel product being tested. This application does not impose specific limitations on this.
[0055] Rolling process numerical data refers to data generated during the rolling production of steel products that can reflect the rolling process status in numerical form. For example, rolling process numerical data may include rolling temperature; it may also include rolling speed, reduction, or other numerical process parameters related to the steel rolling process. Rolling temperature may, for example, include the initial rolling temperature and / or the final rolling temperature. This application does not specifically limit this.
[0056] It should be noted that, in order to establish the correspondence between industrial image samples, process parameter samples, and defect annotation information, each set of samples can also be associated with corresponding production identification information. For example, production identification information may include roll number; it may also include production line number or other information that can identify steel products and their production source. This application does not impose specific limitations on this.
[0057] Defect annotation information refers to supervisory information generated based on the actual situation of steel surface defects in industrial image samples, used to characterize the category and location of steel surface defects. For example, the category in the defect annotation information indicates whether the steel surface defect in the industrial image sample belongs to the category of crack, pit, scratch, roll mark, indentation of iron oxide scale, scab, or other defect categories; the location in the defect annotation information can be represented by a bounding box surrounding the steel surface defect; it can also be represented by other location annotation forms that can characterize the image area where the steel surface defect is located. This application does not specifically limit this.
[0058] It is understood that defect annotation information can be stored using structured files. For example, JSON (JavaScript Object Notation) files can be used to store defect annotation information; XML (Extensible Markup Language) files or other data formats that can record defect categories and defect locations can also be used to store defect annotation information. This application does not impose specific limitations on this.
[0059] Specifically, for industrial image samples, image acquisition equipment can employ a linear CCD (Charge-Coupled Device) camera. The resolution of a linear CCD camera can be 4096 pixels or higher, and it is used in conjunction with an LED (Light-Emitting Diode) linear light source to image the strip surface. For example, the shooting width of a linear CCD camera can be 800 mm to 2000 mm to cover the surface area along the width of the strip. Furthermore, the linear CCD camera can be installed at locations such as the hot rolling mill output roller table, cold rolling mill inlet, cold rolling mill outlet, or after the leveling machine to continuously acquire images of the steel surface according to the corresponding surface quality inspection location in the steel production line.
[0060] The sampling frequency of the image acquisition device can be synchronized with the strip's running speed, allowing continuously acquired images along the strip's length to be stitched or combined according to the strip's actual movement, thus forming a continuous image of the strip's surface. For example, when the strip's running speed is 1 to 2 meters per second, the sampling frequency of the image acquisition device can be set to 10,000 to 20,000 lines per second.
[0061] Optionally, a multispectral camera can be added to the visible light image acquisition equipment. For example, images of steel surfaces can be acquired using a multispectral camera corresponding to the infrared and / or ultraviolet bands. Since different materials or different surface conditions can exhibit different response characteristics in different spectral ranges, the ability to distinguish between surface conditions such as cracks and water stains can be enhanced by adding multispectral industrial image samples.
[0062] For process parameter samples, data can be automatically obtained from the information system corresponding to the steel production process. For example, steel grade data and rolling process numerical data corresponding to the current industrial image sample can be obtained from the MES (Manufacturing Execution System) or a secondary process control system. The steel grade data can be, for example, Q235B, 304, etc.; the rolling process numerical data can include, for example, the initial rolling temperature, final rolling temperature, rolling speed, and reduction amount. Simultaneously, the coil number and production line number can also be obtained to establish a correlation between the industrial image sample and the corresponding process parameter sample.
[0063] For defect annotation information, quality inspectors can manually annotate industrial image samples obtained offline. For example, quality inspectors can determine whether there are steel surface defects in the industrial image sample. If steel surface defects are present, they can determine the corresponding category of the steel surface defects and use bounding boxes to mark the location of the steel surface defects in the industrial image sample, thus forming defect annotation information that simultaneously contains the category and location of the steel surface defects. After annotation is completed, the defect annotation information can be stored in the form of JSON or XML files.
[0064] Optionally, after collecting industrial image samples, process parameter samples, and defect annotation information, different types of sample data can be preprocessed separately.
[0065] For industrial image samples, useless edges can be cropped first to reduce image areas irrelevant to the steel surface quality inspection task. Then, histogram equalization can be used to enhance the contrast of the industrial image samples to improve the recognizability of steel surface texture and defects. Furthermore, bilateral filtering can be used to process the industrial image samples to smooth background noise while preserving steel surface edge information, thereby reducing the interference of background noise on the steel surface defect features.
[0066] For process parameter samples, encoding can be performed according to the different data formats of the process parameter samples. For discrete data such as steel grade data, one-hot encoding or embedding encoding can be used to convert the steel grade data into feature representations that can be input into the initial multimodal large model. Among them, one-hot encoding refers to the encoding method that uses discrete values at different positions to represent different categories; embedding encoding refers to the encoding method that maps discrete categories to continuous vector representations.
[0067] For rolling process numerical data such as rolling temperature, rolling speed, and reduction, Min-Max normalization can be used to map rolling process numerical data with different numerical ranges to a unified numerical range, thereby reducing the influence between different rolling process numerical data due to differences in dimensions or value ranges.
[0068] Optionally, if each sample group is also associated with a text description, text preprocessing can be performed on the text description. For example, for text descriptions related to the surface condition of steel, such as "the length of the edge crack is about 15 mm", the corresponding word segmentation method of BERT can be used for word segmentation, converting the text description into a text input sequence that can be processed by the text encoding branch.
[0069] After the above preprocessing, corresponding industrial image samples, process parameter samples, and defect annotation information can be combined into a set of samples, and a multimodal industrial sample set can be constructed from multiple sets of samples.
[0070] Optionally, the multimodal industrial sample set can be partitioned based on the roll number. For example, samples corresponding to different roll numbers can be assigned to training, validation, and test sets respectively, ensuring that industrial image samples corresponding to the same roll of steel product are not simultaneously distributed across different datasets in the training, validation, and test sets. For instance, if multiple industrial image samples are continuously acquired corresponding to a single roll number, these multiple industrial image samples, along with their corresponding process parameter samples and defect annotation information, are grouped into the same dataset, instead of assigning different samples corresponding to the same roll number to separate training and test sets. This reduces the risk of data leakage caused by similar images of the same roll of steel product appearing simultaneously during the training and testing processes.
[0071] The multimodal industrial quality inspection method provided in this application utilizes a multimodal industrial sample set, where each sample group includes industrial image samples, process parameter samples, and defect annotation information. The process parameter samples include steel grade data and / or rolling process numerical data, and the defect annotation information is used to characterize the category and location of defects on the steel surface. This method enables the simultaneous learning of visual and textual features during model fine-tuning training, reducing the difficulty in fully utilizing production process information when training solely using industrial image samples. This improves the accuracy of defect category identification and defect location determination, thereby enhancing the fine-tuning efficiency and adaptability of the multimodal large model in industrial quality inspection scenarios.
[0072] In one embodiment, determining the low-rank matrices corresponding to the visual coding branch, text coding branch, and cross-modal fusion branch includes: Based on the number of training steps, determine the target rank value of the low-rank matrix corresponding to the visual encoding branch; Keep the rank of the low-rank matrix corresponding to the text encoding branch at the first fixed value; The rank of the low-rank matrix corresponding to the cross-modal fusion branch is kept at the second fixed value; The first fixed value is less than the second fixed value.
[0073] Specifically, the target rank value is used to limit the low-rank representation capability of the low-rank matrix corresponding to the visual encoding branch at the current training step. For example, the target rank value can change as the number of training steps increases; it can also remain unchanged within a certain range of training steps and change after entering other training step ranges. This application does not impose specific limitations on this.
[0074] The first fixed value refers to the rank value that is predetermined and remains unchanged for the low-rank matrix corresponding to the text encoding branch during fine-tuning training. For example, the first fixed value can be 2; it can also be other fixed rank values that can meet the fine-tuning requirements of the text encoding branch. This application does not impose specific limitations on this.
[0075] The second fixed value refers to the rank value that is predetermined and remains unchanged for the low-rank matrix corresponding to the cross-modal fusion branch during fine-tuning training, and the second fixed value is greater than the first fixed value. For example, if the first fixed value is 2, the second fixed value can be 8; it can also be other fixed rank values greater than the first fixed value. This application does not specifically limit this.
[0076] It is understandable that the feature processing tasks undertaken by the visual encoding branch, the text encoding branch, and the cross-modal fusion branch are different. Therefore, different low-rank matrix rank configuration strategies can be adopted for different branches.
[0077] Specifically, the visual encoding branch is mainly used to extract visual features from industrial images. In the scenario of steel surface defect detection, industrial images can contain visual information at different levels, such as edges, textures, shapes, and local abnormal regions. Some steel surface defects also have complex visual structures such as being elongated, irregular, or having branches. Therefore, the target rank value of the low-rank matrix corresponding to the visual encoding branch can be changed with the number of training steps to adjust the low-rank parameter representation capability of the visual encoding branch at different training progresses.
[0078] For the visual encoding branch, after fine-tuning training begins, the current training step number is obtained, and the target rank value of the low-rank matrix corresponding to the visual encoding branch is determined based on the current training step number. For example, when the target rank value corresponding to the current training step is small, the visual encoding branch participates in fine-tuning training with fewer low-rank parameters; when the target rank value corresponding to subsequent training steps increases, the effective rank components participating in fine-tuning training in the low-rank matrix corresponding to the visual encoding branch can be increased, enabling the visual encoding branch to utilize more low-rank parameters for feature learning.
[0079] The text encoding branch is mainly used for feature encoding of information related to industrial production processes. Compared to the complex local textures and geometric structures in industrial images, information related to industrial production processes usually has relatively clear and stable semantics. Therefore, the rank value of the low-rank matrix corresponding to the text encoding branch can be kept at a small first fixed value to avoid configuring too many trainable low-rank parameters for the text encoding branch.
[0080] For the text encoding branch, the rank of the low-rank matrix corresponding to the text encoding branch is kept at a first fixed value. Taking a first fixed value of 2 as an example, at the beginning of fine-tuning training, the rank of the low-rank matrix corresponding to the text encoding branch can be set to 2; as the number of training steps increases, the rank of the low-rank matrix corresponding to the text encoding branch continues to be kept at 2, without changing with the number of training steps.
[0081] The cross-modal fusion branch is primarily used to establish the correlation between the visual features output by the visual encoding branch and the features output by the text encoding branch. Since the cross-modal fusion branch needs to perform interaction and fusion of features from different modalities, it requires a certain level of parameter representation capability. Therefore, the low-rank matrix corresponding to the cross-modal fusion branch can be kept at a second fixed value, and this second fixed value can be greater than the first fixed value corresponding to the text encoding branch.
[0082] For the cross-modal fusion branch, the rank of the low-rank matrix corresponding to the cross-modal fusion branch is kept at a second fixed value. Taking a second fixed value of 8 as an example, at the beginning of fine-tuning training, the rank of the low-rank matrix corresponding to the cross-modal fusion branch can be set to 8; as the number of training steps increases, the rank of the low-rank matrix corresponding to the cross-modal fusion branch continues to be kept at 8, without changing with the number of training steps.
[0083] The multimodal industrial quality inspection method provided in this application determines the target rank value of the low-rank matrix corresponding to the visual encoding branch by the number of training steps. This enables the method to adjust the representation capability of the low-rank parameters corresponding to the visual encoding branch as the fine-tuning training progresses, avoiding the problem of using a single fixed rank value throughout the entire fine-tuning training process, which makes it difficult to meet the visual feature learning needs under different training progresses, thereby improving the fine-tuning adaptability of the visual encoding branch. Furthermore, by keeping the rank value of the low-rank matrix corresponding to the text encoding branch at a first fixed value and the rank value of the low-rank matrix corresponding to the cross-modal fusion branch at a second fixed value, unnecessary parameter updates caused by the use of excessively high rank values in the text encoding branch and the cross-modal fusion branch are reduced, thereby reducing the resource overhead of fine-tuning training. This solves the problem of mismatch between parameter configuration and feature learning needs caused by using the same low-rank configuration for different modal branches, and improves the fine-tuning efficiency and adaptability of multimodal large models in industrial quality inspection scenarios.
[0084] In one embodiment, determining the target rank of the low-rank matrix corresponding to the visual encoding branch based on the number of training steps includes: If the number of training steps is less than or equal to the first preset step threshold, the target rank value is determined to be the initial rank value; If the number of training steps is greater than the first preset step threshold and the number of training steps is less than or equal to the second preset step threshold, the rank value is incremented based on the initial rank value according to the first preset step size to obtain the first candidate rank value, and the first candidate rank value is determined as the target rank value. If the number of training steps is greater than the second preset step threshold and the number of training steps is less than or equal to the third preset step threshold, the rank value is incremented based on the first candidate rank value according to the second preset step size to obtain the second candidate rank value, and the second candidate rank value is determined as the target rank value; the second candidate rank value is less than or equal to the preset rank value threshold.
[0085] Specifically, the first preset step threshold is used to determine whether the low-rank matrix corresponding to the visual encoding branch has entered the training step boundary of the first progressive rank growth stage from its initial rank value. For example, the first preset step threshold can be set according to the training duration that needs to maintain a low rank value in the early stage of fine-tuning training; it can also be set according to the size of the multimodal industrial sample set, batch size, and training convergence speed. This application does not impose specific limitations on this.
[0086] The second preset step threshold refers to the training step boundary used to determine whether the low-rank matrix corresponding to the visual encoding branch has entered the second progressive rank growth stage from the first progressive rank growth stage. For example, the second preset step threshold can be greater than the first preset step threshold. This application does not specifically limit this.
[0087] The third preset step threshold refers to the boundary of the training steps used to limit the training range corresponding to the second progressive rank growth phase. The third preset step threshold is greater than the second preset step threshold. For example, the third preset step threshold can be set according to the total number of training steps corresponding to the fine-tuning training; it can also be set to the number of training steps corresponding to the end of the fine-tuning training. This application does not make specific limitations in this regard.
[0088] The initial rank value refers to the rank value assigned to the low-rank matrix corresponding to the visual encoding branch during the initial stage of fine-tuning training. For example, the initial rank value can be 2; other smaller rank values can also be pre-configured according to the network structure of the visual encoding branch and the parameter requirements during the initial training stage. This application does not impose specific limitations on this.
[0089] The first preset step size refers to the interval of training steps used to control the rank increment of the low-rank matrix corresponding to the visual encoding branch during the first progressive rank increase phase. For example, the first preset step size can be 250 training steps, meaning that the rank of the low-rank matrix corresponding to the visual encoding branch is increased by 1 every 250 training steps; it can also be set to other training step intervals according to actual fine-tuning training needs. This application does not impose specific limitations on this.
[0090] The second preset step size refers to the interval between training steps used to control the rank increment of the low-rank matrix corresponding to the visual encoding branch during the second progressive rank growth phase. For example, the second preset step size can be 400 training steps, meaning that the rank of the low-rank matrix corresponding to the visual encoding branch is increased by 1 every 400 training steps; it can also be set to other training step intervals according to actual fine-tuning training needs. This application does not impose specific limitations on this.
[0091] The first candidate rank value refers to the rank value obtained by gradually increasing the initial rank value according to the first preset step size when the number of training steps is between the first preset step threshold and the second preset step threshold. The first candidate rank value can increase accordingly as the number of training steps increases. This application does not specifically limit this.
[0092] The second candidate rank value refers to the rank value obtained by further increasing the first candidate rank value corresponding to the current training phase based on the second preset step size when the number of training steps is between the second preset step threshold and the third preset step threshold. As the number of training steps increases, the second candidate rank value can increase accordingly, but the second candidate rank value shall not exceed the preset rank value threshold.
[0093] The preset rank threshold refers to the upper limit of the rank value that the low-rank matrix corresponding to the pre-configured visual coding branch can achieve. For example, the preset rank threshold can be 16; other rank values can also be set according to the parameter size of the visual coding branch, the complexity of visual features in the industrial image, and the allowed fine-tuning parameter size. This application does not impose specific limitations on this.
[0094] Understandably, the reason for adopting the aforementioned progressive rank scheduling method is that the visual feature complexity corresponding to different steel surface defects varies. For example, relatively simple steel surface defects such as indented iron oxide scale and pitting clusters usually exhibit visual features with large areas and relatively gentle grayscale changes, and the corresponding feature representation complexity is low. In one example, a rank value suitable for feature learning can be between 2 and 4.
[0095] For example, medium-complexity steel surface defects such as scratches, roll marks, and adhesions are usually linear or strip-shaped, and the defect width may vary. The corresponding feature representation is more complex than that of simple steel surface defects. In one example, the rank value suitable for feature learning can be 6 to 10.
[0096] For example, complex steel surface defects such as microcracks, edge cracks, and scabs may have visual features such as being slender, irregular, or having branches, requiring visual encoding of branches to represent more complex local structures. In one example, a rank value suitable for feature learning can be between 12 and 16.
[0097] It should be noted that there is a correspondence between the complexity of the aforementioned steel surface defects and the suitable range of rank values for feature learning. The more complex the visual features of the steel surface defects, the higher the demand for the representational power of low-rank parameters in the visual encoding branch, thus a relatively large rank value is appropriate. Conversely, for simpler visual features such as large areas and relatively smooth grayscale changes, a relatively small rank value can be used. Based on this correspondence, fine-tuning training can initially use a smaller rank value to prioritize learning simple visual features, and gradually increase the rank value as the number of training steps increases, thereby gradually enhancing the representational power for moderately complex and complex visual features. This forms the basis for the progressive rank growth design.
[0098] Specifically, the APFT (Progressive Automatic Parameter-Efficient Fine-Tuning) method can be used to progressively schedule the low-rank matrix corresponding to the visual encoding branch. Taking a total training step of 5000 as an example, the training process can be divided into three training stages.
[0099] In the first training phase, 0≤ <1000, the target rank value of the low-rank matrix corresponding to the visual coding branch can be expressed as shown in formula (2): Formula (2) in, Indicates the number of training steps. The target rank value of the low-rank matrix corresponding to the visual encoding branch; the value 2 represents the initial rank value.
[0100] In other words, during the initial training phase after fine-tuning begins, the low-rank matrix corresponding to the visual encoding branch maintains a small initial rank value. In the steel surface defect detection scenario, this training phase can prioritize learning simpler visual features such as larger areas and relatively smooth grayscale changes, while avoiding the risk of overfitting by configuring too many trainable parameters in the early stages of training.
[0101] In the second training phase, 1000≤ <3000, the target rank value of the low-rank matrix corresponding to the visual coding branch can be expressed as shown in formula (3): Formula (3) Therefore, after entering the second training phase, the rank of the low-rank matrix corresponding to the visual encoding branch can be increased by 1 every 250 training steps. By gradually increasing the target rank value according to the first preset step size, the visual encoding branch can gradually increase the ability of the low-rank parameters to participate in fine-tuning training, so as to gradually learn visual features of moderate complexity such as linear, strip, and width variations, instead of adjusting the low-rank matrix to a large rank value all at once when entering the second training phase.
[0102] In the third training phase, 3000≤ <5000, the target rank value of the low-rank matrix corresponding to the visual coding branch can be expressed as shown in formula (4): Formula (4) Therefore, in the third training phase, based on the first candidate rank value corresponding to the entry into the third training phase, the rank value can be increased further according to the second preset step size, and the second candidate rank value can be limited by the preset rank value threshold to ensure that the second candidate rank value does not exceed 16. As the rank value of the low-rank matrix corresponding to the visual encoding branch further increases, the visual encoding branch can use the relatively higher low-rank parameter representation ability to learn the slender, irregular, and branched complex visual structures in steel surface defects such as microcracks, edge cracks, and scabs.
[0103] Optionally, for extremely rare steel surface defects, an early rank growth-stopping strategy can be implemented during the progressive rank scheduling process. For example, for extremely rare steel surface defects such as transverse cracks with a sample size of less than 30, the rank value corresponding to the relevant training process can be increased based on the F1-score corresponding to the validation set. When the F1-score corresponding to the extremely rare steel surface defect on the validation set does not improve for 200 consecutive training steps, the continued growth of the relevant rank value can be stopped early to reduce overfitting caused by continuously increasing the model parameter representation ability on a very small number of training samples.
[0104] The multimodal industrial quality inspection method provided in this application maintains the target rank value of the low-rank matrix corresponding to the visual encoding branch at its initial rank value when the number of training steps is less than or equal to a first preset step threshold. This allows the method to prioritize learning relatively simple visual features with fewer low-rank parameters in the early stages of fine-tuning training, reducing parameter overhead and overfitting risks caused by introducing too many trainable parameters. Furthermore, by incrementally increasing the rank value based on the initial rank value according to a first preset step size after the training steps enter the next training stage, the method gradually improves the representation capability of the low-rank parameters corresponding to the visual encoding branch as the training progresses, enabling the visual... The encoding branch can gradually transition from learning relatively simple visual features to learning moderately complex visual features. Then, by using a second preset step size, the rank value is further increased based on the first candidate rank value, and a preset rank value threshold is used to limit the second candidate rank value. This method enables the visual encoding branch to further enhance its ability to represent complex visual features such as slender, irregular, and branched features in the later stages of fine-tuning training. At the same time, it limits the infinite growth of the low-rank matrix corresponding to the visual encoding branch, thereby achieving a balance between the ability to learn complex visual features and the scale of fine-tuning parameters, and improving the fine-tuning efficiency and adaptability of multimodal large models in industrial quality inspection scenarios.
[0105] In one embodiment, the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch, and cross-modal fusion branch is determined based on the multimodal joint loss function, including: Based on the classification loss function, defect localization loss function, and comparison loss function, a multimodal joint loss function is constructed. Based on the multimodal joint loss function, determine the gradient change information of each network layer; Based on the gradient change information and parameter importance information of each network layer, the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch and cross-modal fusion branch is determined; Among them, parameter importance information is used to characterize the degree of influence of network layer parameters on defect prediction results.
[0106] Specifically, the classification loss function is used to measure the difference between the defect category predicted by the initial multimodal large model and the actual defect category. For example, the classification loss function can be the Cross-Entropy loss function; it can also be the Focal Loss function or other loss functions that can measure the error in defect category prediction. For another example, in the scenario of steel surface defect detection, the classification loss function can be used to constrain the initial multimodal large model to different defect categories such as cracks, pits, scratches, roll marks, and indentation of iron oxide scale. When the initial multimodal large model outputs a low prediction probability for the correct defect category, the loss value corresponding to the classification loss function can be increased accordingly, thereby prompting the initial multimodal large model to improve its prediction ability for the correct defect category during fine-tuning training. This application does not impose specific limitations on this.
[0107] The defect localization loss function measures the difference between the predicted defect location and the actual defect location from the initial multimodal large model. For example, the defect localization loss function can be the GIoU (Generalized Intersection over Union) loss function; it can also be the IoU (Intersection over Union) loss function, the DIoU (Distance Intersection over Union) loss function, the CIoU (Complete Intersection over Union) loss function, or other loss functions that can measure the error in defect location prediction. For another example, when the defect prediction task includes defect detection box regression, the defect localization loss function can be determined based on the overlap between the defect detection boxes predicted by the initial multimodal large model and the corresponding annotation boxes of the actual defect. The greater the difference between the predicted defect detection boxes and the actual defect location, the larger the loss value of the defect localization loss function can be. This application does not impose specific limitations on this.
[0108] Contrastive loss functions are used to measure the similarity between mutually matching modal features and between mutually mismatched modal features. For example, the InfoNCE (Information Noise-Contrastive Estimation) loss function can be used; other contrastive loss functions optimized based on the difference in feature similarity between positive and negative sample pairs can also be employed. Mutually matching modal features can originate from the same set of multimodal industrial samples, while mutually mismatched modal features can originate from different sets of multimodal industrial samples. By using contrastive loss functions, the distance between mutually matching modal features in the feature space can be reduced, while the distance between mutually mismatched modal features can be increased, thus enabling the cross-modal fusion branch to more accurately establish the correspondence between different modal features.
[0109] Gradient change information refers to information obtained from the gradient of the multimodal joint loss function relative to the network layer parameters, reflecting the degree of response of the corresponding network layer to the current fine-tuning training. For example, gradient change information can be represented by the norm or square norm of the gradient of the corresponding network layer; it can also be represented by the variance of the gradients between multiple training steps. This application does not impose specific limitations on this.
[0110] Parameter importance information is used to characterize the degree to which network layer parameters affect defect prediction results. The greater the impact of changes in network layer parameters on defect prediction results, the higher the importance of the corresponding parameters in that network layer; conversely, the smaller the impact of changes in network layer parameters on defect prediction results, the lower the importance of the corresponding parameters in that network layer. For example, parameter importance information can be characterized using Fisher information; it can also be characterized using Hessian matrix approximation. This application does not impose specific limitations on this approach.
[0111] Gradient sensitivity is used to characterize the degree to which a network layer is sensitive to the current multimodal industrial quality inspection task. High gradient sensitivity indicates that the corresponding network layer has a significant gradient response during the current fine-tuning training process, and / or that the parameters in the corresponding network layer have a high degree of influence on the defect prediction results; low gradient sensitivity indicates that the gradient response and / or the parameters of the corresponding network layer are relatively less important. This application does not impose specific limitations on this.
[0112] Specifically, a multimodal joint loss function can be constructed based on the classification loss function, defect localization loss function, and comparison loss function. The multimodal joint loss function can be represented by equation (5): Formula (5) in, Represents the multimodal joint loss function; This represents the classification loss function, used to measure the difference between the predicted defect category and the actual defect category; This represents the defect location loss function, used to measure the difference between the predicted defect location and the actual defect location; This represents the contrastive loss function, used to measure the degree of matching between features of different modalities; This represents the weighting coefficients corresponding to the defect localization loss function, used to adjust the contribution of the defect localization loss function to the multimodal joint loss function; This represents the weight coefficients corresponding to the contrastive loss function, used to adjust the contribution of the contrastive loss function to the multimodal joint loss function.
[0113] For example, the classification loss function can be the cross-entropy loss function, the defect localization loss function can be the GIoU loss function, and the contrast loss function can be the InfoNCE loss function.
[0114] Subsequently, the gradient change information of each network layer in the visual coding branch, text coding branch, and cross-modal fusion branch is determined according to the multimodal joint loss function. Taking any network layer A as an example, the gradient of the multimodal joint loss function with respect to the parameters of that network layer can be determined, and the gradient change information of network layer A can be determined based on this gradient.
[0115] Next, based on the gradient change information and parameter importance information of each network layer, the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch, and cross-modal fusion branch is determined. This process can be shown in formula (6): in, Represents network layer The corresponding gradient sensitivity; Represents network layer For the parameters used to perform gradient sensitivity calculations; Describes the multimodal joint loss function Relative to network layer Corresponding parameters The gradient; In the norm, the subscript 2 indicates the L2 norm, and the superscript 2 indicates squaring the result of the L2 norm calculation. Represents network layer The corresponding Fisher information item.
[0116] For example, during a fine-tuning training process, the current batch of multimodal industrial samples is input into the initial multimodal large model to obtain the defect prediction results for the current batch. Based on the defect prediction results, the classification loss function, defect localization loss function, and contrast loss function are determined, thereby determining the calculation result of the multimodal joint loss function. Subsequently, backpropagation is performed to obtain the gradients of the multimodal joint loss function relative to the parameters of each network layer in the visual encoding branch, the text encoding branch, and the cross-modal fusion branch, thereby determining the gradient change information of each network layer. Simultaneously, Fisher information terms corresponding to each network layer are obtained as parameter importance information for that network layer.
[0117] For any given network layer, the gradient change information and parameter importance information are combined to obtain the gradient sensitivity of that layer. By traversing each network layer in the visual encoding branch, text encoding branch, and cross-modal fusion branch in the same way, the gradient sensitivity of each network layer can be determined.
[0118] The multimodal industrial quality inspection method provided in this application constructs a multimodal joint loss function by using a classification loss function, a defect localization loss function, and a contrast loss function. This reduces the difficulty of simultaneously considering defect classification, defect localization, and cross-modal feature association when using only a single loss function. Furthermore, based on the multimodal joint loss function, the gradient change information of each network layer is determined. Then, based on the gradient change information and parameter importance information of each network layer, the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch, and cross-modal fusion branch is determined. This avoids using the same sensitivity evaluation method for different network layers, enabling differentiated quantification of the fine-tuning sensitivity of each network layer in different modal branches. This improves the targeting of differentiated fine-tuning of network layers and enhances the fine-tuning efficiency and adaptability of the multimodal large model in industrial quality inspection scenarios.
[0119] In one embodiment, the target activation layer is selected from each network layer based on gradient sensitivity and training steps, including: Based on the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch, and cross-modal fusion branch, the first sensitive network layer, the second sensitive network layer, and the third sensitive network layer are determined from each network layer. The third sensitive network layer is identified as the target freezing layer, and the target freezing layer is kept in a frozen state. If the number of training steps is less than or equal to the first preset activation threshold, the first sensitive network layer is determined as the target activation layer; When the number of training steps is greater than the first preset activation threshold and less than or equal to the second preset activation threshold, the first sensitive network layer remains in an active state, and the network layers in the second sensitive network layer are gradually identified as target activation layers as the number of training steps increases. The first sensitive network layer includes a shallow network layer of the visual coding branch and a cross-attention network layer of the cross-modal fusion branch. The second sensitive network layer includes the intermediate network layer of the visual coding branch; The third sensitive network layer includes all network layers in the text encoding branch except for the embedding layer.
[0120] It is understandable that the first, second, and third sensitive network layers are used to distinguish the relative sensitivity of different network layers, and do not mean that the corresponding network layer must have a certain fixed gradient sensitivity value.
[0121] Shallow network layers refer to network layers in the visual coding branch that are relatively close to the visual modality input side and are mainly used to extract low-level visual features. For example, shallow network layers can be used to extract edge features in industrial images; they can also be used to extract texture features, local grayscale variation features, and microstructural features. For example, in the scenario of steel surface defect detection, steel surface defects such as microcracks, edge cracks, and pitting can usually be characterized by changes in edges, local textures, or microstructures. Therefore, the shallow network layers of the visual coding branch have a high responsiveness to changes in such visual information and can correspond to the first sensitive network layer. This application does not specifically limit this.
[0122] Intermediate network layers refer to the network layers in the visual coding branch that are located after the shallow network layers and are used to further combine and semantically abstract the visual features extracted by the shallow network layers. For example, intermediate network layers can be used to combine local edges and textures; they can also be used to form intermediate-level visual features that can characterize defect morphology or the semantics of local regions. This application does not specifically limit this.
[0123] A cross-attention network layer refers to a network layer in a cross-modal fusion branch used to calculate the correlation between features of different modalities and to perform feature interaction based on these correlations. For example, a cross-attention network layer can determine the correlation between different modal features based on the visual features output by the visual encoding branch and the features output by the text encoding branch. In the scenario of steel surface defect detection, a cross-attention network layer can establish the correlation between defect region features in an industrial image and corresponding process information features. Therefore, changes in the parameters of the cross-attention network layer can directly affect the fusion effect between different modal information.
[0124] An embedding layer refers to a network layer in the text encoding branch that converts discrete input information into a continuous vector representation. For example, an embedding layer can convert text tags into corresponding embedding vectors; it can also convert discrete encoding results suitable for text encoding branch processing into continuous feature representations. This application does not impose specific limitations on this.
[0125] A target frozen layer refers to a network layer that remains frozen during activation and is not included in the activation range. For example, the third sensitive network layer can be designated as the target frozen layer, and its backbone parameters are kept out of parameter updates at different training steps. This application does not impose specific limitations on this.
[0126] Optionally, the target frozen layer being in a frozen state can mean that the backbone parameters of the target frozen layer remain frozen and do not enter an active state. In cases where limited adaptation of the text encoding branch is required, a very small number of LoRA parameters can be pre-configured for the network layers in the text encoding branch (excluding the embedding layer) for limited adjustment. This limited adjustment does not change the frozen state of the backbone parameters of the target frozen layer. This application does not impose specific limitations on this.
[0127] The first preset activation threshold can be 500 training steps; it can also be set to other training steps according to the size of the multimodal industrial sample set, the training convergence speed, and the parameter size of the target activation layer. This application does not impose specific limitations on this.
[0128] The second preset activation threshold can be 2000 training steps; it can also be set to other training steps based on the total number of training steps for fine-tuning and the number of network layers in the visual encoding branch. This application does not impose specific limitations on this.
[0129] It is understood that, as the number of training steps increases, the network layers in the second sensitive network layer are gradually identified as target activation layers. This means that between the first preset activation threshold and the second preset activation threshold, not all second sensitive network layers are activated at once, but the number of second sensitive network layers identified as target activation layers gradually increases with the number of training steps. For example, target activation layers can be added layer by layer according to preset training step intervals; or target activation layers can be added group by group according to preset training step intervals. This application does not make specific limitations in this regard.
[0130] Specifically, the APFT approach can be used to differentiate each network layer based on the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch, and cross-modal fusion branch.
[0131] First, based on the aforementioned gradient sensitivity calculation results and experimental priors, the shallow network layer of the visual coding branch and the cross-attention network layer of the cross-modal fusion branch can be divided into the first sensitive network layer.
[0132] The shallow network layers of the visual coding branch primarily extract local visual information such as edges, textures, and micro-cracks. When crack edges, pitted textures, or other minute structural changes appear in industrial images, the visual features output by the shallow network layers tend to change significantly. Therefore, the shallow network layers of the visual coding branch can have high gradient sensitivity.
[0133] The cross-attention network layer of the cross-modal fusion branch is mainly used to associate defect region features in industrial images with other modal features. When the parameters of the cross-attention network layer change, the association between different modal features may also change significantly. Therefore, the cross-attention network layer of the cross-modal fusion branch can also have high gradient sensitivity.
[0134] Subsequently, the intermediate network layers of the visual encoding branch can be divided into second sensitive network layers. The intermediate network layers of the visual encoding branch are mainly used to form further semantic abstractions based on shallow edges, textures, and local structural features. Therefore, compared with the first sensitive network layer, its gradient sensitivity can be at a moderate level.
[0135] Furthermore, all network layers in the text encoding branch, excluding the embedding layer, can be classified as third-sensitivity network layers. The encoding structure corresponding to the information processed by the text encoding branch is relatively stable, and the gradient responses corresponding to the deeper network layers in the text encoding branch can be relatively small. Therefore, all network layers in the text encoding branch, excluding the embedding layer, can be identified as target frozen layers, and these target frozen layers should be kept frozen during fine-tuning training.
[0136] After determining the first, second, and third sensitive network layers, progressive activation can be performed in conjunction with the number of training steps.
[0137] For example, the first preset activation threshold is set to 500 training steps, and the second preset activation threshold is set to 2000 training steps.
[0138] During the training phase corresponding to the first to the 500th training steps, the number of training steps is less than or equal to the first preset activation threshold. At this time, only the first sensitive network layer can be determined as the target activation layer, that is, the shallow network layer that activates the visual encoding branch and the cross-attention network layer of the cross-modal fusion branch, while the intermediate network layer of the visual encoding branch is not determined as the target activation layer for the time being.
[0139] Therefore, in the early stages of fine-tuning training, shallow network layers of the visual encoding branch can be used to learn local visual features such as edges, textures, and micro-cracks in industrial images, and cross-attention network layers of the cross-modal fusion branch can be used to learn the correlation between features of different modalities, without having to activate more network layers at the beginning of training.
[0140] During the training phase from the 501st to the 2000th training step, the number of training steps exceeds the first preset activation threshold but is less than or equal to the second preset activation threshold. At this point, the first sensitive network layer remains activated, and as the number of training steps increases, the intermediate network layers of the visual encoding branch are gradually identified as target activation layers. For example, the intermediate network layers can be activated layer by layer according to the order of the network layers in the visual encoding branch; alternatively, multiple adjacent intermediate network layers can be grouped together and activated group by group as the number of training steps increases.
[0141] In the different training phases described above, all network layers in the text encoding branch, except for the embedding layer, can remain as target frozen layers and not enter the progressive activation range as the number of training steps increases. This avoids large-scale parameter adjustments to the text encoding branch network layers, which have low gradient sensitivity.
[0142] Alternatively, by adopting the activation direction based on gradient sensitivity and training steps, the memory usage of fine-tuning training can be further reduced by about 30% compared to the fine-tuning method using fixed LoRA.
[0143] The multimodal industrial quality inspection method provided in this application divides each network layer into a first sensitive network layer, a second sensitive network layer, and a third sensitive network layer based on the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch, and cross-modal fusion branch. This allows the method to differentiate network layers according to their sensitivity to industrial quality inspection, reducing unnecessary parameter updates caused by using the same fine-tuning method for each network layer. Furthermore, when the number of training steps is less than or equal to a first preset activation threshold, the first sensitive network layer is determined as the target activation layer. When the number of training steps is greater than the first preset activation threshold but less than or equal to a second preset activation threshold, the first sensitive network layer is maintained. The method keeps the network layers in an active state and gradually identifies the intermediate network layers of the visual encoding branch as target activation layers as the number of training steps increases. This allows the method to gradually expand the range of network layers participating in fine-tuning training as the training progresses. Furthermore, by identifying all network layers in the text encoding branch except the embedding layer as the third sensitive network layer and keeping the third sensitive network layer in a frozen state, the method reduces the parameter adjustment of network layers with low gradient sensitivity. This solves the technical problems of large resource consumption and lack of differentiated fine-tuning of network layers in the fine-tuning of multimodal large models in existing industrial quality inspection methods, and improves the fine-tuning efficiency and adaptability of multimodal large models in industrial quality inspection scenarios.
[0144] In one embodiment, the method further includes: Based on the low-rank matrix corresponding to the target activation layer, determine the low-rank increment matrix, and perform singular value decomposition on the low-rank increment matrix to obtain the set of singular values. Based on a preset ratio, determine each target singular value from the singular value set; Retain the singular values of each target and set all other singular values in the singular value set to zero to obtain the updated singular value set; Reconstruct the low-rank increment matrix based on the updated set of singular values; Based on the sparsity and sparsity coefficients of the reconstructed low-rank increment matrix, the sparsity constraint loss is determined, and based on the orthogonality and orthogonality coefficients between the columns of the reconstructed low-rank increment matrix, the orthogonality regularization loss is determined. The initial large multimodal model is fine-tuned based on the multimodal joint loss function, sparse constraint loss, and orthogonal regularization loss.
[0145] Specifically, the low-rank increment matrix is used to characterize the parameter increment of the target activation layer relative to the backbone weight matrix. For example, if the low-rank matrix corresponding to the target activation layer includes low-rank matrix A and low-rank matrix B, the low-rank increment matrix can be obtained by matrix multiplication of low-rank matrix B and low-rank matrix A; other methods that can form parameter increment matrices from multiple low-rank matrices corresponding to the target activation layer can also be used to determine the low-rank increment matrix. This application does not impose specific limitations on this.
[0146] Singular value decomposition (SVD) refers to decomposing a target matrix into multiple matrices representing different eigenvalue directions. For example, SVD can be used to decompose a low-rank increment matrix; other matrix decomposition methods that can obtain values corresponding to different eigencomponents can also be used. This application does not impose specific limitations on this.
[0147] A singular value set refers to the set of singular values obtained after performing singular value decomposition on a low-rank increment matrix. Different singular values can be used to reflect the eigenvalue strength of the low-rank increment matrix in different eigendirections.
[0148] The preset ratio is used to filter out outliers that need to be retained. For example, the preset ratio can be 95%; it can also be set to 90%, 98%, or other ratios depending on the background noise level, defect feature complexity, and model accuracy requirements in the industrial quality inspection scenario. This application does not impose specific limitations on this.
[0149] Target singular values refer to singular values that are selected and retained from a set of singular values according to a preset ratio. For example, singular values can be selected sequentially in descending order until the selected singular values reach a preset ratio, and then the selected singular values are determined as target singular values. This application does not impose specific limitations on this.
[0150] The reconstructed low-rank increment matrix refers to the low-rank increment matrix obtained after matrix reconstruction based on the updated singular value set and the relevant matrix information obtained during the singular value decomposition process. Since only the target singular value is retained in the updated singular value set, the reconstructed low-rank increment matrix can mainly retain the eigenvalues represented by the target singular value, while weakening or removing the eigenvalues corresponding to the other singular values. This application does not impose specific limitations on this.
[0151] Sparsity is used to characterize the distribution of non-zero elements in the reconstructed low-rank increment matrix. This application does not impose specific limitations on this.
[0152] The sparsity coefficient is used to adjust the strength of the sparsity constraint during fine-tuning training. For example, the sparsity coefficient can be set according to the type or severity of background noise in the industrial image; it can also be set according to the imaging conditions corresponding to different steel production lines. This application does not impose specific limitations on this.
[0153] The sparse constraint loss is used to constrain the sparsity of the reconstructed low-rank increment matrix. By using the sparse constraint loss, the activation level of some background interference features in the low-rank parameter space can be reduced, allowing the low-rank parameters to retain more effective features related to steel surface defects.
[0154] Orthogonality is used to characterize the degree of independence between different column vectors in the reconstructed low-rank increment matrix. The closer the different column vectors are to orthogonality, the less redundant feature information they contain; the more significantly they deviate from orthogonality, the more correlated or redundant information they may have. This application does not impose specific limitations on this.
[0155] The orthogonality coefficients are used to adjust the strength of the orthogonal regularization loss in the fine-tuning training process. The larger the orthogonality coefficients, the stronger the constraint effect of the orthogonal regularization loss on the approximate orthogonality of each column in the reconstructed low-rank increment matrix; the smaller the orthogonality coefficients, the weaker the constraint effect.
[0156] Orthogonal regularization loss is used to constrain different columns in the reconstructed low-rank increment matrix to remain approximately orthogonal.
[0157] Specifically, SVD sparse pruning and joint regularization can be performed on the low-rank matrix corresponding to the target activation layer.
[0158] The low-rank increment matrix can be represented as shown in equation (7): Formula (7) in, This represents the low-rank increment matrix corresponding to the target activation layer; This represents a low-rank matrix corresponding to the target activation layer; This represents another low-rank matrix corresponding to the target activation layer; This indicates that the low-rank matrix is processed by matrix multiplication. and low-rank matrix By combining these parameters, we can obtain the parameter increments corresponding to the target activation layer.
[0159] Subsequently, singular value decomposition is performed on the low-rank increment matrix, as shown in formula (8): Formula (8) in, This represents the left singular vector matrix obtained after performing singular value decomposition on the low-rank increment matrix M; This represents the right singular vector matrix obtained after performing singular value decomposition on the low-rank increment matrix M; Let V be the transpose of the right singular vector matrix V.
[0160] Therefore, by performing singular value decomposition on the low-rank increment matrix, we can obtain multiple singular values, and these multiple singular values form a singular value set.
[0161] In steel surface defect detection scenarios, industrial images may contain background interference such as water stains, oxide scale, and lighting streaks, in addition to steel surface defects. Among the singular values corresponding to the low-rank increment matrix, the singular values corresponding to background interference are usually relatively small, while the singular values corresponding to steel surface defects are usually relatively large. Therefore, different feature components in the low-rank increment matrix can be filtered based on the magnitude of the singular values.
[0162] For example, the preset ratio can be set to 95%, and the top k largest singular values can be determined from the set of singular values in descending order, so that the eigenvalues corresponding to the top k largest singular values can explain 95% of the variance in the low-rank increment matrix, and the top k largest singular values can be determined as the target singular values.
[0163] After determining the singular values of each target, the first k target singular values are retained, and the remaining singular values in the singular value set other than the first k target singular values are set to zero, thus obtaining the updated singular value set.
[0164] Next, matrix reconstruction is performed based on the updated singular value set and the relevant matrix information obtained from singular value decomposition, resulting in a reconstructed low-rank increment matrix. Since the smaller singular values have been set to zero, the reconstructed low-rank increment matrix can retain more of the main feature components corresponding to the larger singular values and reduce the proportion of background interference features corresponding to the smaller singular values in the low-rank parameters.
[0165] Furthermore, the sparse constraint loss and orthogonal regularization loss can be determined based on the reconstructed low-rank increment matrix, and the joint regularization loss can be determined based on the sparse constraint loss and orthogonal regularization loss. This process can be shown in Equation (9): Formula (9) in, Indicates the joint regularization loss; This represents the reconstructed low-rank increment matrix; This represents the sparsity coefficient, which is used to adjust the strength of the effect of the sparsity constraint loss on the joint regularization loss. Represents the L1 norm; Corresponding sparse constraint loss; This represents the orthogonal regularization coefficient, which is used to adjust the strength of the orthogonal regularization loss in the joint regularization loss. Representation matrix The transpose of the matrix; This represents the L2 norm, and the superscript 2 indicates that the result of the L2 norm calculation is squared. Corresponding to orthogonal regularization loss; Indicates and The matching identity matrix.
[0166] Optionally, the sparsity coefficient and orthogonality coefficient can be adjusted according to the main background interference types in different steel production scenarios. For example, for cold-rolled strip steel, since the surface of cold-rolled strip steel is relatively smooth, background interference such as water stains may be more obvious. The sparsity coefficient can be increased to 0.01, thereby enhancing the constraint strength of the sparsity constraint loss on the reconstructed low-rank incremental matrix and further suppressing background interference features such as water stains. As another example, for hot-rolled strip steel, since there may be more obvious oxide scale interference on the steel surface, the orthogonality coefficient can be increased to 0.005 to enhance the orthogonal regularization constraint. This application does not make specific limitations in this regard.
[0167] Finally, after obtaining the sparse constraint loss and orthogonal regularization loss, the multimodal joint loss function, sparse constraint loss, and orthogonal regularization loss can be used together for fine-tuning training of the initial multimodal large model.
[0168] The multimodal industrial quality inspection method provided in this application determines a low-rank increment matrix based on the low-rank matrix corresponding to the target activation layer. Singular value decomposition is then performed on the low-rank increment matrix to obtain a set of singular values. All singular values in the set except for the target singular values are set to zero, resulting in an updated set of singular values. The low-rank increment matrix is then reconstructed based on this updated set of singular values. This method achieves the goal of retaining the main feature components while weakening the feature components corresponding to smaller singular values, reducing the influence of industrial background interference on the low-rank parameters, thereby improving the low-rank increment matrix's ability to detect defects. The method first determines the concentration of the expression of key features; then, it determines the sparsity constraint loss by the sparsity and sparsity coefficient of the reconstructed low-rank increment matrix, and determines the orthogonal regularization loss based on the orthogonality and orthogonality coefficient between the columns in the reconstructed low-rank increment matrix. Finally, it fine-tunes the initial multimodal large model based on the multimodal joint loss function, sparsity constraint loss and orthogonal regularization loss. This method jointly constrains the sparsity of the low-rank increment matrix and the orthogonality between different feature directions, thereby improving the fine-tuning efficiency and adaptability of the multimodal large model in industrial quality inspection scenarios.
[0169] In one embodiment, the fine-tuning training process includes, prior to: Construct the hyperparameter search space corresponding to fine-tuning training; the hyperparameter search space includes the search range of the initial rank value, the search range of the preset rank value threshold, the search range of the first preset step size, the search range of the second preset step size, the search range of the sparse coefficients, the search range of the orthogonal coefficients, and the search range of the sensitivity threshold. Based on a multimodal industrial sample set, an evaluation function is constructed, and the evaluation function is iteratively calculated within the hyperparameter search space to obtain the target hyperparameter configuration. Based on the target hyperparameter configuration, configure the initial rank, preset rank threshold, first preset step size, second preset step size, sparse coefficients, orthogonality coefficients, and sensitivity threshold during the fine-tuning training process.
[0170] Specifically, the hyperparameter search space refers to the parameter space formed by the combination of candidate value ranges corresponding to one or more hyperparameters to be searched.
[0171] The search range for the initial rank value is used to characterize the candidate range of initial rank values to be used in the initial stage of fine-tuning training for determining the low-rank matrix corresponding to the visual encoding branch. For example, the search range for the initial rank value can include 2, 3, and 4; other candidate initial rank values can also be set according to the proportion of simple defects in different production lines. This application does not impose specific limitations on this.
[0172] The search range of the preset rank threshold is used to characterize the candidate range of the maximum rank value that can be reached when determining the low-rank matrix corresponding to the visual encoding branch. For example, the search range of the preset rank threshold may include 12, 16, and 20; other candidate preset rank thresholds can also be set according to whether there are complex cracks in the target steel production line and the complexity of the features of the complex cracks. This application does not make specific limitations in this regard.
[0173] The search range of the first preset step size is used to characterize the training step interval of the low-rank matrix corresponding to the visual encoding branch and the rank growth rate.
[0174] The search range of the second preset step size is used to characterize the training step interval of the rank growth rate in another rank growth stage for determining the low-rank matrix corresponding to the visual encoding branch.
[0175] The search range of the preset ratio is used to characterize how many principal singularities are retained during the singularity screening process. For example, a search can be performed among multiple candidate preset ratios, and the preset ratio that matches the current industrial quality inspection scenario can be determined based on the fine-tuning training effect corresponding to different candidate preset ratios. This application does not impose specific limitations on this.
[0176] The search range of the sensitivity threshold is used to characterize the range of candidate sensitivity thresholds that can be used when controlling the range of network layers participating in fine-tuning training. For example, a search can be performed among multiple candidate sensitivity thresholds, and the sensitivity threshold that matches the current industrial quality inspection scenario can be determined based on the fine-tuning training effect corresponding to different candidate sensitivity thresholds. This application does not impose specific limitations on this.
[0177] The search range of sparse coefficients is used to characterize the range of candidate sparse coefficients that can be used when adjusting the strength of the sparse constraint loss.
[0178] The search range of orthogonal coefficients is used to characterize the range of candidate orthogonal coefficients that can be used when adjusting the intensity of orthogonal canonical loss.
[0179] The evaluation function is used to assess how well the candidate hyperparameter configurations in the hyperparameter search space fit the current industrial quality inspection task. The output of the evaluation function can be used to compare the model performance corresponding to different candidate hyperparameter configurations.
[0180] The target hyperparameter configuration refers to the combination of hyperparameters whose evaluation results meet the preset requirements after evaluating multiple candidate hyperparameter configurations within the hyperparameter search space.
[0181] Specifically, steel companies typically include multiple steel production lines with different production conditions. For example, they may include 1580 hot rolling lines, 2030 cold rolling lines, and medium and heavy plate lines. The steel grades, production speeds, and lighting conditions corresponding to different steel production lines may vary significantly. Therefore, the same fine-tuning training configuration may not be applicable to different steel production lines simultaneously.
[0182] For example, a steel production line may mainly contain relatively simple steel surface defects, and a small initial rank value and a preset rank threshold are sufficient to meet the fine-tuning training requirements; another steel production line may contain more slender, irregular, or branched complex cracks, which may require a relatively high preset rank threshold. Similarly, the degree of background interference varies in different steel production lines, and the required sparsity constraint strength may also differ.
[0183] Therefore, before performing fine-tuning training for a new steel production line, we can first construct the hyperparameter search space corresponding to the current fine-tuning training.
[0184] Optionally, the search range for the initial rank value can be set to [2, 3, 4]; the search range for the preset rank threshold can be set to [12, 16, 20]; the search range for the first preset step size can be set to [200, 300, 500]; the search range for the second preset step size can be set to [200, 300, 500]; the search range for the sensitivity threshold can be set to [0.3, 0.7]; the search range for the sparsity coefficient can be set to [0.001, 0.05]; and the search range for the orthogonality coefficient can be set to [0.001, 0.05].
[0185] Optionally, a validation set can be obtained from a multimodal industrial sample set, and the F1-score corresponding to rare defects in the validation set data can be used as the evaluation index of the evaluation function. Therefore, for a candidate hyperparameter configuration in the hyperparameter search space, the corresponding model training or model evaluation process can be performed using this candidate hyperparameter configuration, and the calculation result of the evaluation function corresponding to the candidate hyperparameter configuration can be determined based on the F1-score corresponding to rare defects in the validation data.
[0186] The reason for using the F1-score corresponding to rare defects for evaluation is that the number of defect samples on steel surfaces is often uneven, with fewer samples corresponding to some more harmful rare defects. If the hyperparameter configuration is selected solely based on the overall average detection performance, the large number of common defects may significantly impact the evaluation results, making it difficult to fully reflect the adaptability of the candidate hyperparameter configuration to rare defects. Therefore, the F1-score corresponding to rare defects in the validation data can be used as a basis for comparison among candidate hyperparameter configurations.
[0187] Furthermore, Bayesian optimization can be used to perform iterative search in the hyperparameter search space.
[0188] Optionally, 30 to 50 Bayesian optimization iterations can be performed. In each iteration, the corresponding evaluation process is executed based on the current candidate hyperparameter configuration to obtain the rare defect F1-score corresponding to the current candidate hyperparameter configuration; then, the next candidate hyperparameter configuration is determined based on the obtained candidate hyperparameter configurations and their corresponding rare defect F1-scores. The above process is repeated until the preset iteration termination condition is met, and the candidate hyperparameter configuration with the best evaluation result or that meets the preset requirements is determined as the target hyperparameter configuration.
[0189] After 30 to 50 Bayesian optimization iterations, the target hyperparameter configuration that meets the preset requirements can be determined, thereby reducing the manual parameter adjustment time for a steel production line from about 2 weeks to about 1 day.
[0190] In the above manner, target hyperparameter configurations that are adapted to the corresponding production conditions can be automatically determined for different steel production lines, thereby configuring the initial rank value, preset rank value threshold, first preset step size, second preset step size, sparsity coefficient, orthogonality coefficient, and sensitivity threshold in the fine-tuning training process.
[0191] The multimodal industrial quality inspection method provided in this application constructs a hyperparameter search space before fine-tuning training, including an initial rank value, a preset rank value threshold, a first preset step size, a second preset step size, sparse coefficients, orthogonality coefficients, and a sensitivity threshold. This enables the method to incorporate multiple hyperparameters affecting the fine-tuning training of a large multimodal model into a unified automatic search process, reducing the workload of manually trying different hyperparameter combinations for different steel production lines. Furthermore, by constructing an evaluation function based on a multimodal industrial sample set and iteratively calculating the evaluation function within the hyperparameter search space, the target hyperparameter configuration is obtained. This allows the method to evaluate different candidate hyperparameter configurations based on the actual model performance in the current industrial quality inspection scenario, improving the adaptability of the hyperparameter configuration to the current industrial production line, thereby enhancing the fine-tuning efficiency and adaptability of the large multimodal model in industrial quality inspection scenarios.
[0192] To facilitate a clearer understanding of the technical solutions of the various embodiments of this application, further explanation is provided.
[0193] Figure 2 This is an example diagram of the multimodal industrial quality inspection method provided in this application, such as... Figure 2As shown, when collecting data from a steel production line, image data, text data, and numerical data can be collected first. Image data can be used to characterize the surface visual information of steel products, while text and numerical data can be used to characterize process information related to the steel products or production process. Image data, text data, and numerical data together constitute multimodal industrial data for multimodal industrial quality inspection.
[0194] Subsequently, image data, text data, and numerical data can be input into the initial multimodal large model. The initial multimodal large model can include a visual encoding branch, a text encoding branch, and a cross-modal fusion branch. Among them, the visual encoding branch can be used to extract features from image data, the text encoding branch can be used to extract features corresponding to text data and numerical data, and the cross-modal fusion branch can be used to associate and fuse features corresponding to different modalities.
[0195] Then, the initial multimodal large model can be fine-tuned. During fine-tuning, gradient sensitivity can be calculated to determine the network layers to participate in the fine-tuning based on their sensitivity to the current multimodal industrial quality inspection task; singular value decomposition can be performed on the low-rank increment matrix to retain feature components related to the main features; and sparse constraint loss and orthogonal regularization loss can be calculated to constrain the low-rank parameters during fine-tuning. Thus, fine-tuning can be completed by adjusting some low-rank parameters while freezing the backbone parameters of the initial multimodal large model.
[0196] After fine-tuning the training, the obtained target multimodal large model can be used to process the multimodal industrial data to be inspected and output defect prediction results. The output defect prediction results can be used to characterize the corresponding defects of steel products.
[0197] Finally, the target multimodal large model, after fine-tuning and training, can be deployed to edge devices on the production line for detection and alarm functions. Specifically, the edge devices can acquire multimodal industrial data collected from the steel production line and output defect prediction results based on the target multimodal large model. If the output defect prediction results meet the preset alarm conditions, corresponding alarm processing can be executed, thereby realizing online industrial quality inspection of steel products.
[0198] Optionally, for the validation set in the multimodal industrial sample set, when the average F1-score of all defect categories on the validation set does not improve for 300 consecutive training steps, or when the number of training steps reaches the preset maximum number of training steps, fine-tuning training can be stopped, and the optimal low-rank parameters corresponding to the target activation layer can be fixed, deriving low-rank incremental weights. The size of the derived low-rank incremental weights can be less than 5MB, while the size of the backbone model can be approximately 500MB.
[0199] Optionally, edge devices on the production line can be NVIDIA Jetson AGX Orin or Intel Edge AI Box, with up to 32GB of memory, and can use TensorRT or OpenVINO for inference acceleration. Using the aforementioned lightweight fine-tuning and deployment method, model fine-tuning can run on a single RTX 3060 GPU, with model inference latency less than 50ms. When the target multimodal large model detects pre-defined severe defects such as cracks or scabs, a marking machine can be triggered to spray paint the defect location and send an alarm signal to the host computer to guide subsequent cutting or rejection.
[0200] The multimodal industrial quality inspection device provided in this application is described below. The multimodal industrial quality inspection device described below can be referred to in correspondence with the multimodal industrial quality inspection method described above, and can achieve the same technical effect. It will not be repeated here.
[0201] Figure 3 This is a structural schematic diagram of the multimodal industrial quality inspection device provided in this application, such as... Figure 3 As shown, the device may include: The output module 310 is used to input the multimodal industrial data to be inspected into the target multimodal large model to obtain the defect prediction results output by the target multimodal large model; The target multimodal large model is obtained by fine-tuning an initial multimodal large model; the initial multimodal large model includes a visual encoding branch, a text encoding branch, and a cross-modal fusion branch; the fine-tuning training process includes: With the backbone parameters of the initial multimodal large model frozen, the low-rank matrices corresponding to the visual coding branch, text coding branch, and cross-modal fusion branch are determined respectively; Based on the multimodal joint loss function, the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch and cross-modal fusion branch is determined, and the target activation layer is selected from each network layer based on the gradient sensitivity and the number of training steps. Based on the target activation layer, each low-rank matrix, and the multimodal industrial sample set, the initial multimodal large model is fine-tuned and trained to obtain the target multimodal large model.
[0202] In one embodiment, the output module 310 is specifically used for: Based on the number of training steps, determine the target rank value of the low-rank matrix corresponding to the visual encoding branch; The rank value of the low-rank matrix corresponding to the text encoding branch is kept at a first fixed value; The rank value of the low-rank matrix corresponding to the cross-modal fusion branch is kept at a second fixed value; Wherein, the first fixed value is less than the second fixed value.
[0203] In one embodiment, the output module 310 is specifically used for: If the number of training steps is less than or equal to a first preset step threshold, the target rank value is determined to be the initial rank value. When the number of training steps is greater than the first preset step threshold and the number of training steps is less than or equal to the second preset step threshold, the rank value is incremented based on the initial rank value according to the first preset step size to obtain the first candidate rank value, and the first candidate rank value is determined as the target rank value. When the number of training steps is greater than the second preset step threshold and the number of training steps is less than or equal to the third preset step threshold, the rank value is incremented based on the first candidate rank value according to the second preset step size to obtain the second candidate rank value, and the second candidate rank value is determined as the target rank value; the second candidate rank value is less than or equal to the preset rank value threshold.
[0204] In one embodiment, the output module 310 is specifically used for: The multimodal joint loss function is constructed based on the classification loss function, the defect localization loss function, and the comparison loss function; Based on the multimodal joint loss function, determine the gradient change information of each network layer; Based on the gradient change information and parameter importance information of each network layer, the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch and cross-modal fusion branch is determined; The parameter importance information is used to characterize the degree of influence of the network layer parameters on the defect prediction results.
[0205] In one embodiment, the output module 310 is specifically used for: Based on the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch, and cross-modal fusion branch, a first sensitive network layer, a second sensitive network layer, and a third sensitive network layer are determined from each network layer. The third sensitive network layer is identified as the target frozen layer, and the target frozen layer is kept in a frozen state. If the number of training steps is less than or equal to the first preset activation threshold, the first sensitive network layer is determined as the target activation layer; When the number of training steps is greater than the first preset activation threshold and less than or equal to the second preset activation threshold, the first sensitive network layer is kept in an active state, and the network layers in the second sensitive network layer are gradually determined as the target activation layer according to the increase of the number of training steps. The first sensitive network layer includes a shallow network layer of the visual coding branch and a cross-attention network layer of the cross-modal fusion branch. The second sensitive network layer includes the intermediate network layer of the visual coding branch; The third sensitive network layer includes all network layers in the text encoding branch except for the embedding layer.
[0206] In one embodiment, the device is further configured to: Based on the low-rank matrix corresponding to the target activation layer, determine the low-rank increment matrix, and perform singular value decomposition on the low-rank increment matrix to obtain the singular value set. According to a preset ratio, each target singular value is determined from the set of singular values; Each target singular value is retained, and all other singular values in the singular value set except for each target singular value are set to zero, resulting in an updated singular value set. Reconstruct the low-rank increment matrix based on the updated set of singular values; Based on the sparsity and sparsity coefficients of the reconstructed low-rank increment matrix, the sparsity constraint loss is determined, and based on the orthogonality and orthogonality coefficients between the columns of the reconstructed low-rank increment matrix, the orthogonality regularization loss is determined. The initial multimodal large model is fine-tuned and trained based on the multimodal joint loss function, the sparse constraint loss, and the orthogonal regularization loss.
[0207] In one embodiment, prior to the fine-tuning training process, the device is further configured to: Construct a hyperparameter search space corresponding to fine-tuning training; the hyperparameter search space includes the search range of the initial rank value, the search range of the preset rank value threshold, the search range of the first preset step size, the search range of the second preset step size, the search range of the sparse coefficients, the search range of the orthogonal coefficients, and the search range of the sensitivity threshold. Based on the multimodal industrial sample set, an evaluation function is constructed, and the evaluation function is iteratively calculated within the hyperparameter search space to obtain the target hyperparameter configuration; Based on the target hyperparameter configuration, configure the initial rank value, preset rank value threshold, first preset step size, second preset step size, sparse coefficient, orthogonality coefficient, and sensitivity threshold in the fine-tuning training process.
[0208] In one embodiment, each set of samples in the multimodal industrial sample set includes industrial image samples, process parameter samples, and defect annotation information; The process parameter sample includes steel grade data and / or rolling process numerical data; The defect labeling information is used to characterize the type and location of defects on the steel surface.
[0209] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communications interface 420, and the memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute the multimodal industrial quality inspection method described in any of the above embodiments, such as including: The multimodal industrial data to be inspected is input into the target multimodal large model to obtain the defect prediction results output by the target multimodal large model; The target multimodal large model is obtained by fine-tuning an initial multimodal large model; the initial multimodal large model includes a visual encoding branch, a text encoding branch, and a cross-modal fusion branch; the fine-tuning training process includes: With the backbone parameters of the initial multimodal large model frozen, the low-rank matrices corresponding to the visual coding branch, text coding branch, and cross-modal fusion branch are determined respectively; Based on the multimodal joint loss function, the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch and cross-modal fusion branch is determined, and the target activation layer is selected from each network layer based on the gradient sensitivity and the number of training steps. Based on the target activation layer, each low-rank matrix, and the multimodal industrial sample set, the initial multimodal large model is fine-tuned and trained to obtain the target multimodal large model.
[0210] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0211] On the other hand, this application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the multimodal industrial quality inspection method provided by the above methods, the method comprising: The multimodal industrial data to be inspected is input into the target multimodal large model to obtain the defect prediction results output by the target multimodal large model; The target multimodal large model is obtained by fine-tuning an initial multimodal large model; the initial multimodal large model includes a visual encoding branch, a text encoding branch, and a cross-modal fusion branch; the fine-tuning training process includes: With the backbone parameters of the initial multimodal large model frozen, the low-rank matrices corresponding to the visual coding branch, text coding branch, and cross-modal fusion branch are determined respectively; Based on the multimodal joint loss function, the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch and cross-modal fusion branch is determined, and the target activation layer is selected from each network layer based on the gradient sensitivity and the number of training steps. Based on the target activation layer, each low-rank matrix, and the multimodal industrial sample set, the initial multimodal large model is fine-tuned and trained to obtain the target multimodal large model.
[0212] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0213] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0214] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A multimodal industrial quality inspection method, characterized in that, The method includes: The multimodal industrial data to be inspected is input into the target multimodal large model to obtain the defect prediction results output by the target multimodal large model; The target multimodal large model is obtained by fine-tuning an initial multimodal large model; the initial multimodal large model includes a visual encoding branch, a text encoding branch, and a cross-modal fusion branch; the fine-tuning training process includes: With the backbone parameters of the initial multimodal large model frozen, the low-rank matrices corresponding to the visual coding branch, text coding branch, and cross-modal fusion branch are determined respectively; Based on the multimodal joint loss function, the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch and cross-modal fusion branch is determined, and the target activation layer is selected from each network layer based on the gradient sensitivity and the number of training steps. Based on the target activation layer, each low-rank matrix, and the multimodal industrial sample set, the initial multimodal large model is fine-tuned and trained to obtain the target multimodal large model.
2. The multimodal industrial quality inspection method according to claim 1, characterized in that, Determining the low-rank matrices corresponding to the visual coding branch, text coding branch, and cross-modal fusion branch respectively includes: Based on the number of training steps, determine the target rank value of the low-rank matrix corresponding to the visual encoding branch; The rank value of the low-rank matrix corresponding to the text encoding branch is kept at a first fixed value; The rank value of the low-rank matrix corresponding to the cross-modal fusion branch is kept at a second fixed value; Wherein, the first fixed value is less than the second fixed value.
3. The multimodal industrial quality inspection method according to claim 2, characterized in that, Determining the target rank value of the low-rank matrix corresponding to the visual encoding branch based on the number of training steps includes: If the number of training steps is less than or equal to a first preset step threshold, the target rank value is determined to be the initial rank value. When the number of training steps is greater than the first preset step threshold and the number of training steps is less than or equal to the second preset step threshold, the rank value is incremented based on the initial rank value according to the first preset step size to obtain the first candidate rank value, and the first candidate rank value is determined as the target rank value. When the number of training steps is greater than the second preset step threshold and the number of training steps is less than or equal to the third preset step threshold, the rank value is incremented based on the first candidate rank value according to the second preset step size to obtain the second candidate rank value, and the second candidate rank value is determined as the target rank value; the second candidate rank value is less than or equal to the preset rank value threshold.
4. The multimodal industrial quality inspection method according to claim 1, characterized in that, The step of determining the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch, and cross-modal fusion branch based on the multimodal joint loss function includes: The multimodal joint loss function is constructed based on the classification loss function, the defect localization loss function, and the comparison loss function; Based on the multimodal joint loss function, determine the gradient change information of each network layer; Based on the gradient change information and parameter importance information of each network layer, the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch and cross-modal fusion branch is determined; The parameter importance information is used to characterize the degree of influence of the network layer parameters on the defect prediction results.
5. The multimodal industrial quality inspection method according to claim 1, characterized in that, The step of selecting the target activation layer from each network layer based on the gradient sensitivity and the number of training steps includes: Based on the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch, and cross-modal fusion branch, a first sensitive network layer, a second sensitive network layer, and a third sensitive network layer are determined from each network layer. The third sensitive network layer is identified as the target frozen layer, and the target frozen layer is kept in a frozen state. If the number of training steps is less than or equal to the first preset activation threshold, the first sensitive network layer is determined as the target activation layer; When the number of training steps is greater than the first preset activation threshold and less than or equal to the second preset activation threshold, the first sensitive network layer is kept in an active state, and the network layers in the second sensitive network layer are gradually determined as the target activation layer according to the increase of the number of training steps. The first sensitive network layer includes a shallow network layer of the visual coding branch and a cross-attention network layer of the cross-modal fusion branch. The second sensitive network layer includes the intermediate network layer of the visual coding branch; The third sensitive network layer includes all network layers in the text encoding branch except for the embedding layer.
6. The multimodal industrial quality inspection method according to claim 1, characterized in that, Also includes: Based on the low-rank matrix corresponding to the target activation layer, determine the low-rank increment matrix, and perform singular value decomposition on the low-rank increment matrix to obtain the singular value set. According to a preset ratio, each target singular value is determined from the set of singular values; Each target singular value is retained, and all other singular values in the singular value set except for each target singular value are set to zero, resulting in an updated singular value set. Reconstruct the low-rank increment matrix based on the updated set of singular values; Based on the sparsity and sparsity coefficients of the reconstructed low-rank increment matrix, the sparsity constraint loss is determined, and based on the orthogonality and orthogonality coefficients between the columns of the reconstructed low-rank increment matrix, the orthogonality regularization loss is determined. The initial multimodal large model is fine-tuned and trained based on the multimodal joint loss function, the sparse constraint loss, and the orthogonal regularization loss.
7. The multimodal industrial quality inspection method according to claim 1, characterized in that, Prior to the fine-tuning training process, the following also includes: Construct a hyperparameter search space corresponding to fine-tuning training; the hyperparameter search space includes the search range of the initial rank value, the search range of the preset rank value threshold, the search range of the first preset step size, the search range of the second preset step size, the search range of the sparse coefficients, the search range of the orthogonal coefficients, and the search range of the sensitivity threshold. Based on the multimodal industrial sample set, an evaluation function is constructed, and the evaluation function is iteratively calculated within the hyperparameter search space to obtain the target hyperparameter configuration; Based on the target hyperparameter configuration, configure the initial rank value, preset rank value threshold, first preset step size, second preset step size, sparse coefficient, orthogonality coefficient, and sensitivity threshold in the fine-tuning training process.
8. The multimodal industrial quality inspection method according to claim 1, characterized in that, Each set of samples in the multimodal industrial sample set includes industrial image samples, process parameter samples, and defect annotation information; The process parameter sample includes steel grade data and / or rolling process numerical data; The defect labeling information is used to characterize the type and location of defects on the steel surface.
9. A multimodal industrial quality inspection device, characterized in that, The device includes: The output module is used to input the multimodal industrial data to be inspected into the target multimodal large model and obtain the defect prediction results output by the target multimodal large model. The target multimodal large model is obtained by fine-tuning an initial multimodal large model; the initial multimodal large model includes a visual encoding branch, a text encoding branch, and a cross-modal fusion branch; the fine-tuning training process includes: With the backbone parameters of the initial multimodal large model frozen, the low-rank matrices corresponding to the visual coding branch, text coding branch, and cross-modal fusion branch are determined respectively; Based on the multimodal joint loss function, the gradient sensitivity of each network layer in the visual encoding branch, text encoding branch and cross-modal fusion branch is determined, and the target activation layer is selected from each network layer based on the gradient sensitivity and the number of training steps. Based on the target activation layer, each low-rank matrix, and the multimodal industrial sample set, the initial multimodal large model is fine-tuned and trained to obtain the target multimodal large model.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the multimodal industrial quality inspection method as described in any one of claims 1 to 8.
11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the multimodal industrial quality inspection method as described in any one of claims 1 to 8.
