A vehicle recognition method based on convolutional neural network

By constructing an illumination-adaptive convolutional neural network and optimizing the anchor frame scale, the problems of illumination and perspective distortion in tunnel vehicle recognition were solved, improving recognition accuracy and reducing computational overhead.

CN123052684APending Publication Date: 2026-11-06SHANXI JIAOTOU XINFU EXPRESSWAY MANAGEMENT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611403347.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-10
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing vehicle recognition methods based on convolutional neural networks suffer from insufficient dynamic adjustment capability for lighting conditions and inadequate anchor frame scale in highway tunnel scenarios, leading to decreased recognition accuracy and wasted computational resources.

Method used

An illumination-adaptive convolutional neural network is constructed. The convolutional kernel parameters are adjusted in real time through the illumination state determination branch. The anchor frame scale prior is calculated by combining the camera installation parameters and the tunnel cross-section size to optimize the anchor frame configuration of the region proposal network.

Benefits of technology

It improves the accuracy of vehicle recognition in tunnels, reduces computational overhead, and solves the recognition difficulties caused by sudden changes in tunnel lighting and perspective distortion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123052684A_ABST
    Figure CN123052684A_ABST
Patent Text Reader

Abstract

This invention discloses a vehicle recognition method based on convolutional neural networks, belonging to the field of vehicle recognition technology. It addresses the unique environment of tunnels with complex lighting and drastic changes in depth by constructing an illumination-adaptive convolutional neural network with a branch for determining lighting conditions. This network analyzes tunnel segment types and lighting intensity levels in real time and dynamically resets the convolution kernel parameter matrix before convolution operations, enabling the network to adaptively change the convolution kernel response characteristics according to lighting conditions. This solves the problem of feature extraction failure under conditions of sudden changes in lighting with fixed convolution kernels. Simultaneously, utilizing the geometric constraints of fixed tunnel cameras, a mapping relationship between image row positions and tunnel depth positions is established based on the principle of perspective projection, forming prior information on anchor frame scale. Based on this, anchor frames adapted to the tunnel depth position are configured at each level of the multi-scale feature map, overcoming the technical defects of fixed anchor frames in tunnel depth scenarios, such as missed detection of small targets and redundancy of near-end anchor frames.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle recognition technology, and more specifically, to a vehicle recognition method based on convolutional neural networks. Background Technology

[0002] Vehicle recognition is one of the core technologies of intelligent transportation systems and is widely used in traffic monitoring, safety early warning and other fields. With the development of deep learning technology, vehicle recognition methods based on convolutional neural networks have become the mainstream technical solution due to their powerful feature extraction capabilities and end-to-end learning advantages.

[0003] In existing technologies, such as the "Vehicle Recognition and Tracking Method Based on Convolutional Neural Network" disclosed in patent number CN108171112A, a vehicle recognition and tracking scheme combining Faster-RCNN and tracking convolutional neural network is proposed. The fast region convolutional neural network is used to identify vehicles in the initial frame of the monitoring video, and the vehicle targets in subsequent frames are continuously tracked by alternating between offline training and online iterative updates. This has achieved good recognition and tracking results in general road scenarios.

[0004] However, if this technical solution is directly applied to highway tunnel scenarios, the following technical obstacles exist:

[0005] First, the weight parameters of the convolutional neural network used in this scheme are fixed after training and do not have the ability to dynamically adjust according to the lighting conditions of the input image. Highway tunnels have extremely special lighting environments. At the tunnel entrances and exits, there are "black hole effects" and "white hole effects" caused by drastic brightness contrasts, which seriously weaken the image acquisition capabilities of the traffic vision system. In addition, the tunnel interior lights and vehicle driving lights intertwine to form a complex non-uniform lighting distribution, and the image contrast fluctuates drastically. Under the above complex lighting conditions, the convolutional kernel with fixed parameters is difficult to stably extract effective vehicle features, resulting in a significant decrease in recognition accuracy.

