Robot active target detection method based on continuous learning, electronic equipment and storage medium
By adopting a continuous learning method in robot target detection and utilizing a combination of working networks, long-term networks, and short-term networks, efficient and accurate target detection is achieved in open and dynamic environments, solving the problem of insufficient environmental adaptability in existing technologies.
Patent Information
- Application Number
- CN202510785187.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-09-16
AI Technical Summary
Existing robot target detection technology cannot perform efficient and accurate target detection in open and dynamic environments, and lacks the ability to integrate historical knowledge with new environmental knowledge, resulting in insufficient adaptation to complex and changing application scenarios.
A robot active target detection method based on continuous learning is adopted. The robot performs random data sampling in a multi-target environment to construct a multi-batch training data set, and uses a combination of working network, long-term network and short-term network to achieve continuous updating and fusion of knowledge.
The robot has achieved continuous improvement in target detection capabilities in dynamic environments, solved the problem of catastrophic forgetting in incremental learning scenarios, and has good dynamic learning and environmental adaptability.
Smart Images

Figure CN120656037A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot vision technology, and in particular to a robot active target detection method based on continuous learning, an electronic device, and a storage medium. Background Art
[0002] Robotic object detection is a crucial component of robot perception and cognition, enabling robots to observe and interact with their surroundings. Because robots operate in real-world environments that dynamically change over time, the scenes and objects they inhabit also change. Therefore, the question of how robots can continuously identify objects in open and dynamic environments, learn new knowledge, adapt to new environments, and retain previously learned knowledge has become a key research topic in robotics. The current approach to this problem is to adopt continuous learning, which refers to the ability of a model to continuously acquire new knowledge while retaining previously learned experience. Autonomous agents like robots, which interact with their real-world environments, need to be able to learn from their own experience and gradually acquire, fine-tune, and transfer knowledge over long periods of time.
[0003] Although existing technologies provide many robot target detection technical solutions, these solutions are often targeted at specific types of objects or in specific types of environments. This results in the inability of existing technical solutions to perform efficient and accurate robot target detection in open and dynamic environments. In addition, robots in existing technical solutions generally lack the ability to integrate historical knowledge with new knowledge acquired in new environments, which results in the inability of existing robot target detection technical solutions to adapt to complex and changing application scenarios. Summary of the Invention
[0004] In view of the above problems, the present invention provides a robot active target detection method based on continuous learning, an electronic device and a storage medium, which are used to solve at least one of the above technical problems.
[0005] According to a first aspect of the present invention, a robot active target detection method based on continuous learning is provided, comprising:
[0006] Use the robot to continuously perform random data sampling in a multi-target environment to obtain multiple batches of training data sets corresponding to the target detection task;
[0007] In the first task phase, the working network, long-term network, and short-term network are initialized. The working network is trained using the first batch of training data sets. The training output of the working network is used to optimize the robot's object detection task, and the parameters of the first trained working network are saved in the long-term network.
[0008] In the subsequent task stage, part of the training data of the previous task stage is randomly selected as the playback data. The short-term network of the previous task stage and the working network trained in the previous task stage are trained in sequence using the playback data and the training data set of the current task stage. The short-term network trained in the current task stage and the long-term network of the previous task stage are jointly used to perform knowledge distillation on the training process of the working network in the current task stage. The training output of the working network of the current task stage is used to continuously optimize the robot's target detection task, and the parameters of the working network trained in the current task stage are saved to the long-term network of the previous task stage.
[0009] Repeat the operations of the subsequent task stages until the robot completes the target detection tasks in all target environments.
[0010] According to an embodiment of the present invention, the above-mentioned method of continuously performing random data sampling in a multi-target environment using a robot to obtain multiple batches of training data sets corresponding to the target detection task includes:
[0011] The robot starts from a randomly initialized agent starting position and randomly samples data from the target environment with different environmental attribute information, where the agent starting position includes three-dimensional space coordinates and rotation angles;
[0012] During random data sampling, the robot collects label information of objects in multiple batches of training datasets in the target environment. The label information of the object includes the type information and bounding box information of the object.
[0013] During the random data sampling process, the robot performs different actions in the target scene to collect image frame sequences in multiple batches of training data sets, where the image frame sequences include action sequence information.
[0014] According to an embodiment of the present invention, the working network, the long-term network, and the short-term network are target detection models with different initialization parameters;
[0015] Among them, the long-term network can store the historical knowledge learned in different task stages, and the short-term network is used to learn the new knowledge in the current task stage.
[0016] Among them, the target detection model includes a detector based on the DETR model and a supervisor based on the generative pre-trained language model;
[0017] Among them, the detector includes ResNet image feature extractor, Transformer feature encoder, Transformer feature decoder and multi-layer perceptron;
[0018] Among them, the supervisor includes the transformer backbone network, feature embedding layer, loss decoder and policy decoder.
[0019] According to an embodiment of the present invention, the training of the working network using the first batch of training data sets includes:
[0020] The first batch of training data sets are processed using the detector of the working network to obtain image features, category prediction results, bounding box prediction coordinates and detection token prediction information of objects in the target environment;
[0021] The detection loss of the detector in the data processing process is calculated using a predefined detection loss function, and the calculated detection loss value is used to supervise the data processing process of the detector;
[0022] The first batch of training data sets of the detector of the working network are used as well as the image features and detection token prediction information of the object to generate the object's action sequence prediction information;
[0023] The predefined supervised loss function is used to calculate the supervised loss of the supervisor in the data processing process, and the calculated supervised loss value is used to update the parameters of the detector in a gradient backpropagation manner.
[0024] According to an embodiment of the present invention, the detector using the working network processes the first batch of training data sets to obtain the category prediction results, bounding box prediction coordinates and detection token prediction information of the objects in the target environment, including:
[0025] Use the detector's ResNet image feature extractor to extract image features from the first batch of training data sets to obtain the image features of the object;
[0026] The detector's Transformer feature encoder is used to capture the global dependencies of image features based on the self-attention mechanism, obtaining image feature encoding results with contextual information.
[0027] The detector's Transformer feature decoder is used to perform an attention-based decoding operation on the image feature encoding results to obtain the object category prediction result and bounding box prediction coordinate set;
[0028] Based on confidence filtering, the detector's multi-layer perceptron is used to process the category prediction results and bounding box prediction coordinate sets to obtain the object's category prediction results, bounding box prediction coordinates and detection token prediction information.
[0029] According to an embodiment of the present invention, the processing of the first batch of detector training data sets using the working network, the image features of the object, and the detection token prediction information to generate the object's action sequence prediction information includes:
[0030] The image features are linearly mapped using the supervisor’s image feature embedding layer to obtain an image embedding vector, and the detection token prediction information is linearly mapped using the supervisor’s object detection embedding layer to obtain a token embedding vector.
[0031] The image embedding vector and the token embedding vector are concatenated, and the concatenation result is adaptively encoded using the Transformer backbone network of the supervisor to obtain the encoding result;
[0032] The loss decoder of the supervisor is used to decode the encoded result based on the attention mechanism to obtain an adaptive loss scalar;
[0033] The supervisor's policy decoder is used to perform attention decoding on the encoded results based on the initial frame gradient alignment to obtain the object's action sequence prediction information.
[0034] According to an embodiment of the present invention, the above-mentioned predefined supervised loss function includes a policy loss function based on cross entropy loss and a position embedding loss function based on cross entropy loss and L1 norm.
[0035] According to an embodiment of the present invention, the above-mentioned knowledge distillation of the training process of the working network in the current task stage using the short-term network trained in the current task stage and the long-term network in the previous task stage includes:
[0036] The long-term network of the previous task stage is used to process the playback data and the training data set of the current task stage to obtain the long-term training output;
[0037] A predefined joint distillation loss function is used to perform distillation constraints on the long-term training output and the training output of the working network in the current task stage, and the historical knowledge in the long-term training output is transferred to the working network in the previous task stage.
[0038] The predefined joint distillation loss function is used to perform distillation constraints on the short-term training output of the short-term network trained in the current task stage and the training output of the working network in the current task stage. The predefined joint distillation loss function includes a soft label loss value function based on KL divergence and a regression label loss based on Smooth L1.
[0039] Transfer the new knowledge extracted from the training dataset of the current training stage in the short-term training output to the working network of the current task stage.
[0040] A second aspect of the present invention provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0041] The third aspect of the present invention further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the computer program or instructions are executed by a processor.
[0042] The robot active target detection method based on continuous learning provided by the present invention has good dynamic learning and environmental adaptability, which enables the robot to continuously improve its target detection ability in a constantly changing environment, and solves the technical problems of catastrophic forgetting and insufficient adaptability to new tasks faced by existing technical solutions in incremental learning scenarios; in addition, the method provided by the present invention utilizes a multi-model car wash learning and training framework to achieve stable optimization of the model and efficient knowledge transfer in a dynamic environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The above contents and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0044] Figure 1 2 is a diagram illustrating an application scenario of a robot active target detection method based on continuous learning according to an embodiment of the present invention;
[0045] Figure 2 is a flow chart of a robot active target detection method based on continuous learning according to an embodiment of the present invention;
[0046] Figure 3 is a framework diagram of a robot target detection method with a triple knowledge transfer architecture according to an embodiment of the present invention;
[0047] Figure 4 2. Schematic diagram of a continuous learning framework for object detection that processes multiple batches of tasks according to an embodiment of the present invention;
[0048] Figure 5 is a schematic diagram of an Ai2thor simulation environment according to an embodiment of the present invention;
[0049] Figure 6 2. It is a schematic diagram of the effect of target detection in the Ai2thor simulation environment according to an embodiment of the present invention;
[0050] Figure 7 4 is a block diagram of an electronic device suitable for implementing a robot active target detection method based on continuous learning according to an embodiment of the present invention. DETAILED DESCRIPTION
[0051] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concept of the present invention.
[0052] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the presence of the features, steps, operations and / or components, but do not exclude the presence or addition of one or more other features, steps, operations or components.
[0053] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0054] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0055] Robotic object detection involves using visual sensors (such as cameras and lidar) to identify objects in the environment and simultaneously determine their category and spatial location (typically using a bounding box). To achieve this, the robot must possess autonomous learning capabilities, including autonomous acquisition of environmental and object information, autonomous movement, autonomous fine-tuning of image acquisition mechanisms, and autonomous knowledge transfer.
[0056] Existing robotic object detection solutions, such as the one based on the continuous learning framework ANCL, introduce an auxiliary network specifically tailored to the current task to learn new tasks and improve the model's plasticity, while retaining the old model to maintain stability for previous tasks. This approach uses a regularizer to achieve a balance between model stability and plasticity, addressing the problem of catastrophic forgetting. Robots perceive the world through sensors such as vision and construct a continuous model of the world. This model is continuously updated over time. During this updating process, the robot must make decisions, determine the next action, and execute that action to complete different tasks. After a robot completes an action, it may affect the environment. For example, the image observed by the robot before moving may not fully detect an occluded object. However, after moving, the robot's perspective changes, potentially allowing it to obtain a better, unobstructed image frame. Therefore, the robot can proactively obtain better observations through its own movement, which helps improve its recognition accuracy. Based on these strategies, researchers have developed Interactron, which combines an agent's active exploration and movement within an environment with an adaptive learning strategy to continuously improve and adapt object detection models without additional labeled data. However, this work currently targets a specific set of object categories and has yet to implement learning for new categories, limiting its widespread application in the open and dynamic environments faced by robots.
[0057] In order to solve the problem that robot target detection in an open dynamic environment cannot continuously detect new categories, the present invention provides a robot active target detection method based on continuous learning.
[0058] Figure 1 2 is an application scenario diagram of a robot active target detection method based on continuous learning according to an embodiment of the present invention.
[0059] like Figure 1 As shown, the application scenario 100 according to this embodiment may include autonomous driving, drone inspection, security monitoring, etc. The network 104 is used as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0060] A user may use a first terminal device 101, a second terminal device 102, or a third terminal device 103 to interact with a server 105 via a network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, or the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (for example only).
[0061] The first terminal device 101 , the second terminal device 102 , and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0062] The server 105 may be a server that provides various services, such as a background management server (for example only) that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process received data such as user requests, and feed back processing results (e.g., web pages, information, or data obtained or generated based on user requests) to the terminal devices.
[0063] It should be noted that the robot active target detection method based on continuous learning provided in the embodiment of the present invention can generally be executed by the server 105. Accordingly, the robot active target detection device based on continuous learning provided in the embodiment of the present invention can generally be set in the server 105. The robot active target detection method based on continuous learning provided in the embodiment of the present invention can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the robot active target detection device based on continuous learning provided in the embodiment of the present invention can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0064] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0065] The following will be based on Figure 1 The scene described by Figures 2 to 5 The robot active target detection method based on continuous learning of the disclosed embodiment is described in detail.
[0066] Figure 24 is a flowchart of a robot active target detection method based on continuous learning according to an embodiment of the present invention.
[0067] like Figure 2 As shown, the robot active target detection method based on continuous learning in this embodiment includes operations S210 to S240.
[0068] In operation S210 , a robot is used to continuously perform random data sampling in a multi-target environment to obtain multiple batches of training data sets corresponding to the target detection task.
[0069] The training dataset is a sequence of image frame data collected by the robot through its own imaging equipment. The training dataset includes images of different objects in the target environment and also includes the action sequence information performed by the robot.
[0070] By randomly collecting data in different environments, the robot can dynamically update the training dataset in real time. Different batches of training datasets can be constructed for different environments or different target detection tasks.
[0071] In operation S220, in the first task phase, the working network, the long-term network, and the short-term network are initialized, the working network is trained using the first batch of training data sets, the training output of the working network is used to optimize the robot's target detection task, and the parameters of the first trained working network are saved in the long-term network.
[0072] Long-term networks can retain or store historical knowledge learned from different tasks, while short-term networks can quickly learn new knowledge from the current task.
[0073] The long-term network can also be called a stability network, the working network can also be called a main network or main working network, and the short-term network can also be called a plasticity network. However, the long-term network, short-term network, and working network are all target detection networks, but with different parameters.
[0074] In operation S230, in the subsequent task stage, part of the training data of the previous task stage is randomly selected as playback data, and the short-term network of the previous task stage and the working network trained in the previous task stage are trained in sequence using the playback data and the training data set of the current task stage. The short-term network trained in the current task stage and the long-term network of the previous task stage are jointly used to perform knowledge distillation on the training process of the working network in the current task stage. The training output of the working network of the current task stage is used to continuously optimize the target detection task of the robot, and the parameters of the working network trained in the current task stage are saved in the long-term network of the previous task stage.
[0075] In the process of performing subsequent stage tasks, part of the data is first selected from the training data set corresponding to the previous task as playback data, and together with the training data corresponding to the current task, it forms a mixed data set to train the short-term network and the working network.
[0076] In operation S240 , operations of subsequent task phases are repeatedly performed until the robot completes target detection tasks in all target environments.
[0077] The robot active target detection method based on continuous learning provided by the present invention has good dynamic learning and environmental adaptability, which enables the robot to continuously improve its target detection ability in a constantly changing environment, and solves the technical problems of catastrophic forgetting and insufficient adaptability to new tasks faced by existing technical solutions in incremental learning scenarios; in addition, the method provided by the present invention utilizes a multi-model car wash learning and training framework to achieve stable optimization of the model and efficient knowledge transfer in a dynamic environment.
[0078] The following is a specific implementation method and combined with the attached Figure 3 The above-mentioned robot active target detection method based on continuous learning provided by the present invention is further described in detail.
[0079] Figure 3 2 is a framework diagram of a robot target detection method with a triple knowledge transfer architecture according to an embodiment of the present invention.
[0080] like Figure 3 As shown, the present invention provides a robot active target detection method that enables the robot to detect targets in different environments through a continuous learning process that balances network plasticity and stability. During the data stream acquisition process, the robot's image acquisition device continuously acquires image sequences from different environments, which serve as training data for different batches of tasks. These batches of tasks simulate the external information continuously acquired in an open environment. For task t, a triple knowledge transfer architecture is implemented using a long-term network, a working network, and a short-term network. The long-term network is used for "slow learning" and the short-term network is used for fast learning. Memory replay and knowledge distillation are introduced into this triple knowledge transfer architecture. Specifically, for task t (not the first task), the task data is first trained on the short-term network, and then the data is retrained on the working network. The training process is the same as step t. The outputs of the short-term and long-term networks are simultaneously used to distill the model output of the working network. After training, the parameters of the working network are stored in the long-term network.
[0081] like Figure 3 As shown in the figure, the long-term network, short-term network, and working network are all active target detection models. During the training process of the above models, the optimal path planning of the robot is achieved through the target detector, meta-learner, and action strategy planning period.
[0082] like Figure 3 As shown in the figure, the training dataset (image sequence training dataset) acquired by the robot serves as input to the stability network (i.e., the long-term network, hereinafter the same), the plasticity network (i.e., the short-term network, hereinafter the same), and the main network (i.e., the working network, hereinafter the same). The stability network consolidates the model's previously learned knowledge, the plasticity network rapidly learns the image features of the current batch, and the main network is the primary training task for the current batch. These three network models share the same structure: object detection networks consisting of a detection network and an action decision network. Unlike typical object detection models, this object detection model processes image sequence data and detects objects from it. The robot-perspective image sequences that serve as input to the model are captured by the robot moving in a simulated environment. This model leverages the robot's ability to interact with the environment. By moving the robot's perspective, the model observes the target object from different angles, minimizing the impact of environmental occlusion on the target object itself, thereby improving the model's object detection accuracy.
[0083] According to an embodiment of the present invention, the above-mentioned use of a robot to continuously perform random data sampling in a multi-target environment to obtain multiple batches of training data sets corresponding to the target detection task includes: using the robot to start from a randomly initialized agent starting position to randomly sample data on a target environment with different environmental attribute information, wherein the agent starting position includes three-dimensional space coordinates and rotation angles; during the random data sampling process, the robot collects label information of objects in multiple batches of training data sets in the target environment, wherein the label information of the objects includes type information and bounding box information of the objects; during the random data sampling process, the robot performs different actions in the target scene to collect image frame sequences in multiple batches of training data sets, wherein the image frame sequences include action sequence information.
[0084] The following is a further detailed description of the process of the robot collecting training data provided by the present invention through specific implementation methods.
[0085] During the robot training data collection process, a total of 4 simulation environments were set up, namely kitchen, bathroom, bedroom and living room. Different starting positions are set for the robot , the starting position of each scene is The starting position consists of position coordinates and rotation coordinates, and is randomly sampled from all available positions in a given scene. In addition, the position of each object in each scene is also random. The robot starts sampling randomly from the starting position of sampling, and collects a total of 5 consecutive frames, including the initial image frame observed at the starting position and the remaining frames obtained by the robot interacting with the environment through its own movement and rotation. The sequence of each frame of images observed by the robot from the starting position each time is recorded as trajectory F. In order to speed up the training of the model, each frame of each trajectory that the robot may obtain is pre-cached before the model training. During the training process, the sequence dataset inputs each possible trajectory into the model for learning.
[0086] In order to simulate the learning process of continuous learning, the dataset is divided into Batch tasks , each room type is a batch of tasks. During the training process, the model learns a batch of tasks each time, and learns a total of The dataset for this invention is an indoor scene consisting of different rooms, each decorated in a different style, with randomly placed objects. The training data consists of all possible paths the robot explores in the current room. During training, the robot continuously tries different paths to find the best path that helps the model learn new knowledge. The dataset contains the following information:
[0087] Agent starting position ( In each scene, the robot begins navigating from a specific starting position. The starting position includes position and rotation coordinates, which are randomized at each sampling to ensure that the model can learn to detect objects under different viewpoints and conditions.
[0088] Object Tag ( ): For each starting position, the dataset contains labels for all objects visible from that position. These labels include the object’s category and bounding box information, which are used to train the object detection model during the supervised learning process.
[0089] Frame sequence ( ): As the robot navigates the scene, it collects a series of frames (i.e., image frames), which are used for training along with their corresponding labels. Contains the view of the environment observed by the agent after performing actions (such as forward, backward, rotation, etc.).
[0090] Action sequences: The sequences of actions taken by the agent as it explores the scene. These action sequences are used to evaluate and optimize the policy network during training.
[0091] According to an embodiment of the present invention, the working network, the long-term network and the short-term network are target detection models with different initialization parameters; wherein, the long-term network can store historical knowledge learned in different task stages, and the short-term network is used to learn new knowledge in the current task stage; wherein, the target detection model includes a detector based on the DETR model and a supervisor based on a generative pre-trained language model; wherein, the detector includes a ResNet image feature extractor, a Transformer feature encoder, a Transformer feature decoder and a multi-layer perceptron; wherein, the supervisor includes a transformer backbone network, a feature embedding layer, a loss decoder and a strategy decoder.
[0092] The structure and operation of the target detection model provided by the present invention will be further described in detail below through specific implementation methods.
[0093] The long-term network, short-term network and working network provided by the present invention are all target detection models. The target detection model is mainly divided into two parts: a detector for detecting objects. and a monitor for processing interaction information with the environment and back-updating the detector model gradient Specifically, for the detector , the present invention adopts the DETR model, which is a target detection model that combines convolutional neural networks and Transformer architecture. In the present invention, the pre-trained DETR model parameters are used, which reduces the consumption of computing resources for the subsequent further data processing of the model and shortens the training time. In the DETR model, the Backbone part uses a pre-trained CNN model built by the Resnet-50 network to extract useful visual features from the original image. The extracted features are then input into the Transformer, and the image features are processed through the Transformer's self-attention mechanism, and finally the classification prediction results are output. and the predicted object bounding box , as well as image features and other feature information. These output results will be used as the next layer The prediction results are further processed.
[0094] For the supervisor For example, the present invention uses a 4-layer, 8-head Transformer based on the GPT architecture, whose internal structure dimension is 512. The structure contains two independent embedding layers, one for image features and the other for object detection features. Each token in the sequence learns a position embedding ( ). In addition, the supervisor also contains two decoders, each of which consists of 3 consecutive linear layers, with Non-linear activation function split, hidden dimension is 512, one decoder accepts the output of the detection token for calculation After obtaining the loss, the stochastic gradient descent method is used to update Parameters. After updating the parameters, the image data of the current batch of tasks is input for inference to obtain the final adaptive output. The above method uses the information obtained by the interaction between the robot and the environment to The parameters are further updated to improve In the present invention, interaction with the environment refers to images of different angles obtained by the movement of the robot. The object to be detected may exist in multiple consecutive images, which may cause the object to be detected to be blocked by other objects in the first frame. However, in the following frames, due to the different observation angles, the outline of the object is complete in the image. The images of these frames will significantly improve the detection accuracy of the object. Therefore, in the present invention, the image of an area is taken by the movement of the robot, and multiple frames are taken. The first frame is used as the recognition reference image, and the subsequent frames are used for initial frame calculation. , and update the gradient to improve the detection accuracy of objects. outside, At the same time, it generated Used to update the robot's action selection strategy. The action selection strategy of the present invention is composed of a strategy network ( ) is parameterized by the neural network, and the network parameters are , which is responsible for generating the next action to be taken in a given state. The purpose of this policy network is to guide the robot to take a series of actions in the environment in order to collect frame sequences that help the model adapt to new tasks. The generation and update process of the action policy network is as follows. Policy network is a neural network with parameters Parameterized. This network accepts the current frame sequence As input, it outputs an action probability distribution. The training of the policy network is a sequence prediction task. During training, the robot can explore all possible action sequences to find the action that satisfies the requirements of the complete frame sequence. In this invention, the minimum initial frame gradient alignment ( ), which is designed to evaluate whether the model is improved in detection performance due to the frame sequences collected by the robot. This indicator uses the gradient generated by the frame sequence calculation and the detection loss gradient calculated using the true label between The distance is calculated as shown in formula (1):
[0095] (1),
[0096] in, are model parameters, The frame sequence collected by the robot, is the initial frame of the frame sequence. During the training process, the goal is to minimize , that is, the gradient calculated using the frame sequence is as close as possible to the detection gradient generated by the real label. The purpose of this is to make the frame sequence collected by the robot provide training signals similar to the real label, thereby helping the model to better adapt to the new environment. During training, the model explores the gradient from the starting frame to the real label. Calculate the ideal strategy for all trajectories starting from , which will output the result with the lowest During training, the policy network Trained to imitate ideal strategies The behavior of is calculated by using the cross entropy loss function to calculate the distribution difference between the two networks, as shown in formula (2):
[0097] (2).
[0098] During training, the object detection model and the policy network are co-optimized. The output of the policy network is used to generate actions, and the data collected by these actions is used to further optimize the policy network, enabling it to better guide the agent to collect data that helps the model adapt to the environment. This allows the model to still interact with the environment during testing and improves the recognition accuracy of the detection model. When faced with an unseen scene, the robot can use the current policy network to The generated action probability distribution is used to determine the next action to take, frame sequences are collected, and these newly generated frame sequences and the predictions produced by the detection model are used to generate gradients for dynamic adaptation.
[0099] According to an embodiment of the present invention, the above-mentioned training of the working network using the first batch of training data sets includes: using the detector of the working network to process the first batch of training data sets to obtain image features, category prediction results, bounding box prediction coordinates and detection token prediction information of objects in the target environment; using a predefined detection loss function to calculate the detection loss of the detector in the data processing process, and using the calculated detection loss value to supervise the data processing process of the detector; using the first batch of training data sets of the detector of the working network and the image features and detection token prediction information of the object to process and generate the object's action sequence prediction information; using a predefined supervision loss function to calculate the supervision loss of the supervisor in the data processing process, and using the calculated supervision loss value to update the parameters of the detector in a gradient back propagation manner.
[0100] The above-mentioned training process of the working network provided by the present invention forms a closed-loop feedback by jointly training with detection loss and supervision loss, and the detection token information guides the generation of action sequences, thereby greatly improving the robustness of the robot to interference such as occlusion and lighting changes; in addition, by simultaneously extracting image features, bounding box coordinates and detection token information, a deep fusion of visual data and semantic tags is achieved, which greatly improves the accuracy of target recognition.
[0101] According to an embodiment of the present invention, the above-mentioned use of the detector of the working network to process the first batch of training data sets to obtain the category prediction results, bounding box prediction coordinates and detection token prediction information of the objects in the target environment includes: using the ResNet image feature extractor of the detector to extract image features of the first batch of training data sets to obtain the image features of the objects; using the Transformer feature encoder of the detector to capture the global dependencies of the image features based on the self-attention mechanism to obtain the image feature encoding results with contextual information; using the Transformer feature decoder of the detector to perform a decoding operation based on the attention mechanism on the image feature encoding results to obtain the category prediction results and bounding box prediction coordinate set of the object; based on confidence screening, using the multi-layer perceptron of the detector to process the category prediction results and bounding box prediction coordinate set to obtain the category prediction results, bounding box prediction coordinates and detection token prediction information of the object.
[0102] The above embodiments provided by the present invention solve the problem of insufficient generalization ability of traditional methods in dynamic environments by complementing the advantages of convolution and attention. It is particularly suitable for scenarios with high real-time requirements such as service robots and industrial quality inspection. It also combines the local feature extraction of ResNet with the global dependency modeling of Transformer to achieve deep fusion of spatial and semantic information and improve the detection robustness in complex scenarios.
[0103] According to an embodiment of the present invention, the above-mentioned processing of the first batch of training data sets of the detector using the working network and the image features and detection token prediction information of the object to generate the action sequence prediction information of the object includes: using the image feature embedding layer of the supervisor to linearly map the image features to obtain the image embedding vector, and using the target detection embedding layer of the supervisor to linearly map the detection token prediction information to obtain the token embedding vector; splicing the image embedding vector and the token embedding vector, and using the Transformer backbone network of the supervisor to adaptively encode the splicing result to obtain the encoding result; using the loss decoder of the supervisor to decode the encoding result based on the attention mechanism to obtain an adaptive loss scalar; using the strategy decoder of the supervisor to perform attention decoding based on the initial frame gradient alignment on the encoding result to obtain the action sequence prediction information of the object.
[0104] According to an embodiment of the present invention, the above-mentioned predefined supervised loss function includes a policy loss function based on cross entropy loss and a position embedding loss function based on cross entropy loss and L1 norm.
[0105] According to an embodiment of the present invention, the above-mentioned knowledge distillation of the training process of the working network in the current task stage using the short-term network trained in the current task stage and the long-term network in the previous task stage includes: using the long-term network in the previous task stage to process the playback data and the training data set of the current task stage to obtain the long-term training output; using a predefined joint distillation loss function to perform distillation constraints on the long-term training output and the training output of the working network in the current task stage, and migrating the historical knowledge in the long-term training output to the working network in the previous task stage; using a predefined joint distillation loss function to perform distillation constraints on the short-term training output of the short-term network trained in the current task stage and the training output of the working network in the current task stage, wherein the predefined joint distillation loss function includes a soft label loss value function based on KL divergence and a regression label loss based on Smooth L1; migrating the new knowledge extracted from the training data set of the current training stage in the short-term training output to the working network of the current task stage.
[0106] The above embodiment retains historical task knowledge (such as target features of old scenes) through the long-term network and captures new task features through the short-term network, achieving a balance between catastrophic forgetting suppression and incremental learning; KL divergence loss ensures the distribution consistency of knowledge transfer, Smooth L1 loss optimizes the bounding box regression accuracy, and joint knowledge distillation improves the accuracy of target detection; at the same time, the short-term network quickly extracts the current task features, and the knowledge distillation speed is faster than traditional fine-tuning.
[0107] like Figure 3As shown, in the forward propagation stage, the three networks forward propagate the current batch of data to generate the detection prediction results of the model and the action strategy network of the current model. . In order to enable the entire model to work in an open and dynamic environment, that is, to be able to perform target detection work for multiple batches of tasks, continuous learning needs to be introduced. Specifically, the present invention constructs a triple knowledge transfer framework of "main network-stability network-plasticity network", in which the role of the stability network is to consolidate the knowledge that the model has learned, and the role of the plasticity network is to quickly learn the image features of the current batch. The main network uses a continuous learning method and an auxiliary network loss function for training. The loss function is defined as follows: ,in Is the current task Model-specific loss, i.e., the detection loss of the detector and the supervisor loss The sum of Represents model parameters. represents the distillation loss between the teacher network and the student network, Represents the parameters of the distillation loss function. This paper proposes a multi-teacher collaborative distillation optimization method for target detection models. The stability network and the plasticity network serve as the teacher network of the main network. Through the joint distillation mechanism, the knowledge of the main network is quickly transferred to the student network as the main network, helping the student model to learn the predictive ability of the teacher model while maintaining the miniaturization and efficiency of the model. Specifically, the distillation loss mainly includes soft label loss and regression distillation loss, using KL divergence loss and and Smooth L1 loss As a supervisory signal, it supervises the parameter updates of the teacher and student models. The present invention establishes an extensible weight configuration system, using As a global distillation intensity coefficient to control distillation loss, use and As the weight of the stability network and the plasticity network, As a balancing factor between the classification task and the bounding box regression task, The calculation formula of distillation loss is as shown in formula (3):
[0108] (3).
[0109] The present invention constructs a playback sampling pool for training data. During the continuous learning process, by randomly sampling and replaying part of the previous batch of data, the model can maintain stability of old knowledge during the continuous learning process and slow down catastrophic forgetting.
[0110] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0111] (1) The present invention enables robots to learn new categories of knowledge in an open and dynamic environment and have a certain ability to resist forgetting.
[0112] (2) This invention can improve the efficiency and accuracy of robots in object detection tasks while reducing the demand for computing resources. Through knowledge distillation and data replay, robots can achieve faster reasoning speed and lower energy consumption while maintaining high performance.
[0113] (3) This invention provides a dynamic learning and adaptation mechanism that enables the robot to continuously improve its object detection capabilities in a constantly changing environment. Compared with traditional algorithms, this framework gives the robot stronger adaptability and learning capabilities, enabling it to maintain high performance in long-term deployments without the need for frequent retraining or adjustments.
[0114] The following is another specific embodiment and combined with the attached Figure 4 The above-mentioned robot active target detection method based on continuous learning provided by the present invention is further described in detail.
[0115] Figure 4 2 is a diagram of a continuous learning framework for target detection that processes multiple batches of tasks according to an embodiment of the present invention.
[0116] like Figure 4 As shown, the continuous learning framework provided by the present invention mainly includes a working network , long-term network and short-term networks The three network models have the same structure and are all target detection models. In addition, the framework also includes knowledge distillation and memory playback modules , which enables the new model to retain knowledge of old tasks while adapting to new tasks, thereby reducing the risk of catastrophic forgetting.
[0117] The following model The composition of the model is explained: Contains detector and supervisor . The detector For a DETR-based detector, a ResNet backbone is used to extract image features and is combined with a Transformer model to generate object detection embeddings. The Transformer encoder processes feature maps with positional encodings through a self-attention mechanism, capturing global dependencies in the image and providing context for the decoder to generate accurate object predictions. The Transformer decoder receives the encoder output and a fixed number of object queries, and generates predicted categories and bounding boxes for the objects in parallel through self-attention and attention mechanisms. Based on the output of the decoder, a feed-forward network (FFN) assigns a category label and a bounding box to each object query. If no real object is matched, the prediction is "no object". A multi-layer perceptron (MLP) is used to generate predicted bounding box coordinates and category labels.
[0118] Supervisor It is a Transformer-based model that decodes the detector during training. The output feature embedding of is used to calculate the adaptive loss And generate a policy network Supervisor Receives features and embeddings from the detector (called detection tokens) and a learnable policy token (called policy tokens), and merges them into a sequence , and input the sequence into the GPT model for processing. The GPT model will output Sequence understanding and prediction of target detection tasks. One of the decoders accepts the output of the detection token and is used to calculate the adaptive loss decoding Another decoder is used for supervision and also includes a learned policy network , the network predicts the next best action based on the frames collected by the agent.
[0119] Knowledge distillation and memory replay modules For tasks (Task batch number ) The trained detection model Knowledge distillation is performed so that the model can quickly learn the knowledge of the current task while reducing the catastrophic forgetting of learned knowledge (previous batch tasks). The input is the prediction results of the short-term network and the long-term network, as well as the forward propagation output of the main network model . The module uses a hybrid distillation method to calculate the overall distillation loss of the main network model , as shown in formula (3):
[0120] (3).
[0121] The following is an introduction to the process of model processing data:
[0122] For the first task, first train the detector : Work Network Detector Enter Task 1 data , generating predicted class scores , object bounding box , and features of objects and bounding boxes , recorded as . and get loss . The calculation formula is shown in (4):
[0123] (4),
[0124] in , are the true labels of the images and the prediction results of the models, , are the true category labels and predicted category scores of the objects, , are the actual object bounding box and the bounding box predicted by the model, respectively. and are the cross entropy loss function and Norm loss function.
[0125] Secondly, for the current detector Performing Meta-Learning: Defining Adaptive Loss Functions , the parameters are . This loss function is determined by the supervisor Generation, which receives the detector output and the frame sequence as input and outputs a scalar loss value. The generated gradient can be back-propagated to update the detector model The gradient generated by this loss function guides the detector on how to adjust itself according to changes in the environment to improve its performance in the new environment and improve the adaptability of the model in a dynamically changing environment.
[0126] Supervisor Input detector Output , using a linear layer to Convert it into image feature embedding vector and prediction result embedding vector, which are uniformly recorded as detection_tokens. Process the input through the GPT model, and use the multi-layer perceptron MLP to process the output of GPT, and finally output the predicted decoding , bounding box prediction , the predicted probability of the category , adaptive loss decoding and action decoding .
[0127] The resulting adaptive loss decoding pass Norm calculation to get adaptive loss Detector Use the learned loss to perform back propagation to the detector The parameters of the detector are optimized. The optimized output .
[0128] Again, the policy network uses the output of the supervisor to learn:
[0129] Defining a policy network model , is the parameter A parameterized neural network that guides the model to take actions during inference that help the model adapt to the environment. Define IFGA (Initial Frame Gradient Alignment), which is the gradient generated by the frame sequence. and the detection loss gradient calculated using the true label between The distance is calculated, and the specific formula is shown in (1):
[0130] (1),
[0131] in is a sequence of image frames, For the scene The starting position is The starting frame of training policy network model The goal is to find the action trajectory that is most conducive to updating the model parameters, recorded as the best action trajectory , the motion trajectory has the lowest IFGA value. The IFGA value is calculated and updated continuously by the robot during the training process, traversing all possible motion trajectories, and selecting the The optimal action trajectory is used to guide the policy network model training, using a supervisor Action decoding and Perform cross entropy calculation to get loss , the loss function is shown in (2):
[0132] (2).
[0133] Then, the supervisor is calculated loss : Optimized detector Output Using detectors with real image labels The loss function calculates the loss as the supervisor loss part of , the loss function is shown in formula (5):
[0134] (5),
[0135] in, The detector after parameter optimization The output, is the true category label of the object, , are the category scores predicted by the detector and the true category labels of the objects, respectively. , are the bounding box predicted by the model and the actual object bounding box, respectively.
[0136] Supervisor loss Strategy loss and The sum of , as shown in formula (6):
[0137] (6).
[0138] Randomly select a frame from the sequence and input it into the detector , and the obtained output is compared with the real label of the image using the loss function of the detector to calculate the loss ;
[0139] The final loss of the model It is the sum of the losses of the detector and the supervisor ;
[0140] For the first task, after the model is trained on the current task, the working network The parameters are frozen and copied to the long-term network : For the subsequent task stage, a short-term network is first established for the data of the subsequent task. , using long-term networks The parameters are Initialize the parameters: In short-term network The image data for the current task is trained on, and the training process is the same as that for the first task;
[0141] Use long-term network , short-term network Predict the image data of the current task and generate prediction results respectively and , the prediction results are used to supervise the output of the working network. Working network training: Working network Train on the image data of the current task, and the output is , the resulting loss is ;
[0142] Calculate the distillation loss of the working network and the long-term and short-term networks: Use the prediction results of the long-term network and the short-term network to distill the output results of the working network. The distillation loss function is shown in formulas (7) and (8):
[0143] (7),
[0144] (8),
[0145] in , Work Network Output and long-term network , short-term network The model's prediction results, , , Work Network , long-term network and short-term networks The predicted class scores, , , Work Network and long-term networks , short-term network The predicted bounding box. The loss functions are KL divergence loss and Smooth L1 loss , is the balancing factor for the two losses.
[0146] The working network is distilled with the long-term network and the short-term network respectively, and the resulting distillation losses are and , and use regular terms respectively and Constrain the distillation loss and obtain the final loss of the current task, as shown in formula (9):
[0147] (9),
[0148] The working network is distilled with the long-term network to retain old knowledge, and with the short-term network to quickly learn new knowledge. The model uses the gradient obtained from the loss to perform back propagation and update the model, and finally obtains the model .
[0149] Freeze trained Model parameters, which are used to update the long-term network model , until task T is learned and the final model is obtained .
[0150] The dataset used in the examples of the present invention was collected through the Ai2thor
[47] simulation environment. The robot performed random actions in the simulation environment and took 4 steps from the starting position through random actions. During this process, the sensors on the robot received information from the environment.
[0151] Figure 5 2 is a schematic diagram of an Ai2thor simulation environment according to an embodiment of the present invention.
[0152] Figure 6 3 is a schematic diagram of the effect of target detection in the Ai2thor simulation environment according to an embodiment of the present invention.
[0153] like Figure 5 As shown in the figure, what is shown is the result observed by the robot during movement. In this dataset, there are four scenes: kitchen, living room, bedroom, and bathroom. Each scene has 15 different scene distributions, and each scene has a unique layout and object placement. The dataset contains a variety of object categories, which are usually related to furniture and objects in daily life. The images of each scene are detailed with annotations, including the category of the object and the object bounding box, such as Figure 6 shown.
[0154] In the simulation experiment of the example of the present invention, the software used is: Python 3.8, processor: Intel(R) Core(TM) i5-13400F, memory: 32.0GB, operating system: 64-bit Windows 11.
[0155] Experimental content and result analysis - Task definition: In continuous learning tasks, it is necessary to detect and identify objects in different scenes in multiple tasks. The experimental evaluation indicators use standard computer vision evaluation indicators Average Precision (AP) and Mean Average Precision (mAP) to measure the performance of the model. In order to evaluate the effectiveness of the target detection method of the present invention, an experimental comparison was conducted. The comparison methods include: the existing target detection algorithm (INTERACTRON), fine-tuning experiments, and the method proposed in this invention. The parameters of the method are selected through cross-validation, and the optimal parameters are as follows: , , , .
[0156] In the experiment set up by the present invention, two scenarios were used to experimentally verify the method.
[0157] The experimental results are shown below:
[0158] Table 1 - Experimental results
[0159]
[0160] According to the above specific embodiments or specific implementation methods, the present invention addresses the problems of catastrophic forgetting and insufficient adaptability to new tasks faced by traditional target detection models in incremental learning scenarios, and proposes an innovative multi-model continuous learning and training framework, aiming to achieve stable optimization and efficient knowledge transfer of models in dynamic environments.
[0161] The above-mentioned method provided by the present invention first collects continuous image sequence frames through a robot mobile platform to construct a dynamically updated training data set; secondly, based on this data set, the model adaptively updates parameters during the training process and outputs the final detection results. In addition, the present invention designs a multi-model collaborative architecture of "stability network-plasticity network-main network", which innovatively combines multi-model collaborative distillation with a dynamic replay mechanism: the stability network is responsible for maintaining the memory retention of learned knowledge, the plasticity network focuses on rapid adaptation to new task features, and the main network integrates the advantages of both to achieve comprehensive performance optimization and reduce catastrophic forgetting. The dynamic replay mechanism balances the replay ratio of new and old task data through an intelligent sample selection strategy, further alleviating the problem of catastrophic forgetting.
[0162] Figure 7 4 is a block diagram of an electronic device suitable for implementing a robot active target detection method based on continuous learning according to an embodiment of the present invention.
[0163] like Figure 7 As shown, an electronic device 700 according to an embodiment of the present invention includes a processor 701, which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 702 or programs loaded from a storage unit 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or related chipsets and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.
[0164] Various programs and data required for the operation of the electronic device 700 are stored in the RAM 703. The processor 701, ROM 702, and RAM 703 are connected to each other via a bus 704. The processor 701 performs various operations according to the method flow of the embodiment of the present invention by executing the programs in the ROM 702 and / or RAM 703. It should be noted that the programs may also be stored in one or more memories other than the ROM 702 and RAM 703. The processor 701 may also perform various operations according to the method flow of the embodiment of the present invention by executing the programs stored in the one or more memories.
[0165] According to an embodiment of the present invention, electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to bus 704. Electronic device 700 may also include one or more of the following components connected to I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 708 including a hard disk; and a communication section 709 including a network interface card such as a LAN card or modem. Communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to I / O interface 705 as needed. Removable media 711, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 710 as needed, so that computer programs read from the removable media can be installed into storage section 708 as needed.
[0166] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of the present invention.
[0167] According to an embodiment of the present invention, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present invention, a computer-readable storage medium may include the ROM 702 and / or RAM 703 described above, and / or one or more memories other than ROM 702 and RAM 703.
[0168] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0169] It will be understood by those skilled in the art that the features described in the various embodiments of the present invention may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in the present invention. In particular, the features described in the various embodiments of the present invention may be combined and / or coupled in various ways without departing from the spirit and teachings of the present invention. All such combinations and / or couplings fall within the scope of the present invention.
[0170] The above describes embodiments of the present invention. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present invention. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.
Claims
1. A robot active target detection method based on continuous learning, characterized in that: The method comprises: Use the robot to continuously perform random data sampling in a multi-target environment to obtain multiple batches of training data sets corresponding to the target detection task; In the first task phase, the working network, the long-term network, and the short-term network are initialized, the working network is trained using the first batch of training data sets, the training output of the working network is used to optimize the robot's object detection task, and the parameters of the first trained working network are saved in the long-term network; In a subsequent task stage, part of the training data of the previous task stage is randomly selected as playback data, and the short-term network of the previous task stage and the working network trained in the previous task stage are trained in sequence using the playback data and the training data set of the current task stage. The short-term network trained in the current task stage and the long-term network of the previous task stage are jointly used to perform knowledge distillation on the training process of the working network in the current task stage. The training output of the working network of the current task stage is used to continuously optimize the target detection task of the robot, and the parameters of the working network trained in the current task stage are saved in the long-term network of the previous task stage. Repeat the operations of the subsequent task phase until the robot completes all target detection tasks in the target environment.
2. The method according to claim 1, characterized in that The robot continuously performs random data sampling in a multi-target environment to obtain multi-batch training data sets corresponding to the target detection task, including: Using the robot to randomly sample data from a target environment with different environmental attribute information starting from a randomly initialized proxy starting position, wherein the proxy starting position includes a three-dimensional space coordinate and a rotation angle; During random data sampling, the robot collects label information of objects in the multiple batches of training data sets in the target environment, wherein the label information of the objects includes type information and bounding box information of the objects; During the random data sampling process, the robot performs different actions in the target scene to collect image frame sequences in the multiple batches of training data sets, wherein the image frame sequences include action sequence information.
3. The method according to claim 1, characterized in that The working network, the long-term network, and the short-term network are target detection models with different initialization parameters; The long-term network can store historical knowledge learned in different task stages, and the short-term network is used to learn new knowledge in the current task stage; The target detection model includes a detector based on a DETR model and a supervisor based on a generative pre-trained language model; The detector includes a ResNet image feature extractor, a Transformer feature encoder, a Transformer feature decoder, and a multi-layer perceptron; The supervisor includes a transformer backbone network, a feature embedding layer, a loss decoder, and a strategy decoder.
4. The method according to claim 3, characterized in that Training the working network using the first batch of training data sets includes: Processing the first batch of training data sets using the detector of the working network to obtain image features, category prediction results, bounding box prediction coordinates, and detection token prediction information of objects in the target environment; Calculating the detection loss of the detector during the data processing process using a predefined detection loss function, and supervising the data processing process of the detector using the calculated detection loss value; Processing the first batch of training data sets and the image features and detection token prediction information of the object using the detector of the working network to generate action sequence prediction information of the object; The supervisory loss of the supervisor in the data processing process is calculated using a predefined supervisory loss function, and the parameters of the detector are updated using the calculated supervisory loss value in a gradient backpropagation manner.
5. The method according to claim 4, characterized in that The first batch of training data sets are processed using the detector of the working network to obtain the category prediction results, bounding box prediction coordinates and detection token prediction information of the objects in the target environment, including: Performing image feature extraction on the first batch of training data sets using the ResNet image feature extractor of the detector to obtain image features of the object; Using the Transformer feature encoder of the detector to capture the global dependency of the image features based on the self-attention mechanism, to obtain an image feature encoding result with context information; Using the Transformer feature decoder of the detector to perform an attention mechanism-based decoding operation on the image feature encoding result to obtain a category prediction result and a bounding box prediction coordinate set of the object; Based on confidence screening, the category prediction result and the bounding box prediction coordinate set are processed using the multi-layer perceptron of the detector to obtain the category prediction result, bounding box prediction coordinates and detection token prediction information of the object.
6. The method according to claim 4, characterized in that Processing the first batch of training data sets and the image features and detection token prediction information of the object using the detector of the working network to generate the action sequence prediction information of the object includes: Using the image feature embedding layer of the supervisor to linearly map the image features to obtain an image embedding vector, and using the object detection embedding layer of the supervisor to linearly map the detection token prediction information to obtain a token embedding vector; splicing the image embedding vector and the token embedding vector, and adaptively encoding the splicing result using the Transformer backbone network of the supervisor to obtain an encoding result; Using the loss decoder of the supervisor to decode the encoded result based on the attention mechanism to obtain an adaptive loss scalar; The strategy decoder of the supervisor is used to perform attention decoding on the encoding result based on initial frame gradient alignment to obtain the action sequence prediction information of the object.
7. The method according to claim 6, characterized in that The predefined supervised loss function includes a policy loss function based on cross entropy loss and a position embedding loss function based on cross entropy loss and L1 norm.
8. The method according to claim 1, characterized in that: Performing knowledge distillation on the training process of the working network in the current task stage by jointly utilizing the short-term network trained in the current task stage and the long-term network in the previous task stage includes: Processing the playback data and the training data set of the current task phase using the long-term network of the previous task phase to obtain a long-term training output; Using a predefined joint distillation loss function to perform distillation constraints on the long-term training output and the training output of the working network in the current task stage, and migrating historical knowledge in the long-term training output to the working network in the previous task stage; Performing distillation constraints on the short-term training output of the short-term network trained in the current task phase and the training output of the working network in the current task phase using the predefined joint distillation loss function, wherein the predefined joint distillation loss function includes a soft label loss value function based on KL divergence and a regression label loss based on Smooth L1; The new knowledge extracted from the training data set of the current training stage in the short-term training output is transferred to the working network of the current task stage.
9. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.