Test-time adaptation method for visual reinforcement learning applied to robotic arm control

By using sliding average and data mixing technology in robot arm control to update the agent's batch normalization layer, combined with knowledge base and data expansion methods, the problem of poor adaptability of agents in new environments is solved and more efficient adaptation is achieved. and performance improvements, reducing resource consumption in the new environment.

CN118003329BActive Publication Date: 2024-09-06FUDAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410303260.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-18
Publication Date
2024-09-06
Estimated Expiration
2044-03-18

AI Technical Summary

Technical Problem

In robotic arm control, it is difficult for the trained agent to adapt to the new environment. The existing complete test-time adaptation method cannot effectively combine the problem of reinforcement learning, resulting in poor strategic effects of the agent in the new environment.

Method used

By using sliding average and data mixing techniques to update the agent's batch normalization layer offline or online, and combining knowledge base and data augmentation methods to optimize the adaptability of the agent in new environments, including acquisition and storage Images, batches are randomly selected for forward propagation, and the mean and variance of the batch normalization layer are updated in a sliding average manner, the initial and converged data are mixed, and the action output of the agent is optimized.

Benefits of technology

It improves the applicability and adaptability of the agent in the new environment, reduces the engineering cost of fine-tuning in the new environment, saves resources, and achieves more efficient adaptation and performance improvement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118003329B
    Figure CN118003329B
Patent Text Reader

Abstract

The present invention relates to a visual reinforcement learning test-time adaptation method applied to manipulator control, comprising: S1, obtaining a trained agent for manipulator control; S2, placing the agent in an actual environment as the current agent, and building a knowledge base; S3, the current agent obtains a current image from the actual environment, the current image is stored in the knowledge base, and the agent outputs the current action; S4, judging whether the image in the knowledge base reaches the batch threshold, if not, returning to S3, otherwise, forward propagation is performed to update each batch normalization layer of the current agent; S5, repeating S3-S4 to obtain the result mean and result variance of each batch normalization layer; S6, mixing the result mean and result variance with the initial value of the mean and variance to obtain the mixed mean and mixed variance. Compared with the prior art, the present invention has the advantages of improving the environmental applicability of reinforcement learning, etc.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of robot arm control, and in particular to a visual reinforcement learning test-time adaptation method applied to robot arm control. Background Art

[0002] In the process of using the trained agent to control the robot arm, when entering a new visual environment, in order to improve the generalization of the visual reinforcement learning agent, various carefully designed data enhancements can be used to expand the observation range of the agent during training, or through certain self-supervision methods (such as contrastive learning). However, conventional domain adaptation algorithms are often limited in the application scope of reinforcement learning. First, fine-tuning in a new environment is often unrealistic, and making dense rewards for a new environment is a huge project, especially in a high-real-time scenario. And the information in the old environment is often impossible to be brought to the new scene for adaptation. For example, on a small-capacity platform such as a drone, a large amount of data cannot be carried. Therefore, how to design a "complete test-time adaptation" solution that only uses visual information in the new environment for adaptation is a very valuable topic.

[0003] In the field of visual deep learning, existing technologies propose a full test-time adaptation algorithm to achieve adaptation to new environments. However, in the setting of deep learning, the model can often obtain data in the data set arbitrarily to form a batch. In reinforcement learning, due to the Markov property of reinforcement learning problems, the agent can often obtain an observation result from the environment only after giving a feedback. This greatly limits the method of test-time adaptation based on BN layer changes. The full test-time adaptation method cannot be combined with the reinforcement learning problem. In the process of controlling the robot arm, the trained agent cannot adapt well to the new environment, and the strategy output by the agent is less effective. Summary of the invention

[0004] The purpose of the present invention is to provide a visual reinforcement learning test-time adaptation method applied to robotic arm control in order to improve the applicability of an intelligent agent for robotic arm control to new environments.

[0005] The purpose of the present invention can be achieved by the following technical solutions:

[0006] A visual reinforcement learning test-time adaptation method for robot arm control, the method is performed in an offline state, and the method comprises:

[0007] S1. Obtain a trained intelligent agent for robot arm control, wherein the intelligent agent includes an image processing network and a multilayer perceptron, wherein the image processing network includes multiple batch normalization layers, and obtain initial values ​​of the mean and variance of each batch normalization layer;

[0008] S2, placing the agent obtained in S1 in the actual environment as the current agent, and constructing a knowledge base, wherein the knowledge base is used to store the current image obtained by the agent;

[0009] S3, the current agent corresponding to the current time t obtains the current image from the actual environment, the current image is stored in the knowledge base, the agent outputs the current action, the robot arm executes the current action, and the environment feeds back a new image;

[0010] S4: Determine whether the images in the knowledge base have reached the batch threshold. If not, return to S3. Otherwise, randomly select an image of a batch size from the knowledge base as the propagation image for forward propagation, and update each batch normalization layer of the current agent in a sliding average manner to obtain the mean and variance of the batch normalization layer at time t+1.

[0011] S5. Take the agent after updating the batch normalization layer as the new current agent, update the current time, and repeat S3 to S4 until the mean and variance of each batch normalization layer converge. Let the time at this time be T to obtain the result mean μ of each batch normalization layer. T and the resulting variance

[0012] S6. Mix the result mean and result variance with the initial values ​​of the mean and variance to obtain a mixed mean and a mixed variance, and use the agent corresponding to the batch normalization layer corresponding to the mixed mean and the mixed variance as the result agent. The result agent continues to obtain the actual image of the actual environment, and the result agent outputs an action, and the robotic arm executes the action.

[0013] Furthermore, the updating of each batch normalization layer of the current agent is specifically: updating the mean and variance of each batch normalization layer:

[0014] μ t+1 =γμ+(1-γ)μ t

[0015]

[0016] Among them, μ t+1 and represents the mean and variance of the batch normalization layer at time t+1 after the update, γ represents the sliding average update ratio, μ and σ 2 is the mean and variance of the propagated image calculated at the batch normalization layer, μ t and σ 2t represents the mean and variance of the batch normalization layer at time t. When t = 0, μ0 = μ s , σ 2 0=σ 2 s , where μ s and They represent the initial values ​​of the mean and variance of the batch normalization layer respectively.

[0017] Furthermore, the mixed mean and mixed variance are:

[0018]

[0019]

[0020] Among them, μ T and represents the mean and variance of the converged batch normalization layer, and denote the mixed mean and mixed variance respectively, α is a hyperparameter, μ s and They represent the initial values ​​of the mean and variance of the batch normalization layer respectively.

[0021] Furthermore, when the current image is stored in the knowledge base, if the number of images in the knowledge base is equal to the image number threshold, the image that entered the knowledge base the earliest is deleted from the knowledge base, and then the current image is stored in the knowledge base.

[0022] In another aspect of the present invention, a visual reinforcement learning online test adaptation method for robotic arm control based on the above-mentioned visual reinforcement learning test adaptation method for robotic arm control is provided, and the method comprises:

[0023] S1. Obtain a trained intelligent agent for robot arm control, wherein the intelligent agent includes an image processing network and a multilayer perceptron, wherein the image processing network includes multiple batch normalization layers, and obtain initial values ​​of the mean and variance of each batch normalization layer;

[0024] S2, placing the agent obtained in S1 in the actual environment as the current agent at the current time t;

[0025] S3, the current agent obtains the current image from the actual environment;

[0026] S4, expand the current image to obtain an image of a batch size as a propagation image, perform forward propagation on the propagation image, calculate the mean and variance of the propagation image in each batch normalization layer, and use the calculated mean and variance as the result mean and result variance respectively;

[0027] S5. Mix the result mean and result variance with the initial values ​​of the mean and variance to obtain a mixed mean and a mixed variance, and use the agent corresponding to the batch normalization layer corresponding to the mixed mean and the mixed variance as the result agent. The result agent outputs the current action according to the current image, and the robotic arm performs the current action. The result agent is used as the current agent, and the current time is updated to t+1. Repeat S3 to S5.