[0006] Second, in the Faster-RCNN framework used in this scheme, the RPN (Region Proposal Network) generally presets a fixed number and fixed scale of anchor boxes at each feature map location. In the narrow space of a highway tunnel, the camera is usually positioned low due to installation space limitations, resulting in severe perspective distortion in the monitoring image. The vehicle imaging size decreases sharply with the increase of depth position. The imaging scale of vehicles at the near end of the image is large, while the imaging scale of vehicles at the far end is extremely small, with the imaging scale difference reaching tens of times. The traditional fixed-scale anchor box strategy, on the one hand, generates a large number of redundant anchor boxes that do not match the target scale in the near end region, resulting in a waste of computing resources. On the other hand, in the far end region, the lack of sufficiently small-scale anchor boxes leads to a large number of small target vehicles being missed.

[0007] Therefore, in view of the actual technical defects, a vehicle recognition method based on convolutional neural networks is proposed to adapt to the special lighting conditions and spatial geometric constraints of tunnels. Summary of the Invention

[0008] The purpose of this invention is to solve the above problems, and a vehicle recognition method based on convolutional neural networks is provided.

[0009] The objective of this invention can be achieved through the following technical solution: a vehicle recognition method based on a convolutional neural network, comprising the following steps:

[0010] S1. Acquire tunnel monitoring video images, mark them as target images, perform illumination status analysis on the target images, and determine the tunnel section type and current illumination intensity level to which the target images belong.

[0011] S2. Construct an illumination-adaptive convolutional neural network, which includes an illumination state determination branch and a feature extraction backbone network. Each convolutional layer in the feature extraction backbone network has an initial training-completed original convolutional kernel parameter matrix.

[0012] According to the S1 determination result, the illumination state determination branch generates channel reset parameters corresponding to each output channel of the target convolutional layer for at least one target convolutional layer selected from multiple convolutional layers. The channel reset parameters are used to dynamically reset the original convolutional kernel parameter matrix of the target convolutional layer, and the convolution operation is performed with the real-time adjusted convolutional kernel parameter matrix.

[0013] S3. Pre-acquire the calibration parameters of the camera and the cross-sectional dimensions of the tunnel, and establish the mapping relationship between the pixel row position in the image and the depth position of the tunnel. Calculate the theoretical imaging size of a standard-sized vehicle at each depth position according to the mapping relationship to form prior information on the anchor frame scale.

[0014] S4. Input the target image into the feature extraction backbone network adjusted in S2, and output a multi-scale convolutional feature map after multi-layer convolution operation.

[0015] S5. Input the multi-scale convolutional feature map output by S4 into the region proposal network. The region proposal network adopts a known convolutional neural network structure and configures the anchor frame size and number for different spatial locations on the multi-scale convolutional feature map according to the anchor frame scale prior constraint information to generate suspected vehicle regions.

[0016] S6. Classify and refine the boundaries of the suspected vehicle area, and output the identification results of vehicles in the tunnel.

[0017] Furthermore, the method for determining the tunnel section type in S1 is as follows:

[0018] The camera is fixedly positioned inside the tunnel along its optical axis, ensuring a fixed physical spatial correspondence in the captured images. The target image is divided from top to bottom into a top distant view area, a middle mid-range view area, and a bottom near view area, based on pixel row direction. The top distant view area corresponds to the far end of the tunnel, the middle mid-range view area corresponds to the middle of the tunnel's depth, and the bottom near view area corresponds to the near end of the tunnel's depth. The average pixel brightness difference between the bottom near view area and the top distant view area is calculated to distinguish the tunnel entrance transition section, the tunnel interior section, and the tunnel exit transition section.

[0019] The method for determining the light intensity level is as follows: draw a grayscale histogram of the target image, calculate the global brightness mean and standard deviation of the histogram, trace back N-1 consecutive frames from the current frame, obtain the global brightness mean of each of the N consecutive frames including the current frame, arrange them in chronological order to form a global brightness mean sequence, and classify the light intensity level into light transient level, strong light level, normal light level or weak light level based on the global brightness mean sequence and the standard deviation of the grayscale histogram of the current frame image.

[0020] Furthermore, the illumination state determination branch in S2 includes a learnable parameter mapping layer. The channel reset parameters are generated in real time by the parameter mapping layer based on the input tunnel segment type and illumination intensity level. It includes multiplicative scaling coefficients and additive bias coefficients corresponding to each output channel of the target convolutional layer. The parameter mapping layers corresponding to different target convolutional layers are independent of each other, and their respective mapping relationships are obtained through pre-training of tunnel scene image samples.

