A vehicle color recognition method and system based on shallow feature information enhancement
By embedding a shallow feature information enhancement module into a convolutional neural network and utilizing multiple 1*1 convolutional layers and cross-entropy loss function constraints, the performance problem of vehicle color recognition algorithm under varying lighting conditions is solved, improving recognition accuracy and generalization ability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-27
- Publication Date
- 2026-03-17
AI Technical Summary
Existing vehicle color recognition algorithms are affected by changes in lighting conditions, shallow feature information cannot play a decisive role, deep learning leads to the loss of color information, and the model performance and generalization are negatively affected.
A shallow feature enhancement module is embedded in the convolutional neural network. The feature information is enhanced by multiple 1*1 convolutional layers, and the cross-entropy loss function with label smoothing regularization is used for constraint to improve the expressive power of shallow features.
It enhances the accuracy of vehicle color recognition and the generalization ability of the model, reduces the impact of lighting changes on recognition, and improves the effect of vehicle color classification.
Smart Images

Figure CN115578714B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition technology, and in particular to a vehicle color recognition method and system based on shallow feature information enhancement. Background Technology
[0002] With the development of video structuring, the main focus is on structuring vehicles and pedestrians in video streams. This includes pedestrian detection, recognition, and behavioral feature analysis; and vehicle identification such as license plate numbers, models, and colors. While current vehicle color recognition algorithms have achieved good results, they still face significant challenges. Changes in lighting conditions in real-world scenarios can significantly impact the performance of vehicle color recognition models. However, current convolutional neural networks, due to their deep convolutional layers, mean that color features acquired in shallow layers cannot play a decisive role in the final constraints; instead, higher-level semantic information determines the network's optimization direction.
[0003] Currently, video structuring has been applied to security monitoring, primarily for structuring personnel and vehicle targets in videos. It can extract attributes such as age, gender, clothing color, and whether someone is wearing glasses, as well as vehicle attributes such as license plate number, model, color, and accessories. Based on the extracted attribute information, further comparative analysis of personnel and vehicles can be performed to identify criminals and illegal vehicles. Vehicle detection, model recognition, and vehicle color recognition have received widespread attention. However, vehicle color recognition still presents significant challenges. Early methods used traditional manual features for vehicle color classification, but these features were not robust enough and were affected by lighting conditions in real-world applications, frequently leading to misclassifications. Current algorithms often employ deep learning techniques to acquire vehicle color features for recognition. Compared to traditional manual features, this offers significant performance improvements in performance and generalization. However, deep learning techniques typically extract color feature information in shallow convolutional layers. As the convolutional layers deepen, the feature information is gradually transformed into rich semantic information, resulting in some loss of color information. Using only a few convolutional layers negatively impacts network convergence and generalization.
[0004] Existing algorithms use vehicle images as input. Although trained with color label constraints, the models still focus heavily on the headlights and tires, while vehicle color recognition should focus more on the vehicle body itself. Existing algorithms show that convolutional neural networks extract features in two layers: shallow features and high-level features. Shallow features primarily consist of appearance, texture, and color information. As the forward propagation progresses, these shallow features gradually transform into richer high-level semantic information. Unlike other tasks, vehicle color recognition and classification relies heavily on shallow features, which play a crucial role in backpropagation. If the algorithm directly prunes the model, leaving only the initial feature extraction layer, the features cannot be classified in low-dimensional space, negatively impacting model performance. Therefore, for vehicle color recognition algorithms, feature enhancement of shallow information should be performed to increase its influence on network convergence. Summary of the Invention
[0005] To address the aforementioned technical problems in the existing technology, this invention proposes a vehicle color recognition method and system based on shallow feature information enhancement to solve these problems.
[0006] According to one aspect of the present invention, a vehicle color recognition method based on shallow feature information enhancement is proposed, comprising:
[0007] S1: Embed a shallow feature information enhancement module in the convolutional neural network for vehicle color recognition. The convolutional neural network includes shallow convolutional blocks, middle convolutional blocks, and high-level convolutional blocks. The shallow feature information enhancement module is embedded after the shallow convolutional blocks and middle convolutional blocks.
[0008] S2: The vehicle image is used as the input to the shallow convolutional block for feature extraction. The shallow feature information enhancement module receives the feature input, passes through multiple 1*1 convolutional layers to obtain features of different dimensions, performs matrix multiplication on the features of different dimensions to obtain features with enhanced information expression, and sends them to the next convolutional block.
[0009] S3: The features of each convolutional block are sequentially fed into the global average pooling layer and the corresponding classification layer for classification, and the cross-entropy loss function with label smoothing regularization is used for constraint.
[0010] In some specific embodiments, the convolutional neural network for vehicle color recognition is a ResNet50 network, which sequentially includes shallow convolutional block 1, shallow convolutional block 2, middle convolutional block 1, middle convolutional block 2, and high-level convolutional block.
[0011] In some specific embodiments, the shallow feature information enhancement module is embedded after shallow convolutional block 1, shallow convolutional block 2 and middle convolutional block 1.
[0012] In some specific embodiments, S2 specifically includes:
[0013] The shallow feature information enhancement module receives feature f B×C×H×W As input, the data is processed through three 1*1 convolutional layers to obtain features with dimensions B*(H*W)*C1, B*C1*(H*W), and B*C*C1, respectively. Here, B represents the batch size during training, H and W represent the height and width of the image, respectively, and C and C1 represent the channels.
[0014] Multiply the matrices of dimensions B*(H*W)*C1 and B*C1*(H*W), and then feed the result into the softmax function to calculate an information enhancement matrix A. ji , Among them, S ij The contribution of the i-th position to the j-th position;
[0015] Information enhancement matrix A ji The feature with feature dimension B*C*C1 is multiplied by the corresponding matrix, and then multiplied by the corresponding element-wise with the original feature to obtain the feature with enhanced information expression, which is then passed into the next convolutional block.
[0016] In some specific embodiments, the label smoothing regularization cross-entropy loss function in S3 is specifically as follows: Where ε∈[0,1], K is the number of vehicle color categories, and p(k) represents the probability of predicting that the vehicle belongs to category k.
[0017] In some specific embodiments, the loss function of the overall framework is L = 0.5 × l1 + l2 + 1.5 × l3 + 2 × l4, where l1, l2, l3, and l4 are used to constrain the four classification layers, respectively.
[0018] According to a second aspect of the invention, a computer-readable storage medium is provided on which one or more computer programs are stored, which, when executed by a computer processor, implement any of the methods described above.
[0019] According to a third aspect of the present invention, a vehicle color recognition system based on shallow feature information enhancement is proposed, the system comprising:
[0020] A shallow feature information enhancement module embedding unit is configured to embed a shallow feature information enhancement module in a convolutional neural network for vehicle color recognition. The convolutional neural network includes shallow convolutional blocks, middle convolutional blocks, and high-level convolutional blocks. The shallow feature information enhancement module is embedded after the shallow convolutional blocks and middle convolutional blocks are embedded.
[0021] The information enhancement unit is configured to extract features sequentially using vehicle images as input to shallow convolutional blocks. The shallow feature information enhancement module receives the feature input, passes it through multiple 1*1 convolutional layers to obtain features of different dimensions, performs matrix multiplication on the features of different dimensions to obtain features that enhance information expression, and sends them to the next convolutional block.
[0022] Constraint Unit: Configured to sequentially feed the features of each convolutional block into the global average pooling layer and the corresponding classification layer for classification, and to constrain the convolution using the label smoothing regularized cross-entropy loss function.
[0023] In some specific embodiments, the convolutional neural network for vehicle color recognition is a ResNet50 network. The ResNet50 network includes, in sequence, a shallow convolutional block 1, a shallow convolutional block 2, a middle convolutional block 1, a middle convolutional block 2, and a high-level convolutional block. The shallow feature information enhancement module is embedded after the shallow convolutional block 1, the shallow convolutional block 2, and the middle convolutional block 1.
[0024] In some specific embodiments, the information enhancement unit specifically includes:
[0025] The shallow feature information enhancement module receives feature f B×C×H×W As input, the data is processed through three 1*1 convolutional layers to obtain features with dimensions B*(H*W)*C1, B*C1*(H*W), and B*C*C1, respectively.
[0026] Multiply the matrices of dimensions B*(H*W)*C1 and B*C1*(H*W), and then feed the result into the softmax function to calculate an information enhancement matrix A. ji , Among them, S ij The contribution of the i-th position to the j-th position;
[0027] Information enhancement matrix A ji The feature with feature dimension B*C*C1 is multiplied by the corresponding matrix, and then multiplied by the corresponding element-wise with the original feature to obtain the feature with enhanced information expression, which is then passed into the next convolutional block.
[0028] In some specific embodiments, the label smoothing regularization cross-entropy loss function is specifically as follows: Where ε∈[0,1], K is the number of vehicle color categories, and p(k) represents the probability of predicting that the vehicle belongs to category k.
[0029] In some specific embodiments, the loss function of the overall framework is L = 0.5 × l1 + l2 + 1.5 × l3 + 2 × l4, where l1, l2, l3, and l4 are used to constrain the four classification layers, respectively.
[0030] This invention proposes a vehicle color recognition method and system based on shallow feature information enhancement. By introducing a shallow feature information enhancement module, the expression of shallow feature information is enhanced. The shallow feature information enhancement module proposed in this invention has good flexibility and can be flexibly inserted into any position of the convolutional neural network to enhance feature information and increase the generalization of the model. Attached Figure Description
[0031] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments and, together with the description, serve to explain the principles of the invention. Other embodiments and many anticipated advantages of the embodiments will be readily recognized as they become better understood through reference to the following detailed description. Other features, objects, and advantages of this application will become more apparent from reading the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0032] Figure 1 This is a flowchart of a vehicle color recognition method based on shallow feature information enhancement according to an embodiment of this application;
[0033] Figure 2 This is an algorithm framework diagram of a vehicle color recognition method based on shallow feature information enhancement, which is a specific embodiment of this application;
[0034] Figure 3 This is a framework diagram of a vehicle color recognition system based on shallow feature information enhancement, according to an embodiment of this application.
[0035] Figure 4 This is a schematic diagram of the structure of a computer system suitable for implementing the electronic devices of the present application embodiments. Detailed Implementation
[0036] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0037] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0038] A vehicle color recognition method based on shallow feature information enhancement according to an embodiment of this application, Figure 1 A flowchart illustrating a vehicle color recognition method based on shallow feature information enhancement according to an embodiment of this application is shown. Figure 1 As shown, the method includes:
[0039] S101: A shallow feature information enhancement module is embedded in the convolutional neural network for vehicle color recognition. The convolutional neural network includes shallow convolutional blocks, middle convolutional blocks, and high-level convolutional blocks. The shallow feature information enhancement module is embedded after the shallow convolutional blocks and middle convolutional blocks.
[0040] In a specific embodiment, the convolutional neural network for vehicle color recognition is a ResNet50 network, which sequentially includes shallow convolutional block 1, shallow convolutional block 2, middle convolutional block 1, middle convolutional block 2, and high-level convolutional blocks. The shallow feature information enhancement module is embedded after shallow convolutional block 1, shallow convolutional block 2, and middle convolutional block 1.
[0041] S102: The vehicle image is used as the input to the shallow convolutional block for feature extraction. The shallow feature information enhancement module receives the feature input, passes through multiple 1*1 convolutional layers to obtain features of different dimensions, performs matrix multiplication on the features of different dimensions to obtain features with enhanced information expression, and sends them to the next convolutional block.
[0042] In a specific embodiment, the shallow feature information enhancement module receives feature f B×C×H×W As input, the data is processed through three 1x1 convolutional layers to obtain features of dimensions B*(H*W)*C1, B*C1*(H*W), and B*C*C1, respectively, where B represents the batch size during training, H and W represent the height and width of the image, and C and C1 represent the channels. The features of dimensions B*(H*W)*C1 and B*C1*(H*W) are then multiplied and fed into a softmax function to calculate an information augmentation matrix A. ji , Among them, S ij Let A be the contribution of the i-th position to the j-th position; let the information enhancement matrix A be... ji The feature with feature dimension B*C*C1 is multiplied by the corresponding matrix, and then multiplied by the corresponding element-wise with the original feature to obtain the feature with enhanced information expression, which is then passed into the next convolutional block.
[0043] S103: The features of each convolutional block are sequentially fed into the global average pooling layer and the corresponding classification layer for classification, and the cross-entropy loss function with label smoothing regularization is used for constraint.
[0044] In a specific embodiment, the label smoothing regularization cross-entropy loss function is specifically as follows: Where >∈[0,1], K is the number of vehicle color categories, and p(k) represents the probability of predicting that the vehicle belongs to category k. The overall loss function is L=0.5×l1+l2+1.5×l3+2×l4, where l1, l2, l3, and l4 are used to constrain the four classification layers, respectively.
[0045] Figure 2 The diagram illustrates the algorithmic framework of a vehicle color recognition method based on shallow feature information enhancement according to a specific embodiment of the present invention. Figure 2 As shown, this invention proposes a shallow feature information enhancement module to enhance the role of feature information in network constraints. It can be flexibly embedded into any position within a convolutional neural network, specifically including the following steps:
[0046] Step S1: The proposed shallow feature enhancement module is embedded into the convolutional neural network. This step is illustrated using ResNet50 as an example. In ResNet50, Conv1 and Stage1 are defined as shallow convolutional blocks, Stage2 and Stage3 as mid-level convolutional blocks, and Stage4 as a high-level convolutional block. The vehicle image is used as input to the shallow convolutional blocks, and feature extraction is performed sequentially.
[0047] Step S2: To enhance the representation of shallow feature information, this invention embeds a shallow feature information enhancement module after shallow convolutional block 1, shallow convolutional block 2, and middle convolutional block 1. The shallow feature information enhancement module receives feature f. B×C×H×W As input, it first goes through the following process: Figure 2 The three 1*1 convolutional layers shown obtain features of dimensions B*(H*W)*C1, B*C1*(H*W), and B*C*C1, respectively.
[0048] Step S3: Multiply the dimensions B*(H*W)*C1 and B*C1*(H*W) obtained in step S2, and then feed them into the softmax function to calculate an information enhancement matrix, as shown below:
[0049]
[0050] Among them, S ij The contribution of the i-th position to the j-th position is used to calculate the entire spatial information enhancement matrix A. ji .
[0051] Step S4: Calculate the entire spatial information enhancement matrix A obtained in step S3. ji The feature obtained in step S2 with a feature dimension of B*C*C1 is multiplied by the corresponding matrix, and then multiplied element-wise by the original feature to obtain the feature with enhanced information representation, which is then passed to the next convolutional block. In the whole process, feature information enhancement is performed on shallow convolutional block 1, shallow convolutional block 2 and middle convolutional block 1 respectively, and the enhancement process is the same as in steps S2, S3 and S4.
[0052] Step S5: A total of 4 features are generated, from shallow convolutional block 1, shallow convolutional block 2, mid-level convolutional block 1, and high-level convolutional block 1, respectively. All features are fed into a global average pooling layer, and then into the corresponding classification layer for classification. All features are constrained using a label-smoothed regularized cross-entropy loss function, as shown in the following expression: Where ε∈[0,1], K is the number of vehicle color categories, and p(k) represents the probability of predicting that the vehicle belongs to category k. The loss function of the entire framework is as follows: L=0.5×l1+l2+1.5×l3+2×l4, where l1, l2, l3, and l4 are used to constrain classification layer 1, classification layer 2, classification layer 3, and classification layer 4, respectively. In order to ensure that the shallow convolutional layers can obtain effective parameter updates during backpropagation, a larger coefficient penalty is applied to the loss of the classification layer with shallow features.
[0053] This invention proposes a vehicle color recognition method and system based on shallow feature information enhancement. By introducing a shallow feature information enhancement module, the expression of shallow feature information is enhanced. The shallow feature information enhancement module proposed in this invention has good flexibility and can be flexibly inserted into any position of the convolutional neural network to enhance feature information and increase the generalization of the model.
[0054] Continue to refer to Figure 3 , Figure 3 A framework diagram of a vehicle color recognition system based on shallow feature information enhancement according to an embodiment of the present invention is shown. The system specifically includes a shallow feature information enhancement module embedding unit 301, an information enhancement unit 302, and a constraint unit 303. The shallow feature information enhancement module embedding unit 301 is configured to embed a shallow feature information enhancement module into a convolutional neural network for vehicle color recognition. The convolutional neural network includes shallow convolutional blocks, mid-level convolutional blocks, and high-level convolutional blocks. The shallow feature information enhancement module is embedded after the shallow and mid-level convolutional blocks. The information enhancement unit 302 is configured to extract features sequentially from vehicle images as input to the shallow convolutional blocks. The shallow feature information enhancement module receives the feature input, passes it through multiple 1*1 convolutional layers to obtain features of different dimensions, performs matrix multiplication on the features of different dimensions to obtain features representing enhanced information, and sends them to the next convolutional block. The constraint unit 303 is configured to sequentially send the features of each convolutional block to a global average pooling layer and the corresponding classification layer for classification, and uses a label-smoothed regularized cross-entropy loss function for constraint.
[0055] The following is for reference. Figure 4 It shows a schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application. Figure 4 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0056] like Figure 4 As shown, the computer system includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 402 or programs loaded from storage section 408 into random access memory (RAM) 403. RAM 403 also stores various programs and data required for the operation of system 400. CPU 401, ROM 402, and RAM 403 are interconnected via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.
[0057] The following components are connected to I / O interface 405: an input section 406 including a keyboard, mouse, etc.; an output section 407 including a liquid crystal display (LCD) and speakers, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card and a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to I / O interface 405 as needed. A removable medium 411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 410 as needed so that computer programs read from it can be installed into storage section 408 as needed.
[0058] Specifically, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 409, and / or installed from removable medium 411. When the computer program is executed by central processing unit (CPU) 401, it performs the functions defined in the methods of this application. It should be noted that the computer-readable storage medium of this application can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium can be, for example,—but 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 may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, 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 devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable storage medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0059] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—as well as conventional procedural programming languages—such as the "C" language 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).
[0060] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0061] The modules described in the embodiments of this application can be implemented in software or in hardware.
[0062] In another aspect, this application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: embed a shallow feature information enhancement module into a convolutional neural network for vehicle color recognition, wherein the convolutional neural network includes shallow convolutional blocks, mid-level convolutional blocks, and high-level convolutional blocks; after the shallow feature information enhancement module is embedded into the shallow and mid-level convolutional blocks; the vehicle image is used as input to the shallow convolutional block for sequential feature extraction; the shallow feature information enhancement module receives the feature input, passes through multiple 1*1 convolutional layers to obtain features of different dimensions, performs matrix multiplication on the features of different dimensions to obtain features for enhanced information expression, and sends them to the next convolutional block; the features of each convolutional block are sequentially sent to a global average pooling layer and the corresponding classification layer for classification, and constrained using a label smoothing regularized cross-entropy loss function.
[0063] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A vehicle color recognition method based on shallow feature information enhancement, characterized in that, include: S1: A shallow feature information enhancement module is embedded in the convolutional neural network for vehicle color recognition. The convolutional neural network includes shallow convolutional blocks, middle convolutional blocks, and high-level convolutional blocks. The shallow feature information enhancement module is embedded after the shallow convolutional blocks and the middle convolutional blocks. S2: the vehicle picture is taken as an input of a shallow convolution block for feature extraction in sequence, the shallow feature information enhancement module receives the feature input, and the multiple Convolution layers obtain features of different dimensions, matrix multiplication is performed on the features of different dimensions to obtain features of enhanced information expression, and the features are sent to the next convolution block; S3: The features of each convolutional block are sequentially fed into the global average pooling layer and the corresponding classification layer for classification, and the cross-entropy loss function with label smoothing regularization is used for constraint. The shallow feature information enhancement module receives feature As input, the 3 Convolutional layers obtain features with dimensions of respectively, where B represents the batch size in the training process, H and W represent the height and width of the picture respectively, and C and C1 represent the channels. The dimension is Matrix multiplication is performed, and then an information enhancement matrix is calculated by a softmax function wherein, is the contribution of the th position to the th position; The information enhancement matrix and the feature dimension The corresponding matrix multiplication is performed on the information enhancement matrix and the feature, and then the corresponding element multiplication is performed on the initial feature to obtain the enhanced information expression feature, which is transmitted to the next convolution block. 2.The vehicle color recognition method based on shallow feature information enhancement according to claim 1, characterized in that, The convolutional neural network for vehicle color recognition is a ResNet50 network, which sequentially includes shallow convolutional block 1, shallow convolutional block 2, middle convolutional block 1, middle convolutional block 2, and high-level convolutional block. 3.The vehicle color recognition method based on shallow feature information enhancement according to claim 2, characterized in that, The shallow feature information enhancement module is embedded after the shallow convolutional block 1, shallow convolutional block 2 and middle convolutional block 1.
4. The vehicle color recognition method based on shallow feature information enhancement according to claim 1, characterized in that, The cross-entropy loss function of the label smoothing regularization in the S3 is specifically , wherein , is the number of categories of vehicle colors, represents the probability of predicting that the vehicle belongs to category .
5. The vehicle color recognition method based on shallow feature information enhancement according to claim 4, characterized in that, The loss function of the overall framework is wherein, are used to constrain the four classification layers, respectively.
6. A computer readable storage medium having stored thereon one or more computer programs. When the one or more computer programs are executed by a computer processor, they perform the method according to any one of claims 1 to 5.
7. A vehicle color recognition system based on shallow feature information enhancement, characterized in that, The system includes: A shallow feature information enhancement module embedding unit is configured to embed a shallow feature information enhancement module in a convolutional neural network for vehicle color recognition. The convolutional neural network includes shallow convolutional blocks, middle convolutional blocks, and high-level convolutional blocks. The shallow feature information enhancement module is embedded after being embedded in the shallow convolutional blocks and the middle convolutional blocks. The information enhancement unit is configured to sequentially perform feature extraction on the vehicle picture as the input of the shallow convolution block. The shallow feature information enhancement module receives the feature input, performs matrix multiplication on the features of different dimensions to obtain enhanced information expression features, and sends the features to the next convolution block. The convolution layer obtains features of different dimensions, matrix multiplication is performed on the features of different dimensions to obtain enhanced information expression features, and the features are sent to the next convolution block. Constraint Unit: Configured to sequentially feed the features of each convolutional block into the global average pooling layer and the corresponding classification layer for classification, and to use the label smoothing regularized cross-entropy loss function for constraint; The information enhancement unit specifically includes: The shallow feature information enhancement module receives feature As input, 3 Convolutional layers are used to obtain features with dimensions of , respectively. Dimension is Perform matrix multiplication, then feed the matrix into the softmax function to calculate an information enhancement matrix. ,in, For the first The position is the first The contribution of each position; The information enhancement matrix and feature dimension is The features are multiplied by the corresponding matrix, and then multiplied element-wise with the original features to obtain the features that enhance the information representation, which are then passed into the next convolutional block.
8. The vehicle color recognition system based on shallow feature information enhancement according to claim 7, characterized in that, The convolutional neural network for vehicle color recognition is a ResNet50 network. The ResNet50 network includes, in sequence, a shallow convolutional block 1, a shallow convolutional block 2, a middle convolutional block 1, a middle convolutional block 2, and a high-level convolutional block. The shallow feature information enhancement module is embedded after the shallow convolutional block 1, the shallow convolutional block 2, and the middle convolutional block 1.
9. The vehicle color recognition system based on shallow feature information enhancement according to claim 7, characterized in that, The specific cross-entropy loss function for label smoothing regularization is as follows: ,in , It represents the number of vehicle color categories. The representative predicts that it belongs to the category. The probability of.
10. The vehicle color recognition system based on shallow feature information enhancement according to claim 9, characterized in that, The loss function of the overall framework is ,in, These are used to constrain the four classification layers respectively.
Citation Information
Patent Citations
Method and device for recognizing vehicle information
CN106874840A
Vehicle damage identification model establishment method, damage identification method and device
CN114004289A