[0028] Furthermore, the mixed mean and mixed variance are:

[0029]

[0030]

[0031] Among them, μ t represents the mean and variance of the propagation image at the current time t in each batch normalization layer, α is a hyperparameter, and They represent the mixed mean and mixed variance, μ s and They represent the initial values ​​of the mean and variance of the batch normalization layer respectively.

[0032] Furthermore, the specific steps of expanding the current image are:

[0033] Duplicate the current image and perform random translation and random color jitter on all copies of the current image.

[0034] Furthermore, the random translation is specifically:

[0035] Suppose the current image is an RGB image of size H*W, where H represents the image height and W represents the image width. N blank pixels are extended around the current image. The size of the extended image is (H+2*n)*(W+2*n). A picture of H*W pixels is captured from the extended image as the randomly translated image.

[0036] Furthermore, the random color jitter is specifically:

[0037] The brightness, contrast, saturation and hue of the randomly shifted image are randomly changed to obtain a batch size of images.

[0038] Furthermore, after the current image is copied, the total number of all copied current images is equal to a batch size.

[0039] Compared with the prior art, the present invention has the following beneficial effects:

[0040] (1) The online test adaptation method of the present invention uses each image to construct a batch. At each time step t, a constructed batch is forward propagated, and the mean variance obtained from the batch and the mean variance obtained during training are mixed in a certain proportion. According to the mixed network, the action of forward propagation calculation output is calculated, and the batch of images obtained in the new environment is expanded to expand the number of observation results in the new environment. Then, based on the observation results of the new environment, the normalization layer of the intelligent agent is optimized to improve the applicability of the intelligent agent to the new environment.

[0041] (2) The offline test adaptation method of the present invention utilizes the knowledge base to store the images acquired in the new environment. After a certain number of images acquired in the new environment are reached, the normalization layer of the intelligent agent is optimized based on the images acquired in the new environment, thereby improving the adaptability of the intelligent agent to the new environment. Compared with the fine-tuning algorithm in the new environment, the present invention does not need to produce dense rewards in the new environment, and can directly interact with the environment, thereby saving a lot of engineering costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 is a flow chart of the present invention;

[0043] Figure 2 The storage and update methods of the knowledge base in the offline solution of the present invention;

[0044] Figure 3 It is a schematic diagram of batch expansion of the present invention;

[0045] Figure 4 Schematic diagram of data mixing of the BN layer of the present invention. DETAILED DESCRIPTION

[0046] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0047] The present invention proposes a visual reinforcement learning test-time adaptation method for robot arm control. The method is executed in an offline state. The flowchart of the method is as follows: Figure 1 The method includes:

[0048] S1. Obtain a trained intelligent agent for robot arm control, wherein the intelligent agent includes an image processing network and a multilayer perceptron, wherein the image processing network includes multiple batch normalization layers, and obtain initial values ​​of the mean and variance of each batch normalization layer;

[0049] S2, placing the agent obtained in S1 in the actual environment as the current agent, and constructing a knowledge base, wherein the knowledge base is used to store the current image obtained by the agent;

[0050] S3, the current agent obtains the current image from the actual environment, the current image is stored in the knowledge base, the agent outputs the current action, the robot arm performs the current action, and the environment feeds back a new image;

[0051] S4: Determine whether the images in the knowledge base have reached the batch threshold. If not, return to S3. Otherwise, randomly select an image of a batch size from the knowledge base as the propagation image for forward propagation, and update each batch normalization layer of the current agent in a sliding average manner.

[0052] S5. Use the agent after updating the batch normalization layer as the new current agent, and repeat S3 to S4 until the mean and variance of each batch normalization layer converge, and obtain the result mean and result variance of each batch normalization layer;