[0021] Furthermore, the dynamic reset method in S2 is as follows: the parameter values ​​of each output channel in the original convolution kernel parameter matrix of the target convolutional layer are multiplied by the corresponding scaling factor and then superimposed with the corresponding bias factor to obtain the adjusted convolution kernel parameter matrix.

[0022] Furthermore, the method for forming the prior constraint information of the anchor frame size in S3 is as follows:

[0023] The installation height, pitch angle, focal length parameters, and tunnel cross-sectional width of the camera inside the tunnel are obtained in advance. Based on the similar triangle projection principle, the theoretical imaging pixel width of a standard vehicle width at different depth positions along the tunnel longitudinal direction is calculated on the target image plane. The pixels corresponding to each row position in the target image from top to bottom correspond to each depth position from far to near. Substituting the depth position corresponding to each row position in the target image into the above calculation, the configuration basis of the anchor frame size at that row position is obtained. The configuration basis corresponding to all row positions in the image is summarized to form the prior constraint information of the anchor frame size.

[0024] Furthermore, the multi-layer convolutional network of the feature extraction backbone includes shallow convolutional layers, deep convolutional layers, and intermediate convolutional layers. The feature maps output by each convolutional layer have different resolutions and correspond to different tunnel depth positions. The high-resolution feature maps output by the shallow convolutional layers correspond to the bottom near-field region in the target image, i.e., the near depth of the tunnel. The low-resolution feature maps output by the deep convolutional layers correspond to the top far-field region in the image, i.e., the far depth of the tunnel. The medium-resolution feature maps output by the intermediate convolutional layers correspond to the middle-field region in the image, i.e., the mid-depth of the tunnel.

[0025] The target image is input into the feature extraction backbone network, and after multiple convolution operations, the output is a multi-scale convolutional feature map consisting of low-resolution feature maps, high-resolution feature maps, and medium-resolution feature maps.

[0026] Furthermore, in S5, small-sized anchor boxes are configured for low-resolution feature maps of multi-scale convolutional feature maps; large-sized anchor boxes are configured for high-resolution feature maps; and medium-sized anchor boxes are configured for medium-resolution feature maps. The number of anchor boxes configured at each location is less than the total number of anchor boxes preset at each location by the standard region proposal network.

[0027] Furthermore, the specific method for generating the suspected vehicle area in S5 is as follows:

[0028] Based on each anchor box configured on the multi-scale convolutional feature map, the region proposal network outputs a confidence score indicating the presence of a vehicle target in the anchor box through its internal region proposal binary classification branch. Anchor boxes with confidence scores greater than a preset threshold are selected and sorted from high to low to form a high-confidence anchor box sequence. Non-maximum suppression is performed on this sequence, and the intersection-union ratio (CIU) between any two anchor boxes is calculated. The CIU is the ratio of the intersection area to the union area of ​​two anchor boxes. If the CIU exceeds a preset CIU threshold, anchor boxes with lower confidence scores are removed, and the image regions of the remaining anchor boxes are considered as suspected vehicle regions.

[0029] Furthermore, features of each suspected vehicle region are extracted from the multi-scale convolutional feature map. Region of interest pooling or region of interest alignment operations are used to adjust the extracted features into feature vectors of uniform size. Each feature vector is input into the detection classification branch composed of fully connected layers, and the output is the probability distribution of the suspected vehicle region belonging to the preset vehicle category. The category with the highest probability is taken as the vehicle category determination result of the suspected vehicle region.

[0030] Simultaneously, each feature vector is input into the detection regression branch composed of fully connected layers, which outputs the refined offset of the bounding box of the suspected vehicle region. Based on this, the position and size of the bounding box of the suspected vehicle region are finely adjusted to obtain accurate bounding box coordinates.

[0031] Compared with the prior art, the advantages of this invention are:

[0032] 1. To address the limitations of fixed convolutional kernel parameters in conventional convolutional neural networks, an illumination-adaptive convolutional neural network is constructed, comprising an illumination state determination branch and a feature extraction backbone network. The illumination state determination branch analyzes the tunnel section type and illumination intensity level in real time, generating channel reset parameters corresponding one-to-one with each output channel of the target convolutional layer. The convolutional kernel parameter matrix is ​​dynamically reset before the convolution operation, enabling the feature extraction backbone network to adaptively change the convolutional kernel response characteristics according to the illumination conditions of different sections such as the tunnel entrance, interior, and exit. By directly adjusting the convolutional kernel parameters before the convolution operation, the problem of feature extraction failure under sudden changes in tunnel illumination with fixed convolutional kernel parameters is solved, significantly improving the accuracy of tunnel vehicle recognition.

