Model training method and apparatus, and electronic device and storage medium

By using multi-scale feature vectors and multi-scale supervision information for image reconstruction in self-supervised visual representation learning, the problem of low learning efficiency in the existing technology is solved, and the model training efficiency and recognition accuracy are improved.

WO2024175045A1PCT designated stage expired Publication Date: 2024-08-29HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/078005
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-22
Filing Date
2024-02-22
Publication Date
2024-08-29

AI Technical Summary

Technical Problem

Existing self-supervised visual representation learning methods mainly rely on the top-level output of the encoder during the image reconstruction process, resulting in low and slow learning efficiency.

Method used

By designing multiple network blocks with different depths and corresponding decoding networks, feature vectors of different scales are used for image reconstruction, and random occlusion and multi-scale supervision information are used for model training to improve learning efficiency and model training accuracy.

Benefits of technology

It improves the efficiency of self-supervised visual representation learning and model training efficiency, improves the recognition accuracy of the model, avoids model convergence problems, and enhances training accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024078005_29082024_PF_FP_ABST
    Figure CN2024078005_29082024_PF_FP_ABST
Patent Text Reader

Abstract

A model training method and apparatus, and an electronic device and a storage medium. The method comprises: partitioning a training image, so as to obtain a plurality of first image blocks (301); shielding the plurality of first image blocks, so as to obtain a plurality of second image blocks, wherein the plurality of second image blocks are first image blocks which are not shielded among the plurality of first image blocks (302); inputting a feature vector of each second image block into an encoding network for encoding, so as to obtain a plurality of encoding features corresponding to a plurality of network blocks, wherein the plurality of network blocks correspond to the plurality of encoding features on a one-to-one basis (303); inputting each encoding feature into a decoding network corresponding to each encoding feature for image reconstruction, so as to obtain a reconstructed image corresponding to each decoding network (304); and training a model according to the reconstructed image corresponding to each decoding network and supervision information corresponding to each decoding network (305). The present application facilitates an improvement in the model training efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Model training method, device, electronic device and storage medium

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on February 22, 2023, with application number 202310183197.6 and invention name “Model training method, device, electronic device and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present invention relates to the field of artificial intelligence technology, and in particular to a model training method, device, electronic device and storage medium. Background Art

[0003] In recent years, self-supervised visual representation learning has garnered widespread attention and rapid development. Its research value lies in its ability to learn generalized representations from massive amounts of virtually free unlabeled data, which can be used to improve representations for various downstream tasks, such as classification, detection, and segmentation. Because this learning approach does not require high labeling costs, it has broad application prospects.

[0004] With the emergence and rapid development of visual self-attention networks, mask image modeling has received increasing attention. Self-supervised visual representation learning also uses a mask image modeling method based on a "mask-reconstruction" proxy task to train the model. When using this method for self-supervised visual representation learning, a portion of the input image is first randomly masked. Then, the image is reconstructed based on the unobstructed portion, and the occluded portion is predicted. Finally, self-supervised visual representation learning is performed based on the predicted occluded portion and the actual occluded portion. However, this "mask-reconstruction" self-supervised visual representation learning method mainly uses the final output features of the encoder for image reconstruction, and the entire learning process is slow.

[0005] Summary of the Invention

[0006] The present application provides a model training method, device, electronic device and storage medium, which utilize feature vectors of different scales to reconstruct images, guide self-supervised visual representation learning, and improve learning efficiency and model training efficiency.

[0007] In a first aspect, an embodiment of the present application provides a model training method, wherein the model includes an encoding network and multiple decoding networks, wherein the encoding network includes multiple network blocks of different depths, wherein each network block corresponds to a decoding network in the multiple decoding networks, and each network block includes one or more network layers; the method includes: dividing the training image into blocks to obtain multiple first image blocks; blocking the multiple first image blocks to obtain multiple second image blocks, wherein the multiple second image blocks are unblocked first image blocks in the multiple first image blocks; inputting the feature vector of each second image block into the encoding network for encoding to obtain multiple encoding features corresponding to the multiple network blocks, wherein the multiple network blocks correspond one-to-one to the multiple encoding features; inputting each encoding feature into the decoding network corresponding to each encoding feature for image reconstruction to obtain a reconstructed image corresponding to each decoding network; and training the model according to the reconstructed image corresponding to each decoding network and the supervision information corresponding to each decoding network.

[0008] It can be seen that in the embodiment of the present application, when performing self-supervised visual representation learning, corresponding decoding networks are designed in network layers of different depths of the encoding network, that is, multiple decoding networks are designed; then, each decoding network is used to reconstruct the image to obtain the reconstruction of each decoding network, so that the output features of network layers of different depths of the decoding network are used for image reconstruction (that is, the low-level features output by the encoding network and the high-level features are used for image reconstruction); finally, the model is trained based on the reconstructed image and supervision information of each decoding network. Therefore, in this application, features of different scales output by the encoding network are used for self-supervised visual representation learning, not just the top-level features (features output by the last network layer), so that more detailed features can be used for learning, thereby improving the learning efficiency and model training efficiency, and making the recognition accuracy of the trained model higher.

[0009] In one embodiment of the present application, multiple first image blocks are blocked to obtain multiple second image blocks, including: generating an index value corresponding to each first image block, the index value of each first image block being used to indicate whether each first image block is blocked; and blocking the multiple first image blocks according to the index value of each first image block to obtain multiple second image blocks.

[0010] It can be seen that in the implementation manner of the present application, when occluding multiple first image blocks, the multiple first image blocks are occluded by randomly constructing index values. The random occlusion eliminates redundancy to a large extent, and creates a task that cannot be easily solved by extrapolating from visible adjacent faces, thereby avoiding special circumstances that lead to model convergence and improving the accuracy of model training.

[0011] In one embodiment of the present application, based on the reconstructed image corresponding to each decoding network and the supervisory information corresponding to each decoding network, before training the model, the method further includes: obtaining a block scale corresponding to each decoding network, wherein the shallower the depth of the network block corresponding to the decoding network, the smaller the block scale corresponding to the decoding network; according to the block scale corresponding to each decoding network, blocking the training image to obtain multiple third image blocks corresponding to each decoding network; and using the multiple third image blocks corresponding to each decoding network as the supervisory information of each decoding network.