[0053] S6. Mix the result mean and result variance with the initial values ​​of the mean and variance to obtain a mixed mean and a mixed variance, and use the agent corresponding to the batch normalization layer corresponding to the mixed mean and the mixed variance as the result agent. The result agent continues to obtain the actual image of the actual environment, and the result agent outputs an action, and the robotic arm executes the action.

[0054] The overall idea of ​​the offline visual reinforcement learning test-time adaptation method is:

[0055] (1) The reinforcement learning agent builds a knowledge base in the new environment, similar to the experience pool in the training environment, and collects visual information in the new environment;

[0056] (2) After an initial period of exploration, the agent begins to extract images from the knowledge base, randomly extracting a batch size each time, and forward propagating to update the mean and variance of the batch normalization layer in a sliding average manner;

[0057] (3) For practical application considerations, the knowledge base maintains a certain capacity and adopts a "first-in, first-out" strategy: when the new images in the knowledge base overflow the capacity, the oldest images in the knowledge base are deleted first;

[0058] (4) After the mean variance data of the BN layer is updated to be stable, the obtained mean variance and the mean variance during training are mixed in a certain proportion as the final BN layer data.

[0059] In the offline method, the image processing network of the robot is first initialized with the mean variance of the BN layer obtained during training. The robot establishes a knowledge base in memory. Considering the memory limitations of the physical environment, the length of the knowledge base is batchsize*10, which is used to store the pictures encountered by the robot during interaction. When the number of pictures in the knowledge base is equal to batchsize*10 at a certain moment and a new picture is entered, the picture with the earliest entry time in the knowledge base is replaced to keep the data in the knowledge base relatively new. Figure 2 As shown in the figure, the robot interacts with the environment, gives an action a based on the visual observation result s, and obtains the observation result s' at the next moment. The obtained image is stored in the knowledge base and the time step t is calculated. Take T = 2*batchsize. When t < = T, only the image is stored. When t> T, after storing the image, a batchsize image is randomly extracted from the knowledge base for forward propagation, and the BN layer data is updated in a sliding average manner. After several time steps, each BN layer μ t and σ 2 t The values ​​have converged, and the converged μ t and σ 2 t and μ obtained in the training environment s and σ 2 s The mixture was mixed in a ratio of α:1-α. After the mixture was completed, the test was continued. The mixed BN layer alleviated the distribution deviation and the performance of the robot arm was improved.

[0060] In S1 of the offline method, the main network of the visual reinforcement learning agent based on the deep learning network (or the actor network under the ac architecture) consists of two parts: the visual processing network encoder and the action output network MLP, where the encoder outputs a vector, which is the feature vector obtained by processing the current input image, and the MLP outputs the selected action a / the position of the robot arm at the next time step based on the feature vector. The encoder includes several BN layers. The agent has been trained in the training environment, and the mean μ and variance σ are obtained in each BN layer. 2 In S3, the agent cannot obtain rewards in the new environment, but can only obtain the image s at each moment t in the interaction with the environment. t :That is, according to the reinforcement learning paradigm, the agent gets s t , output action a t , the environment continues to feedback t+1 In S2, the agent builds a knowledge base during testing / deployment to store images that arrive at the network in subsequent interactions. Specifically, at time t, the observation result s tEnter the knowledge base; for practical application considerations, the knowledge base has an upper capacity limit CAPACITY. When the number of stored images is greater than CAPACITY, the image that enters the knowledge base earlier in time is overwritten. For example, when t = CAPACITY + 1, s t+1 Overwrite s1.

[0061] In S4, a batch-sized image is selected as the propagation image for forward propagation, and each batch normalization layer of the current agent is updated in a sliding average manner as an update operation. An update operation is to randomly extract an image of batch size from the knowledge base at time t, forward propagate in the network, and update the mean and variance of the BN layer in a sliding average manner:

[0062] μ t+1 =γμ+(1-γ)μ t

[0063]

[0064] where μ and σ 2 is the mean and variance of a batch of the current forward propagation calculated at the BN layer, μ t and σ 2 t represents the mean and variance of the BN layer at time t. γ is the sliding average update ratio. The mean and variance of the BN layer of the agent at time 0 are initialized with the mean and variance obtained in the training environment, that is, at t = 0, μ0 = μ s , σ 2 0=σ 2 s .