[0033] 2. Building upon the above, to address the issue that fixed-scale anchor frames in traditional region proposal networks cannot adapt to drastic changes in tunnel depth, this paper utilizes the geometric constraints of the optical axis of a camera fixedly installed in the tunnel along the tunnel's depth direction. By pre-obtaining camera installation parameters and tunnel cross-sectional dimensions, the theoretical imaging size of vehicles at different tunnel depth locations in the target image is calculated. Based on the principle of perspective projection, a precise mapping relationship between the image row position and the depth position is established, forming prior information on the anchor frame scale. The region proposal network then configures anchor frame sizes and quantities at each level of the multi-scale feature map according to this prior information, adapting to the depth position. This overcomes the technical shortcomings of standard RPN, which uses a uniform anchor frame scale across the entire map, leading to missed detection of small targets at a distance and redundant anchor frames at a nearby location. This improves the detection accuracy of small targets while reducing computational overhead. Attached Figure Description

[0034] Figure 1 This is a flowchart illustrating the overall method of the present invention;

[0035] Figure 2 This is a flowchart of the determination of tunnel section type and light intensity level in S1 of the present invention. Detailed Implementation

[0036] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0037] This invention discloses a vehicle recognition method based on convolutional neural networks. Please refer to [link / reference]. Figures 1-2 It includes the following steps:

[0038] S1. Acquire tunnel monitoring video images, mark the current image as the target image, input the target image of the current frame and the previous N-1 frames to perform illumination status analysis, and determine the tunnel section type to which the target image belongs and the current illumination intensity level;

[0039] The method for determining the tunnel section type is as follows: the camera is fixedly arranged in the tunnel along the longitudinal direction of the tunnel optical axis, and the physical spatial correspondence of its captured image is fixed. The perspective projection law makes the pixels in different rows of the image correspond to different longitudinal positions. That is, according to the pixel row direction, the target image is divided from top to bottom into the top distant view area, the middle mid-range area and the bottom near view area. The top distant view area corresponds to the far distance in the tunnel longitudinal direction, the middle mid-range area corresponds to the middle distance in the tunnel longitudinal direction, and the bottom near view area corresponds to the road surface near the camera.

[0040] The average pixel brightness difference between the bottom near-field area and the top far-field area is calculated. When the average pixel brightness difference is negative and its absolute value exceeds the preset entrance section threshold, the currently acquired tunnel monitoring video image is determined to belong to the tunnel entrance transition section; when the absolute value of the average pixel brightness difference is less than the preset internal section threshold, the current image is determined to belong to the tunnel internal section; when the average pixel brightness difference is positive and exceeds the preset exit section threshold, the current image is determined to belong to the tunnel exit transition section. Each threshold can be pre-calibrated according to the specific camera model and tunnel lighting configuration.

[0041] The method for determining the light intensity level is as follows: draw a grayscale histogram of the target image, calculate the global brightness mean and standard deviation of the histogram, trace back N-1 consecutive frames from the current frame, obtain the global brightness mean of each of the N consecutive frames including the current frame, arrange them in chronological order to form a global brightness mean sequence, and classify the light intensity level into light transient level, strong light level, normal light level or weak light level based on the global brightness mean sequence and the standard deviation of the grayscale histogram of the current frame image.

[0042] Specifically, the absolute value d of the difference between the global brightness mean between adjacent frames is calculated to obtain a difference sequence of length N-1. The number of differences in the difference sequence that satisfy the condition that the absolute value of the difference is greater than a preset change threshold is counted, and their proportion is calculated. When the proportion is greater than a preset proportion threshold, it is determined whether the current frame is at the illumination transient change level, and the illumination transient change level is directly output.

[0043] Conversely, based on the global brightness mean and grayscale histogram standard deviation of the target image in the current frame, the following determination is made: the global brightness mean and grayscale histogram standard deviation are labeled as μ and σ, respectively, and a preset high brightness threshold μ is referenced. - h, preset low brightness threshold μ - l and the preset standard deviation threshold σ - Compare th:

[0044] When μ > μ - h and σ > σ - When the value is th, it indicates that the overall image is bright and the pixel grayscale distribution is sufficiently wide, and the image lighting level is rich, which is judged as a strong light level;

