A method for extracting vehicle 3D size information based on CEMGM-FE-FCN
Through the CEMGM-FE-FCN algorithm, combined with the expectation maximization and feature enhancement network, it solves the difficult problem of vehicle three-dimensional dimension extraction under environmental interference and low-texture areas with traditional vision systems, achieving higher extraction accuracy and reducing computing resources. need.
Patent Information
- Application Number
- CN202111308008.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-05
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2041-11-05
AI Technical Summary
The traditional monocular vision system is difficult to accurately extract the three-dimensional size information of the vehicle in the presence of environmental interference and low-texture image areas, especially in the case of vehicle adhesion and occlusion, and the accuracy of the depth estimation algorithm in these situations is insufficient, resulting in vehicle size information Extraction costs are high.
A vehicle three-dimensional size information extraction algorithm based on CEMGM-FE-FCN is used, through the expectation maximization mixed Gaussian model and feature-enhanced fully convolutional network, combined with the Canopy algorithm and residual coding module, for shadow removal and depth estimation, and the use of high-pass filter Extract high-frequency features to achieve accurate extraction of the three-dimensional dimensions of the vehicle.
It improves the accuracy of vehicle three-dimensional size information extraction and network prediction performance, reduces shadow mask errors, enhances depth estimation accuracy in low-texture areas, and reduces computing resource requirements.
Smart Images