[0012] It can be seen that in the embodiment of the present application, supervision information corresponding to the depth of each decoding network is constructed, that is, multi-scale supervision information is used for model training, and the shallower the depth of the decoding network, the finer the scale of the supervision information corresponding to the decoding network. This can better capture the feature information of the output of the lower-level encoding network layer, better train the lower-level encoding network, further improve the efficiency of model training and improve the recognition accuracy of the model.

[0013] In one embodiment of the present application, the reconstructed image corresponding to each decoding network includes multiple fourth image blocks; training a model based on the reconstructed image corresponding to each decoding network and the supervisory information corresponding to each decoding network includes: determining a third image block corresponding to each fourth image block in the multiple fourth image blocks corresponding to each decoding network based on the multiple third image blocks in the supervisory information of each decoding network; determining the loss of each decoding network based on each fourth image block corresponding to each decoding network and the third image block corresponding to the fourth image block; and training the model based on the loss of each decoding network.

[0014] It can be seen that in the embodiment of the present application, after constructing corresponding supervision information for each decoding, the loss of each decoding network is determined based on the supervision information of each decoding network, so that the loss of each decoding network is more consistent with the actual loss, thereby improving the training accuracy of the model.

[0015] In one embodiment of the present application, before determining the loss of each decoding network based on each fourth image block corresponding to each decoding network and the third image block corresponding to the fourth image block, the method also includes: generating a first index value vector based on the index value of each first image block; inputting the first index value vector into the model to obtain a second index value vector corresponding to each decoding network; determining the loss of each decoding network based on the fourth image block corresponding to each decoding network and the third image block corresponding to the fourth image block, including: determining the index value of each fourth image block corresponding to each decoding network based on the second index value vector corresponding to each decoding network, wherein the index value of each fourth image block is used to indicate whether the real content corresponding to each fourth image block is blocked; determining the loss corresponding to each decoding network based on each fourth image block corresponding to each decoding network, the index value corresponding to the fourth image block and the third image block corresponding to the fourth image block.

[0016] It can be seen that in an embodiment of the present application, during the model training process, the index value of the first image block is synchronously transmitted to the model for upsampling and / or downsampling, so that the index value of each image block in the reconstructed image can be determined, that is, it is determined which image blocks in the reconstructed image are occluded, so that only the occluded image blocks can be used for loss calculation, thereby improving the efficiency and accuracy of the loss calculation, and further improving the accuracy and efficiency of model training.

[0017] In one embodiment of the present application, the loss corresponding to each decoding network is determined based on the feature information of each fourth image block corresponding to each decoding network, and the feature information of the third image block corresponding to the fourth image block; wherein the feature information of image block A is one of the following: the pixel value of each pixel in image block A; or, the directional gradient histogram of image block A; or, the normalized pixel value of image block A; image block A is the fourth image block corresponding to each decoding network or the third image block corresponding to the fourth image block.

[0018] It can be seen that in the embodiment of the present application, various morphological features of the image block can be used as supervisory information to improve the diversity of loss calculation and the diversity of model training.

[0019] In one embodiment of the present application, the method further includes: after completing the training of the model, using the encoding network as the backbone network of the downstream recognition task; wherein the downstream recognition task includes one of the following: pedestrian attribute recognition, image segmentation and image classification.

[0020] It can be seen that since the recognition accuracy of the trained model in this application is relatively high, the encoding network of this application is used as the backbone network of the downstream recognition task, thereby improving the recognition accuracy of the downstream recognition task.

[0021] In a second aspect, an embodiment of the present application provides a model training device, wherein the model includes: an encoding network and multiple decoding networks, wherein the encoding network includes multiple network blocks of different depths, wherein each network block corresponds to a decoding network in the multiple decoding networks, and each network block includes one or more network layers; the model training device includes: an acquisition unit and a processing unit; the acquisition unit is used to acquire a training image; the processing unit is used to divide the training image into blocks to obtain multiple first image blocks; the multiple first image blocks are blocked to obtain multiple second image blocks, wherein the multiple second image blocks are unblocked first image blocks in the multiple first image blocks; the feature vector of each second image block is input into the encoding network for encoding to obtain multiple encoding features corresponding to the multiple network blocks, wherein the multiple network blocks correspond one-to-one to the multiple encoding features; each encoding feature is input into the decoding network corresponding to each encoding feature for image reconstruction to obtain a reconstructed image corresponding to each decoding network; the model is trained according to the reconstructed image corresponding to each decoding network and the supervision information corresponding to each decoding network.

[0022] In one embodiment of the present application, in terms of occluding multiple first image blocks to obtain multiple second image blocks, the processing unit is specifically used to: generate an index value corresponding to each first image block, the index value of each first image block being used to indicate whether each first image block is occluded; and occlude the multiple first image blocks according to the index value of each first image block to obtain multiple second image blocks.

[0023] In one embodiment of the present application, before training the model, the processing unit is further used to: obtain the blocking scale corresponding to each decoding network, wherein the shallower the depth of the network block corresponding to the decoding network, the smaller the blocking scale corresponding to the decoding network; block the training image according to the blocking scale corresponding to each decoding network to obtain multiple third image blocks corresponding to each decoding network; and use the multiple third image blocks corresponding to each decoding network as the supervision information of each decoding network.

[0024] In one embodiment of the present application, the reconstructed image corresponding to each decoding network includes multiple fourth image blocks; in terms of training the model based on the reconstructed image corresponding to each decoding network and the supervisory information corresponding to each decoding network, the processing unit is specifically used to: determine the third image block corresponding to each of the multiple fourth image blocks corresponding to each decoding network based on the multiple third image blocks in the supervisory information of each decoding network; determine the loss of each decoding network based on each fourth image block corresponding to each decoding network and the third image block corresponding to the fourth image block; and train the model based on the loss of each decoding network.