[0045] When μ - l≤μ≤μ - h, and σ > σ - When the value is th, it indicates that the overall brightness of the image is moderate and the grayscale distribution is sufficient, and it is judged as a normal lighting level.

[0046] When μ≤μ - l, and σ>σ - When the value is th, it indicates that the overall image is dark and the grayscale distribution is broad enough, and it is judged as a low light level.

[0047] The specific values ​​of the above preset thresholds (high brightness threshold, low brightness threshold, standard deviation threshold) can be determined by pre-calibration based on the tunnel lighting configuration, camera gain settings, and actual scene illumination distribution. Different threshold combinations can be set for different tunnels or different camera parameters.

[0048] S2. Construct an illumination-adaptive convolutional neural network. This network includes an illumination state determination branch and a feature extraction backbone network. Each convolutional layer in the feature extraction backbone network has an initial training-completed original convolutional kernel parameter matrix.

[0049] The illumination state determination branch, based on the determination results of S1 on the tunnel section type and the current illumination intensity level, generates channel reset parameters corresponding to each output channel of the target convolutional layer for at least one target convolutional layer selected from multiple convolutional layers. The original convolutional kernel parameter matrix of the target convolutional layer is dynamically reset using the channel reset parameters, and the convolution operation is performed with the real-time adjusted convolutional kernel parameter matrix.

[0050] The illumination state determination branch contains a learnable parameter mapping layer. The channel reset parameters are predicted and generated in real time by the parameter mapping layer based on the input tunnel segment type and illumination intensity level. It includes multiplicative scaling coefficients and additive bias coefficients corresponding to each output channel of the target convolutional layer. The parameter mapping layers corresponding to different target convolutional layers are independent of each other, and their respective mapping relationships are obtained through pre-training on tunnel scene image samples. Since the optimal convolutional kernel parameter distributions are different for different tunnel segment types and illumination intensity levels, the parameter mapping layer establishes a mapping relationship from "illumination state" to "convolutional kernel parameter adjustment amount" by learning a large number of tunnel scene samples.

[0051] After obtaining the channel reset parameters, the parameter values ​​of each output channel in the original convolution kernel parameter matrix of the target convolutional layer are multiplied by the corresponding scaling factor and then superimposed with the corresponding bias factor to obtain the adjusted convolution kernel parameter matrix.

[0052] The value of the channel reset parameter depends only on the current lighting state and is independent of the vehicle position or category content in the input image. When the lighting state changes (such as when a vehicle moves from the entrance transition section into the inner section), the channel reset parameter changes accordingly, and the convolution kernel parameter is adjusted synchronously.

[0053] This paper constructs an illumination-adaptive convolutional neural network that includes an illumination state determination branch and a feature extraction backbone network. This network dynamically adjusts the convolutional kernel parameter matrix based on the illumination state, enabling the feature extraction backbone network to adapt to different tunnel sections and illumination conditions. This dynamic adjustment of the convolutional kernel parameter matrix according to real-time illumination conditions meets the feature extraction requirements of the backbone network in different tunnel sections and under varying illumination conditions. This approach differs fundamentally from existing technologies that only adjust feature map weights through attention mechanisms after feature extraction. By addressing the problem at the convolutional kernel parameter level, this method is more thorough and efficient.

[0054] S3. Utilizing the inherent perspective geometry constraints of the fixed installation of the camera inside the tunnel, the calibration parameters of the camera and the cross-sectional dimensions of the tunnel are obtained in advance. Based on this, a mapping relationship is established between the pixel row positions in the image and the depth positions in the tunnel. The theoretical imaging size of a standard-sized vehicle at each depth position is calculated according to this mapping relationship, forming prior information on the anchor frame scale that does not change with the image content. The specific process is as follows:

[0055] The installation height, pitch angle, focal length, and tunnel cross-sectional width of the camera inside the tunnel are obtained in advance. Based on the principle of similar triangle projection, the theoretical imaging pixel width of a standard vehicle width at different depth positions along the tunnel's longitudinal direction is calculated on the target image plane. The pixels corresponding to each row position in the target image from top to bottom correspond to different depth positions from far to near. Substituting the depth position corresponding to each row position in the target image into the above calculation, the configuration basis of the anchor frame size at that row position is obtained. The configuration basis corresponding to all image row positions is summarized to form the prior constraint information of the anchor frame size. This information remains unchanged throughout the recognition process of the entire video and is not adjusted with changes in the image content of the current frame.