Figure CN114004980B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of image processing and machine learning, and is a method for extracting the three-dimensional size of a vehicle. Background Art
[0002] For the problem of extracting the three-dimensional size of a vehicle, common monocular vision systems include task-oriented vision systems, vision systems that introduce machine learning, and model-based vision systems. The traditional distance measurement method based on the vanishing point of the lane line in the image estimates the intersection of the lane line on the image based on the inclination of the lane line on the image to calculate the target distance. Since the intersection is obtained through estimation, the accuracy of the distance measurement depends on the accuracy of the estimation. In the presence of environmental interference, there are more factors to consider when extracting the three-dimensional size information of the vehicle. One of the main interferences is the adhesion and occlusion between vehicles. When the camera is not very high relative to the ground, the adhesion error cannot be ignored. At the same time, the traditional depth estimation algorithm performs poorly in image areas with low texture or texture loss. There is a scale factor between the predicted depth value and the actual depth value, and the image depth prediction accuracy needs to be improved.
[0003] With the continuous advancement of multimedia technology, a huge amount of image and video information is produced every day, among which there are a lot of materials taken from real scenes. It is difficult for these multimedia materials to fully reflect the quantitative attributes of things. At present, the staff on the highway can intuitively see whether the vehicle can pass through the height limit gate smoothly from the road monitoring video, but they cannot obtain accurate vehicle size information from it. If the size information of the traffic vehicles is to be extracted based on the road monitoring video, certain technical means must be used. It is not difficult to find that the traditional height limit gate can only qualitatively judge whether the vehicle has exceeded the limit, and it will also affect the normal passage of large vehicles such as double-decker buses and fire trucks; and the high-precision cameras and massive computing resources required by the laser radar scanning method have greatly increased the cost of extracting vehicle size information. Therefore, how to reasonably use visual intelligence technology to realize quantitative information extraction in pictures or videos is an urgent problem to be solved. Summary of the invention
[0004] In view of the problems existing in the above-mentioned prior art, the technical problem to be solved by the present invention is to provide a vehicle three-dimensional size information extraction algorithm based on CEMGM-FE-FCN. The whole process of the "CEMGM-FE-FCN" method is "Component-wise expectation-maximization for Gaussian mixtures-Feature Enhanced-Fully Convolutional Networks" (FCN for short). The specific process is as followsFigure 1 shown.
[0005] The implementation steps are as follows:
[0006] (1) Determine the image mean μ;
[0007] Divide the image into different blocks, randomly sample n pixels in each block, specify the distance thresholds T1 and T2, and use the Canopy algorithm to pre-divide the pixel intensity.
[0008] The cluster center c is roughly estimated based on the mean of Euclidean distance and Hamming distance. i , which is the initialization value of the probability distribution parameter μ;
[0009] (2) Expectation maximization;
[0010] In the expectation (E) step, the initialization value of the required parameter or the iteration value obtained after the previous iteration is substituted into the following formula;
[0011]
[0012] In the formula, z represents the latent variable, represents the jth data in the kth sub-model hidden variable, k represents the kth sub-model in the K mixed models, α k represents the mixing coefficient, that is, the probability of selecting the kth sub-model, θk represents the set of mean parameters and covariance matrix parameters, θ i ={θ 1 ,θ 2 ,…,θ k}, α i ={α 1 , α 2 , …, α k},y j represents the observed data, P(y j |θ k ) is the Gaussian distribution density of the jth data in the kth sub-model;
[0013] In the maximum (Max, M) step, the current estimated value of z calculated in step E is substituted into the formula for maximum likelihood estimation to obtain the new parameter value as follows;
[0014]
[0015] In the formula, μ k represents the estimated mean, ∑ k represents the estimated covariance matrix, α k represents the estimated mixing coefficient, n represents the number of samples, <yjm |k> represents the conditional mean, represents the sample corrected covariance;
[0016] (3) Repeat step (2) until convergence to obtain the final CEMGM model;
[0017]
[0018] θ k =(μ k ,∑ k );
[0019] In the formula, P(y|θ) represents the Gaussian distribution density of all observation data in all sub-models, P(y|θ k ) represents the Gaussian distribution density of all observation data in the kth sub-model;
[0020] (4) Determine the background color of the image, the value is represented by G;
[0021] The cluster center with the lower mean after clustering is assigned as the background color of the local area, denoted as g i ;
[0022] Similarly, randomly sample e pixels in the entire image for global clustering, and mark the cluster center with a lower mean after clustering as the initial global background color G0;
[0023] The intensity closest to the background cluster average is designated as the final global background RGB reference G;
[0024] (5) Remove shadow mask;
[0025]
[0026] In the formula, q i represents the density of the shadow at pixel i, gi represents the local background color for pixel i, and G represents the global background color;
[0027] (6) Extracting image feature information;
[0028] Residual coding, i.e. downsampling, uses the RetNet-50 network as a feature classifier to extract image features, including convolution operations, pooling operations, and 4 residual modules consisting of multiple residual units;
[0029] Conv1_x→Conv2_x→Conv3_x→Conv4_x→Conv5_x→conv;
[0030] The extracted feature map containing the feature information of the input image is input into the corresponding residual decoding module, i.e. upsampling, directly through the fast up-mapping structure, including four convolution kernels of 3×3, 3×2, 2×3, and 2×2, and then the image is subjected to four small convolutions to obtain four images, which are arranged and combined in sequence to obtain the result;
[0031] (7) Determine a depth estimation image;
[0032] Reuse the multi-scale feature maps obtained from the results of downsampling and upsampling, select the feature maps output by Conv2_x and Conv3_x during the downsampling process, and implement the feature pyramid network structure;
[0033] Use image high-pass filter to extract high-frequency features of input data;
[0034]
[0035] G(δ, ε)=H(δ, ε)F(δ, ε);
[0036] In the formula, G(δ, ε) represents the image after extracting high-frequency features, H(δ, ε) represents the high-pass filter, and D 0 represents the frequency threshold, F(δ, ε) represents the image data after Fourier transformation;
[0037] Perform a 3×3 convolution operation and merge it with the result of upsampling to output the depth estimation image and the coordinates of the vehicle corner points;
[0038] (8) Determine the three-dimensional dimensions of the vehicle l, w, h;
[0039] Combined with the camera model, the coordinates of the corner points in the vehicle's three-dimensional space are calculated;
[0040]
[0041] Where Z is the scale factor, (u, v) is the horizontal and vertical coordinates of a pixel in the pixel coordinate system, dx and dy represent the physical length of a pixel in the x and y directions on the camera photosensitive plate, and u is 0 、v 0 Respectively represent the coordinates of the center of the camera's photosensitive plate in the pixel coordinate system, θ represents the angle between the horizontal and vertical sides of the photosensitive plate, f represents the focal length, R represents the rotation matrix, t represents the translation vector, and (U, V, W) are the physical coordinates of a point in the world coordinate system corresponding to a specified point in the image;
[0042] Finally, the three-dimensional dimensions of the vehicle are obtained: l, w, and h, where l represents length, w represents width, and h represents height.
[0043] The present invention has the following advantages over the prior art:
[0044] (1) Based on the characteristic of uniform road color, the present invention adopts the EMGM method to extract shadows, and combines the Canopy algorithm to improve the defect that its accuracy depends on the initial mean value, thereby achieving a better shadow removal effect.
[0045] (2) The present invention introduces a feature pyramid structure, fuses the multi-scale feature map extracted from the residual encoding module with the residual decoding module, uses a high-pass filter to extract the high-frequency information of the input image, enriches and refines the image, can effectively preserve the features in the RGB image, and improves the network prediction performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to better understand the present invention, further description is given below in conjunction with the accompanying drawings.
[0047] Figure 1 It is a flowchart of the steps for establishing a vehicle 3D size information extraction algorithm based on CEMGM-FE-FCN;
[0048] Figure 2 It is to establish a flow chart of the vehicle 3D size information extraction algorithm based on CEMGM-FE-FCN;
[0049] Figure 3 It is a schematic diagram of the structure of the FE-FCN neural network;
[0050] Figure 4 This is the error comparison of the results of three image depth information extraction methods; Specific implementation plan
[0051] The present invention is further described in detail below through implementation cases.
[0052] The data set used in this implementation case has a total of 800 sets of samples. 160 sets of images from 5 different traffic monitoring locations are selected. 120 sets of samples are randomly selected from each of the 5 sets of data as training sets, and the remaining 40 sets are used as test sets. In the end, the total number of samples used for training is 600, and the total number of samples used for testing is 200.
[0053] The overall process of the vehicle 3D size information extraction algorithm provided by the present invention is as follows: Figure 1 As shown, the specific steps are as follows:
[0054] (1) Determine the image mean μ
[0055] The image is divided into 21×21 blocks, and 120 pixels are randomly sampled in a block, with pixel intensities of 67, 178, 207…195. Distance thresholds T1 and T2 are specified, and the Canopy algorithm is used for pre-division.
[0056] The cluster center c is roughly estimated based on the Euclidean distance i , which is the initialization value of the probability distribution parameter μ.
[0057] (2) Expectation maximization:
[0058] In step E, the initialization value of the required parameter or the iteration value obtained after the previous iteration is substituted into the following formula:
[0059]
[0060] In the formula, z represents the latent variable, k represents the kth sub-model in the K mixed models, α k represents the mixing coefficient, that is, the probability of selecting the kth sub-model, θ i ={θ 1 ,θ 2 ,…,θ k}, α i ={α 1 , α 2 , …, α k},y j represents the observed data, P(y|θ k ) is the Gaussian distribution density.
[0061] In the maximum (Max, M) step, the current estimated value of z calculated in step E is substituted into the formula for maximum likelihood estimation to obtain the new parameter value as follows;
[0062]
[0063] In the formula, μ k represents the estimated mean, ∑ k represents the estimated covariance matrix, α k represents the estimated mixing coefficient, n represents the number of samples, <y jm |k> represents the conditional mean, represents the sample corrected covariance;
[0064] (3) Repeat step (2) until convergence to obtain the final CEMGM model:
[0065]
[0066] θ k =(μ k ,∑ k )
[0067] The cluster centers 102, 188 are obtained by dividing the data into the first group of block sizes.
[0068] (4) Determine the image background color G:
[0069] The cluster center with the lower mean after clustering, i.e. 102, is assigned as the background color of the local area, denoted as v 1 .
[0070] Similarly, 1000 pixels are randomly sampled in the entire image for global clustering, and the cluster center with a lower mean after clustering is marked as the initial global background color G0.
[0071] The intensity 108 closest to the background cluster mean is designated as the final global background RGB reference G.
[0072] (5) Remove the shadow mask:
[0073]
[0074] In the formula, q i represents the density of the shadow at pixel i, g i represents the local background color for pixel i, and G represents the global background color. i and q i The values are 102, 34, 96…115 and 0.04, 0.50, 0.08…-0.05 respectively.
[0075] (6) Extract image feature information:
[0076] Residual coding, i.e. downsampling, uses the RetNet-50 network as a feature classifier to extract image features, including convolution operations, pooling operations, and 4 residual modules consisting of multiple residual units.
[0077] Conv1_x→Conv2_x→Conv3_x→Conv4_x→Conv5_x→conv
[0078] The extracted feature map containing the feature information of the input image is input into the corresponding residual decoding module, that is, upsampling, directly through the fast up-mapping structure, including four sizes of convolution kernels, namely 3×3, 3×2, 2×3, and 2×2. The image is then subjected to four small convolutions to obtain four images, which are arranged and combined in order to obtain the result.
[0079] (7) Determine the depth estimation image:
[0080] The multi-scale feature maps obtained from the results of downsampling and upsampling are reused, and the feature maps output by Conv2_x and Conv3_x in the downsampling process are selected to realize the feature pyramid network structure.
[0081] Use an image high-pass filter to extract high-frequency features of the input data:
[0082]
[0083] G(δ,ε)=H(δ,ε)F(δ,ε)
[0084] In the formula, G(δ, ε) represents the image after extracting high-frequency features, H(δ, ε) represents the high-pass filter, and D 0 represents the frequency threshold, and F(δ, ε) represents the image data after Fourier transformation.
[0085] Perform a 3×3 convolution operation and fuse it with the result from upsampling to output a depth estimation image and the pixel coordinates of the vehicle corner points.
[0086] (8) Determine the three-dimensional dimensions of the vehicle:
[0087] Combined with the camera model, the coordinates of the corner points in the vehicle's three-dimensional space are calculated:
[0088]
[0089] Where Z is the scale factor, (u, v) is the pixel coordinate of a point in the pixel coordinate system, dx and dy represent the physical length of a pixel in the x and y directions on the camera photosensitive plate, and u is 0 、v 0 They represent the coordinates of the center of the camera's photosensitive plate in the pixel coordinate system, θ represents the angle between the horizontal and vertical edges of the photosensitive plate, f represents the focal length, R represents the rotation matrix, t represents the translation vector, and (U, V, w) are the physical coordinates of the point in the world coordinate system.
[0090] Finally, the three-dimensional dimensions of the vehicle are obtained: length l is 4640mm, width w is 1830mm, and height h is 1690mm.
[0091] In order to verify the accuracy of the present invention in estimating the depth information of the image, the following indicators are used to quantify the effect and compare it with the method before improvement. It can be seen that the FE-FCN method and the CEMGM-FE-FCN method have small prediction errors and good results in depth estimation.
[0092]
Claims
1. A method for extracting vehicle three-dimensional size information based on CEMGM-FE-FCN, characterized by: (1) Determine the image mean μ, (2) maximize expectation, (3) iterate to obtain the final CEMGM model, (4) determine the image background color G, (5) remove the shadow mask, (6) extract image feature information, (7) determine the depth estimation image, (8) determine the three-dimensional size of the vehicle l, w, h; specifically, it includes the following eight steps; The implementation steps are as follows: (1) Determine the image mean μ; Divide the image into different blocks, randomly sample n pixels in each block, specify the distance thresholds T1 and T2, and use the Canopy algorithm to pre-divide the pixel intensity. The cluster center c is roughly estimated based on the mean of Euclidean distance and Hamming distance. i , which is the initialization value of the probability distribution parameter μ; (2) Expectation maximization; In the expectation (E) step, the initialization value of the required parameter or the iteration value obtained after the previous iteration is substituted into the following formula; In the formula, z represents the latent variable, represents the jth data in the kth sub-model hidden variable, k represents the kth sub-model in the K mixed models, α k represents the mixing coefficient, that is, the probability of selecting the kth sub-model, θk represents the set of mean parameters and covariance matrix parameters, θ i ={θ1,θ2,…,θ k }, α i ={α1,α2,…,α k },y j represents the observed data, P(y j |θ k ) is the Gaussian distribution density of the jth data in the kth sub-model; In the maximum (Max, M) step, the current estimated value of z calculated in step E is substituted into the formula for maximum likelihood estimation to obtain the new parameter value as follows; In the formula, μ k represents the estimated mean, ∑ k represents the estimated covariance matrix, α k represents the estimated mixing coefficient, n represents the number of samples, <y jm |k> represents the conditional mean, represents the sample corrected covariance; (3) Repeat step (2) until convergence to obtain the final CEMGM model; i k =(μ k ,∑ k ); In the formula, P(y|θ) represents the Gaussian distribution density of all observation data in all sub-models, P(y|θ k ) represents the Gaussian distribution density of all observation data in the kth sub-model; (4) Determine the background color of the image, the value is represented by G; The cluster center with the lower mean after clustering is assigned as the background color of the local area, denoted as g i ; Similarly, randomly sample e pixels in the entire image for global clustering, and mark the cluster center with a lower mean after clustering as the initial global background color G0; The intensity closest to the background cluster average is designated as the final global background RGB reference G; (5) Remove shadow mask; In the formula, q i represents the density of the shadow at pixel i, g i represents the local background color for pixel i, and G represents the global background color; (6) Extracting image feature information; Residual coding, i.e. downsampling, uses the RetNet-50 network as a feature classifier to extract image features, including convolution operations, pooling operations, and 4 residual modules consisting of multiple residual units; Conv1_x→Conv2_x→Conv3_x→Conv4_x→Conv5_x→conv; The extracted feature map containing the feature information of the input image is input into the corresponding residual decoding module, i.e. upsampling, directly through the fast up-mapping structure, including four convolution kernels of 3×3, 3×2, 2×3, and 2×2, and then the image is subjected to four small convolutions to obtain four images, which are arranged and combined in sequence to obtain the result; (7) Determine a depth estimation image; Reuse the multi-scale feature maps obtained from the results of downsampling and upsampling, select the feature maps output by Conv2_x and Conv3_x during the downsampling process, and implement the feature pyramid network structure; Use image high-pass filter to extract high-frequency features of input data; G(δ, ε)=H(δ, ε)F(δ, ε); In the formula, G(δ, ε) represents the image after high-frequency features are extracted, H(δ, ε) represents the high-pass filter, D0 represents the frequency threshold, and F(δ, ε) represents the image data after Fourier transformation; Perform a 3×3 convolution operation and merge it with the result of upsampling to output the depth estimation image and the coordinates of the vehicle corner points; (8) Determine the three-dimensional dimensions of the vehicle l, w, h; Combined with the camera model, the coordinates of the corner points in the vehicle's three-dimensional space are calculated; Where Z is the scale factor, (u, v) are the horizontal and vertical coordinates of a pixel in the pixel coordinate system, dx and dy represent the physical length of a pixel on the camera photosensitive plate in the x and y directions, u0 and v0 represent the coordinates of the center of the camera photosensitive plate in the pixel coordinate system, θ represents the angle between the horizontal and vertical sides of the photosensitive plate, f represents the focal length, R represents the rotation matrix, t represents the translation vector, and (U, V, W) are the physical coordinates of a point in the world coordinate system corresponding to a specified point in the image; Finally, the three-dimensional dimensions of the vehicle are obtained: l, w, and h, where l represents length, w represents width, and h represents height.