[0025] In one embodiment of the present application, before the processing unit determines the loss of each decoding network based on each fourth image block corresponding to each decoding network and the third image block corresponding to the fourth image block, the processing unit is further used to: generate a first index value vector based on the index value of each first image block; input the first index value vector into the model to obtain a second index value vector corresponding to each decoding network; in determining the loss of each decoding network based on the fourth image block corresponding to each decoding network and the third image block corresponding to the fourth image block, the processing unit is specifically used to: determine the index value of each fourth image block corresponding to each decoding network based on the second index value vector corresponding to each decoding network, wherein the index value of each fourth image block is used to indicate whether the real content corresponding to each fourth image block is blocked; determine the loss corresponding to each decoding network based on each fourth image block corresponding to each decoding network, the index value corresponding to the fourth image block and the third image block corresponding to the fourth image block.

[0026] In one embodiment of the present application, the loss corresponding to each decoding network is determined based on the feature information of each fourth image block corresponding to each decoding network, and the feature information of the third image block corresponding to the fourth image block; wherein the feature information of image block A is one of the following: the pixel value of each pixel in image block A; or, the directional gradient histogram of image block A; or, the normalized pixel value of image block A; image block A is the fourth image block corresponding to each decoding network or the third image block corresponding to the fourth image block.

[0027] In one embodiment of the present application, the processing unit is further used to: after completing the training of the model, use the encoding network as the backbone network of the downstream recognition task; wherein the downstream recognition task includes one of the following: pedestrian attribute recognition, image segmentation and image classification.

[0028] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory for storing programs; a processor for executing the programs stored in the memory; when the programs stored in the memory are executed, the processor is used to implement the method in the above-mentioned first aspect.

[0029] In a fourth aspect, an embodiment of the present application provides a computer-readable medium, which stores program code for execution by a device, and the program code includes code for implementing the method in the above-mentioned first aspect.

[0030] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to implement the method in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] FIG1 is a schematic diagram of an image reconstruction provided by an embodiment of the present application;

[0032] FIG2 is a schematic diagram of the structure of a model provided in an embodiment of the present application;

[0033] FIG3 is a flow chart of a model training method provided in an embodiment of the present application;

[0034] FIG4 is a schematic diagram of a method for dividing and blocking a training image according to an embodiment of the present application;

[0035] FIG5 is a schematic diagram of constructing supervision information of different scales provided by an embodiment of the present application;

[0036] FIG6 is a schematic diagram of constructing an index value matrix provided in an embodiment of the present application;

[0037] FIG7 is a schematic diagram of a model training provided in an embodiment of the present application;

[0038] FIG8 is a schematic diagram of a model training device provided in an embodiment of the present application;

[0039] FIG9 is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] In order to facilitate understanding of this application, the technical knowledge related to this application is first introduced.

[0041] As shown in Figure 1, when performing self-supervised visual representation learning, the input image is first divided into multiple image blocks. Then, the multiple image blocks are randomly occluded, and features are extracted from the unoccluded image blocks. The extracted features are input into the model's encoder for encoding, resulting in an encoding result, which is the output of the encoder's last layer. For occluded image blocks, a placeholder vector is added to the encoding result to obtain the input data for the decoder. The input data is input into the decoder for image reconstruction, resulting in a predicted image. Finally, a loss is calculated based on the predicted image and the input image, and the model is trained based on this loss until the model converges, completing self-supervised visual representation learning.

[0042] However, the aforementioned self-supervised visual representation learning methods primarily utilize the top-level output of the encoder for image reconstruction, specifically the output of the encoder's final network layer. This results in only features extracted from the model's deeper network layers, slowing down the learning process at lower levels and leading to a slow and inefficient self-supervised visual representation learning process. Therefore, improving the efficiency of self-supervised visual representation learning is a pressing technical challenge.

[0043] First, it is explained that the encoding network involved in this application can also be understood as an encoder, and the decoding network can also be understood as a decoder.

[0044] Refer to Figure 2, which is a schematic diagram of the structure of a model provided in an embodiment of the present application. As shown in Figure 2, the model includes an encoding network and multiple decoding networks, wherein the encoding network includes multiple network blocks, and the depths of the multiple network blocks are different, such as Network Block 1, Network Block 2...Network Block N, and Decoding Network 1, Decoding Network 2...Decoding Network N shown in Figure 2.

[0045] Optionally, each network block includes one or more network layers in the decoding network, that is, one or more network layers in the decoding network are regarded as a network block. Furthermore, the encoding process of each network block can be referred to as a stage, that is, the above-mentioned multiple network blocks split the entire encoding process of the encoding network into multiple stages (as shown in Figure 2, Stage 1, Stage 2...Stage N), and then a decoding network is connected to the last network layer of each stage.

[0046] Optionally, the above-mentioned multiple network blocks correspond to a decoding network among multiple decoding networks. As shown in Figure 2, the last network layer of each network block is connected to the decoding network corresponding to the network block.

[0047] Exemplarily, the coding network can be various types of coding networks, such as a Vit coding network or a Swin coding network. It should be noted that if the coding network used is already divided into stages, i.e., the coding network itself contains multiple network blocks, such as a Swin coding network, then the already divided network blocks can be used as the multiple network blocks. If the coding network is not divided into stages, such as a Vit coding network, the multiple network layers of the coding network can be first divided into blocks to obtain multiple network blocks.

[0048] Refer to Figure 3, which is a flow chart of a model training method provided in an embodiment of the present application. The model is the model shown in Figure 2. The method includes but is not limited to the following steps:

[0049] 301: Divide the training image into blocks to obtain multiple first image blocks.

[0050] Optionally, as shown in FIG4 , the training image is evenly divided into non-overlapping blocks to obtain a plurality of first image blocks.

[0051] 302: Block the multiple first image blocks to obtain multiple second image blocks, where the multiple second image blocks are unblocked first image blocks among the multiple first image blocks.