[0065] The moment when the images in the knowledge base reach the batch threshold is the start update time T. Since the agent cannot collect enough data to form a batch in the initial stage, the agent only explores and does not update in the time 0-T during the adaptation stage; the update starts from the time T+1. At the time T+1, the agent performs an update operation in each time step.

[0066] In the present invention, assuming that the batch size is N, T is much larger than N, so starting from time T+1, a batch of data can be randomly extracted. When the batch threshold is reached, the number of images in the library is much larger than the batch size.

[0067] In S6 of the offline method, after the mean and variance of the BN layer converge, the new mean and variance are taken as:

[0068]

[0069]

[0070] Pick and is the final mean variance of the agent in the new environment. Adaptation is completed. Mixing where α is a hyperparameter in the range of [0,1] and is taken before adaptation (the recommended value is 0.8). The mixing process is as follows Figure 4 shown.

[0071] Based on the above offline method, the present invention also proposes a visual reinforcement learning online test adaptation method for robot arm control, the method comprising:

[0072] S1. Obtain a trained intelligent agent for robot arm control, wherein the intelligent agent includes an image processing network and a multilayer perceptron, wherein the image processing network includes multiple batch normalization layers, and obtain initial values ​​of the mean and variance of each batch normalization layer;

[0073] S2, placing the agent obtained in S1 in the actual environment as the current agent at the current time t;

[0074] S3, the current agent obtains the current image from the actual environment;

[0075] S4, expand the current image to obtain an image of a batch size as a propagation image, perform forward propagation on the propagation image, calculate the mean and variance of the propagation image in each batch normalization layer, and use the calculated mean and variance as the result mean and result variance respectively;

[0076] S5. Mix the result mean and result variance with the initial values ​​of the mean and variance to obtain a mixed mean and a mixed variance, and use the agent corresponding to the batch normalization layer corresponding to the mixed mean and the mixed variance as the result agent. The result agent outputs the current action according to the current image, and the robotic arm performs the current action. The result agent is used as the current agent, and the current time is updated to t+1. Repeat S3 to S5.

[0077] In the online test adaptation method, the agent only gets one image at each time step, and cannot forward propagate a batch when performing online test adaptation. Therefore, when performing online adaptation, it is necessary to construct a batch using each image. Using subtle color jitter and translation, data enhancement is performed on the image at each moment, so that an image is expanded to the size of a batch. At each time step t, a constructed batch is forward propagated, and the mean variance obtained from the batch and the mean variance obtained during training are mixed in a certain proportion. Based on the mixed network, the output action is forward propagated. The mean variance calculated based on the enhanced batch at each time step will not be retained to the next time step.

[0078] In S1 of the online method, the main network of the visual reinforcement learning agent based on the deep learning network (or the actor network under the ac architecture) consists of two parts: the visual processing network encoder and the action output network MLP, where the encoder outputs a vector, which is the feature vector obtained by processing the current input image, and the MLP outputs the selected action a / the position of the robot arm at the next time step based on the feature vector. The encoder includes several BN layers. The agent has been trained in the training environment, and the mean μ and variance σ are obtained in each BN layer. 2 In S4, at time t when a single image s t When entering the agent, the image is enlarged to a batch size and enhanced. Assuming the preset batch size is N, the original image is copied N times and image enhancement is performed separately to obtain data of a batch size.

[0079] Image enhancement is as follows: The image enhancement algorithm of the online scheme is: first, random translation is performed, and then random color jitter is performed. Assuming that the original image is an RGB image of size H*W, the random translation algorithm is as follows: first, n blank pixels are extended on the top, bottom, left, and right sides of the image to obtain (H+2*n)*(W+2*n), and then the image of H*W pixels is intercepted from the extended image. The color jittering method is: randomly changing the brightness, contrast, saturation, and hue of the image. In S5, at time t, a batch size image obtained by amplification is forward propagated to calculate the mean μ in each batch normalization layer t and variance σ t 2 . Then mix the obtained mean variance with the original mean variance in the old environment, and the mean variance at time t is:

[0080]

[0081]

[0082] According to the mean variance of the BN layer above, the action output by the agent at time t is calculated. After the calculation is completed, the mean μ is not saved. t and variance σ t 2 , the mean variance at the next moment is s t+1 Obtained by calculation.

[0083] In the online method, the image processing network of the robot arm is first established and initialized with the mean variance of the BN layer obtained during training. Then the robot arm obtains the image s in the environment at time step t. t ,,according to Figure 3 As shown, for s tPerform data amplification. Assuming the batchsize is 32 and the image size is H*W, first expand the image by 4 pixels on the top, bottom, left and right sides (random uniform colors can be used) to obtain a picture of (H+8)*(W+8) size, and then randomly crop 32 pictures of H*W size from it to obtain a batch; then use random color jitter to randomly change the brightness, contrast, saturation and hue of this batch of pictures with a small amplitude, so as to obtain different pictures of a batch size. After obtaining a batch of pictures, forward propagate the batch of pictures in the encoder to calculate the mean μ of the batch in each BN layer t and variance σ 2 t . t and σ 2 t The mean μ in each BN layer obtained in the training environment s and variance σ 2 s Mix in a ratio of α:1-α. After mixing, t Calculate the action a at the current time step t , the mixed BN layer alleviates the distribution offset, and the robot selects a better action at this time step. After the action is completed, at time step t+1, the mean μ calculated in the previous time step t s and variance σ 2 s It will not be retained, but will return to S3 to obtain the new environment feedback s after executing the current action. t+1 , repeat S3 to S5.

[0084] Compared with the prior art, the present invention first applies the full test-time adaptation algorithm to visual reinforcement learning in a continuous action space. Compared with adaptive algorithms in other fields, the present invention does not require data in the training environment, saving memory space during adaptation; it also does not require any requirements for the training process, and has a wider range of applications. In particular, for some algorithms that perform test time training based on self-supervised tasks, the online algorithm in the present invention also greatly improves the efficiency of online adaptation. Compared with fine-tuning algorithms in new environments, the present invention does not need to create dense rewards in the new environment, and can directly interact with the environment, saving a lot of engineering costs.

[0085] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.

Claims

1. A visual reinforcement learning test-time adaptation method for robot arm control, characterized in that: The method is performed in an offline state, and the method includes: S1. Obtain a trained intelligent agent for robot arm control, wherein the intelligent agent includes an image processing network and a multilayer perceptron, wherein the image processing network includes multiple batch normalization layers, and obtain initial values ​​of the mean and variance of each batch normalization layer; S2, placing the agent obtained in S1 in the actual environment as the current agent, and constructing a knowledge base, wherein the knowledge base is used to store the current image obtained by the agent; S3, the current agent corresponding to the current time t obtains the current image from the actual environment, the current image is stored in the knowledge base, the agent outputs the current action, the robot arm executes the current action, and the environment feeds back a new image; S4: Determine whether the images in the knowledge base have reached the batch threshold. If not, return to S3. Otherwise, randomly select an image of a batch size from the knowledge base as the propagation image for forward propagation, and update each batch normalization layer of the current agent in a sliding average manner to obtain the mean and variance of the batch normalization layer at time t+1. S5. Take the agent after updating the batch normalization layer as the new current agent, update the current time, and repeat S3 to S4 until the mean and variance of each batch normalization layer converge. Let the time at this time be T, and get the result mean μ of each batch normalization layer. T and the resulting variance S6. Mix the result mean and result variance with the initial values ​​of the mean and variance to obtain a mixed mean and a mixed variance, and use the agent corresponding to the batch normalization layer corresponding to the mixed mean and the mixed variance as the result agent. The result agent continues to obtain the actual image of the actual environment, and the result agent outputs an action, and the robotic arm executes the action.

