Industrial quality inspection model training method, control device and storage medium
By combining simple and complex data sets to train graphic learning models and bridging them with large language models, the problem of misunderstanding and misidentification of industrial quality inspection models in professional fields is solved, and the accuracy of quality inspection results and production efficiency are improved.
Patent Information
- Application Number
- CN202410949599.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-10-18
AI Technical Summary
When existing industrial quality inspection models are applied in professional fields, misunderstandings and misidentifications often occur, leading to inaccurate quality inspection results and affecting production efficiency and product quality.
By acquiring simple and complex data sets, we train the graphic learning model and bridge it with the large language model to form a highly adaptable industrial quality inspection model and enhance the adaptability and accuracy of the model in professional industrial fields.
It improves the accuracy and understanding of the model in industrial quality inspection tasks, and significantly improves production efficiency and product quality stability.
Smart Images

Figure CN118799680A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial quality inspection, and specifically provides a training method, a control device and a storage medium for an industrial quality inspection model. Background Art
[0002] In current industrial quality inspection technology, large multimodal models are usually formed by training on large amounts of data on the Internet or other general data sources, which makes the models perform well when processing general data sets.
[0003] However, these models often have misunderstandings and misrecognition problems when applied to professional fields, because they may not have been exposed to specific professional images and symbols, causing the model to make incorrect expressions based on inaccurate memories. This lack of expertise and data processing capabilities limits the effectiveness of the model in specific industrial tasks, resulting in inaccurate quality inspection results, which in turn affects production efficiency and product quality.
[0004] Accordingly, the art needs a new training solution for industrial quality inspection models to solve the above problems. Summary of the invention
[0005] In order to overcome the above-mentioned defects, the present invention is proposed to provide a solution or at least partially solve the technical problem that when the model in the prior art is applied to the field of quality inspection, the quality inspection results are inaccurate.
[0006] In a first aspect, the present invention provides a method for training an industrial quality inspection model, the method comprising: obtaining a simple data set and a complex data set; inputting the simple data set into the graph-text learning model, training the graph-text learning model, and obtaining a pre-trained graph-text learning model; bridging the pre-trained graph-text learning model with a first large language model through a perception layer to obtain an industrial quality inspection model; inputting the simple data set into the industrial quality inspection model, training the perception layer; inputting the complex data set into the industrial quality inspection model, and training the industrial quality inspection model.
[0007] As an alternative or supplement to the above scheme, in a method according to an embodiment of the present invention, a simple data set includes a first image data set and a first image-text data set, the image-text learning model includes a perception branch and a image-text alignment branch, and the simple data set is input into the image-text learning model to train the image-text learning model to obtain a pre-trained image-text learning model, including: inputting the first image data set into the image-text learning model to train the perception branch in the image-text learning model; inputting the first image-text data set into the image-text learning model to train the image-text alignment branch in the image-text learning model; and obtaining a pre-trained image-text learning model.
[0008] As an alternative or supplement to the above scheme, in a method according to one embodiment of the present invention, the first image data set includes general knowledge images and quality inspection task images; the first image and text data set includes general knowledge image and text pairs and first quality inspection task image and text pairs; the complex data set is the second quality inspection task image and text pairs, wherein the text length of the second quality inspection task image and text pair is greater than the text length of the first quality inspection task image and text pair.
[0009] As an alternative or supplement to the above scheme, in a method according to an embodiment of the present invention, the method for obtaining at least part of the first quality inspection task image-text pairs in the first image-text data set includes: inputting the quality inspection task image in combination with a command statement into a second largest language model to obtain at least one first description of the quality inspection task image replied by the second largest language model; combining the first description and the corresponding quality inspection task image to obtain a first quality inspection task image-text pair.
[0010] As an alternative or supplement to the above scheme, in a method according to an embodiment of the present invention, the first description and the corresponding quality inspection task picture are combined to obtain a first quality inspection task picture-text pair, including: if there are multiple first descriptions for the quality inspection task picture, the quality inspection task picture is combined with different first descriptions one by one to obtain multiple first quality inspection task picture-text pairs, wherein the number of the first quality inspection task picture-text pairs is the same as the number of the first descriptions.
[0011] As an alternative or supplement to the above scheme, in a method according to an embodiment of the present invention, when training the graph-text alignment branch in the graph-text learning model, the graph-text learning model is optimized using a metric learning framework, and the first image data set is input into the graph-text learning model to train the perceptual branch in the graph-text learning model, and also includes: when training the perceptual branch of the graph-text learning model, there cannot be two first quality inspection task graph-text pairs corresponding to the same quality inspection task graph in the first image data set processed in each iteration.
[0012] As an alternative or supplement to the above scheme, in a method according to an embodiment of the present invention, the graph-text learning model includes a text encoder and an image encoder; the pre-trained graph-text learning model is bridged with the first large language model through a perception layer to obtain an industrial quality inspection model, including: the output of the image encoder is input into the perception layer, and the output of the perception layer and the output of the text encoder are combined and input into the first large language model.
[0013] In a second aspect, a control device is provided, which includes a processor and a storage device, wherein the storage device is suitable for storing multiple computer programs, and the computer programs are suitable for being loaded and run by the processor to execute the industrial quality inspection model training method described in any one of the technical solutions of the above-mentioned industrial quality inspection model training method.
[0014] In a third aspect, a computer-readable storage medium is provided, which stores a plurality of computer programs, wherein the computer programs are suitable for being loaded and run by a processor to execute the industrial quality inspection model training method described in any one of the technical solutions of the above-mentioned industrial quality inspection model training method.
[0015] The above one or more technical solutions of the present invention have at least one or more of the following Beneficial effects:
[0016] In the technical solution of the present invention, the technology fine-tunes the image-text learning model by combining the training strategies of simple data sets and complex data sets, and bridges it with the first language model to form a highly adaptive industrial quality inspection model. This method effectively improves the adaptability and accuracy of the model in professional industrial fields, enabling the model to accurately identify and understand specific industrial images and related complex text information. Through this training method, the model not only enhances the ability to capture key information in industrial quality inspection tasks, but also improves the operational efficiency and quality control level in real industrial environments, thereby significantly improving production efficiency and product quality stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The disclosure of the present invention will become more easily understood with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present invention. In addition, similar numbers in the figures are used to represent similar components, among which:
[0018] Figure 1 1 is a flow chart of the main steps of a method for training an industrial quality inspection model according to an embodiment of the present invention;
[0019] Figure 2 1 is a first descriptive schematic diagram of a method for training an industrial quality inspection model according to an embodiment of the present invention.
[0020] Figure 3 is a schematic diagram of a perception branch of a training method for an industrial quality inspection model according to an embodiment of the present invention;
[0021] Figure 4 is a schematic diagram of an image-text alignment branch of a training method for an industrial quality inspection model according to an embodiment of the present invention;
[0022] Figure 5 is a schematic diagram of a sub-process of a method for training an industrial quality inspection model according to an embodiment of the present invention;
[0023] Figure 6 It is a schematic diagram of industrial quality inspection model training according to a method for training an industrial quality inspection model according to an embodiment of the present invention. DETAILED DESCRIPTION
[0024] Some embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0025] In the description of the present invention, "module" and "processor" may include hardware, software or a combination of the two. A module may include hardware circuits, various suitable sensors, communication ports, and memories, and may also include software parts, such as computer programs, or a combination of software and hardware. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor, or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, hardware, or a combination of the two. Non-temporary computer-readable storage media include any suitable medium that can store computer programs, such as magnetic disks, hard disks, optical disks, flash memory, read-only memory, random access memory, etc. The term "A and / or B" means all possible combinations of A and B, such as only A, only B, or A and B. The term "at least one A or B" or "at least one of A and B" has a similar meaning to "A and / or B", and may include only A, only B, or A and B. The singular terms "one" and "the" may also include plural forms.
[0026] In an example of an application scenario of the present invention, even if the model is trained with professional knowledge, it is usually easy to lose its original ability. That is, in the process of learning professional knowledge, the original ability of the model degenerates, resulting in poor results.
[0027] Embodiment 1:
[0028] See attached Figure 1 , Figure 1 FIG. 1 is a flow chart showing the main steps of a method for training an industrial quality inspection model according to an embodiment of the present invention. Figure 1 As shown, the training method of the industrial quality inspection model in the embodiment of the present invention mainly includes the following steps S10 to S50.
[0029] Step S10: Acquire a simple data set and a complex data set.
[0030] In one embodiment, the construction of a simple data set and a complex data set is to meet the needs of multimodal learning model training, wherein the simple data set is mainly used for the preliminary training of the image and text learning model and the perception layer and the ability to learn quality inspection tasks, while the complex data set is used to further enhance the adaptability and accuracy of the industrial quality inspection model in dealing with more complex scenarios. The simple data set includes two parts: the first image data set and the first image and text data set. The first image data set includes two types of images, namely general images and quality inspection task images. General images refer to images that are widely present in public data sets. These images cover a variety of natural scenes and objects. The purpose is to allow the model to learn a wide range of visual features so that it can maintain a certain recognition ability in various environments. Quality inspection task images are images directly related to specific industrial quality inspection tasks. Quality inspection task images are specifically obtained from industrial production lines, reflecting the actual product status and possible defects. The training model can recognize and analyze these specific industrial images to improve the accuracy and reliability of the model in actual quality inspection industrial applications.
[0031] In this embodiment, the first image-text data set includes general image-text pairs and first quality inspection task image-text pairs. General image-text pairs are extracted from a wide range of data sources, such as from databases such as coco, cc3m, and vg. The text descriptions therein are closely related to general images. These image-text pairs help the image-text learning model learn how to combine visual information with language descriptions, thereby improving the relevance of language and visual data. The first quality inspection task image-text pairs focus more on images and texts related to quality inspection. The first quality inspection task image-text pairs are obtained by describing the quality inspection task images in detail. The description not only covers the basic content of the images, but also includes detailed information that may be helpful for quality inspection decisions, such as defect types, locations, and their possible impacts.
[0032] The complex dataset is mainly composed of the second quality inspection task image-text pairs, where the text description length of the second quality inspection task image-text pairs is longer than the text length of the first quality inspection task image-text pairs. The purpose is to enable the industrial quality inspection model to show better performance when processing more detailed and complex descriptions. The growth of text not only provides more information, but also increases the complexity of the description, forcing the industrial quality inspection model to deal with more complex language structures and deeper semantic information. This setting helps the model better understand and process complex instructions and descriptions when encountering complex usage scenarios in actual applications, thereby improving the practicality and robustness of the model.
[0033] Through such a data set construction strategy, we can ensure that the model gradually adapts to multimodal tasks from basic to complex during the learning process, while ensuring that the model's learning at each stage is targeted and practical, and ultimately can effectively improve the performance and reliability of the model in the field of professional quality inspection. This step-by-step training strategy meets the needs of high precision and high reliability in actual industrial applications, so that the trained model not only performs well in laboratory tests, but also maintains efficient and stable performance in complex and changeable actual production environments.
[0034] The method for obtaining at least part of the first quality inspection task image-text pairs in the first image-text data set includes:
[0035] Step S101: inputting the quality inspection task picture into the second largest language model in combination with the command statement, and obtaining at least one first description of the quality inspection task picture replied by the second largest language model.
[0036] In one implementation, the second language model can deeply analyze the input quality inspection task image and generate a description. The command sentence is designed to specifically instruct the large language model to provide information from multiple perspectives, ensuring that the generated text is rich and covers the key visual features of the image in detail.
[0037] For example, in one implementation, "Please analyze the structure of the picture, with rich analysis angles, and use the subject-verb-object format for the content of each analysis (each angle)".
[0038] Furthermore, in one embodiment, the angular richness of the large language model is increased in an auxiliary manner. For example, it is achieved through image processing techniques such as automatic target detection and image segmentation. The automatic target detection model identifies different elements in the image and generates a bounding box (BBOX) and a class label (class) for each element. This information is then used to generate a description so that the text not only describes the objects in the image, but also accurately points out the location and properties of these objects. For example, for an image of a PCBA board, if there are abnormal conditions such as "pins not out", the automatic target detection model will identify and mark the specific location of the abnormal part, and the language model will generate a specific and accurate description based on this visual information.
[0039] This method of generating image-text pairs enhances the model’s understanding of image content. For the same quality inspection task image, the second language model can obtain multiple first descriptions from multiple perspectives, such as Figure 2 shown.
[0040] Step S102: Combine the first description and the corresponding quality inspection task picture to obtain a first quality inspection task picture-text pair.
[0041] In one embodiment, the core purpose of this step is to create an intuitive and informative training sample, such that the first quality inspection task image-text pair not only provides visual data, but also comes with a language description, which is crucial for subsequent training. The first quality inspection task image-text pairs generated in this way can significantly improve the performance of the model in performing quality inspection tasks, because the model not only learns to recognize objects and features in the image, but also learns how to understand and use the language descriptions associated with these visual elements.
[0042] In this embodiment, if there are multiple first descriptions for the quality inspection task picture, the quality inspection task picture is combined with different first descriptions one by one to obtain multiple first quality inspection task picture-text pairs, where the number of first quality inspection task picture-text pairs is the same as the number of first descriptions.
[0043] In this embodiment, this process is automated, and specially designed software or scripts are used to ensure that each first description can be accurately matched with the corresponding quality inspection task image to form an independent first quality inspection task image-text pair. The advantage of this method is that it can generate a large number of diverse training samples, each of which reflects the understanding of the same image from a different perspective or in a different context.
[0044] This method of generating multiple first quality inspection task image-text pairs greatly enriches the training data set, allowing the trained model to better generalize to a variety of different situations. Since the model is exposed to the same quality inspection task images described from multiple different perspectives during the training process, it can learn more complex and in-depth image features and their associations with text, thereby improving accuracy and reliability in practical applications. In addition, this method also helps to avoid overfitting. Since the model does not learn only one fixed description of the image-text pair, but learns multiple pairs with different descriptions, such diversity enables the model to show better adaptability and flexibility when encountering new images or new descriptions that it has not seen before.
[0045] Step S20: inputting the simple data set into the graph-text learning model, training the graph-text learning model, and obtaining a pre-trained graph-text learning model.
[0046] In one embodiment, the simple data set mainly includes a first image data set and a first image-text data set. The first image data set covers general images and specific quality inspection task images, and is intended to train the image-text learning model to recognize various image features through a wide range of visual information. Through the two types of images in the first image data set, the image-text learning model can not only learn how to understand image features, but also adapt to the visual recognition needs in actual industrial applications.
[0047] Secondly, the first image-text dataset contains text descriptions that match the images. These descriptions not only simply explain the image content, but also include specific details and functional information. By learning from the first image-text dataset, the image-text learning model can not only recognize objects in images, but also understand the specific characteristics of these objects and their application in actual operations, enhancing the model's capabilities that are particularly needed in industrial quality inspection.
[0048] In one implementation, the graph-text learning model includes a perception branch and a graph-text alignment branch.
[0049] The perception branch is responsible for processing the input image data, such as Figure 3 In one implementation, a Vision Transformers (ViT) architecture is used. The ViT architecture is suitable for feature extraction of image data and can identify and parse various visual elements in an image, such as shape, texture, color, and spatial relationship.
[0050] In this embodiment, the perception branch is composed of a picture encoder and a picture decoder. The picture encoder sends the encoded content to the picture decoder.
[0051] The image-text alignment branch consists of an image encoder and a text encoder. Figure 4 As shown in FIG, the image-text alignment branch and the perception branch use the same image encoder. In the image-text alignment branch, the output content of the image encoder and the output content of the text encoder are used to calculate the loss function to train the image-text alignment branch.
[0052] In this embodiment, the same image encoder as the perception branch is used in the image-text alignment branch to ensure consistency and efficiency of image processing. This shared image encoder structure allows the image-text learning model to maintain high efficiency and accuracy when processing image feature extraction.
[0053] In this embodiment, the text encoder is responsible for processing the text description corresponding to the image. Further, in one embodiment, the image-text learning model uses the CLIP model. The image-text learning model maximizes the similarity of related image-text pairs and minimizes the similarity of unrelated pairs, thereby improving the model's ability to understand and express the image-text relationship.
[0054] Further, in this embodiment, a pre-trained graph-text learning model is obtained through steps S201-203, such as Figure 5 shown.
[0055] Step S201: input the first image data set into the image-text learning model to train the perception branch in the image-text learning model.
[0056] In one embodiment, the main purpose of this step is to use general images obtained from a wide range of image sources and quality inspection task images designed specifically for specific industrial quality inspection tasks to train and improve the general visual recognition ability and task-specific image processing ability of the graphic learning model.
[0057] In this embodiment, by layering and specializing the training of the perception branches, not only the flexibility and application breadth of the graph-text learning model are improved, but also the efficiency and accuracy of the graph-text learning model in facing specific quality inspection tasks are ensured.
[0058] Step S202: input the first image-text data set into the image-text learning model, and train the image-text alignment branch in the image-text learning model.
[0059] In one implementation, when training the graph-text alignment branch in the graph-text learning model, a metric learning framework is used to optimize the graph-text learning model.
[0060] In this embodiment, the core of metric learning is to perform spatial mapping, in which related image-text pairs (general image-text pairs and first quality inspection task image-text pairs) are closer in the space, while unrelated image-text pairs are farther away. In this way, the alignment branch is trained to identify and strengthen the correlation between image content and corresponding text descriptions, thereby improving the semantic understanding ability of the model in automatic annotation, content retrieval and quality inspection tasks.
[0061] In one embodiment, metric learning can use contrastive loss or triplet loss to optimize the model during training. These loss functions emphasize the importance of bringing similar image-text pairs closer and pushing dissimilar image-text pairs further apart. This method not only improves the performance of the model on the image-text alignment task, but also enhances the model's sensitivity to subtle differences between images and text.
[0062] Furthermore, when training the perception branch of the image-text learning model, the first image data set processed in each iteration cannot contain two first quality inspection task image-text pairs corresponding to the same quality inspection task image.
[0063] In this embodiment, this method is used to enhance the generalization ability of the model while avoiding possible confusion of the model during the training process.
[0064] Metric learning aims to bring similar instances closer together and push dissimilar instances further apart. If multiple descriptions of the same quality inspection task image are fed into the model in one iteration, the model may encounter conflicts when trying to minimize the distance between multiple descriptions at the same time, resulting in impaired learning. This is because each description may emphasize different features or attributes in the image, making it difficult for the model to form a clear and consistent visual-text mapping relationship.
[0065] For example, if a quality inspection image has two descriptions, one description focuses on a specific mechanical part in the image, while the other description may focus on the overall state of the machine or other parts. In the framework of metric learning, this situation may cause directional confusion in the model's learning process, because the model needs to approach both descriptions at the same time, even though they focus on different visual elements. This may cause the model to be unable to effectively learn to distinguish which features are critical, thus affecting its judgment and accuracy in practical applications.
[0066] By avoiding using multiple descriptions from the same quality inspection task graph in each iteration, we can ensure that the model focuses on the correspondence between one description and the image at a time. This not only helps the model learn more clearly how to associate an image with a single, specific text description, but also helps improve the model's generalization ability when faced with new, unseen image-text pairs. This strategy effectively reduces noise and confusion during training, allowing the model to learn in a more stable and controllable environment, ultimately improving the performance and reliability of the model in actual operations.
[0067] Step S203: Obtain a pre-trained graph-text learning model.
[0068] In one embodiment, although step S201 and step S202 are listed consecutively in the description, this does not mean that they must be executed sequentially. This is just for the convenience of description. In one embodiment, step S201 and step S202 adopt an alternating training method. The graph-text learning model is provided with a switch to enable the model to seamlessly switch between the perception branch and the graph-text alignment branch, thereby realizing the alternating training strategy.
[0069] In alternating training, training does not complete one task in a single way and then switch to another, but rather switches between two related tasks periodically. For example, in the training of a graph-text learning model, after a certain number of iterations of the perception branch, you can switch to the training of the graph-text alignment branch, and then return to the training of the perception branch. The advantage of this training method is that it allows the model to continuously balance and adjust the development of the two abilities during the learning process, thereby promoting more coordinated learning progress and avoiding the risk of over-focusing on a single task and ignoring another task.
[0070] Adopting an alternating training strategy also helps the model better integrate the functions of image processing and language processing, because each switch forces the model to re-adjust its internal representation to adapt to different data and task requirements. This not only helps to strengthen the generalization ability of the model, but also improves its flexibility in adapting to new tasks.
[0071] Step S30: Bridge the pre-trained image-text learning model with the first language model through the perception layer to obtain an industrial quality inspection model.
[0072] In one embodiment, the output of the image encoder is input into the perception layer, and the output of the perception layer and the output of the text encoder are combined and input into the first large language model.
[0073] In this embodiment, the perception layer not only processes the visual information from the image encoder, but also converts the information into a format suitable for the language model to process. Because the characteristic of the large language model is to receive text information, that is, language description information, the perception layer converts the input from the image encoder into a format that is easy for the large language model to understand.
[0074] The output of the perception layer is then combined with the output of the text encoder. The combined information is then fed into the first language model. The first language model uses advanced natural language processing techniques to process and interpret data that combines visual and textual information.
[0075] Step S40: Input the simple data set into the industrial quality inspection model to train the perception layer.
[0076] In one implementation, the first image and text data set in the simple data set is input into the industrial quality inspection model to train the perception layer.
[0077] In this embodiment, the purpose of training the perception layer is to enable it to process and convert image data more effectively so that these data can be more accurately connected with text data to achieve efficient image-text fusion. The perception layer is mainly composed of a multi-layer perceptron (MLP) for learning and extracting features from input data.
[0078] In one embodiment, the parameters of the graph-text learning model and the first language model are fixed during the training process of this step. This means that the learning parameters of these models are not updated at this stage, so that the focus is on adjusting the parameters of the perception layer to better adapt to the integration with these models. Fixing the parameters of other models helps to isolate the impact of the perception layer and will not cause the performance of the trained graph-text learning model to regress.
[0079] Step S50: input the complex data set into the industrial quality inspection model to train the industrial quality inspection model.
[0080] In one implementation, the complex pattern dataset consists of two main parts: a public dataset and a second quality inspection task text-image pair. Public datasets include resources such as LLAVA-instruct-150k and ShareGPT4V. The text-image pairs in the public dataset often include detailed descriptions and complex sentence structures, which are suitable for training models to process diverse and highly complex language expressions.
[0081] The second quality inspection task, image-text pairs, focuses more on specific needs in industrial applications, such as equipment maintenance, fault diagnosis, and quality assessment. This part of the dataset is generated through two main approaches: one is to construct longer sentence descriptions and multi-round question answering (Visual Question Answering, VQA) based on short-mode descriptions to provide in-depth scenario analysis and question answering; the other is to directly use the target in the image and its coordinates, attributes and other information to generate detailed description sentences through GPT4. These descriptions not only explain the content of the image, but also include evaluations of the functions and states of the elements in the image.
[0082] In this embodiment, the training Figure 6 As shown in the figure, the question "Please describe in detail what defects are there in the image" is used, and then fused with the output of the image encoder, and then input into the first language model to obtain the output text. The output text is compared with the text description in the second quality inspection task image-text pair to obtain the loss function and train through back propagation.
[0083] In this embodiment, the learning rate of this step is lower than the learning rate for pre-training the image-text learning model or training the perception layer. In this embodiment, a smaller learning rate is used to ensure that the model can be carefully adjusted and optimized while gradually adapting to the quality inspection task scenario, thereby maintaining and enhancing its perception and language expression capabilities.
[0084] In this step of training, the graph learning model, the perception layer, and the first language model are all in an updated state, which means that every part of the model can adjust and optimize itself according to the new information in the complex data set. This comprehensive update strategy ensures that every part of the model can respond to the needs of the training data, thereby improving the collaborative efficiency and effectiveness of the entire model.
[0085] In this embodiment, the purpose of inputting these complex data sets into the industrial quality inspection model is to stimulate and enhance the ability of the first language model to process professional knowledge and technical language. Through training, the first language model learns how to parse and generate language descriptions of highly specialized industrial tasks. In addition, this training method can also ensure that the model can "apprentice" and master professional knowledge that has not been learned before.
[0086] Through the implementation of step S50, the industrial quality inspection model not only enhances the accuracy of its image processing, but also greatly improves its ability to understand and generate complex industrial language expressions. This enables the model to more effectively identify problems, generate reports, and propose feasible solutions in actual industrial environments, significantly improving its practicality and reliability in quality inspection and maintenance tasks.
[0087] It should be pointed out that although the various steps in the above embodiments are described in a specific order, those skilled in the art can understand that in order to achieve the effects of the present invention, different steps do not have to be performed in such an order. They can be performed simultaneously (in parallel) or in other orders. These changes are within the scope of protection of the present invention.
[0088] It is understood by those skilled in the art that the present invention implements all or part of the processes in the method of the above embodiment, and can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of each of the above method embodiments when executed by the processor. Among them, the computer program includes a computer program, and the computer program can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium that can carry the computer program. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electric carrier signals and telecommunication signals.
[0089] Furthermore, the present invention also provides a control device. In an embodiment of a control device according to the present invention, the control device includes a processor and a storage device, the storage device can be configured to store a program for executing the training method of the industrial quality inspection model of the above method embodiment, and the processor can be configured to execute the program in the storage device, which includes but is not limited to the program for executing the training method of the industrial quality inspection model of the above method embodiment. For ease of explanation, only the parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. The control device can be a control device device formed by various electronic devices.
[0090] Furthermore, the present invention also provides a computer-readable storage medium. In a computer-readable storage medium embodiment according to the present invention, the computer-readable storage medium can be configured to store a program for executing the training method of the industrial quality inspection model of the above-mentioned method embodiment, and the program can be loaded and run by the processor to implement the training method of the above-mentioned industrial quality inspection model. For ease of explanation, only the parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. The computer-readable storage medium can be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present invention is a non-temporary computer-readable storage medium.
[0091] Further, it should be understood that since the setting of each module is only for illustrating the functional units of the device of the present invention, the physical devices corresponding to these modules may be the processor itself, or a part of the software in the processor, a part of the hardware, or a part of the combination of software and hardware. Therefore, the number of each module in the figure is only schematic.
[0092] Those skilled in the art will appreciate that the modules in the device can be adaptively split or merged. Such splitting or merging of specific modules will not cause the technical solution to deviate from the principle of the present invention, and therefore, the technical solutions after splitting or merging will fall within the protection scope of the present invention.
[0093] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
Claims
1. A training method for industrial quality inspection models, It is characterized in that The method comprises: Get simple data sets as well as complex data sets; Inputting the simple data set into the graph-text learning model, training the graph-text learning model, and obtaining a pre-trained graph-text learning model; The pre-trained image-text learning model is bridged with the first language model through the perception layer to obtain an industrial quality inspection model; Inputting the simple data set into the industrial quality inspection model to train the perception layer; The complex data set is input into the industrial quality inspection model to train the industrial quality inspection model.
2. The training method of the industrial quality inspection model according to claim 1, It is characterized in that The simple data set includes a first image data set and a first image-text data set, the image-text learning model includes a perception branch and an image-text alignment branch, and the simple data set is input into the image-text learning model to train the image-text learning model to obtain a pre-trained image-text learning model, including: Inputting the first image data set into the image-text learning model to train the perception branch in the image-text learning model; Inputting the first image-text data set into the image-text learning model, and training the image-text alignment branch in the image-text learning model; Get the pre-trained graph-text learning model.
3. The training method of the industrial quality inspection model according to claim 2, It is characterized in that The first image dataset includes general knowledge images and quality inspection task images; The first image-text data set includes general knowledge image-text pairs and first quality inspection task image-text pairs; The complex data set is a second quality inspection task image-text pair, wherein the text length of the second quality inspection task image-text pair is greater than the text length of the first quality inspection task image-text pair.
4. The training method of the industrial quality inspection model according to claim 2, It is characterized in that The method for obtaining at least part of the first quality inspection task image-text pairs in the first image-text data set includes: Inputting the quality inspection task picture into the second largest language model in combination with the command statement, and obtaining at least one first description of the quality inspection task picture replied by the second largest language model; The first description and the corresponding quality inspection task picture are combined to obtain a first quality inspection task picture-text pair.
5. The training method of the industrial quality inspection model according to claim 4, It is characterized in that The combining the first description and the corresponding quality inspection task picture to obtain a first quality inspection task picture-text pair includes: If there are multiple first descriptions for the quality inspection task picture, the quality inspection task picture is combined with different first descriptions one by one to obtain multiple first quality inspection task picture-text pairs, wherein the number of the first quality inspection task picture-text pairs is the same as the number of the first descriptions.
6. The training method of the industrial quality inspection model according to claim 4 or 5, It is characterized in that When training the image-text alignment branch in the image-text learning model, the image-text learning model is optimized using a metric learning framework, the first image data set is input into the image-text learning model, and the perception branch in the image-text learning model is trained, further comprising: When performing perceptual branch training of the image-text learning model, the first image data set processed in each iteration cannot contain two first quality inspection task image-text pairs corresponding to the same quality inspection task graph.
7. The training method of the industrial quality inspection model according to claim 2, It is characterized in that The image-text learning model includes a text encoder and an image encoder; the pre-trained image-text learning model is bridged with the first language model through a perception layer to obtain an industrial quality inspection model, including: The output of the image encoder is input into the perception layer, and the output of the perception layer and the output of the text encoder are combined and input into the first language model.
8. The training method of the industrial quality inspection model according to claim 2, It is characterized in that The step of inputting the complex data set into the industrial quality inspection model to train the industrial quality inspection model includes: The learning rate when training the industrial quality inspection model is lower than the learning rate when pre-training the graph learning model or training the perception layer.
9. A control device comprising a processor and a storage device, wherein the storage device is suitable for storing a plurality of computer programs. It is characterized in that The computer program is suitable for being loaded and run by the processor to execute the training method of the industrial quality inspection model according to any one of claims 1 to 8.
10. A computer-readable storage medium having a plurality of computer programs stored therein, It is characterized in that The computer program is suitable for being loaded and run by a processor to execute the training method of the industrial quality inspection model according to any one of claims 1 to 8.
Citation Information
Patent Citations
Industrial scene-oriented method and system for constructing multi-modal large language model and application method
CN117292146A
Intelligent industrial defect detection method and system based on fusion model
CN117853492A
Method and apparatus for vision-language understanding
US20240144651A1
Cited By
Industrial quality inspection method, system and equipment based on multi-modal large model
CN121191067A