[0052] 4 , multiple first image blocks are randomly blocked to obtain multiple second image blocks. For ease of distinction, in this application, the unblocked first image blocks among the multiple first image blocks are referred to as second image blocks.

[0053] Exemplarily, an index value corresponding to each first image block is generated, where the index value of each first image block is used to indicate whether each first image block is occluded. Optionally, the index value of each first image block is randomly generated between 0 and 1. For example, when the index value is 0, it indicates that the first image block is not occluded, and when the index value is 1, it indicates that the first image block is occluded. Based on the index value corresponding to each first image block, multiple first image blocks are occluded to obtain multiple second image blocks.

[0054] 303: Input the feature vector of each second image block into the encoding network for encoding to obtain a plurality of encoding features corresponding to the plurality of network blocks, wherein the plurality of network blocks correspond to the plurality of encoding features in a one-to-one manner.

[0055] Optionally, after dividing the training image into blocks, each first image block is embedded to obtain an embedding vector of each first image block; then, position encoding is added to the embedding vector of each first image block to obtain a feature vector of each first image block. In this way, after blocking multiple first image blocks, the feature vector of each second image block can be directly input into the encoding network for encoding, that is, only the feature vectors of the unblocked first image blocks are input.

[0056] Optionally, after the training image is divided into blocks, instead of embedding each first image block directly, multiple first image blocks are first masked; then, each second image block is embedded to obtain an embedding vector of each second image block, and then position encoding is added to the embedding vector of each second image block to obtain a feature vector of each second image block; finally, the feature vector of each second image block is input into the encoding network for encoding.

[0057] Exemplarily, the feature vector of each second image block is input into the encoding network for encoding, and the feature vector is encoded by multiple network blocks in the encoding network to obtain multiple encoding features corresponding to the multiple network blocks, that is, the output of the last network layer in each network block is used as the encoding feature corresponding to each network block.

[0058] 304: Input each coding feature into a decoding network corresponding to each coding feature to perform image reconstruction, and obtain a reconstructed image corresponding to each decoding network.

[0059] Exemplarily, the coding features output by each network block are input into the decoding network corresponding to the network block for image reconstruction, thereby obtaining a reconstructed image corresponding to each decoding network.

[0060] Specifically, a placeholder vector is added to the encoding features (i.e., feature vector sequences) corresponding to each decoding network to generate new encoding features (i.e., new feature vectors). This placeholder vector is pre-learned and is a shared learning vector that indicates that the position corresponding to the placeholder vector has an occluded image block to be predicted. Position encoding is then added to the new encoding features corresponding to each decoding network to obtain the input data corresponding to each decoding network. Finally, the input data corresponding to each decoding network is input into each decoding network for image reconstruction, resulting in a reconstructed image corresponding to each decoding network.

[0061] 305: Train the model according to the reconstructed image corresponding to each decoding network and the supervision information corresponding to each decoding network.

[0062] Exemplarily, based on the reconstructed image corresponding to each decoding network and the supervision information corresponding to each decoding network, the loss corresponding to each decoding network is determined; and the model is trained according to the loss corresponding to each decoding network.

[0063] Exemplarily, since the decoding network reconstructs the training image, and the present application divides the training image into multiple first image blocks and inputs them into the model for image reconstruction, the reconstruction of the training image can also be understood as the reconstruction of the image blocks, and the reconstructed image corresponding to each decoding network includes multiple fourth image blocks. Accordingly, the supervisory information corresponding to each decoding network is the supervisory information corresponding to the multiple fourth image blocks of each decoding network. Therefore, the loss corresponding to each decoding network is determined based on each fourth image block in the reconstructed image corresponding to each decoding network and the supervisory information corresponding to each fourth image block.

[0064] The following describes the process of obtaining the supervision information corresponding to each decoding network.

[0065] Scenario 1: The scale of supervision information of each decoding network is different.

[0066] Exemplarily, when the scales of supervisory information for each decoding network are different, a block scale corresponding to each decoding network is obtained, wherein the shallower the depth of the network block corresponding to the decoding network, the smaller the block scale corresponding to the decoding network. As shown in FIG2 , the block scale of decoding network 1 is smaller than the block scale of decoding network 2. According to the block scale corresponding to each decoding network, the training image is divided into blocks to obtain multiple third image blocks corresponding to each decoding network. That is, using the block scale corresponding to each decoding network, the training image is evenly and non-overlappingly divided into blocks to obtain multiple third image blocks corresponding to each decoding network, and the multiple third image blocks corresponding to each decoding network are used as supervisory information for each decoding network. For example, as shown in FIG5 , the training image is divided into blocks using block scale 1, block scale 2, ..., block scale N corresponding to decoding network 1, decoding network 2, ..., decoding network N, to obtain supervisory information corresponding to decoding network 1, decoding network 2, ..., decoding network N. After the training image is divided into blocks according to the block scale of each decoding network, the deeper the decoding network, the larger the size of the corresponding third image block and the fewer the number of third image blocks.

[0067] In addition, the multiple fourth image blocks in the reconstructed image of each decoding network correspond one-to-one to the multiple third image blocks corresponding to each decoding network. Then, the third image block corresponding to each of the multiple fourth image blocks corresponding to each decoding network can be determined based on the multiple third image blocks in the supervision information of each decoding network (that is, the supervision information of each fourth image block is determined); then, based on each fourth image block corresponding to each decoding network and the third image block corresponding to the fourth image block, the loss of each decoding network is determined, that is, the loss between each fourth image block corresponding to each decoding network and the third image block corresponding to the fourth image block is synthesized to obtain the loss of each decoding network, wherein the loss between each fourth image block and the third image block corresponding to the fourth image block can be the cross entropy loss between the two image blocks.

[0068] It can be seen that supervision information of different scales is designed for each decoding network. Specifically, the shallower the depth of the decoding network, the finer the granularity of the supervision information. In this way, feature information of finer scales can be used for loss calculation, so that the calculated loss of each decoding network is more accurate, thereby improving the training efficiency and accuracy of the model.

