A method, apparatus, system and storage medium for image processing
By selecting images with high information richness as training samples, the problem of low training efficiency of vehicle recognition models caused by low information richness in massive images is solved, thereby improving the training effect and efficiency of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NEUSOFT REACH AUTOMOBILE TECH (SHENYANG) CO LTD
- Filing Date
- 2022-12-23
- Publication Date
- 2026-06-02
AI Technical Summary
In existing technologies, there are images with low information richness among massive images, resulting in poor training effect and low efficiency of vehicle recognition models.
By identifying multiple feature maps and their weight coefficients of the target image, images with high information richness are selected as training samples, reducing the number of training images and improving model training efficiency.
By selecting images with high information richness for model training, the training effect and efficiency of the vehicle recognition model were improved.
Smart Images

Figure CN116152751B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle recognition, and in particular to a method, apparatus, system and storage medium for image processing. Background Technology
[0002] With the development of automotive technology, vehicle recognition models have become an important technical means for detecting traffic congestion and optimizing traffic, as they can identify vehicles in complex scenes.
[0003] Current technologies often involve pre-collecting massive amounts of image data before training vehicle recognition models. However, these massive images may contain images with low information richness, such as images containing only vehicle type information. Inputting these images with low information richness into the vehicle recognition model has virtually no effect on the training effect and leads to low training efficiency. Summary of the Invention
[0004] In view of this, this application provides a method, apparatus, system and storage medium for image processing, which aims to improve the training efficiency of the vehicle recognition model by selecting images with high information richness from a large number of pre-collected images.
[0005] In a first aspect, this application provides a method for image processing, the method comprising:
[0006] In response to the received target image, multiple feature maps of the target image and a weight coefficient for each feature map are determined; the weight coefficient is used to indicate the degree of influence of the feature map on the recognition result of the vehicle recognition model.
[0007] The image information richness of the target image is determined based on the weight coefficient of each feature map among the plurality of feature maps; the image information richness is used to indicate the degree of richness of image information contained in the target image;
[0008] If the information richness of the image is less than a preset threshold, the target image is deleted.
[0009] Optionally, determining the image information richness of the target image based on the weight coefficients of each feature map among the plurality of feature maps includes:
[0010] A weight distribution is determined based on the weight coefficients of each of the plurality of feature maps; the weight distribution is used to represent the distribution of the weight coefficients of each feature map.
[0011] The information richness of the image is determined based on the weight distribution.
[0012] Optionally, determining the multiple feature maps of the target image and the weight coefficient of each feature map includes:
[0013] Determine multiple feature maps of the target image;
[0014] Based on the plurality of feature maps, and using a preset weight acquisition function, the weight coefficient of each feature map in the plurality of feature maps is determined;
[0015] The weight acquisition function is related to the object recognition result of the feature map on the vehicle recognition model.
[0016] Optionally, determining the multiple feature maps of the target image and the weight coefficient of each feature map includes:
[0017] Determine multiple feature maps of the target image;
[0018] Based on the multiple feature maps, the weight coefficients of each feature map are determined using Singular Value Decomposition (SVD).
[0019] Optionally, determining the multiple feature maps of the target image and the weight coefficient of each feature map includes:
[0020] Determine multiple feature maps of the target image;
[0021] Based on Singular Value Decomposition (SVD), the reference weight coefficients of each feature map in the plurality of feature maps are determined;
[0022] Select multiple target feature maps from the multiple feature maps;
[0023] Based on a preset weight acquisition function, the target weight coefficient of each target feature map in the plurality of target feature maps is determined;
[0024] The target weight coefficient of each target feature map is used to replace the corresponding reference weight coefficient; the weight coefficient of each feature map is the corresponding reference weight coefficient after replacement.
[0025] Optionally, determining the multiple feature maps of the target image and the weight coefficient of each feature map includes:
[0026] Determine multiple feature maps of the target image;
[0027] Based on the plurality of feature maps, the weight coefficient of each feature map in the plurality of feature maps is determined according to the gradient;
[0028] The gradient is related to the degree of influence of the feature map on the object recognition result of the vehicle recognition model.
[0029] Secondly, this application provides an image processing apparatus, the apparatus comprising:
[0030] A response unit is configured to, in response to a received target image, determine multiple feature maps of the target image and a weight coefficient for each feature map; the weight coefficient is used to indicate the degree of influence of the feature map on the recognition result of the vehicle recognition model.
[0031] The determining unit is configured to determine the image information richness of the target image based on the weight coefficients of each feature map in the plurality of feature maps; the image information richness is used to indicate the degree of richness of image information contained in the target image;
[0032] A filtering unit is used to select the target image as the image for training the vehicle recognition model when the image information richness is greater than a preset threshold.
[0033] Optionally, the determining unit is specifically used for:
[0034] A weight distribution is determined based on the weight coefficients of each of the plurality of feature maps; the weight distribution is used to represent the distribution of the weight coefficients of each feature map.
[0035] The information richness of the image is determined based on the weight distribution.
[0036] Thirdly, this application provides a vehicle system including an image processing apparatus as described in the second aspect.
[0037] Fourthly, this application provides a computer storage medium storing code, wherein when the code is executed, a device executing the code implements the method described in any of the first aspects above.
[0038] This application discloses a method, apparatus, system, and storage medium for image processing. When executing the method: firstly, in response to a received target image, multiple feature maps of the target image and a weight coefficient for each feature map are determined. Then, based on the weight coefficient of each feature map, the image information richness is determined. Target images with high image information richness are used as training images for a vehicle recognition model. Thus, by using image information richness, images with high image richness are selected from a large number of pre-collected images for model training, reducing the number of training images and thereby improving the training effect of the vehicle recognition model. Attached Figure Description
[0039] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0040] Figure 1 A flowchart of an image processing method provided in this application embodiment;
[0041] Figure 2 A schematic diagram of an image with low image richness provided for an embodiment of this application;
[0042] Figure 3 This is a schematic diagram of an image processing apparatus provided in an embodiment of this application. Detailed Implementation
[0043] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0044] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0045] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0046] As mentioned earlier, the training samples used in current vehicle recognition model training involve a massive amount of images, which may include images with low information richness. Inputting such images into the vehicle recognition model has little effect on the training results and leads to low training efficiency.
[0047] Based on this, embodiments of this application provide an image processing method. This method determines multiple feature maps of an image and their weight coefficients, and then determines the image's information richness based on these weight coefficients. The weight coefficients represent the degree of influence of the feature maps on the model training results. Finally, based on the image information richness, images with high information richness are selected as training samples for training the vehicle recognition model. In this way, by reducing the number of inefficient training images, the training efficiency of the recognition model is improved while ensuring its accuracy.
[0048] To better illustrate the image processing method provided in this application, the following description, in conjunction with the accompanying drawings, provides a detailed explanation of the image processing method provided in the embodiments of this application.
[0049] See Figure 1 This is a flowchart illustrating an image processing method provided in an embodiment of this application. This method can be applied to a vehicle detection system, and its execution entity is the detection server within the detection system. The method includes the following steps:
[0050] S101: The detection server receives massive amounts of image data.
[0051] The detection server of the detection system receives massive amounts of image data. This massive amount of images may include those with low image richness.
[0052] Example illustration: See Figure 2 This is a schematic diagram of an image with low image richness provided in an embodiment of this application. The image does not contain vehicle-related information and is therefore considered an image with low image richness.
[0053] In this embodiment of the application, images with low information richness from a massive image dataset, when input into an object recognition model, such as a vehicle recognition model, generally have a significant impact on the training results but lead to low training efficiency. Therefore, images with low information richness should be removed from the massive image dataset.
[0054] S102: Determine multiple feature maps corresponding to the target image.
[0055] The detection server receives a massive number of images, including the target image. In this embodiment, the target image can be any image from the massive number of images.
[0056] In this embodiment, it is first necessary to determine multiple feature maps corresponding to the target image. These feature maps are images that correspond to the features of the target image.
[0057] In one possible implementation, the target image is input into a convolutional neural network, and feature maps corresponding to the target image are determined through convolution and pooling. The number of feature maps corresponds to the number of convolution kernels.
[0058] In one possible implementation, the detection server inputs the target image into the backbone network of the vehicle recognition model used for feature extraction, obtaining multiple feature maps corresponding to the target image. For example, this could be the ResNet residual network in a Faster R-CNN model, which determines the multiple feature maps corresponding to the target image. The number of feature maps corresponding to the target image is determined by the number of neurons in the last layer of the backbone network. For example, if the last layer has 1280 neurons, then the number of feature maps is 1280.
[0059] In one possible implementation, the target image can be input into the backbone network of a VGG series version, such as the VGG16 backbone network, to extract multiple feature maps corresponding to the target image.
[0060] It is worth noting that this application does not limit the specific acquisition of multiple feature maps corresponding to the target image, and those skilled in the art can adjust the acquisition method as needed.
[0061] S103: Determine the weight coefficients of each feature map among multiple feature maps.
[0062] The detection server needs a weight coefficient for each of the multiple feature maps acquired. This weight coefficient represents the influence of the feature map on the vehicle recognition model's recognition result. The greater the influence of the feature map on the vehicle recognition model, the larger its weight coefficient.
[0063] In one possible implementation, the weight coefficients of each feature map are obtained in a non-perturbative manner. Specifically, the weight coefficients of the feature maps can be determined through Singular Value Decomposition (SVD). SVD will be discussed in detail below.
[0064] Example illustration: Assume the feature map has a dimension A of m×n. That is, A contains m data points and n features. Then the SVD value of A is:
[0065]
[0066] Where λ1, λ2, ..., λ k Let p be the eigenvalues of matrix A. p = (p1, p2, ..., p...) k ) is called a left singular matrix with dimensions m×m, q=(q1 T ,q2 T , ...q k T ) T It is called a right singular matrix with dimensions n×n, where k≤m and k≤n.
[0067] In this embodiment, the first row of the right singular value matrix can be approximated as the weights of the feature activation map. Compared to other methods, obtaining the weight coefficients of each feature map has higher processing efficiency.
[0068] In one possible implementation, the weight coefficients of each feature map are obtained through perturbation. Specifically, a weight acquisition function is preset, and the weight coefficients of each feature map in the plurality of feature maps are determined based on the multiple feature maps and the weight acquisition function. The weight acquisition function is related to the object recognition function of the feature maps in the target object recognition model.
[0069] Specifically, the weighting function can be obtained by identifying the probability distribution deviation of the results and the rate of change of the object's bounding box area. For example, the weighting function is:
[0070] λ(x,y)=a1x+a2y (2)
[0071] Where x is the offset rate of the object bounding box, such as IOU, and y is the probability distribution deviation of the recognition result, such as cross-entropy. a1 and a2 are either parameters and can be adjusted as needed.
[0072] Example explanation: Set the parameters of one feature map among multiple feature maps to 0, input multiple feature maps corresponding to the target image into the subsequent steps of the vehicle recognition model, the probability distribution deviation of the obtained object recognition result is 1, the area change rate of the object bounding box is 50%, and assuming a1 and a2 are 0.3 and 0.5 respectively, then the weight coefficient of this feature map is 0.55.
[0073] In one possible implementation, reference weight coefficients for multiple feature maps can be obtained first using the non-perturbative method described above. These reference weight coefficients are then arranged in a preset order, such as from largest to smallest or vice versa. Next, a portion of the target feature maps corresponding to these reference weight coefficients are selected using a perturbative method. The weights of this portion of the feature maps under the perturbative condition are then recalculated. The remaining unperturbed feature maps continue to use the weights obtained in the previous non-perturbative method as the required weights. This approach balances processing efficiency and accuracy.
[0074] In one possible implementation, backpropagation can be used to calculate gradients across multiple feature maps, and the weights of each feature map can be determined based on the gradient magnitude. The gradient is related to the degree of influence of the feature map on the object recognition result of the vehicle recognition model.
[0075] In one possible implementation, the weight coefficients of the feature map are obtained based on IoU and its derivative algorithms (such as GIOU).
[0076] Example explanation: Before the feature map is artificially perturbed, the obtained bounding box is A. After artificially perturbing the feature map (i.e., setting all parameters to 0), the obtained bounding box is B.
[0077]
[0078] Where A∩B represents the intersection area of the first and second bounding boxes. A∪B is the union area of the first and second bounding boxes. Compared to the non-perturbation method, the weight coefficients of the feature map obtained by the perturbation method have higher accuracy.
[0079] In the embodiments of this application, the weight coefficients of multiple feature maps corresponding to the target image can also be obtained in other ways, and those skilled in the art can adjust them as needed.
[0080] S104: Determine the image information richness of the target image based on the weight coefficients of the feature map.
[0081] In this embodiment of the application, the image information richness of the target image can be determined based on the weight coefficients of multiple feature maps corresponding to the target image.
[0082] Image information richness refers to the degree of information richness in an image. The richer the image information, the higher the image information richness; conversely, the lower the image information richness, the lower the image information richness.
[0083] In one possible implementation, a weight distribution of the weight coefficients of multiple feature maps corresponding to the target image can be plotted based on the weight coefficients of the feature maps. The weight distribution represents the distribution of the weight coefficients of each feature map. The image information richness is determined based on the weight distribution. For example, a mapping relationship between image information richness and the uniformity of the weight distribution can be preset; the uniformity of the weight distribution represents the dispersion of the weight coefficients. When the uniformity of the weight distribution is high, i.e., the dispersion of the weight coefficients is small, the image information richness is high. The image information richness is determined based on the uniformity of the weight distribution.
[0084] In one possible implementation, the information entropy of the target image can be calculated based on the weight coefficients of the feature map, and the information richness of the image can be determined based on the information entropy.
[0085] Information entropy is used to evaluate the amount of information in a piece of information, and its specific definition is as follows:
[0086] Let X be a discrete random variable with m possible outcomes, each with a probability p. i If i = 1, 2, 3, ..., m, then its information entropy H(X) is:
[0087]
[0088] The higher the information entropy, the more information it carries, meaning the richer the information content of the image.
[0089] S105: Determine if the image information richness is greater than a preset threshold. If yes, proceed to S106. Otherwise, proceed to S107.
[0090] The detection server determines whether the image information richness exceeds a preset threshold. Assuming the preset threshold is 7.8, if the obtained image information richness is 7.73, then the image information richness is less than the preset threshold. If the obtained image information richness is 7.95, then the image information richness exceeds the preset threshold.
[0091] S106: Use the target image as the image for training the recognition model.
[0092] When the image information richness exceeds a preset threshold, the target image is considered to have a high level of image information richness. This image is then added to the training sample set to train the recognition model.
[0093] S107: Delete the target image.
[0094] When the information richness of an image is not greater than a preset threshold, the image information richness of the target image is low, and the target image is deleted.
[0095] Then, the detection server repeatedly executes steps S101 to S107 until all images in the pre-collected massive image set have been processed, obtaining the training sample set. At this point, the training sample set only contains images with relatively rich image information.
[0096] This application discloses an image processing method. First, in response to a received target image, multiple feature maps of the target image and a weight coefficient for each feature map are determined. Then, based on the weight coefficient of each feature map, the image information richness is determined. Target images with high information richness are used as training images for a vehicle recognition model. In this way, by using image information richness, images with high richness are selected from a large number of pre-collected images for model training, reducing the number of training images and thus improving the training effect of the vehicle recognition model.
[0097] Additionally, this application also provides an image processing apparatus. See [link to relevant documentation]. Figure 3 This is a schematic diagram of an image processing apparatus 300 provided in an embodiment of this application. The apparatus includes:
[0098] The response unit 301 is used to determine multiple feature maps of the target image and the weight coefficient of each feature map in response to the received target image; the weight coefficient is used to indicate the degree of influence of the feature map on the recognition result of the vehicle recognition model.
[0099] The detection server receives a massive number of images, including the target image. In this embodiment, the target image can be any image from the massive number of images.
[0100] In this embodiment, it is first necessary to determine multiple feature maps corresponding to the target image. These feature maps are images that correspond to the features of the target image.
[0101] In one possible implementation, the target image is input into a convolutional neural network, and feature maps corresponding to the target image are determined through convolution and pooling. The number of feature maps corresponds to the number of convolution kernels.
[0102] In one possible implementation, the detection server inputs the target image into the backbone network of the vehicle recognition model used for feature extraction, obtaining multiple feature maps corresponding to the target image. For example, this could be the ResNet residual network in a Faster R-CNN model, which determines the multiple feature maps corresponding to the target image. The number of feature maps corresponding to the target image is determined by the number of neurons in the last layer of the backbone network. For example, if the last layer has 1280 neurons, then the number of feature maps is 1280.
[0103] In one possible implementation, the target image can be input into the backbone network of a VGG series version, such as the VGG16 backbone network, to extract multiple feature maps corresponding to the target image.
[0104] It is worth noting that this application does not limit the specific acquisition of multiple feature maps corresponding to the target image, and those skilled in the art can adjust the acquisition method as needed.
[0105] The determining unit 302 is used to determine the image information richness of the target image based on the weight coefficient of each feature map in the multiple feature maps; the image information richness is used to indicate the degree of image information richness contained in the target image.
[0106] The detection server needs a weight coefficient for each of the multiple feature maps acquired. This weight coefficient represents the influence of the feature map on the vehicle recognition model's recognition result. The greater the influence of the feature map on the vehicle recognition model, the larger its weight coefficient.
[0107] In one possible implementation, the weight coefficients of each feature map are obtained in a non-perturbative manner. Specifically, the weight coefficients of the feature maps can be determined through Singular Value Decomposition (SVD). SVD will be discussed in detail below.
[0108] Example illustration: Assume the dimension A of the feature map is m×n. Then the SVD value of A is:
[0109]
[0110] Where λ1, λ2, ..., λ k Let be the eigenvalues of matrix A, where λ1, λ2, ..., λ3 are the eigenvalues of matrix A. k Let p be the eigenvalues of matrix A. p = (p1, p2, ..., p...) k ) is called a left singular matrix with dimensions m×m, q=(q1 T ,q2 T , ...q k T ) T It is called a right singular matrix with dimensions n×n, where k≤m and k≤n.
[0111] In this embodiment, the first row of the right singular value matrix can be used as the weights of the feature activation map. Compared to other methods, obtaining the weight coefficients of each feature map has higher processing efficiency.
[0112] In one possible implementation, the weight coefficients of each feature map are obtained through perturbation. Specifically, a weight acquisition function is preset, and the weight coefficients of each feature map in the plurality of feature maps are determined based on the multiple feature maps and the weight acquisition function. The weight acquisition function is related to the feature map's object recognition capability in the vehicle recognition model.
[0113] Specifically, the weighting function can be obtained by considering the accuracy of the recognition results and the rate of change of the object's bounding box area. For example, the weighting function could be:
[0114] λ(x,y)=a1x+a2y (6)
[0115] Where x is the rate of change of the object's bounding box area, and y is the accuracy of the recognition result. a1 and a2 are either parameters and can be adjusted as needed.
[0116] Example explanation: If the parameters of one feature map in multiple feature maps are all set to 0, and multiple feature maps corresponding to the target image are input into the subsequent steps of the vehicle recognition model, the accuracy of the obtained object recognition result is 100%, the area change rate of the object bounding box is 50%, and assuming that a1 and a2 are 0.3 and 0.5 respectively, then the weight coefficient of the feature map is 0.55.
[0117] In one possible implementation, reference weight coefficients for multiple feature maps can be obtained first using the non-perturbative method described above. These reference weight coefficients are then arranged in a preset order, such as from largest to smallest or vice versa. Next, a portion of the target feature maps corresponding to these reference weight coefficients are selected using a perturbative method. The weights of this portion of the feature maps under the perturbative condition are then recalculated. The remaining unperturbed feature maps continue to use the weights obtained in the previous non-perturbative method as the required weights. This approach balances processing efficiency and accuracy.
[0118] In one possible implementation, backpropagation can be used to calculate gradients across multiple feature maps, and the weights of each feature map can be determined based on the gradient magnitude. The gradient is related to the degree of influence of the feature map on the object recognition result of the vehicle recognition model.
[0119] In one possible implementation, the weight coefficients of the feature map are obtained based on IoU and its derivative algorithms (such as GIOU).
[0120] Example explanation: Before the feature map is artificially perturbed, the obtained bounding box is A. After artificially perturbing the feature map (i.e., setting all parameters to 0), the obtained bounding box is B.
[0121]
[0122] Where A∩B represents the intersection area of the first and second bounding boxes. A∪B is the union area of the first and second bounding boxes. Compared to the non-perturbation method, the weight coefficients of the feature map obtained by the perturbation method have higher accuracy.
[0123] In the embodiments of this application, the weight coefficients of multiple feature maps corresponding to the target image can also be obtained in other ways, and those skilled in the art can adjust them as needed.
[0124] The information richness of the target image can be determined by the weight coefficients of multiple feature maps corresponding to the target image.
[0125] Image information richness refers to the degree of information richness in an image. The richer the image information, the higher the image information richness; conversely, the lower the image information richness, the lower the image information richness.
[0126] In one possible implementation, a weight distribution of the weight coefficients of multiple feature maps corresponding to the target image can be plotted based on the weight coefficients of the feature maps. The weight distribution represents the distribution of the weight coefficients of each feature map. The image information richness is determined based on the weight distribution. For example, a mapping relationship between image information richness and the uniformity of the weight distribution can be preset; the uniformity of the weight distribution represents the dispersion of the weight coefficients. When the uniformity of the weight distribution is high, i.e., the dispersion of the weight coefficients is small, the image information richness is high. The image information richness is determined based on the uniformity of the weight distribution.
[0127] In one possible implementation, the information entropy of the target image can be calculated based on the weight coefficients of the feature map, and the information richness of the image can be determined based on the information entropy.
[0128] Information entropy is used to evaluate the amount of information in a piece of information, and its specific definition is as follows:
[0129] Let X be a discrete random variable with m possible outcomes, each with a probability p. i If i = 1, 2, 3, ..., m, then its information entropy H(X) is:
[0130]
[0131] The higher the information entropy, the lower the amount of information it carries, meaning the lower the information richness of the image.
[0132] The filtering unit 303 is used to select the target image as the image for training the vehicle recognition model when the image information richness is greater than a preset threshold.
[0133] Optionally, device 300 also includes:
[0134] The addition module is used to add the target image to the training sample library when the image information richness is not less than a preset threshold; the training sample library is used to store the image data to be trained in order to train the vehicle recognition model.
[0135] This application discloses an image processing apparatus. A response unit 301, in response to a received target image, determines multiple feature maps of the target image and a weight coefficient for each feature map. A determination unit 302 determines the image information richness based on the weight coefficient of each feature map. A filtering unit 303 selects target images with high image information richness as training images for a vehicle recognition model. Thus, by using image information richness to filter images with high richness from a large number of pre-collected images for model training, the number of training images is reduced, thereby improving the training effect of the vehicle recognition model.
[0136] This application also provides a vehicle system including the image processing apparatus described above.
[0137] This application also provides corresponding devices and computer-readable storage media for implementing the solutions provided in this application.
[0138] The device includes a memory and a processor. The memory stores instructions or code, and the processor executes the instructions or code to cause the device to perform an image processing method according to any embodiment of this application.
[0139] In practical applications, the computer-readable storage medium can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0140] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0141] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0142] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0143] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0144] The above description is merely one specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for image processing, characterized in that, The method includes: In response to the received target image, multiple feature maps of the target image and a weight coefficient for each feature map are determined; the weight coefficient is used to indicate the degree of influence of the feature map on the recognition result of the vehicle recognition model. The image information richness of the target image is determined based on the weight coefficients of each feature map among the plurality of feature maps; the image information richness is used to indicate the degree of richness of image information contained in the target image; the image information richness is information entropy. If the information richness of the image is less than a preset threshold, the target image is deleted.
2. The method according to claim 1, characterized in that, The step of determining the image information richness of the target image based on the weight coefficient of each feature map in the plurality of feature maps includes: A weight distribution is determined based on the weight coefficients of each of the plurality of feature maps; the weight distribution is used to represent the distribution of the weight coefficients of each feature map. The information richness of the image is determined based on the weight distribution.
3. The method according to claim 1, characterized in that, The determination of multiple feature maps of the target image and the weight coefficient of each feature map includes: Determine multiple feature maps of the target image; Based on the multiple feature maps, the weight coefficients of each feature map are determined using Singular Value Decomposition (SVD).
4. The method according to claim 1, characterized in that, The determination of multiple feature maps of the target image and the weight coefficient of each feature map includes: Determine multiple feature maps of the target image; Based on the plurality of feature maps, and using a preset weight acquisition function, the weight coefficient of each feature map in the plurality of feature maps is determined; The weight acquisition function is related to the degree of influence of the feature map on the object recognition result of the vehicle recognition model.
5. The method according to claim 1, characterized in that, The determination of multiple feature maps of the target image and the weight coefficient of each feature map includes: Determine multiple feature maps of the target image; Based on Singular Value Decomposition (SVD), the reference weight coefficients of each feature map in the plurality of feature maps are determined; Select multiple target feature maps from the multiple feature maps; Based on a preset weight acquisition function, the target weight coefficient of each target feature map in the plurality of target feature maps is determined; The target weight coefficient of each target feature map is used to replace the corresponding reference weight coefficient; the weight coefficient of each feature map is the corresponding reference weight coefficient after replacement.
6. The method according to claim 1, characterized in that, The determination of multiple feature maps of the target image and the weight coefficient of each feature map includes: Determine multiple feature maps of the target image; Based on the plurality of feature maps, the weight coefficient of each feature map in the plurality of feature maps is determined according to the gradient; The gradient is related to the degree of influence of the feature map on the object recognition result of the vehicle recognition model.
7. An image processing apparatus, characterized in that, The device includes: A response unit is configured to, in response to a received target image, determine multiple feature maps of the target image and a weight coefficient for each feature map; the weight coefficient is used to indicate the degree of influence of the feature map on the recognition result of the vehicle recognition model. The determining unit is configured to determine the image information richness of the target image based on the weight coefficients of each feature map in the plurality of feature maps; the image information richness is used to indicate the degree of richness of image information contained in the target image; the image information richness is information entropy. A filtering unit is used to select the target image as the image for training the vehicle recognition model when the image information richness is greater than a preset threshold.
8. The apparatus according to claim 7, characterized in that, The determining unit is specifically used for: A weight distribution is determined based on the weight coefficients of each of the plurality of feature maps; the weight distribution is used to represent the distribution of the weight coefficients of each feature map. The information richness of the image is determined based on the weight distribution.
9. A vehicle system comprising the image processing apparatus as described in any one of claims 7 or 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores code that, when executed, performs the steps of the method as described in any one of claims 1-6.