Visual detection task processing method and system based on metal learning
Through the visual detection task processing method based on meta-learning, the meta-learning model is used to improve training efficiency in industrial robot vision detection, solving the problems of inefficient training efficiency and high cost in multi-task visual processing, and realizing the robot vision model for new tasks Quick adaptation and efficient training.
Patent Information
- Application Number
- CN202410908898.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-11-01
AI Technical Summary
The prior art is inefficient and costly in the visual detection tasks of industrial robots, and fails to effectively utilize the shared features between multiple tasks, resulting in waste of information and computing resources.
Using a visual detection task processing method based on meta-learning, the basic detection model, a collection of few sample trainers and a meta-learning model parameter predictor, the new task initialization category specific parameters and hyperparameters are obtained, and the new task model is updated to improve the model pair. Adaptation ability for different categories of tasks.
This greatly improves the training efficiency of the visual detection model, enables the robot to quickly adapt to new tasks, reduces the dependence on manually labeled samples, and improves the system's adaptability and overall production efficiency in the case of few samples.
Smart Images

Figure CN118886483A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of visual inspection technology, and in particular to a visual inspection task processing method and system based on meta-learning. Background Art
[0002] In the field of industrial robots, the application of deep learning technology has made significant progress. The successful application of deep learning visual models in tasks such as target detection, image segmentation, and image classification has brought significant improvements to industrial automation. The target detection model is the most commonly used and common model. These models can achieve efficient visual recognition on the production line, enabling robots to perform complex tasks and improve production efficiency.
[0003] On the production line, industrial production robots need to handle a variety of visual inspection tasks. For example, on the automotive parts production line, robots need to accurately identify different types of parts, locate and perform precise assembly operations, and classify and inspect the quality of products. Each task places unique requirements on deep learning visual models, and traditional training methods require a separate model to be designed and trained for each task. This separate training method leads to expensive training costs and lengthy training cycles because each model needs to learn from scratch how to handle specific visual tasks. At the same time, different tasks on the production line usually share similar working environments, background information, and lighting conditions, and may even involve different parts of the same object. Existing methods fail to effectively utilize these shared features, resulting in a waste of information and computing resources.
[0004] The challenge we face is how to establish an effective knowledge sharing mechanism between multiple tasks to improve the efficiency of visual inspection model training. To solve this problem, we introduced the concept of meta-learning, which not only focuses on the learning of a single task during training, but also focuses on how the model can quickly adapt to new tasks, so that the robot can adapt to different visual requirements more flexibly.
[0005] In view of this, the existing technology needs to be further improved. Summary of the invention
[0006] In view of this, the present invention proposes a visual inspection task processing method and system based on meta-learning, aiming to solve the problems of low training efficiency and high cost in current multi-task visual processing.
[0007] The technical solution of the present invention is achieved in this way:
[0008] The present invention provides a method for processing visual inspection tasks based on meta-learning, comprising the following steps:
[0009] Get the basic detection model;
[0010] Based on the basic detection model, obtaining a few-sample trainer set;
[0011] Training a meta-learning model parameter predictor based on the few-shot trainer set;
[0012] Based on the new task dataset and the meta-learning model parameter predictor, obtain new task initialization category specific parameters, new task initialization category hyperparameters and a new task model;
[0013] Based on the new task initialization category specific parameters and the new task initialization category hyperparameters, an updated new task model is obtained, and the updated new task model is used for visual inspection.
[0014] Preferably, the basic detection model is a basic detection model with the smallest sum of loss functions on all detection tasks, and the expression of the basic detection model is:
[0015]
[0016] Among them, M base represents the basic detection model, L base represents the loss function of the basic detection model, Represents the dataset that has been trained on the i-th detection task.
[0017] Preferably, before the step of obtaining a few-sample trainer set, the step further includes:
[0018] Freeze the category-independent parameters of the basic detection model to obtain the frozen basic detection model.
[0019] Preferably, the step of obtaining a small sample training set based on the basic detection model further comprises:
[0020] Based on large data sets, obtain data samples;
[0021] Processing the frozen basic detection model based on the data sample to obtain optimal hyperparameters in the processing process;
[0022] Based on the optimal hyperparameters, the few-shot training detector set is obtained.
[0023] Preferably, the step of training the meta-learning model parameter predictor based on the few-sample trainer set comprises:
[0024] Inputting the data sample into a dedicated detection model for the data sample to obtain optimal initialization category-specific parameters and training hyperparameters;
[0025] Obtaining a training loss function based on the task loss function, the optimal initialization category-specific parameters, and the training hyperparameters;
[0026] The task loss function is minimized to obtain a mapping relationship between category-specific parameters and training hyperparameters.
[0027] Preferably, the step of obtaining new task initialization category specific parameters, new task initialization category hyperparameters and new task model based on the new task data set and the meta-learning model parameter predictor comprises:
[0028] Accepting a new task data set, inputting the new task data set into the meta-learning model parameter predictor, and obtaining the new task initialization category specific parameters and the new task initialization category hyperparameters;
[0029] The new task model is obtained based on the category-independent parameters of the basic detection model, the new task initialization category-specific parameters and the new task initialization category hyperparameters.
[0030] Preferably, based on the new task initialization category specific parameters and the new task initialization category hyperparameters, the step of obtaining an updated new task model comprises:
[0031] A new task training loss function is obtained, the category-independent parameters of the basic detection model are frozen, the category-specific parameters of the new task model are updated, and an updated new task model is obtained.
[0032] In addition, the present invention also provides a visual inspection task processing system based on meta-learning, the system comprising:
[0033] An acquisition module is used to obtain a basic detection model;
[0034] An analysis module, used for obtaining a few-sample trainer set based on the basic detection model;
[0035] A training module, configured to train a meta-learning model parameter predictor based on the few-shot trainer set;
[0036] A new task module, used for obtaining new task initialization category specific parameters, new task initialization category hyperparameters and a new task model based on a new task dataset and the meta-learning model parameter predictor;
[0037] An updating module is used to obtain an updated new task model based on the new task initialization category specific parameters and the new task initialization category hyperparameters, wherein the updated new task model is used for visual inspection.
[0038] In addition, the present invention also provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, it can implement any step of the above method.
[0039] In addition, the present invention also provides an industrial robot, the industrial robot comprising:
[0040] A collection unit, wherein the collection unit captures and collects image data;
[0041] A computing unit, wherein the computing unit receives the image data from the acquisition unit, and processes the image data by applying the steps of the visual inspection task processing method based on meta-learning as described in any one of the above items, so as to obtain processed image data by performing visual inspection using the updated new task model;
[0042] A human-machine interface unit, the human-machine interface unit being communicatively connected with the computing unit to enable monitoring and setting of visual tasks within the computing unit; and
[0043] A control unit receives the processed image data from the computing unit and controls the industrial robot to perform mechanical actions based on the processed image data.
[0044] In summary, the present invention provides a visual inspection task processing method based on meta-learning and related equipment, including the following steps: obtaining a basic detection model; based on the basic detection model, obtaining a few-sample trainer set; training a meta-learning model parameter predictor based on the few-sample trainer set; based on a new task data set and the meta-learning model parameter predictor, obtaining new task initialization category-specific parameters, new task initialization category hyperparameters and a new task model; based on the new task initialization category-specific parameters and the new task initialization category hyperparameters, obtaining an updated new task model. By distinguishing between category-independent parameters and category-specific parameters, the model's specific representation of each category is adjusted, so that the model can adapt to tasks of different categories more flexibly. By introducing meta-learning, the updated new task model can quickly adapt to new tasks, greatly improving training efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 The present invention is a flow chart of the method.
[0047] Figure 2 It is a schematic diagram of the system structure of the present invention.
[0048] Figure 3 The figure is a flowchart of the method of the present invention.
[0049] Figure 4 It is a schematic diagram of the visual module structure of the robot of the present invention.
[0050] Figure 5 This is a flow chart of the operation of the vision module of the robot of the present invention. DETAILED DESCRIPTION
[0051] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] It should be understood that the terms used in this description of the embodiments of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the embodiments of the present invention. As used in the description of the embodiments of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms of "a", "an" and "the" are intended to include plural forms.
[0053] Meta-learning, also known as "learning to learn" or "fast learning", is a machine learning method that aims to enable models to adapt and learn quickly when faced with new tasks. In traditional machine learning, models are usually learned through a large amount of training data and then applied to specific tasks. However, the core idea of meta-learning is to enable the model to have stronger generalization capabilities, so that it can quickly learn and adapt when faced with new tasks using only a small number of samples. The key point of meta-learning is to enable the model to learn how to extract universal laws and features from limited training samples so that it can perform well on unseen tasks. This way of learning is similar to the way humans learn, that is, through continuous experience accumulation and adaptation, it can quickly adapt to new situations and tasks.
[0054] In this invention, the concept of meta-learning is introduced to solve the similarities between different tasks on the production line and improve the training efficiency of the model in multi-task scenarios. Through meta-learning, we let the robot's visual model not only learn how to complete the current task, but also learn general features and knowledge, so that it can better adapt to new tasks that may appear in the future.
[0055] Please also see Figure 1 to Figure 2, the present invention provides a preferred embodiment.
[0056] like Figure 1 As shown, a method for visual inspection tasks based on meta-learning provided by the present invention comprises the following steps:
[0057] Step S100: Obtain a basic detection model.
[0058] Specifically, the basic detection model M base The training is performed by minimizing the loss function on each task so that the basic detection model M base It has universal applicability to various tasks. Therefore, in this embodiment, the basic detection model M with the minimum sum of loss functions on all detection tasks is obtained. base , the basic detection model M base As shown in the following expression:
[0059]
[0060] Among them, M base represents the basic detection model, L base represents the loss function of the basic detection model, Represents the dataset that has been trained on the i-th detection task.
[0061] Specifically, M base The basic detection model is applicable to the entire dataset D train Multiple detection tasks in M base The base detection model is a model trained for general-purpose visual detection tasks. This model is not optimized for a specific task, that is, it is a baseline model trained on multiple tasks to achieve generalization.
[0062] L base is the loss function of the basic detection model, which is used to evaluate the performance of the basic detection model on a specific data set. base It is a function that measures the difference between the model output and the true data label. The loss function L base The design goal of is to minimize this value through an optimization process.
[0063] is the i-th trained dataset. Here, n represents a total of n such datasets used to train the basic detection model. These datasets usually contain a large number of images and corresponding annotation information for model learning.
[0064] At the same time, the parameters of the basic detection model are composed of category-independent parameters and category-specific parameters, and their expressions are:
[0065]
[0066] Among them, M base represents the basic detection model, represents a category-independent parameter, represents the class-specific parameter, f base A function representing the basic detection model.
[0067] f base It is a mapping function that can transform input data into output results, for example, input category-independent parameters and category-specific parameters, and output the category and position of target detection.
[0068] Category-independent parameters usually involve the feature extraction layer of the neural network, which contains the general feature extraction capabilities of the image. In visual inspection tasks, these parameters are mainly responsible for capturing shared features that are independent of the category, such as edges, textures, etc. Since the category-independent parameters of different visual models are very similar in the inspection tasks of the same production line, this can make the model easier to adapt to new tasks. By sharing these category-independent parameters, the meta-learning model can more effectively utilize the knowledge of existing tasks and achieve faster convergence in new tasks.
[0069] Category-specific parameters are associated with specific visual inspection task objectives and are mainly used to adjust M base The base detection model has a specific representation for each class. In a neural network, this may involve the final classification layer or other class-specific network structures. The presence of class-specific parameters allows the base detection model M base In the meta-learning stage, different categories of visual detection tasks are personalized. In this embodiment, by adjusting these parameters, the basic detection model M base It can better adapt to the specific category characteristics of new tasks, improve the detection performance, and ensure flexibility in handling different categories of tasks.
[0070] Furthermore, the method for visual inspection tasks based on meta-learning provided by the present invention also includes: step S200, obtaining a few-sample trainer set based on the basic detection model.
[0071] Specifically, in this embodiment, based on the basic detection model M base , randomly obtain m few-shot trainers, the few-shot trainers are used for training the meta-learning model parameter predictor. Based on the few-shot trainers, obtain the few-shot trainer set.
[0072] Wherein, step S200 may further specifically include: step S210, obtaining data samples based on the large data set.
[0073] Specifically, in this embodiment, for each few-sample training detector, we randomly select train Extract n data samples D from k , where k represents the ordinal number of the few-shot training detector corresponding to the data sample.
[0074] Among them, step S200 may also specifically include: step S220, processing the frozen basic detection model based on the data sample to obtain the optimal hyperparameters in the processing process.
[0075] Specifically, in this embodiment, the basic detection model M base The category-independent parameters Freeze the model to obtain the basic detection model after freezing.
[0076] By freezing the initialized category-independent parameters, the basic detection model M base In the meta-learning stage, the class-independent parameters Unchanged, basic detection model M base In the new task, only the common features of the existing tasks are used. By using a small amount of sample data of the target task, the training update of the category-specific parameters can be completed. This freezing and updating method helps to balance the trade-off between generality and specificity. By retaining the learned common features, that is, category-independent parameters, the basic detection model M base It can better adapt to the specific category requirements of the target task. As the target task data is used, the basic detection model can gradually update the category-specific parameters. To better capture the special features of the target task. Therefore, it is possible to effectively transfer the knowledge of previous tasks and achieve better performance in new tasks when data is limited.
[0077] Based on the n data samples, the frozen basic detection model M base Process and obtain a dedicated detection model M for these n data samples base , the dedicated detection model M base Also by category-independent parameters and category specific parameters In this process, the optimal set of hyperparameters h is obtained. k , the expression is as follows:
[0078]
[0079] Among them, D k represents the data sample, Mk represents the dedicated detection model for the data sample, h k represents the optimal set of hyperparameters, Represents a category-specific parameter.
[0080] Wherein, step S200 may further specifically include: step S230, obtaining the few-sample training detector set based on the optimal hyperparameters.
[0081] Specifically, by repeating step S220, a small number of sample training detector sets are obtained. The expression of the small number of sample training detector sets is as follows:
[0082] {(M1,h1),(M2,h2),…,(M m ,h m )}
[0083] The present invention introduces the concept of few-sample learning, which enables effective training in new tasks with only a small number of samples. After effective testing, it is found that on average only one-fourth of the original number of training samples is needed to achieve the same optimization effect. The method of the present invention greatly reduces the reliance on a large number of manually labeled samples and improves the adaptability of the system to the case of few samples.
[0084] Furthermore, the method for visual inspection tasks based on meta-learning provided by the present invention also includes:
[0085] Step S300: Based on the few-sample trainer set and the meta-learning model parameter predictor, obtain a mapping relationship between category-specific parameters and training hyperparameters.
[0086] Specifically, based on the few-sample training detector set, the meta-learning model parameter predictor P(·; Θ) is trained. The meta-learning model parameter predictor P(·; Θ) is a fully connected neural network.
[0087] The step of training the meta-learning model parameter predictor based on the few-sample training detector set includes:
[0088] Step S310: input the data sample into a dedicated detection model for the data sample to obtain optimal initialization category-specific parameters and training hyperparameters.
[0089] Specifically, the data sample D k Input the dedicated detection model M of the data sample k , predict the optimal initialization category-specific parameters and training hyperparameters. The purpose of obtaining the initialization category-specific parameters and category hyperparameters is to give the new task model a starting point for a specific task.
[0090] Step S320: Obtain a training loss function based on the task loss function, the optimal initialization category-specific parameters and the training hyperparameters.
[0091] Specifically, the training loss function L meta (Θ) can be expressed as:
[0092]
[0093] in, represents the task loss function, D k represents a data sample, P(·; Θ) represents the meta-learning model parameter predictor, represents the set of optimal initialization class-specific parameters, H k Represents a set of training hyperparameters.
[0094] Specifically, H k Training hyperparameters include but are not limited to: learning rate, regularization coefficient, batch size, and other data. k Training hyperparameters control different aspects of the model learning process, such as learning speed and model generalization ability. k Training hyperparameters can enable the model to find a better performance balance on multiple tasks and further improve the model's adaptability to new tasks.
[0095] By using the meta-learning model parameter predictor P(·; Θ), the model can quickly adapt to new tasks even when only a small amount of data is available, so this method has fast adaptability. The meta-learning framework enables the model to learn common knowledge from multiple tasks and transfer this knowledge to new, unseen tasks, greatly enhancing generalization capabilities. By providing the optimal initialization category-specific parameters for each new task This improves the learning efficiency and performance of the model.
[0096] Step S330: Minimize the task loss function to obtain a mapping relationship between category-specific parameters and training hyperparameters.
[0097] Specifically, The task loss function is used to measure the difference between the predicted parameters and the actual parameters. By minimizing the task loss That is, minimizing the difference between the predicted parameters and the actual parameters, the meta-learning model parameter predictor P(·; Θ) will learn a model that can accurately predict the class-specific parameters and training hyperparameters H kThe mapping between class-specific parameters and training hyperparameters is obtained. The design of the meta-learning weight predictor enables the model to fully exploit the similarities between different tasks. By predicting the optimal initialization parameters and training hyperparameters, the model can be better generalized to new tasks, realize the sharing of knowledge between tasks, further improve the overall training efficiency, and also improve the robustness of the model.
[0098] Furthermore, the method for visual inspection tasks based on meta-learning provided by the present invention also includes: step S400, based on the new task data set and the meta-learning model parameter predictor, obtaining new task initialization category specific parameters, new task initialization category hyperparameters and a new task model.
[0099] Specifically, the meta-learning parameter predictor model P(·; Θ) receives a new task dataset D new , the new task dataset D new Input the meta-learning model parameter predictor P(·; Θ) to obtain the new task initialization category-specific parameters And the new task initializes the category hyperparameter H new Specifically, the new task initializes the category-specific parameters And the new task initializes the category hyperparameter H new The expression is as follows:
[0100]
[0101] Specifically, based on the category-independent parameters of the basic detection model The new task initializes class specific parameters And the new task initializes the category hyperparameter H new , get the new task model M base . New Mission Model M new The expression is as follows:
[0102]
[0103] Among them, the new task initializes the category-specific parameters It is the initial setting of model parameters customized for the new task. These parameters are derived from the knowledge learned on the previous task, setting the new task to initialize category-specific parameters The purpose is to provide a good starting point for new tasks. New tasks initialize category-specific parameters Including but not limited to: model internal parameters such as weights and biases, and category-specific parameters for initializing new tasks It is crucial to perform specific tasks such as classification, regression, etc.
[0104] Initialize the hyperparameter H of the new task categorynew It is the initial value of the hyperparameter set for the new task. Hyperparameters usually include learning rate, batch size, regularization coefficient, etc. The new task initialization category hyperparameter H new Controls the learning process of the model rather than the direct prediction behavior of the model. The new task initializes the category hyperparameter H new It is usually set based on experience accumulated during the meta-learning process.
[0105] Furthermore, the method for visual inspection tasks based on meta-learning provided by the present invention also includes:
[0106] Step S500: obtaining an updated new task model based on the new task initialization category specific parameters and the new task initialization category hyper parameters, obtaining an updated new task model.
[0107] Specifically, obtain the new task training loss function L fine-tune , the new task training loss function L fine-tune It is used to measure the performance of the new task model on the new task dataset, that is, it measures the gap between the model output and the true label. Freeze the category-independent parameters of the base detection model For the new task model M new Category-specific parameters for Update to obtain the updated new task model.
[0108] The new task training loss function L fine-tune As shown below:
[0109]
[0110] Among them, the specific task loss function L task Determined by the selected detection model structure. By freezing the category-independent parameters of the basic detection model So that in the subsequent training process, the category-independent parameters Keep it unchanged to ensure that the general feature extraction ability of the model is not affected by training for the new task. Obtain an updated new task model that focuses on adapting to the specific features of the new task Use the new task to train the loss function L fine-tune to guide the category-specific parameters in the new task model Typically, this involves iteratively adjusting these parameters using gradient descent or other optimization algorithms, with the goal of minimizing the value of the loss function. and updating the class-specific parameters of the model for the new task This allows the updated new task model to balance the trade-off between generality and specificity.
[0111] Update the class-specific parameters of the new task model in multiple iterations After that, a model tuned for the new task is finally obtained, that is, the updated new task model, which will be used for visual detection of the new task. The exact optimization process may include but is not limited to: calculating the gradient of the loss function with respect to the category-specific parameters; using the gradient information to update the category-specific parameters, which may include standard or improved gradient descent methods such as learning rate adjustment and momentum consideration.
[0112] The above process is repeated until the stopping criteria are met. The stopping criteria include, but are not limited to: reaching a preset number of iterations, the loss function drops to a certain threshold, or the model performance no longer improves, etc., which are not limited in this embodiment.
[0113] In addition, by retaining the learned common features, i.e., the category-independent parameters of the base detection model, the updated new task model can better adapt to the specific category requirements of the target task. As the target task data is used, the updated new task model gradually updates the category-specific parameters to better capture the special features of the target task. The present invention can effectively transfer the knowledge of previous tasks and achieve better performance in new tasks when data is limited.
[0114] The method of the present invention constructs a meta-learning weight predictor, which is essentially a fully connected neural network. The meta-learning weight predictor predicts the optimal initialization parameters and training hyperparameters for the new task model by learning the model parameter optimization process of multiple visual tasks on the same production line. The construction of the meta-learning weight predictor enables the robot to learn quickly and be applied to new tasks even with only a small number of samples. By introducing the concept of few-sample learning, effective training is achieved in new tasks with only a small number of samples. This is achieved through the training process of the random few-sample training detector set and the meta-learning model parameter predictor in meta-learning, thereby improving the adaptability of the system to new tasks. When constructing the task model, by distinguishing between category-independent parameters and category-specific parameters, the model's specific representation of each category is adjusted, so that the model can be more flexibly adapted to tasks of different categories.
[0115] like Figure 2 As shown, the present invention also provides a visual inspection task processing system based on meta-learning, the system comprising:
[0116] An acquisition module 61 is used to acquire a basic detection model;
[0117] An analysis module 62, configured to obtain a small sample training set based on the basic detection model;
[0118] A training module 63, configured to train a meta-learning model parameter predictor based on the few-sample trainer set;
[0119] A new task module 64, used to obtain new task initialization category specific parameters, new task initialization category hyperparameters and a new task model based on a new task dataset and the meta-learning model parameter predictor;
[0120] The updating module 65 is used to obtain an updated new task model based on the new task initialization category specific parameters and the new task initialization category hyperparameters, and the updated new task model is used for visual inspection.
[0121] In addition, the present invention also provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, it can implement the steps of the method for visual inspection tasks based on meta-learning as described above.
[0122] In addition, the present invention also provides an industrial robot, which can apply the above-mentioned method for visual inspection tasks based on meta-learning.
[0123] In one embodiment, if Figure 3 As shown in FIG. 1 , the operation process of the industrial robot is specifically divided into a training phase and a deployment phase, and the steps in the method for visual inspection tasks based on meta-learning are applied. Specifically, in the training phase, the industrial robot first uses the full dataset D train Train the basic detection model M base , to realize the basic detection model training, where M base The parameters are composed of category-independent parameters and category specific parameters Composition; then from D train Randomly select m sample sets D1, D2, D3…, D m , in freezing After that, to M base Fine-tune each sample set separately to obtain the detection model for each sample set, and record the optimal hyperparameters And get m groups of few-shot training detectors to realize the random few-shot training detector set generation {(M1,h1),(M2,h2),…,(M m ,h m)}; Finally, the few-shot training detector set obtained in the previous step is used to train the meta-learning model parameter predictor P(·; Θ). In the deployment phase, the industrial robot uses the meta-learning parameter predictor obtained in the training phase to generate corresponding task models for the initialization category-specific parameters and initialization category hyperparameters of different detection tasks to complete the corresponding visual detection tasks. For example, for detection task A, first obtain the meta-predictor initialization task A model M newA Parameters Then from task A model M newA In task A dataset D newA Fine-tune the training to obtain the updated model for task A Deploy the updated model M newA To task A, complete the corresponding visual inspection task. For other inspection tasks B, inspection task C, etc., follow the same steps to update category-specific parameters for different tasks to better capture the special features of the target task, effectively transfer the knowledge of previous tasks in the case of limited data, and achieve better performance in new tasks.
[0124] In one embodiment, the industrial robot has a vision module, such as Figure 4 and Figure 5 As shown, the visual module may include: a collection unit, a calculation unit, a control unit and a human-machine interface unit.
[0125] Among them, the acquisition unit is the basis of the entire visual module. The hardware devices of the acquisition unit work together to capture, collect and transmit image data to the computing unit. The main components of the acquisition unit include: industrial cameras and lenses, which are used to capture high-quality images through industrial cameras and achieve clear imaging of the target with professional lenses; light source systems, which are used to provide appropriate lighting to ensure image quality and contrast; image sensors, which are used to convert optical information into electrical signals to provide input for subsequent processing. After the industrial robot starts running, the acquisition unit uses multiple sets of industrial cameras and lenses to collect task images, and then uses the camera to send image data to the computing unit through the image transmission interface.
[0126] The computing unit is responsible for processing and analyzing image data, and the main components of the computing unit include: an image transmission interface, which is responsible for transmitting the image data obtained from the acquisition unit to the computing unit to ensure efficient data flow; image processing software, which is used to execute advanced visual algorithms based on deep learning to achieve tasks such as image classification and target detection. In this embodiment, the computing unit is used to perform the steps of the method for visual detection tasks based on meta-learning. The image transmission interface transmits the image data obtained from the acquisition unit to the computer-readable storage medium to ensure efficient data flow. By learning the model parameter optimization process of multiple visual tasks, the optimal initialization parameters and training hyperparameters are predicted for the new task model. This enables the visual model of the industrial robot to quickly adapt to new tasks, while making full use of the similarities between different tasks to improve the overall training efficiency. After receiving the image data from the acquisition unit, the detection model is first initialized, and then the model initialization parameters and hyperparameters are predicted by the meta-learning predictor, and then the model is fine-tuned and trained to obtain specific task models for different visual detection tasks, and the relevant instructions for the corresponding visual detection tasks are output. The computing unit synchronously completes the training process of the meta-learning predictor when receiving image data, wherein the training process is completed using multiple sets of images collected and labeled by multiple sets of industrial cameras and lenses, including a basic model training process, a random few-sample training detector process, and a meta-learning predictor training process.
[0127] The control unit is the execution center of the multi-task vision module of the industrial production robot, responsible for coordinating the actions of the robot arm and other equipment to ensure the coordinated work of visual feedback and mechanical actions. The main components of the control unit include: communication interface, which is used to equip the control unit with an efficient communication interface to achieve fast and stable information transmission with equipment such as the robot arm and industrial camera, which can ensure that the various components can work together in real time; motion control system, which is a built-in motion control system in the control unit, through the precise control of the robot arm, to achieve efficient interaction between the visual module and the working environment. The motion control system is responsible for converting the results of the visual task into specific mechanical actions; the task scheduler is used to coordinate the working order of different equipment, ensuring that the robot arm and other related equipment are executed in an orderly manner according to the established task process, and improving the overall work efficiency. After receiving the relevant instructions issued by the computing unit, the control unit first coordinates the computing unit and the control unit through the communication interface, and then uses the motion control system to control the actions of other mechanical structures such as the robot arm, and then the task scheduler coordinates the working order of each task to ensure that the industrial robot successfully completes the established tasks.
[0128] The human-machine interface unit enables the operator to interact with the robot system. The human-machine interface unit includes: human-machine interaction software, which is used to provide an intuitive interface for the operator to monitor the execution of visual tasks and make necessary settings; a visual calibration system, which is used to calibrate and adjust parameters such as cameras, lenses, and light sources to ensure the accuracy and stability of the visual module. Specifically, the human-machine interface unit provides users with a visual monitoring interface, and sets new visual task parameters and working modes, while monitoring the task execution process and providing adjustments to ensure the accuracy and stability of the overall work.
[0129] The computing unit can coordinate the actions of the robot arm and other equipment through the control unit to ensure the coordinated work of visual feedback and mechanical actions. Among them, the task scheduler is responsible for coordinating the working order of different equipment to ensure that the robot arm and other related equipment are executed in an orderly manner according to the established task process. The embedding of the meta-learning-based visual inspection task method enables the robot system to perform multiple production tasks more intelligently through meta-learning.
[0130] The industrial robot of the present invention introduces meta-learning so that the industrial robot vision model can quickly adapt when facing new tasks, greatly improving the training efficiency. Compared with the single training method, the time to reach the same optimization index (accuracy: 95%) is reduced by an average of 30%. By learning the model parameter optimization process of multiple tasks, the system can more effectively utilize the knowledge of existing tasks and achieve rapid learning of new tasks. The application of meta-learning significantly shortens the training time for new tasks. This means that in the same amount of time, the robot can complete the visual model training of more tasks, improving overall production efficiency. It ensures that industrial robots can work collaboratively when performing visual tasks, improves work efficiency, and provides a more comprehensive solution for multi-task visual applications of industrial robots.
[0131] In summary, the present invention provides a visual inspection task processing method based on meta-learning and related equipment, including the following steps: obtaining a basic detection model; based on the basic detection model, obtaining a few-sample trainer set; training a meta-learning model parameter predictor based on the few-sample trainer set; based on a new task data set and the meta-learning model parameter predictor, obtaining new task initialization category-specific parameters, new task initialization category hyperparameters and a new task model; based on the new task initialization category-specific parameters and the new task initialization category hyperparameters, obtaining an updated new task model. By distinguishing between category-independent parameters and category-specific parameters, the model's specific representation of each category is adjusted, so that the model can adapt to tasks of different categories more flexibly. By introducing meta-learning, the updated new task model can quickly adapt to new tasks, greatly improving training efficiency.
[0132] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for processing visual inspection tasks based on meta-learning, characterized in that: The steps include: Get the basic detection model; Based on the basic detection model, obtaining a few-sample trainer set; Training a meta-learning model parameter predictor based on the few-shot trainer set; Based on the new task dataset and the meta-learning model parameter predictor, obtain new task initialization category specific parameters, new task initialization category hyperparameters and a new task model; Based on the new task initialization category specific parameters and the new task initialization category hyperparameters, an updated new task model is obtained, and the updated new task model is used for visual inspection.
2. The method for processing visual inspection tasks based on meta-learning according to claim 1, characterized in that: The basic detection model is a basic detection model with the minimum sum of loss functions on all detection tasks. The expression of the basic detection model is: Among them, M base represents the basic detection model, L base represents the loss function of the basic detection model, Represents the dataset that has been trained on the i-th detection task.
3. The method for processing visual inspection tasks based on meta-learning according to claim 1, characterized in that: The step of obtaining a few-sample training set also includes: Freeze the category-independent parameters of the basic detection model to obtain the frozen basic detection model.
4. The method for processing visual inspection tasks based on meta-learning according to claim 3, characterized in that: The step of obtaining a small sample training set based on the basic detection model further includes: Obtain data samples based on large data sets; Processing the frozen basic detection model based on the data sample to obtain optimal hyperparameters in the processing process; Based on the optimal hyperparameters, the few-shot training detector set is obtained.
5. A method for processing visual inspection tasks based on meta-learning as claimed in claim 4, characterized in that: The step of training the meta-learning model parameter predictor based on the few-sample trainer set comprises: Inputting the data sample into a dedicated detection model for the data sample to obtain optimal initialization category-specific parameters and training hyperparameters; Obtaining a training loss function based on the task loss function, the optimal initialization category-specific parameters, and the training hyperparameters; The task loss function is minimized to obtain a mapping relationship between category-specific parameters and training hyperparameters.
6. The method for processing visual inspection tasks based on meta-learning according to claim 1, characterized in that: The step of obtaining new task initialization category specific parameters, new task initialization category hyperparameters and new task model based on the new task data set and the meta-learning model parameter predictor comprises: Accepting a new task data set, inputting the new task data set into the meta-learning model parameter predictor, and obtaining the new task initialization category specific parameters and the new task initialization category hyperparameters; The new task model is obtained based on the category-independent parameters of the basic detection model, the new task initialization category-specific parameters and the new task initialization category hyperparameters.
7. The method for processing visual inspection tasks based on meta-learning according to claim 1, characterized in that: The step of obtaining an updated new task model based on the new task initialization category specific parameters and the new task initialization category hyperparameters comprises: A new task training loss function is obtained, the category-independent parameters of the basic detection model are frozen, the category-specific parameters of the new task model are updated, and an updated new task model is obtained.
8. A visual inspection task processing system based on meta-learning, characterized in that: The system comprises: An acquisition module is used to obtain a basic detection model; An analysis module, used for obtaining a few-sample trainer set based on the basic detection model; A training module, configured to train a meta-learning model parameter predictor based on the few-shot trainer set; A new task module, used for obtaining new task initialization category specific parameters, new task initialization category hyperparameters and a new task model based on a new task dataset and the meta-learning model parameter predictor; An updating module is used to obtain an updated new task model based on the new task initialization category specific parameters and the new task initialization category hyperparameters, wherein the updated new task model is used for visual inspection.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps described in any one of claims 1 to 7 can be implemented.
10. An industrial robot, characterized in that: The industrial robot comprises: A collection unit, wherein the collection unit captures and collects image data; A computing unit, wherein the computing unit receives the image data from the acquisition unit, and processes the image data by applying the steps of the visual inspection task processing method based on meta-learning according to any one of claims 1 to 7, so as to obtain processed image data by performing visual inspection using the updated new task model; A human-machine interface unit, the human-machine interface unit being communicatively connected with the computing unit to enable monitoring and setting of visual tasks within the computing unit; and A control unit receives the processed image data from the computing unit and controls the industrial robot to perform mechanical actions based on the processed image data.
Citation Information
Patent Citations
Small sample target detection method based on multi-view learning and meta-learning
CN114119966A
Metalearning-based small sample target detection method and device
CN114998672A
Adaptive face recognition technology based on ALFA meta-learning optimization algorithm
CN115223218A
Small sample fault diagnosis method, system and device based on model independent element learning and medium
CN117150359A
Method for generating task model based on meta-learning, method for generating text embeddings for few-shot text data, and apparatus implementing the same method
US20230214718A1