[0069] It should be noted that when the scale of the supervisory information for each decoding network is different, the size of the multiple fourth image blocks and the multiple third image blocks in the reconstructed image output by each decoding network are designed to be the same. It should be noted that since the input data for image reconstruction for each decoding network comes from the decoding network, that is, the number of blocks in the reconstructed image depends on the number of blocks in the training image, in order to make the size of the fourth image blocks the same as the size of the third image blocks, the decoding network needs to perform upsampling or downsampling according to the size of the third image blocks corresponding to the decoding network during image reconstruction, so that the size of the reconstructed fourth image blocks is the same as the size of the third image blocks. For example, if the training image size is 20*20 and the size of the first image block is 10*10, if no upsampling or downsampling process is designed for the decoding network, the block size in the reconstructed image will also be 10*10. However, if the size of the third image block corresponding to the decoding network is 5*5, then upsampling is required during image reconstruction to make the block size of the reconstructed image 5*5.

[0070] In practical applications, the model can be trained by simply calculating the loss between the occluded content and the predicted content in the training image. Therefore, for each decoding network, a target fourth image block among multiple fourth image blocks corresponding to each decoding network can be determined, where the content corresponding to the target fourth image block is occluded, that is, the actual content of the target fourth image block in the training image is occluded; the loss between the target fourth image block corresponding to each decoding network and the third image block corresponding to the target fourth image block is determined to obtain the loss of each decoding network; finally, the model is trained based on the loss of each decoding network.

[0071] In one embodiment of the present application, a target fourth image block among multiple fourth image blocks corresponding to each decoding network can be determined based on an index value. Exemplarily, the index value of each fourth image block corresponding to each decoding network is obtained, wherein the index value of each fourth image block is used to indicate whether the real content corresponding to each fourth image block is blocked. For example, if the index value of the fourth image block is 0, it indicates that the real content corresponding to the fourth image block is not blocked. If the index value of the fourth image block is 1, it indicates that the real content corresponding to the fourth image block is blocked. The target fourth image block among the multiple fourth image blocks corresponding to each decoding network is determined based on the index value of each fourth image block.

[0072] Specifically, as shown in FIG6 , after generating the index value corresponding to each first image block, a first index value matrix can be generated based on the index value corresponding to each first image block, wherein the first index value matrix is ​​a square matrix, and the product of the length and width of the first index value matrix is ​​the number of the plurality of first image blocks. Therefore, the index value of the i-th row and j-th column in the first index value is the index value of the i-th row and j-th column of the plurality of first image blocks. Then, the first index value matrix is ​​flattened to obtain a first index value vector; then, when the feature vector of the second image block is input, the first index value vector is simultaneously input into the model, i.e., the first index value vector is encoded (downsampled) by the decoding network and decoded (downsampled) by the decoding network to obtain a second index value vector corresponding to each decoding network; then, the second index value vector is reshaped to obtain a second index value matrix corresponding to each decoding network, wherein the second index value matrix is ​​a square matrix, and the product of the length and width of the second index value matrix is ​​the number of the plurality of fourth image blocks. Accordingly, the element in the i-th row and j-th column of the second index value matrix corresponding to each decoding network is the index value of the i-th row and j-th column fourth image block among the multiple fourth image blocks corresponding to each decoding network. Then, based on the second index value matrix, the index value corresponding to each fourth image block corresponding to each decoding network is determined. Based on the index value corresponding to each fourth image block corresponding to each decoding network, the target fourth image block among the multiple fourth image blocks corresponding to each decoding network can be determined.

[0073] In one embodiment of the present application, after determining the index value of each fourth image block, the loss corresponding to each decoding network can also be determined based on each fourth image block directly corresponding to each decoding network, the index value corresponding to the fourth image block, and the third image block corresponding to the fourth image block.

[0074] For example, when the index value is used, the loss corresponding to each decoding network can be expressed by formula (1):

[0075] in, is the loss of the l-th decoding network, i represents the i-th fourth image block in the multiple fourth image blocks corresponding to the l-th decoding network, is the index value corresponding to the i-th fourth image block, is the supervision information corresponding to the ith fourth image block, that is, the third image block corresponding to the ith fourth image block, is the ith fourth image block, Represents the cross entropy loss between the i-th fourth image block and the supervisory information corresponding to the i-th fourth image block.

[0076] It can be seen that through the index value of each fourth image block, only the fourth image block with an index value of 1 (i.e., the target fourth image block mentioned above) participates in the calculation of the loss, which means that only the loss between the occluded content and the predicted content is calculated, thereby speeding up the calculation of the loss and improving the calculation efficiency.

[0077] In one embodiment of the present application, the loss of each decoding network can be determined based on the feature information of each fourth image block corresponding to each decoding network and the loss between the feature information of the third image block corresponding to the fourth image block. The feature information of each fourth image block can be the pixel value of each pixel in the fourth image block, and accordingly, the feature information of the third image block corresponding to the fourth image block is also the pixel value of each pixel in the third image block, that is, the cross entropy loss of the pixel values ​​of the fourth image block and the third image block is calculated to obtain the loss of each decoding network; or, the feature information of the fourth image block is the directional gradient histogram of the fourth image block, and accordingly, the feature information of the third image block corresponding to the fourth image block is also the directional gradient histogram of the third image block, and the cross entropy loss between the directional gradient histogram of the fourth image block and the third image block is calculated to obtain the loss of each decoding network; or, the feature information of the fourth image block is the normalized pixel value of the fourth image block, and accordingly, the feature information of the third image block is also the normalized pixel value of the third image block. This application does not limit the feature information of the image block.

[0078] Scenario 2: The scale of the supervision information of each decoding network is the same.

[0079] Optionally, the scale of the supervisory information of each decoding network is the same, that is, the size of the supervisory information corresponding to the fourth image block reconstructed by each decoding network is the same.

[0080] For example, in this application, the divided training image can be used as supervision information for each decoding network, that is, multiple first image blocks are used as supervision information for each decoding network. Of course, in actual applications, the new block scale can also be used to divide the training image into blocks to obtain multiple fifth image blocks, and then the multiple fifth image blocks are used as supervision information for each decoding network. In this application, multiple first image blocks are directly used as supervision information for each decoding network as an example for explanation.