[0056] S4. Input the target image into the feature extraction backbone network adjusted in S2. The multi-layer convolutional layers of the feature extraction backbone network include shallow convolutional layers, deep convolutional layers and intermediate convolutional layers. The feature maps output by each convolutional layer have different resolutions and correspond to different tunnel depth positions.

[0057] The high-resolution feature maps output by the shallow convolutional layers correspond to the bottom near-field region of the target image, i.e., the near depth of the tunnel; the low-resolution feature maps output by the deep convolutional layers correspond to the top far-field region of the image, i.e., the far depth of the tunnel; and the medium-resolution feature maps output by the intermediate convolutional layers correspond to the middle-field region of the image, i.e., the middle depth of the tunnel.

[0058] The target image is input into the feature extraction backbone network, and after multiple convolution operations, the output is a multi-scale convolutional feature map consisting of low-resolution feature maps, high-resolution feature maps, and medium-resolution feature maps.

[0059] S5. Input the multi-scale convolutional feature map output from S4 into the region proposal network. The region proposal network adopts a known convolutional neural network structure and configures the anchor box size and number for different spatial locations on the multi-scale convolutional feature map according to the anchor box scale prior constraint information. Specifically, the low-resolution feature map in the multi-scale convolutional feature map is configured with a small-sized anchor box; the high-resolution feature map is configured with a large-sized anchor box; the medium-resolution feature map is configured with a medium-sized anchor box; the large-sized anchor box is larger than the medium-sized anchor box, and the medium-sized anchor box is larger than the small-sized anchor box.

[0060] Standard RPNs typically pre-set 9 anchor frames of different scales and aspect ratios at each location. This application introduces a depth prior and retains only the anchor frame scale combination that matches the depth location, which greatly reduces the number of invalid anchor frames. Therefore, the number of anchor frames configured at each location is less than the total number of anchor frames pre-set at each location in the standard regional proposal network.

[0061] Based on each anchor box configured on the multi-scale convolutional feature map, the region proposal network outputs a confidence score that the anchor box contains a vehicle target through its internal region proposal binary classification branch. Anchor boxes with confidence scores greater than a preset score threshold are selected and sorted from high to low to form a high-confidence anchor box sequence. The preset score threshold is a probability value, which is usually in the range of 0.3-0.7. In actual tunnel monitoring scenarios, it can be adjusted according to different requirements for recall and precision.

[0062] Non-maximum suppression is performed on the high-confidence anchor frame sequence. The cross-union ratio (CUP) between any two anchor frames is calculated. The CUP is the ratio of the intersection area to the union area of ​​the two anchor frames. If the CUP exceeds the preset CUP threshold, the anchor frames with lower confidence scores are removed, and the image regions corresponding to the retained anchor frames are regarded as suspected vehicle regions. The preset CUP threshold is usually in the range of 0.5-0.7. In actual tunnel monitoring scenarios, it can be adjusted according to different requirements for the number of anchor frames to be retained. When the CUP of two anchor frames exceeds the threshold, it is considered that they point to the same vehicle target. At this time, the anchor frame with lower confidence score is removed, and the anchor frame with higher confidence score is retained.

[0063] Meanwhile, the region proposal network outputs the coarse adjustment offset of the anchor frame's position through its internally set region proposal regression branch. The anchor frame's position is coarsely adjusted before the anchor frame is filtered. The coarse adjustment offset can include the center point's horizontal and vertical coordinate offset, width scaling, and height scaling.

[0064] The core task of this step is to quickly filter out areas that may contain vehicles from a large number of anchor boxes, and use these areas as input to S6 for fine-grained category determination and boundary refinement.

[0065] S6. Classify and refine the boundaries of suspected vehicle areas, and output the identification results of vehicles in the tunnel.

[0066] Features corresponding to each suspected vehicle region are extracted from the multi-scale convolutional feature map. Region of interest pooling or region of interest alignment operations are used to adjust the extracted features of each suspected vehicle region into feature vectors of a uniform size. Each feature vector is input into the detection classification branch composed of fully connected layers, and the output is the probability distribution of each suspected vehicle region belonging to each preset vehicle category. The preset vehicle categories include at least cars, buses and trucks. The category with the highest probability is taken as the category determination result of the region.