2. The method for visual reinforcement learning test-time adaptation for robot arm control according to claim 1, characterized in that: The updating of each batch normalization layer of the current agent is specifically as follows: updating the mean and variance of each batch normalization layer: m t+1 =γμ+(1-γ)μ t Among them, μ t+1 and represents the mean and variance of the batch normalization layer at time t+1 after the update, γ represents the sliding average update ratio, μ and σ 2 is the mean and variance of the propagated image calculated at the batch normalization layer, μ t and σ 2 t represents the mean and variance of the batch normalization layer at time t. When t = 0, μ0 = μ s , σ 2 0=σ 2 s , where μ s and They represent the initial values ​​of the mean and variance of the batch normalization layer respectively.

3. The method for visual reinforcement learning test-time adaptation for robot arm control according to claim 2, characterized in that: The mixed mean and mixed variance are: Among them, μ T and represents the mean and variance of the converged batch normalization layer, and denote the mixed mean and mixed variance respectively, α is a hyperparameter, μ s and They represent the initial values ​​of the mean and variance of the batch normalization layer respectively.

4. The method for visual reinforcement learning test-time adaptation for robot arm control according to claim 1, characterized in that: When the current image is stored in the knowledge base, if the number of images in the knowledge base is equal to the image number threshold, the image that entered the knowledge base the earliest is deleted from the knowledge base, and then the current image is stored in the knowledge base.

5. A visual reinforcement learning online test adaptation method for manipulator control based on the visual reinforcement learning test adaptation method for manipulator control according to any one of claims 1 to 4, characterized in that: Methods include: S1. Obtain a trained intelligent agent for robot arm control, wherein the intelligent agent includes an image processing network and a multilayer perceptron, wherein the image processing network includes multiple batch normalization layers, and obtain initial values ​​of the mean and variance of each batch normalization layer; S2, placing the agent obtained in S1 in the actual environment as the current agent at time t=0; S3, the current agent corresponding to the current time t obtains the current image from the actual environment; S4, expand the current image to obtain an image of a batch size as a propagation image, perform forward propagation on the propagation image, calculate the mean and variance of the propagation image in each batch normalization layer, and use the calculated mean and variance as the result mean and result variance respectively; S5. Mix the result mean and result variance with the initial values ​​of the mean and variance to obtain a mixed mean and a mixed variance, and use the agent corresponding to the batch normalization layer corresponding to the mixed mean and the mixed variance as the result agent. The result agent outputs the current action according to the current image, and the robotic arm performs the current action. The result agent is used as the current agent, and the current time is updated to t+1. Repeat S3 to S5.

6. The method for visual reinforcement learning test-time adaptation for robot arm control according to claim 5, characterized in that: The mixed mean and mixed variance are: Among them, μ t represents the mean and variance of the propagation image at the current time t in each batch normalization layer, α is a hyperparameter, and They represent the mixed mean and mixed variance, μ s and They represent the initial values ​​of the mean and variance of the batch normalization layer respectively.

7. The method for test-time adaptation of visual reinforcement learning applied to robot arm control according to claim 5, characterized in that: The specific steps of expanding the current image are: Duplicate the current image and perform random translation and random color jitter on all copies of the current image.

8. The method for test-time adaptation of visual reinforcement learning for robot arm control according to claim 7, characterized in that: The random translation is specifically: Suppose the current image is an RGB image of size H*W, where H represents the image height and W represents the image width. N blank pixels are extended around the current image. The size of the extended image is (H+2*n)*(W+2*n). A picture of H*W pixels is captured from the extended image as the randomly translated image.

9. The method for visual reinforcement learning test-time adaptation for robot arm control according to claim 8, characterized in that: The random color jitter is specifically: The brightness, contrast, saturation and hue of the randomly shifted image are randomly changed to obtain a batch size of images.

10. The method for visual reinforcement learning test-time adaptation for robot arm control according to claim 9, characterized in that: After copying the current image, the total number of all copied current images is equal to a batch size.