[0081] Then, the first image block (supervisory information) corresponding to each fourth image block corresponding to each decoding network is obtained; based on each fourth image block corresponding to each decoding network and the first image block corresponding to the fourth image block, the loss of each decoding network is determined, that is, the loss between each fourth image block of each decoding network and the first image block is determined to obtain the loss of each decoding network. Similarly, the loss of each decoding network can be determined based on the index value of each fourth image block of each decoding network, except that the supervisory information of each fourth image block is replaced from the third image block to the first image block. Please refer to the above formula (1) and will not be described again.

[0082] It should be noted that if the encoding network changes the size of the input data, for example, down-samples the input data, so that the size of the input data of each decoding network is different, then in order to make the size of the fourth image block reconstructed by each decoding network the same, corresponding upsampling will be performed in the decoding network, so that the size of the fourth image block reconstructed by each decoding network is the same and the same as the size of the first image block.

[0083] In one embodiment of the present application, after obtaining the loss of each decoding network, the model can be trained as a whole based on the loss of each decoding network. For example, after obtaining the loss of each decoding network, the losses of multiple decoding networks are weighted according to the weight of each decoding network to obtain a target loss; the model is trained based on the target loss until the model converges, completing the training of the model.

[0084] For example, the target loss can be expressed by formula (2):

[0085] Among them, L LaMSR is the target loss, l is the lth network layer of the model, w l is the weight of the lth network layer, Represents the network layer set composed of the last network layer in the above multiple network blocks, that is, Represents the weighted summation of the losses of multiple decoding networks.

[0086] In one embodiment of the present application, after obtaining the loss of each decoding network, the above model may be trained layer by layer based on the loss of each decoding network, i.e., greedy training.

[0087] The following describes why this application can perform layer-by-layer training.

[0088] First, when the decoding network is ViT-B or Swin-B, the model of the present application (i.e., the local multi-scale reconstruction (LaSMR) model) is trained using gradient truncation training, and the LaSMR model of the present application is trained without gradient truncation training, that is, the LaSMR model is trained as a whole. Then, the training time (i.e., the average time consumed by the image processor) and the accuracy (acc) of the model under the two training modes are obtained respectively. Table 1 shows the training time and accuracy under the two training modes.

[0089] Table 1:

[0090] As can be seen from Table 1, when the encoding network is ViT-B, when the gradient truncation training is used to train the LaSMR model, the required training time is the same as the training time required for not using gradient truncation training, and the accuracy achieved is also the same. When the encoding network is Swin-B, when the gradient truncation training is used to train the LaSMR model, the required training time is the same as the training time required for not using gradient truncation training, and the accuracy is also very close. As can be seen from Table 1, when the gradient truncation training is performed on the model of the present application, the training time of the model will not be increased, nor will the accuracy of the model be reduced. That is to say, the model of the present application can be trained with gradient truncation, so the model of the present application supports layer training.

[0091] See Table 2, which shows the training results when the model of this application is trained layer by layer.

[0092] Table 2:

[0093] Based on the content shown in Table 2, it can be seen that when the model of the present application is trained layer by layer, the memory overhead and pre-training time can be significantly reduced, and layer-by-layer training brings 30-40% acceleration and saves 40-55% of memory usage without reducing the accuracy of the model.

[0094] The following takes the encoding network as a Swin network (the Swin network includes four stages) as an example to illustrate the training process of the model in this application.

[0095] As shown in Figure 7, the training image is first divided into image blocks, and the image blocks are blocked to obtain multiple unobstructed image blocks (i.e., the second image blocks of the present application). Then, the features of the unobstructed image are input into the encoding network for encoding to obtain the encoding features corresponding to each stage in the encoding network, that is, the encoding features corresponding to each decoding network are obtained; then, the placeholder vector of the obstructed image block is added to the encoding features of each decoding network to obtain a new encoding feature corresponding to each decoding network, and a position code is added to the new encoding feature (not shown in Figure 7), which can be added to the input data of each decoding network; the input data of each decoding network is input into each decoding network for image reconstruction to obtain a reconstructed image corresponding to each decoding network (including multiple reconstructed image blocks).

[0096] In addition, this application constructs corresponding supervision information for each decoding network. Specifically, the scale of supervision information for decoding networks of different depths in this application is different. Then, based on the supervision information of each decoding network and the image blocks reconstructed by each decoding network, the loss corresponding to each decoding network is determined. Finally, the model is trained based on the loss corresponding to each decoding network.

[0097] In one embodiment of the present application, after the model is trained, the encoding network is used as the backbone network for a downstream recognition task, wherein the downstream recognition task includes one of the following: pedestrian attribute recognition, image segmentation, and image classification. Specifically, the trained encoding network is used as the backbone network for the downstream recognition task to perform feature extraction for pedestrian attribute recognition, image segmentation, and image classification.

[0098] Specifically, in autonomous driving scenarios, it is necessary to segment the road image captured by the camera to separate different objects such as the road surface, roadbed, vehicles, and pedestrians from the image, so as to keep the vehicle driving in the correct area. Using the coding network of this application as the backbone network to extract semantic features from the image can improve the accuracy of image segmentation. In an intelligent monitoring system, it is necessary to identify the attributes of pedestrians in the image captured by the camera, for example, to identify the pedestrian's gender, age, hair, clothing, backpack, etc. Using the coding network of this application as the backbone network to extract semantic features from the image can improve the accuracy of pedestrian attribute recognition.

[0099] Refer to Figure 8, which is a schematic diagram of a model training device provided in an embodiment of the present application. As shown in Figure 8, the model training device includes an acquisition unit 801 and a processing unit 802;

[0100] Wherein, the acquisition unit 801 is used to acquire a training image;

[0101] The processing unit 802 is configured to divide the training image into blocks to obtain a plurality of first image blocks;

[0102] Blocking the plurality of first image blocks to obtain a plurality of second image blocks, wherein the plurality of second image blocks are unblocked first image blocks among the plurality of first image blocks;