[0067] Simultaneously, each feature vector is input into the detection regression branch composed of fully connected layers, which outputs the refined offset of the bounding box of the suspected vehicle region. Based on the offset, the position and size of the bounding box of the suspected vehicle region are finely adjusted. Finally, each suspected vehicle region obtains an accurate category label and accurate bounding box coordinates, which correspond one-to-one to form a complete vehicle recognition result.

[0068] The values ​​of the various threshold parameters involved in this application can be pre-calibrated by collecting typical scene image samples of the target tunnel before system deployment, or they can be adaptively adjusted according to the actual effect during system operation. Different threshold combinations can be set for different tunnels or different camera parameters. The above description is only a preferred embodiment of the present invention; however, the scope of protection of the present invention is not limited thereto; any equivalent substitutions or modifications made by those skilled in the art within the technical scope disclosed in the present invention, based on the technical solution and its improved concept, should be covered within the scope of protection of the present invention.

Claims

1. A vehicle recognition method based on convolutional neural networks, characterized in that: Includes the following steps: S1. Acquire tunnel monitoring video images, mark them as target images, perform illumination status analysis on the target images, and determine the tunnel section type and current illumination intensity level to which the target images belong. S2. Construct an illumination-adaptive convolutional neural network, which includes an illumination state determination branch and a feature extraction backbone network. Each convolutional layer in the feature extraction backbone network has an initial training-completed original convolutional kernel parameter matrix. According to the S1 determination result, the illumination state determination branch generates channel reset parameters corresponding to each output channel of the target convolutional layer selected from multiple convolutional layers. The channel reset parameters are used to dynamically reset the original convolutional kernel parameter matrix of the target convolutional layer, and the convolution operation is performed with the real-time adjusted convolutional kernel parameter matrix. S3. Pre-acquire the calibration parameters of the tunnel camera and the cross-sectional dimensions of the tunnel, and establish the mapping relationship between the pixel row position in the image and the depth position of the tunnel. Calculate the theoretical imaging size of a standard-sized vehicle at each depth position according to the mapping relationship to form prior information on the anchor frame scale. S4. Input the target image into the feature extraction backbone network adjusted in S2, and output a multi-scale convolutional feature map after multi-layer convolution operation. S5. Input the multi-scale convolutional feature map output from S4 into the region proposal network, and configure the anchor frame size and number for different spatial locations on the multi-scale convolutional feature map according to the anchor frame scale prior constraint information to generate suspected vehicle regions. S6. Classify and refine the boundaries of the suspected vehicle area, and output the identification results of vehicles in the tunnel.

2. The vehicle recognition method based on a convolutional neural network according to claim 1, characterized in that: The method for determining the tunnel section type in S1 is as follows: The camera is fixedly positioned inside the tunnel along the tunnel's longitudinal direction, with a fixed physical spatial correspondence of its captured images. The target image is divided from top to bottom into a top distant view area, a middle mid-range view area, and a bottom close-up view area according to the pixel row direction. The top distant view area corresponds to the far distance in the tunnel's longitudinal direction, the middle mid-range view area corresponds to the middle distance in the tunnel's longitudinal direction, and the bottom close-up view area corresponds to the near distance in the tunnel's longitudinal direction. Calculate the average pixel brightness difference between the bottom foreground area and the top background area to distinguish the tunnel entrance transition section, the tunnel interior section, and the tunnel exit transition section. The method for determining the light intensity level is as follows: draw a grayscale histogram of the target image, calculate the global brightness mean and standard deviation of the histogram, trace back N-1 consecutive frames from the current frame, obtain the global brightness mean of each of the N consecutive frames including the current frame, arrange them in chronological order to form a global brightness mean sequence, and classify the light intensity level into light transient level, strong light level, normal light level or weak light level based on the global brightness mean sequence and the standard deviation of the grayscale histogram of the current frame image.

3. The vehicle recognition method based on a convolutional neural network according to claim 2, characterized in that: The illumination state determination branch in S2 includes a learnable parameter mapping layer. The channel reset parameters are generated in real time by the parameter mapping layer based on the input tunnel segment type and illumination intensity level. The parameters include multiplicative scaling coefficients and additive bias coefficients corresponding to each output channel of the target convolutional layer. The parameter mapping layers corresponding to different target convolutional layers are independent of each other. The mapping relationship of each parameter mapping layer is obtained through pre-training of tunnel scene image samples.

