Vehicle image processing method and device in repnet vehicle re-identification network
By introducing the Attention Extraction Network (APN) layer and super-resolution processing into the RepNet network, the problem of insufficient extraction of vehicle detail features in low-resolution or small vehicle scenarios is solved, enabling richer acquisition of vehicle detail features and improving the accuracy of vehicle re-identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MOBILE QUANTONG SYST INTEGRATION CO LTD
- Filing Date
- 2021-09-22
- Publication Date
- 2026-07-07
AI Technical Summary
Existing deep learning-based vehicle re-identification methods cannot effectively extract rich vehicle detail features when the resolution is low or the vehicle is small in the image.
An attention extraction network (APN) layer is introduced into the RepNet network to obtain attention region images of vehicle images. Detail features are obtained through super-resolution processing and feature fusion is performed in conjunction with a fully connected layer.
In cases of low resolution or small vehicle size, it provides rich vehicle detail features, offering a more accurate basis for vehicle re-identification.
Smart Images

Figure CN115861046B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and specifically to a vehicle image processing method and apparatus in a RepNet vehicle re-identification network. Background Technology
[0002] Existing vehicle re-identification methods based on deep learning networks acquire vehicle features through deep neural networks and then re-identify vehicles by comparing the features of different vehicle images.
[0003] Existing deep learning-based vehicle re-identification methods require a large amount of data to support the model, so the quality of the data plays a crucial role in the final model. However, currently, most of the data acquired in vehicle re-identification comes from traffic cameras. There are many types of cameras, and numerous external interference factors, resulting in inconsistent image quality. This leads to many vehicles appearing at low resolution in the images, ultimately resulting in fewer detailed vehicle features being obtained.
[0004] Therefore, it is of great significance to propose a method that can extract rich vehicle detail features even when the acquired vehicle image resolution is low and the vehicle is small in the image. Summary of the Invention
[0005] This invention provides a vehicle image processing method and apparatus in the RepNet vehicle re-identification network to solve the technical problem in the prior art that rich vehicle detail features cannot be extracted when the vehicle image resolution is low or the vehicle is small in the image.
[0006] In a first aspect, the present invention provides a vehicle image processing method in a RepNet vehicle re-identification network, comprising:
[0007] The initial features of the vehicle image obtained by the convolutional layer in the vehicle re-identification network RepNet are input into the attention extraction network APN layer to obtain the attention region image of the vehicle image.
[0008] Super-resolution processing is performed on the attention region image to obtain detailed features of the vehicle image;
[0009] The detailed features are then input into the fully connected layer of RepNet.
[0010] In one embodiment, the step of inputting the initial features of the vehicle image obtained from the convolutional layers in RepNet into the APN layer to obtain the attention region image of the vehicle image includes:
[0011] The initial features of the vehicle image are input into the APN layer to determine the confidence level of the initial features. The initial features whose confidence level meets a preset threshold are determined as features within the attention region.
[0012] An attention region image of the vehicle image is determined based on features within the attention region. In one embodiment, the confidence level of the initial features is:
[0013] P(X)=f(W C ×X);
[0014] Where X is the feature vector of the initial features, P(X) is the confidence level of the initial features, and W C Here are the parameters of the APN network, and the f function is a function of the fully connected layer and the softmax layer in the APN network.
[0015] In one embodiment, the region of the attention region image is:
[0016] [t x ,t y ,t l ] = g(W C ×Y);
[0017] Where Y is the feature vector whose confidence level satisfies the preset threshold, and W C Here are the parameters of the APN network, and the g function is a function implemented in the APN network through two fully connected layers. x Let t be the x-coordinate of the center point of the square attention region. y Let t be the ordinate of the center point of the square attention region. l It is half the side length of the square attention region.
[0018] In one embodiment, the super-resolution processing of the attention region image includes:
[0019] The attention region image is input into two convolutional layers to obtain a feature image with the same number of channels as the size of the attention region image.
[0020] The feature image is upsampled, and the upsampled feature image is rearranged to obtain a high-resolution image with the same size as the attention region image.
[0021] In one embodiment, the high-resolution feature image is:
[0022]
[0023] Among them, I SR For the output high-resolution feature image, I LRThe input is the feature image of the attention region of the vehicle image, where L is the number of layers in the current convolutional layer, and f L-1 The function is the function of the (L-1)th convolutional layer, W L Let b be the parameter of the Lth convolutional layer. L This represents the bias of the Lth convolutional layer. It is a periodic recombination operator.
[0024] In one embodiment, after acquiring the detailed features of the vehicle image, the method further includes:
[0025] Repeat the following steps until the number of executions reaches the threshold:
[0026] The detailed features of the current vehicle image are input into the APN layer to obtain the attention region image of the current vehicle image;
[0027] Super-resolution processing is performed on the attention region image of the current vehicle image to obtain the detailed features of the next vehicle image.
[0028] In a second aspect, the present invention also provides a vehicle image processing apparatus in a RepNet vehicle re-identification network, comprising:
[0029] The attention region acquisition module is used to input the initial features of the vehicle image obtained by the convolutional layer in the vehicle re-identification network RepNet into the attention extraction network APN layer to obtain the attention region image of the vehicle image.
[0030] The super-resolution processing module is used to perform super-resolution processing on the attention region image to obtain detailed features of the vehicle image.
[0031] The detail feature processing module is used to input the detail features into the fully connected layer of RepNet.
[0032] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the vehicle image processing method in the RepNet vehicle re-identification network described above.
[0033] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the vehicle image processing method in the RepNet vehicle re-identification network described above.
[0034] The present invention provides a vehicle image processing method, apparatus, electronic device, and storage medium in the RepNet vehicle re-identification network. It obtains the attention region image of the vehicle image by inputting the initial features of the vehicle image acquired by the convolutional layers of the RepNet network into the attention extraction network (APN) layer. Simultaneously, it performs super-resolution upscaling on the attention region image of the vehicle image to obtain rich vehicle detail features. This provides abundant detail features for vehicle re-identification when the resolution of the image acquired by the camera device is low or the vehicle is too small to extract detailed vehicle features. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0036] Figure 1 This is a schematic diagram of the RepNet vehicle re-identification network process provided by the present invention;
[0037] Figure 2 This is a flowchart illustrating the vehicle image processing method in the RepNet vehicle re-identification network provided by the present invention.
[0038] Figure 3 A schematic diagram of the optimized RepNet vehicle re-identification network process provided by the present invention;
[0039] Figure 4 This is a schematic diagram of the vehicle image processing device in the RepNet vehicle re-identification network provided by the present invention.
[0040] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0042] In realizing this invention, the inventors considered the following solutions. For example... Figure 1The RepNet vehicle re-identification network flowchart is shown below: The RepNet (Repression Network) mainly includes convolutional feature extraction, fully connected layers, feature fusion layers, and classification recognition. The RepNet vehicle re-identification network divides vehicle feature extraction into multiple tasks, learning coarse-grained features such as color and brand / model, and specific detailed features describing the vehicle, such as scratches and trim. Then, the local features learned from each task are fused, and similarity is judged. Each branch task performs vehicle type classification. Specifically, the fully connected layer before the feature fusion layer is divided into two branches, processing coarse-grained and fine-grained vehicle features separately. Then, the two types of features are fused, finally determining whether the vehicles belong to the same vehicle.
[0043] Figure 2 This is a flowchart illustrating the vehicle image processing method in the RepNet vehicle re-identification network provided by the present invention. (Refer to...) Figure 2 The vehicle image processing method in the RepNet vehicle re-identification network provided by this invention may include:
[0044] S210. Input the initial features of the vehicle image obtained by the convolutional layer in the vehicle re-identification network RepNet into the attention extraction network APN layer to obtain the attention region image of the vehicle image.
[0045] S220. Perform super-resolution processing on the attention region image to obtain detailed features of the vehicle image;
[0046] S230. Input the detailed features into the fully connected layer of RepNet.
[0047] The vehicle image processing method in the RepNet vehicle re-identification network provided by this invention can be executed by an electronic device, a component in the electronic device, an integrated circuit, or a chip. The electronic device can be a mobile electronic device or a non-mobile electronic device. For example, a mobile electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc., while a non-mobile electronic device can be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This invention does not impose specific limitations.
[0048] The technical solution of the present invention will be described in detail below using the example of a computer executing the vehicle image processing method in the RepNet vehicle re-identification network provided by the present invention.
[0049] In step S210, the vehicle image is input into the convolutional layer of the deep neural network RepNet to obtain the initial features of the vehicle image. The initial features of the vehicle image are then input into the APN (Attention Proposal Network) layer to obtain the attention region image of the vehicle image.
[0050] Specifically, based on the original deep neural network RepNet structure, an attention extraction network (APN) layer is added after the convolutional layers of the RepNet network. The APN layer receives the initial features of the vehicle image output from the RepNet convolutional layers, calculates the initial features of the vehicle, and obtains the image of the key information region in the vehicle image, i.e., the attention region image.
[0051] In step S220, super-resolution processing is performed on the attention region image to obtain detailed features of the vehicle image.
[0052] Specifically, refer to Figure 3 The optimized RepNet vehicle re-identification network flowchart is shown below. After the convolutional layers of the RepNet vehicle re-identification network, an attention extraction network (APN) layer is added, followed by a super-resolution processing layer. After the attention extraction network (APN) layer obtains the attention region image of the vehicle image, the vehicle detail features in the attention region image are super-resolution magnified to obtain richer vehicle detail features, providing richer detail features for subsequent determination of whether the vehicles are the same vehicle.
[0053] In step S230, the detailed features are input into the fully connected layer of RepNet for further processing to determine whether the vehicles are the same vehicle.
[0054] Specifically, after inputting detailed features into the fully connected layer of RepNet, these detailed features are divided into coarse-grained and fine-grained features. Simultaneously, the fully connected layer is divided into two branches, one for processing the coarse-grained features and the other for processing the fine-grained features of the vehicle. Then, the two types of features are fused, and a similarity assessment is performed on the fused features to finally determine whether the vehicle in question is the same vehicle.
[0055] The vehicle image processing method in the RepNet vehicle re-identification network provided by this invention inputs the initial features of the vehicle image obtained by the convolutional layers of the RepNet network into the attention extraction network (APN) layer to obtain the attention region image of the vehicle image. Simultaneously, super-resolution magnification is performed on the attention region image of the vehicle image to obtain rich vehicle detail features. This provides abundant detail features for vehicle re-identification when the resolution of the image acquired by the camera device is low or the vehicle is too small to extract detailed vehicle features.
[0056] In one embodiment, the initial features of the vehicle image obtained by the convolutional layer in RepNet are input into the APN layer to obtain the attention region image of the vehicle image, including: inputting the initial features of the vehicle image into the APN layer, determining the confidence level of the initial features, determining the initial features whose confidence level meets a preset threshold as features within the attention region, and determining the attention region image of the vehicle image based on the features within the attention region.
[0057] Specifically, the initial features of the vehicle image are input into the APN network. The confidence of the initial features is calculated through the fully connected layer and softmax layer in the APN network. It is determined whether the confidence of the initial features meets a preset threshold. The features that meet the preset threshold are identified as features within the attention region, thereby identifying the key information region in the vehicle image.
[0058] The vehicle image processing method in the RepNet vehicle re-identification network provided by this invention determines the key information regions in the vehicle image by inputting the initial features of the vehicle image obtained from the convolutional layers of the RepNet network into the attention extraction network (APN) layer, and judging the confidence of the initial features by a preset threshold. This provides a foundation for subsequently determining whether the vehicles belong to the same vehicle.
[0059] In one embodiment, the confidence level of the initial feature is:
[0060] P(X)=f(W C ×X) (1)
[0061] Where X is the feature vector of the initial features, P(X) is the confidence level of the initial features, and W C Here are the parameters of the APN network, and the f function is a function of the fully connected layer and the softmax layer in the APN network.
[0062] It is understandable that by calculating the probability of the initial feature through the fully connected layer and softmax layer in the APN network as the confidence level of the initial feature, and by setting a threshold to judge the confidence level of the initial feature, it is possible to determine whether the feature is a key region feature.
[0063] The vehicle image processing method in the RepNet vehicle re-identification network provided by this invention calculates the probability of initial features as the confidence level of the initial features through the fully connected layer and softmax layer in the APN network, and judges the confidence level of the initial features by preset threshold, thereby extracting key information regions in the vehicle image. This provides a foundation for subsequent determination of whether the vehicles are the same vehicle.
[0064] In one embodiment, the region of the attention region image is:
[0065] [t x ,t y ,t l ] = g(W C ×Y) (2)
[0066] Where Y is the feature vector whose confidence level satisfies the preset threshold, and W C Here are the parameters of the APN network, and the g function is a function implemented in the APN network through two fully connected layers. x Let t be the x-coordinate of the center point of the square attention region. y Let t be the ordinate of the center point of the square attention region. l It is half the side length of the square attention region.
[0067] It is understandable that by using features whose confidence level meets a preset threshold as features within the attention region, the key information region in the vehicle image is determined.
[0068] Optionally, after obtaining the region of the attention image, the obtained key region is used as a template and multiplied element-wise with the feature vector whose confidence satisfies the preset threshold feature to achieve image scaling, and the finally obtained region is used as the attention region of the image.
[0069] X att =Y⊙M(t) x ,t y ,t l (3)
[0070] Among them, X att Let Y be the attention region feature of the final scaled image, and M(t) be the feature vector whose confidence level satisfies the preset threshold. x ,t y ,t l () represents the attention region of the image.
[0071] The vehicle image processing method in the RepNet vehicle re-identification network provided by this invention extracts key information regions from vehicle images by judging the confidence level of initial features using a preset threshold. This provides a foundation for subsequently determining whether vehicles belong to the same individual.
[0072] In one embodiment, super-resolution processing of the attention region image includes: inputting the attention region image into two convolutional layers to obtain a feature image with the same number of channels as the size of the attention region image; upsampling the feature image; and rearranging the upsampled feature image to obtain a high-resolution image with the same size as the attention region image.
[0073] Specifically, after inputting the initial features of the vehicle image into the APN layer of the attention extraction network, the feature image of the attention region of the vehicle image is obtained. This feature image is then passed through two convolutional layers to obtain a high-resolution feature image with the same number of channels as the size of the attention region image. Specifically, the feature image is input into the first convolutional layer for processing:
[0074] f 1 (I LR ;W1,b1)=φ(W1×I LR +b1) (4)
[0075] Among them, I LR f is the feature image of the attention region of the input vehicle image. 1 The function is the function of the first convolutional layer, W1 is the parameter of the first convolutional layer, b1 is the bias of the first convolutional layer, and φ is the linear activation function tanh.
[0076] The feature image processed by the first convolutional layer is then processed by the second convolutional layer:
[0077] f 2 (I LR W 1:2 ,b 1:2 )=φ(W2×f 1 (I LR (5) + b2)
[0078] Among them, I LR f is the feature image of the attention region of the input vehicle image. 2 The function is the function of the second convolutional layer, f 1 The function is the function of the first convolutional layer, W. 1:2 b represents the parameters from the first to the second layer of the convolutional layer. 1:2φ is the bias from the first layer to the second layer of the convolutional layer, W2 is the parameter of the second convolutional layer, b2 is the bias of the second convolutional layer, and φ is the linear activation function tanh.
[0079] After processing through two convolutional layers, the feature image of the original low-resolution attention region is transformed into a feature image with the same number of channels as the size of the attention region image, i.e., r. 2 The feature image is ×H×W, where the number of channels is r. 2 H is the height of the feature image, and W is the width of the feature image.
[0080] After obtaining r 2 After the feature image is processed by a third convolutional layer (×H×W), the feature image is upsampled and rearranged into a 1×rH×rW image, resulting in a high-resolution image with the same size as the attention region image. Here, r is the upsampling factor, which is an integer multiple.
[0081] The vehicle image processing method in the RepNet vehicle re-identification network provided by this invention performs super-resolution magnification on key information regions in vehicle images. This provides rich detailed features for subsequent determination of whether the vehicles are the same vehicle, especially when the resolution of the image acquired by the camera device is poor or the vehicle is too small to extract detailed features.
[0082] In one embodiment, the high-resolution feature image is:
[0083]
[0084] Among them, I SR For the output high-resolution feature image, I LR f is the feature image of the attention region of the input vehicle image. 3 The function is the function of the third convolutional layer, W3 is the parameter of the third convolutional layer, and b3 is the bias of the third convolutional layer. It is a periodic recombination operator.
[0085] Specifically, through the processing of the third convolutional layer, r 2 The ×H×W multichannel feature images are rearranged into a 1×rH×rW high-resolution image of the same size as the attention region image.
[0086] The vehicle image processing method in the RepNet vehicle re-identification network provided by this invention performs super-resolution magnification on key information regions in vehicle images. This provides rich detailed features for subsequent determination of whether the vehicles are the same vehicle, especially when the resolution of the image acquired by the camera device is poor or the vehicle is too small to extract detailed features.
[0087] In one embodiment, after obtaining the detailed features of the vehicle image, the method further includes: repeatedly performing the following steps until the number of executions reaches a threshold: inputting the detailed features of the current vehicle image into the APN layer to obtain the attention region image of the current vehicle image; performing super-resolution processing on the attention region image of the current vehicle image to obtain the detailed features of the next vehicle image.
[0088] Understandably, repeatedly inputting vehicle features into the APN layer and performing super-resolution upscaling can acquire more detailed vehicle features until the requirements for subsequent vehicle re-identification and detection are met.
[0089] The vehicle image processing method in the RepNet vehicle re-identification network provided by this invention repeatedly inputs vehicle features into the APN layer and performs super-resolution upscaling to obtain richer vehicle detail features. This provides abundant detail features for subsequent determination of whether the vehicles are the same vehicle, especially when the resolution of the image acquired by the camera device is poor or the vehicle is too small to extract detailed features.
[0090] The present invention also provides a vehicle image processing apparatus in the RepNet vehicle re-identification network, which can be referred to in correspondence with the vehicle image processing method in the RepNet vehicle re-identification network described above.
[0091] Figure 4 This is a schematic diagram of the vehicle image processing device in the RepNet vehicle re-identification network provided by the present invention, as shown below. Figure 4 As shown, the device includes:
[0092] The attention region acquisition module 410 is used to input the initial features of the vehicle image obtained by the convolutional layer in the vehicle re-identification network RepNet into the attention extraction network APN layer to obtain the attention region image of the vehicle image.
[0093] Super-resolution processing module 420 is used to perform super-resolution processing on the attention region image to obtain detailed features of the vehicle image;
[0094] The detail feature processing module 430 is used to input the detail features into the fully connected layer of RepNet.
[0095] The vehicle image processing device in the RepNet vehicle re-identification network provided by this invention inputs the initial features of the vehicle image obtained by the convolutional layers of the RepNet network into the attention extraction network (APN) layer to obtain the attention region image of the vehicle image. Simultaneously, super-resolution magnification is performed on the attention region image of the vehicle image to obtain rich vehicle detail features. This provides rich detail features for vehicle re-identification when the resolution of the image acquired by the camera device is low or the vehicle is too small to extract detailed vehicle features.
[0096] In one embodiment, the attention region acquisition module 410 is specifically used for:
[0097] The initial features of the vehicle image are input into the APN layer to determine the confidence level of the initial features. The initial features whose confidence level meets a preset threshold are determined as features within the attention region.
[0098] The attention region image of the vehicle image is determined based on the features within the attention region.
[0099] In one embodiment, the attention region acquisition module 410 is further configured to:
[0100] The confidence level of the initial feature is determined as follows:
[0101] P(X)=f(W C ×X);
[0102] Where X is the feature vector of the initial features, P(X) is the confidence level of the initial features, and W C Here are the parameters of the APN network, and the f function is a function of the fully connected layer and the softmax layer in the APN network.
[0103] In one embodiment, the attention region acquisition module 410 is further configured to:
[0104] The region of the attention region image is defined as follows:
[0105] [t x ,t y ,t l ] = g(W C ×Y);
[0106] Where Y is the feature vector whose confidence level satisfies the preset threshold, and W C Here are the parameters of the APN network, and the g function is a function implemented in the APN network through two fully connected layers. x Let t be the x-coordinate of the center point of the square attention region. y Let t be the ordinate of the center point of the square attention region. l It is half the side length of the square attention region.
[0107] In one embodiment, the super-resolution processing module 420 is specifically used for:
[0108] Super-resolution processing is performed on the attention region image, including:
[0109] The attention region image is input into two convolutional layers to obtain a feature image with the same number of channels as the size of the attention region image.
[0110] The feature image is upsampled, and the upsampled feature image is rearranged to obtain a high-resolution image with the same size as the attention region image.
[0111] In one embodiment, the super-resolution processing module 420 is further configured to:
[0112] The high-resolution feature image is determined as follows:
[0113]
[0114] Among them, I SR For the output high-resolution feature image, I LR The input is the feature image of the attention region of the vehicle image, where L is the number of layers in the current convolutional layer, and f L-1 The function is the function of the (L-1)th convolutional layer, W L Let b be the parameter of the Lth convolutional layer. L This represents the bias of the Lth convolutional layer. It is a periodic recombination operator.
[0115] In one embodiment, the detail feature processing module 430 is specifically used for:
[0116] After obtaining the detailed features of the vehicle image, the process also includes:
[0117] Repeat the following steps until the number of executions reaches the threshold:
[0118] The detailed features of the current vehicle image are input into the APN layer to obtain the attention region image of the current vehicle image;
[0119] Super-resolution processing is performed on the attention region image of the current vehicle image to obtain the detailed features of the next vehicle image.
[0120] The present invention also provides an electronic device, such as... Figure 5As shown, the electronic device may include a processor 510, a communication interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other via the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute vehicle image processing method steps in the RepNet vehicle re-identification network, such as:
[0121] The initial features of the vehicle image obtained by the convolutional layer in the vehicle re-identification network RepNet are input into the attention extraction network APN layer to obtain the attention region image of the vehicle image.
[0122] Super-resolution processing is performed on the attention region image to obtain detailed features of the vehicle image;
[0123] The detailed features are then input into the fully connected layer of RepNet.
[0124] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0125] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, which, when executed by a computer, enable the computer to perform the steps of the vehicle image processing method in the RepNet vehicle re-identification network provided in the above-described method embodiments, for example including:
[0126] The initial features of the vehicle image obtained by the convolutional layer in the vehicle re-identification network RepNet are input into the attention extraction network APN layer to obtain the attention region image of the vehicle image.
[0127] Super-resolution processing is performed on the attention region image to obtain detailed features of the vehicle image;
[0128] The detailed features are then input into the fully connected layer of RepNet.
[0129] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the vehicle image processing method in the RepNet vehicle re-identification network provided in the above-described method embodiments, including, for example:
[0130] The initial features of the vehicle image obtained by the convolutional layer in the vehicle re-identification network RepNet are input into the attention extraction network APN layer to obtain the attention region image of the vehicle image.
[0131] Super-resolution processing is performed on the attention region image to obtain detailed features of the vehicle image;
[0132] The detailed features are then input into the fully connected layer of RepNet.
[0133] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. 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 the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0134] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A vehicle image processing method in a RepNet vehicle re-identification network, characterized in that, include: The initial features of the vehicle image obtained by the convolutional layer in the vehicle re-identification network RepNet are input into the attention extraction network APN layer to obtain the attention region image of the vehicle image. Super-resolution processing is performed on the attention region image to obtain detailed features of the vehicle image; The super-resolution processing of the attention region image includes: The attention region image is input into two convolutional layers to obtain a feature image with the same number of channels as the size of the attention region image. The feature image is upsampled, and the upsampled feature image is rearranged to obtain a high-resolution image with the same size as the attention region image. The detailed features are then input into the fully connected layer of RepNet.
2. The vehicle image processing method in the RepNet vehicle re-identification network according to claim 1, characterized in that, The initial features of the vehicle image obtained from the convolutional layers in RepNet are input into the APN layer to obtain the attention region image of the vehicle image, including: The initial features of the vehicle image are input into the APN layer to determine the confidence level of the initial features. The initial features whose confidence level meets a preset threshold are determined as features within the attention region. The attention region image of the vehicle image is determined based on the features within the attention region.
3. The vehicle image processing method in the RepNet vehicle re-identification network according to claim 2, characterized in that, The confidence level of the initial feature is: ; in, The feature vector of the initial features. The confidence level of the initial feature. For parameters of the APN network, The function is a function of the fully connected layer and the softmax layer in the APN network.
4. The vehicle image processing method in the RepNet vehicle re-identification network according to claim 2, characterized in that, The region of the attention region image is: ; in, For feature vectors whose confidence levels meet a preset threshold, For parameters of the APN network, The function is implemented in the APN network through two fully connected layers. Let x be the x-coordinate of the center point of the square attention region. The ordinate of the center point of the square attention region is... It is half the side length of the square attention region.
5. The vehicle image processing method in the RepNet vehicle re-identification network according to claim 1, characterized in that, The high-resolution feature image is: ; in, For the output high-resolution feature image, The input is the feature image of the attention region of the vehicle image, where L is the number of the current convolutional layer. The function is the function of the (L-1)th convolutional layer. Let L be the parameters of the Lth convolutional layer. This represents the bias of the Lth convolutional layer. It is a periodic recombination operator.
6. The vehicle image processing method in the RepNet vehicle re-identification network according to claim 1, characterized in that, After acquiring the detailed features of the vehicle image, the process also includes: Repeat the following steps until the number of executions reaches the threshold: The detailed features of the current vehicle image are input into the APN layer to obtain the attention region image of the current vehicle image; Super-resolution processing is performed on the attention region image of the current vehicle image to obtain the detailed features of the next vehicle image.
7. A vehicle image processing apparatus in a RepNet vehicle re-identification network, characterized in that, include: The attention region acquisition module is used to input the initial features of the vehicle image obtained by the convolutional layer in the vehicle re-identification network RepNet into the attention extraction network APN layer to obtain the attention region image of the vehicle image. The super-resolution processing module is used to perform super-resolution processing on the attention region image to obtain detailed features of the vehicle image. The super-resolution processing of the attention region image includes: The attention region image is input into two convolutional layers to obtain a feature image with the same number of channels as the size of the attention region image; the feature image is upsampled and rearranged to obtain a high-resolution image with the same size as the attention region image; The detail feature processing module is used to input the detail features into the fully connected layer of RepNet.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the vehicle image processing method in the RepNet vehicle re-identification network as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the vehicle image processing method in the RepNet vehicle re-identification network as described in any one of claims 1 to 6.