[0103] Inputting the feature vector of each second image block into the encoding network for encoding to obtain a plurality of encoding features corresponding to the plurality of network blocks, wherein the plurality of network blocks correspond to the plurality of encoding features in a one-to-one manner;

[0104] Input each encoding feature into the decoding network corresponding to each encoding feature to reconstruct the image, and obtain the reconstructed image corresponding to each decoding network;

[0105] The model is trained according to the reconstructed image corresponding to each decoding network and the supervision information corresponding to each decoding network.

[0106] For a more detailed description of the acquisition unit 801 and the processing unit 802 , please refer to the relevant description in the above method embodiment, which will not be described again here.

[0107] Referring to Figure 9, Figure 9 is a schematic diagram of an electronic device provided in an embodiment of the present application. Electronic device 900 may be the aforementioned model training device 800. Electronic device 900 includes a memory 901, a processor 902, a communication interface 903, and a bus 904. The memory 901, processor 902, and communication interface 903 are communicatively connected to each other via bus 904.

[0108] The memory 901 can be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 901 can store programs; when the electronic device 900 is the above-mentioned model training device 800, when the program stored in the memory 901 is executed by the processor 902, the processor 902 and the communication interface 903 are used to execute the various steps in the model training method of the embodiment of the present application.

[0109] The processor 902 can adopt a general central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), a graphics processing unit (GPU) or one or more integrated circuits to execute relevant programs to implement the model training method of the embodiment of the present application.

[0110] The processor 902 may also be an integrated circuit chip with signal processing capabilities. During implementation, each step in the data stream transmission method of the present application may be completed by hardware integrated logic circuits or software instructions in the processor 902. The above-mentioned processor 902 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, or the like. The storage medium is located in the memory 901, and the processor 902 reads the information in the memory 901 to execute each step in the model training method.

[0111] Communication interface 903 can be a transceiver or other transceiver device to enable communication between electronic device 900 and other devices or a communication network. Communication interface 903 can also be an input-output interface to enable data transmission between electronic device 900 and input-output devices, where input-output devices include but are not limited to keyboards, mice, displays, USB flash drives, and hard drives. For example, processor 902 can obtain voice samples through communication interface 903.

[0112] The bus 904 may include a path for transmitting information between various components of the device electronic device 900 (eg, the memory 901 , the processor 902 , and the communication interface 903 ).

[0113] It should be noted that although the electronic device 900 shown in FIG9 only shows a memory, a processor, and a communication interface, in the specific implementation process, those skilled in the art will understand that the electronic device 900 also includes other components necessary for normal operation. At the same time, according to specific needs, those skilled in the art will understand that the electronic device 900 may also include hardware components for implementing other additional functions. In addition, those skilled in the art will understand that the electronic device 900 may also include only the components necessary to implement the embodiments of the present application, and does not necessarily include all the components shown in FIG9.

[0114] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0115] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of the solution of this embodiment according to actual needs.

[0116] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0117] In this application, "at least one" means one or more, and "more" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In the text description of this application, the character " / " generally indicates that the previous and next related objects are in an "or" relationship; in the formulas of this application, the character " / " indicates that the previous and next related objects are in a "division" relationship.

[0118] It is understood that the various numbers used in the embodiments of this application are merely for ease of description and are not intended to limit the scope of the embodiments of this application. The order of the sequence numbers of the above-mentioned processes does not necessarily imply a specific order of execution; the order of execution of the processes should be determined by their functions and inherent logic.

[0119] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0120] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A model training method, characterized in that: The model includes an encoding network and multiple decoding networks, wherein the encoding network includes multiple network blocks with different depths, wherein each network block corresponds to one decoding network among the multiple decoding networks, and each network block includes one or more network layers; the method includes: Dividing the training image into blocks to obtain a plurality of first image blocks; Blocking the plurality of first image blocks to obtain a plurality of second image blocks, wherein the plurality of second image blocks are unblocked first image blocks among the plurality of first image blocks; Inputting the feature vector of each second image block into the encoding network for encoding, to obtain a plurality of encoding features corresponding to the plurality of network blocks, wherein the plurality of network blocks correspond to the plurality of encoding features one by one; Input each encoding feature into a decoding network corresponding to each encoding feature to reconstruct an image, and obtain a reconstructed image corresponding to each decoding network; The model is trained according to the reconstructed image corresponding to each decoding network and the supervision information corresponding to each decoding network.

2. The method according to claim 1, characterized in that The step of masking the plurality of first image blocks to obtain a plurality of second image blocks comprises: Generate an index value corresponding to each first image block, where the index value of each first image block is used to indicate whether each first image block is blocked; The multiple first image blocks are masked according to the index value of each first image block to obtain the multiple second image blocks.

3. The method according to claim 2, characterized in that According to the reconstructed image corresponding to each decoding network and the supervision information corresponding to each decoding network, before training the model, the method further includes: Obtaining a block scale corresponding to each decoding network, wherein the shallower the depth of the network block corresponding to the decoding network, the smaller the block scale corresponding to the decoding network; According to the block scale corresponding to each decoding network, the training image is divided into blocks to obtain a plurality of third image blocks corresponding to each decoding network; The multiple third image blocks corresponding to each decoding network are used as supervision information of each decoding network.

4. The method according to claim 3, characterized in that The reconstructed image corresponding to each decoding network includes a plurality of fourth image blocks; and training the model according to the reconstructed image corresponding to each decoding network and the supervision information corresponding to each decoding network includes: Determine, according to the plurality of third image blocks in the supervision information of each decoding network, a third image block corresponding to each fourth image block in the plurality of fourth image blocks corresponding to each decoding network; Determine the loss of each decoding network according to each fourth image block corresponding to each decoding network and the third image block corresponding to the fourth image block; The model is trained based on the loss of each decoding network.