4. The vehicle recognition method based on a convolutional neural network according to claim 3, characterized in that: The dynamic reset method in S2 is as follows: multiply the parameter values ​​of each output channel in the original convolution kernel parameter matrix of the target convolutional layer by the corresponding scaling factor and then superimpose the corresponding bias factor to obtain the adjusted convolution kernel parameter matrix.

5. The vehicle recognition method based on a convolutional neural network according to claim 4, characterized in that: The method for forming the prior constraint information of the anchor frame size in S3 is as follows: The installation height, pitch angle, focal length parameters, and tunnel cross-sectional width of the camera inside the tunnel are obtained in advance. Based on the similar triangle projection principle, the theoretical imaging pixel width of a standard vehicle width at different depth positions along the tunnel longitudinal direction is calculated on the target image plane. The pixels corresponding to each row position in the target image from top to bottom correspond to each depth position from far to near. Substituting the depth position corresponding to each row position in the target image into the above calculation, the configuration basis of the anchor frame size at that row position is obtained. The configuration basis corresponding to all row positions in the image is summarized to form the prior constraint information of the anchor frame size.

6. The vehicle recognition method based on a convolutional neural network according to claim 5, characterized in that: The feature extraction backbone network comprises multiple convolutional layers, including shallow convolutional layers, deep convolutional layers, and intermediate convolutional layers. Each convolutional layer outputs a feature map with a different resolution and corresponds to a different tunnel depth position. The high-resolution feature map output by the shallow convolutional layer corresponds to the bottom near-field region of the target image, i.e., the near depth of the tunnel. The low-resolution feature map output by the deep convolutional layer corresponds to the top far-field region of the image, i.e., the far depth of the tunnel. The medium-resolution feature map output by the intermediate convolutional layer corresponds to the middle-field region of the image, i.e., the mid-depth of the tunnel. The target image is input into the feature extraction backbone network, and after multiple convolution operations, the output is a multi-scale convolutional feature map consisting of low-resolution feature maps, high-resolution feature maps, and medium-resolution feature maps.

7. The vehicle recognition method based on a convolutional neural network according to claim 6, characterized in that: In step S5, small-sized anchor boxes are configured for low-resolution feature maps of multi-scale convolutional feature maps; large-sized anchor boxes are configured for high-resolution feature maps; and medium-sized anchor boxes are configured for medium-resolution feature maps. The number of anchor boxes configured at each location is less than the total number of anchor boxes preset at each location by the standard region proposal network.

8. The vehicle recognition method based on a convolutional neural network according to claim 7, characterized in that: The specific method for generating suspected vehicle areas in S5 is as follows: Based on each anchor box configured on the multi-scale convolutional feature map, the region proposal network outputs a confidence score indicating the presence of a vehicle target in the anchor box through its internal region proposal binary classification branch. Anchor boxes with confidence scores greater than a preset threshold are selected and sorted from high to low to form a high-confidence anchor box sequence. Non-maximum suppression is performed on this sequence, and the intersection-union ratio (CIU) between any two anchor boxes is calculated. The CIU is the ratio of the intersection area to the union area of ​​two anchor boxes. If the CIU exceeds a preset CIU threshold, anchor boxes with lower confidence scores are removed, and the image regions of the remaining anchor boxes are considered as suspected vehicle regions.

9. The vehicle recognition method based on a convolutional neural network according to claim 8, characterized in that: Features of each suspected vehicle region are extracted from the multi-scale convolutional feature map. Region of interest pooling or region of interest alignment is used to adjust the extracted features into feature vectors of uniform size. Each feature vector is input into the detection classification branch composed of fully connected layers, and the output is the probability distribution of the suspected vehicle region belonging to the preset vehicle category. The category with the highest probability is taken as the vehicle category determination result of the suspected vehicle region. Simultaneously, each feature vector is input into the detection regression branch composed of fully connected layers, which outputs the refined offset of the bounding box of the suspected vehicle region. Based on this, the position and size of the bounding box of the suspected vehicle region are finely adjusted to obtain accurate bounding box coordinates.

Citation Information

Patent Citations

  • Vehicle recognition and tracking method based on convolutional neural networks

    CN108171112A