5. The method according to claim 4, characterized in that Before determining the loss of each decoding network according to each fourth image block corresponding to each decoding network and the third image block corresponding to the fourth image block, the method further includes: Generate a first index value vector according to the index value of each first image block; Inputting the first index value vector into the model to obtain a second index value vector corresponding to each decoding network; The determining the loss of each decoding network according to the fourth image block corresponding to each decoding network and the third image block corresponding to the fourth image block comprises: Determining, according to the second index value vector corresponding to each decoding network, an index value of each fourth image block corresponding to each decoding network, wherein the index value of each fourth image block is used to indicate whether the real content corresponding to each fourth image block is blocked; The loss corresponding to each decoding network is determined according to each fourth image block corresponding to each decoding network, the index value corresponding to the fourth image block, and the third image block corresponding to the fourth image block.

6. The method according to claim 4 or 5, characterized in that: The loss corresponding to each decoding network is determined based on feature information of each fourth image block corresponding to each decoding network and feature information of the third image block corresponding to the fourth image block; The characteristic information of the image block A is one of the following: The pixel value of each pixel in the image block A; or, the directional gradient histogram of the image block A; or, the normalized pixel value of the image block A; the image block A is the fourth image block corresponding to each decoding network or the third image block corresponding to the fourth image block.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: After completing the training of the model, the encoding network is used as a backbone network for downstream recognition tasks; The downstream recognition task includes one of the following: pedestrian attribute recognition, image segmentation and image classification.

8. A model training device, characterized in that: The model comprises: an encoding network and a plurality of decoding networks, wherein the encoding network comprises a plurality of network blocks of different depths, wherein each network block corresponds to a decoding network among the plurality of decoding networks, and each network block comprises one or more network layers; the model training device comprises: an acquisition unit and a processing unit; The acquisition unit is used to acquire a training image; The processing unit is used to divide the training image into blocks to obtain a plurality of first image blocks; Blocking the plurality of first image blocks to obtain a plurality of second image blocks, wherein the plurality of second image blocks are unblocked first image blocks among the plurality of first image blocks; Inputting the feature vector of each second image block into the encoding network for encoding, to obtain a plurality of encoding features corresponding to the plurality of network blocks, wherein the plurality of network blocks correspond to the plurality of encoding features one by one; Input each encoding feature into a decoding network corresponding to each encoding feature to reconstruct an image, and obtain a reconstructed image corresponding to each decoding network; The model is trained according to the reconstructed image corresponding to each decoding network and the supervision information corresponding to each decoding network.

9. The device according to claim 8, characterized in that In terms of masking the plurality of first image blocks to obtain the plurality of second image blocks, the processing unit is specifically configured to: Generate an index value corresponding to each first image block, where the index value of each first image block is used to indicate whether each first image block is blocked; The multiple first image blocks are masked according to the index value of each first image block to obtain the multiple second image blocks.

10. The device according to claim 9, characterized in that Before training the model according to the reconstructed image corresponding to each decoding network and the supervision information corresponding to each decoding network, the processing unit is further used to: Obtaining a block scale corresponding to each decoding network, wherein the shallower the depth of the network block corresponding to the decoding network, the smaller the block scale corresponding to the decoding network; According to the block scale corresponding to each decoding network, the training image is divided into blocks to obtain a plurality of third image blocks corresponding to each decoding network; The multiple third image blocks corresponding to each decoding network are used as supervision information of each decoding network.

11. The device according to claim 10, characterized in that The reconstructed image corresponding to each decoding network includes a plurality of fourth image blocks; in terms of training the model according to the reconstructed image corresponding to each decoding network and the supervision information corresponding to each decoding network, the processing unit is specifically used to: Determine, according to the plurality of third image blocks in the supervision information of each decoding network, a third image block corresponding to each fourth image block in the plurality of fourth image blocks corresponding to each decoding network; Determine the loss of each decoding network according to each fourth image block corresponding to each decoding network and the third image block corresponding to the fourth image block; The model is trained based on the loss of each decoding network.

12. The device according to claim 11, characterized in that Before the processing unit determines the loss of each decoding network according to each fourth image block corresponding to each decoding network and the third image block corresponding to the fourth image block, the processing unit is further configured to: Generate a first index value vector according to the index value of each first image block; Inputting the first index value vector into the model to obtain a second index value vector corresponding to each decoding network; In determining the loss of each decoding network according to the fourth image block corresponding to each decoding network and the third image block corresponding to the fourth image block, the processing unit is specifically configured to: Determining, according to the second index value vector corresponding to each decoding network, an index value of each fourth image block corresponding to each decoding network, wherein the index value of each fourth image block is used to indicate whether the real content corresponding to each fourth image block is blocked; The loss corresponding to each decoding network is determined according to each fourth image block corresponding to each decoding network, the index value corresponding to the fourth image block, and the third image block corresponding to the fourth image block.

13. The device according to claim 11 or 12, characterized in that The loss corresponding to each decoding network is determined based on feature information of each fourth image block corresponding to each decoding network and feature information of the third image block corresponding to the fourth image block; The characteristic information of the image block A is one of the following: The pixel value of each pixel in the image block A; or, the directional gradient histogram of the image block A; or, the normalized pixel value of the image block A; the image block A is the fourth image block corresponding to each decoding network or the third image block corresponding to the fourth image block.

14. The device according to any one of claims 8 to 13, characterized in that The processing unit is also used for: After completing the training of the model, the encoding network is used as a backbone network for downstream recognition tasks; The downstream recognition task includes one of the following: pedestrian attribute recognition, image segmentation and image classification.

15. An electronic device, comprising: Memory, used to store programs; A processor, configured to execute a program stored in the memory; When the program stored in the memory is executed, the processor is configured to implement the method according to any one of claims 1 to 7.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes for execution by a device, wherein the program codes include codes for implementing the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Image processing method and device, storage medium and electronic equipment

    CN111862127A

  • Semantic segmentation network training method, image processing method and device

    CN113113119A

  • Image processing method, device, equipment, computer storage medium and system

    CN114079776A

  • Sequence identification method and device, electronic equipment and storage medium

    CN114207673A

  • Model training method and device, electronic equipment and storage medium

    CN116258727A