Vehicle re-identification method, computer equipment and storage medium for road traffic
In the vehicle re-identification method, the multi-scale feature difference and significance analysis of multi-frame images are used to optimize the frequency tuning algorithm and obtain significant images with multi-scale fusion, which solves the problem of insufficient feature extraction accuracy in traditional methods and improves the accuracy of vehicle re-identification.
Patent Information
- Application Number
- CN202411596315.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-11-11
AI Technical Summary
In the complex road traffic scenarios, traditional vehicle re-identification methods fail to fully utilize the feature correlation between adjacent frame images, resulting in low accuracy of vehicle details feature extraction, affecting the accuracy of identification results.
By acquiring the multi-frame images of the vehicle at each angle, downsampling and multi-scale division, determining the feature difference values between adjacent frame images, combining the change values and highlight values of local significant features, optimizing the Gaussian smoothing parameters in the frequency tuning algorithm, obtaining the significant images of multi-scale fusion, and finally using a neural network for vehicle re-identification.
The accuracy of feature extraction during vehicle re-identification is improved and the accuracy of vehicle re-identification results is enhanced. Especially when the vehicle models are the same or similar, it can better deal with local detailed feature differences caused by decoration and modification.
Smart Images

Figure CN119152451B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image recognition technology, and in particular to a vehicle re-identification method, computer equipment and storage medium for road traffic. Background Art
[0002] Vehicle re-identification is an image retrieval task that aims to find all vehicles with the same identity as the query vehicle from a given query set of vehicles in an image library captured by different cameras. In recent years, with the release of multiple large-scale datasets, the continuous innovation of deep learning technology, and the significant improvement of hardware device performance, the vehicle re-identification network model based on deep learning has achieved rapid development. Vehicle re-identification has become an indispensable part of intelligent transportation and smart city construction.
[0003] However, vehicle re-identification is a process of identifying target vehicles through multi-angle feature comparison in complex road traffic scenarios. As the number of vehicles of the same model increases, the importance of subtle differences between vehicles increases accordingly. Traditional vehicle re-identification methods usually do not fully utilize the feature associations between adjacent frame images, resulting in low accuracy in extracting detailed features in the image of the vehicle to be identified, which in turn affects the accuracy of vehicle re-identification in road traffic. Summary of the invention
[0004] In view of the above, it is necessary to provide a vehicle re-identification method for road traffic, a computer device and a storage medium, which improves the accuracy of feature extraction in the vehicle re-identification process, and thus improves the accuracy of the vehicle re-identification result, compared with the traditional vehicle re-identification method for road traffic:
[0005] In a first aspect, an embodiment of the present application provides a vehicle re-identification method for road traffic, the method comprising the following steps:
[0006] Obtain multiple frames of images of any vehicle at various angles, and perform downsampling and multi-scale division on each frame of the image;
[0007] Determine the feature difference value between any two adjacent frames of images at each scale based on the difference in grayscale distribution between any two adjacent frames of images at each angle;
[0008] Determine the change value of the local significant feature of all images at each angle at each scale based on the similarity of the feature difference value corresponding to each scale and all other scales at each angle;
[0009] Determine, based on the difference in the change value of the local significant feature between each angle and all other angles, the prominence value of the significant detail feature in all images at each angle at each scale;
[0010] Based on the salient values with significant detail features, optimizing the value of the Gaussian smoothing parameter in the frequency tuning algorithm;
[0011] The optimized frequency tuning algorithm is used to obtain the saliency map of each frame image at each scale, and the multi-scale fused saliency image of each frame image is obtained by combining the distribution of the saliency values at all scales of each frame image;
[0012] Based on all frame images of any vehicle at all angles and the salient image, a re-identification result of any vehicle is obtained by using a neural network.
[0013] In one embodiment, the process of determining the feature difference value is as follows:
[0014] The inter-frame difference method is used to obtain the difference image between any two adjacent frames of images at any angle and at any scale;
[0015] Obtaining a pixel point with a gray value of 1 in the differential image, and recording a pixel point in the same position as the pixel point with a gray value of 1 in any two adjacent frames of images as a moving pixel point;
[0016] Calculate the difference in grayscale values within the neighborhood of the moving and changing pixel points at the same position in any two adjacent frames of images, and record it as the image difference;
[0017] The discrete degrees of the image differences at all the same positions in the any two adjacent frames of images are used as the feature difference values between the any two adjacent frames of images at the any scale.
[0018] In one embodiment, the process of determining the change value of the local significant feature is as follows:
[0019] All the feature difference values corresponding to each scale at each angle are used to form a comparison feature vector at each scale at each angle;
[0020] Calculate the similarity of the comparison feature vector between each scale and the remaining scales at each angle;
[0021] The change value of the local significant feature is proportional to the modulus of the contrast feature vector and inversely proportional to the similarity.
[0022] In one embodiment, the expression of the prominent value having significant detail features is:
[0023] ; In the formula, Indicates that all images at the vth angle have a prominent value of significant detail features at the xth scale; , Respectively represent the change value of the local significant features of all images at the vth angle and the dth angle at the xth scale; exp( ) represents an exponential function with a natural constant as the base; m represents the number of angles; represents the absolute value function.
[0024] In one embodiment, the process of optimizing the value of the Gaussian smoothing parameter in the frequency tuning algorithm is as follows:
[0025] Normalizing the prominence values of the significant detail features of the images at all angles at any scale;
[0026] The optimized value of the Gaussian smoothing parameter of the image at any scale at each angle is positively correlated with the preset initial value of the Gaussian smoothing parameter, and is negatively correlated with the normalized result of the prominent value of the significant detail feature of the image at each angle at any scale.
[0027] In one embodiment, the method for acquiring the salient image is:
[0028] Calculate the sum of the salient values at all scales in each frame image;
[0029] Calculate the proportion of the protrusion value in the sum value at each scale in each frame image;
[0030] The proportion is used as the weight of the salient map of each frame image at each scale, and a feature fusion algorithm is used to fuse the salient maps of each frame image at all scales to obtain a multi-scale fused salient image of each frame image.
[0031] In one embodiment, the process of obtaining the re-identification result is:
[0032] Obtain the salient images of all vehicle images in the open source dataset;
[0033] Training a neural network based on all vehicle images and the salient images in the open source dataset;
[0034] Based on all images of the any vehicle and the salient image thereof, a re-identification result of the any vehicle is obtained using a trained neural network.
[0035] In one embodiment, the re-identification result is a similarity measurement value between the any vehicle and the vehicles in the open source dataset.
[0036] In a second aspect, an embodiment of the present application provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the vehicle re-identification method for road traffic as described in the first aspect when executing the computer program.
[0037] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the vehicle re-identification method for road traffic as described in the first aspect is implemented.
[0038] This application has at least the following beneficial effects:
[0039] The present application analyzes the phenomenon that when taking vehicle images in road traffic, the decoration or modification between different vehicles leads to large differences in local detail features between vehicles. Based on the difference in grayscale distribution at each scale between any two adjacent frames of images at each angle, the feature difference value at each scale between the two adjacent frames of images is determined, and based on the similarity between the feature difference values corresponding to each scale at each angle and all other scales, the change value of the local significant features of all images at each angle at each scale is determined; the change difference of the local detail features of the vehicle at different positions taken at the same angle is fully considered, and the local detail features of the vehicle image at each scale are accurately analyzed;
[0040] Further, based on the difference in the change value of the local significant feature between each angle and all other angles, the prominent value of all images at each angle with significant detail features at each scale is determined; based on the prominent value with significant detail features, the value of the Gaussian smoothing parameter in the frequency tuning algorithm is optimized; and the multi-scale fused significant image of each frame image is obtained; the vehicle images at different scales are analyzed for significance by the prominent value, and a higher weight is given to the salient map at the scale with more obvious local detail feature information during multi-scale fusion, so as to improve the accuracy of the multi-scale fused significant image;
[0041] Furthermore, vehicle re-identification is performed based on multi-scale fused salient images, which fully takes into account the fact that when the vehicle models are the same or similar, the local detail features of the vehicles may differ greatly due to decoration and modification, and uses the salient image obtained based on this feature as an additional input feature for vehicle re-identification, thereby improving the accuracy of feature extraction in the vehicle re-identification process and thus improving the accuracy of the vehicle re-identification results. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0043] Figure 1A flowchart of a method for re-identifying a vehicle for road traffic provided by an embodiment of the present application;
[0044] Figure 2 Schematic diagram of the process of determining the feature difference value;
[0045] Figure 3 is a schematic diagram of the process of determining the change value;
[0046] Figure 4 Schematic diagram of the process of determining a salient image of multi-scale fusion;
[0047] Figure 5 It is a salient image of multi-scale fusion. DETAILED DESCRIPTION
[0048] In the description of the embodiments of the present application, words such as "exemplary", "or", "for example" and the like are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "or", "for example" and the like is intended to present related concepts in a concrete manner.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art in the present application. The terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. It should be understood that, unless otherwise specified, " / " means or.
[0050] It should also be noted that the terms "first" and "second" in the present application are used to distinguish similar objects rather than to describe a specific order or sequence.
[0051] The specific scheme of the vehicle re-identification method for road traffic, computer equipment and storage medium provided by the present application is described in detail below with reference to the accompanying drawings.
[0052] See also Figure 1 , which shows a flowchart of a method for re-identifying a vehicle for road traffic provided by an embodiment of the present application, the method comprising the following steps:
[0053] Step 1: obtain multiple frames of images of any vehicle at various angles, and downsample and divide each frame of the image into multiple scales.
[0054] The images of vehicles are captured by cameras arranged in road traffic. Since the process of identifying a single vehicle requires comprehensive judgment and analysis of vehicle images captured at multiple positions, for each vehicle that needs to be re-identified, vehicle images captured by cameras at multiple positions are obtained. All vehicle images captured by the camera at each position are taken as vehicle images at the same angle, and k frames of vehicle images are continuously acquired at each angle.
[0055] In this embodiment, vehicle images taken by cameras adjacent to each other at 10 positions are obtained, and the height of all cameras is 3.5m, that is, the distance between the camera and the ground. The number and height of the cameras are preset manually and can be set by the implementer. This application does not impose any special restrictions.
[0056] In this embodiment, the value of k is 5, and the acquisition time interval between two adjacent frames of images is 1s. The values of k and the time interval are preset manually and can be set by the implementer. This application does not impose any special restrictions.
[0057] Since the detailed features of the vehicle in the vehicle images taken from different angles are different, and due to the movement of the vehicle, the detailed features of multiple frames of vehicle images taken at the same angle at different scales are also different. Therefore, in order to avoid the problem of large feature extraction errors of vehicle images at different angles due to differences in local detailed features during vehicle re-identification, the present application performs multi-scale division on each frame image at each angle, specifically: using a down-sampling scale division method to divide each frame image into scales according to a resolution ratio of 4:2:1, for example, if the resolution of the image is 1000×1000, the resolution of each scale after division is 1000×1000, 500×500 and 250×250 respectively; therefore, each frame image at each angle corresponds to an image of three scales.
[0058] Step 2: Perform frame-to-frame comparative analysis on the images taken at each angle of the vehicle to be identified, and obtain the change value of the local significant features at each scale during the vehicle re-identification process; based on the change value at each angle, perform comparative analysis on the features at different angles, and obtain the prominent value of the significant detail features of the vehicle to be identified at each angle, and obtain the salient map of the image at each scale based on the prominent value.
[0059] Nowadays, with the increase in the number of cars of the same model, in the process of vehicle re-identification based on road traffic images, if the license plate number in the collected image is blocked, blurred or duplicated, it will affect the recognition result of the vehicle based on the license plate; and when performing recognition analysis based on the characteristics of the vehicle itself, there is a problem of "large similarity within the class and large difference between classes", that is, it is more difficult to recognize the features of similar or identical models, and it is less difficult to recognize the features of vehicles with large differences in models; however, due to different vehicle usage conditions and different situations of simple decoration or modification of the vehicles, there will be large differences in the local detail features between vehicles. Therefore, in the process of vehicle re-identification, the local detail features between vehicles can be highlighted to avoid the problem of large errors in recognition of vehicle feature differences.
[0060] Based on the above analysis, taking any vehicle as an example, images of the vehicle taken at different angles are obtained, and each frame image at each angle is scaled to compare the prominent change differences of local detail features at different positions at each angle; based on the prominent change features at each angle, the salient features at different angles are compared and analyzed, and the salient map at each angle is obtained based on the analysis results. The specific calculation and analysis process is as follows:
[0061] Step 2.1, based on the difference in grayscale distribution at each scale between any two adjacent frames of images at each angle, determine the feature difference value at each scale between the any two adjacent frames of images.
[0062] During the actual shooting process, the parts on the vehicle with significant differences are decorated or modified parts, and their features are different at different positions at the same angle. Therefore, the local features in the vehicle image at the same angle are analyzed to highlight the changing characteristics of the local details of the vehicle at the same angle, which can effectively analyze the vehicle features with significant differences during the vehicle re-identification process.
[0063] Specifically, for images taken at each angle in road traffic, the inter-frame difference method is used to obtain a differential image at any scale between any two adjacent frames of images at any angle, and the differential image is a binary image, which reflects whether there are moving and changing pixels between any two adjacent frames of images at any angle at any scale. The pixel points with a gray value of 1 in the differential image are obtained, and the pixel points at the same position as the pixel points with a gray value of 1 in the two adjacent frames of images are recorded as moving and changing pixels; wherein, the inter-frame difference method is a well-known technology and will not be described in detail in this application.
[0064] In order to further highlight the difference in local feature changes at any scale between all two adjacent frames of images at any angle, for each frame of the any two adjacent frames of images, a square window of a preset length is constructed with each moving change pixel point as the center, and the difference between all grayscale values in the square window of the moving change pixel points at the same position in the any two adjacent frames of images is calculated, and recorded as the image difference; the larger the value of the image difference, the more significant the difference in feature changes at any scale when the decorative or modified part of the vehicle moves at any angle when performing local feature comparison based on the difference between frames.
[0065] In this embodiment, the value of the preset length is 11. The value of the preset length is preset manually and can be set by the implementer. This application does not impose any special restrictions.
[0066] In this embodiment, the image difference is a SAD (Sum of Absolute Differences) value. As other implementation methods, based on the difference between the grayscale values in the measurable square window, the implementer may use other existing technologies for measurement, such as MAD (Mean Absolute Differences) value, SSD (Sum of Squared Differences) value, etc. This application does not impose any special restrictions.
[0067] Furthermore, considering the influence of illumination changes and vehicle surface reflection in the actual shooting scene, the vehicle images shot at the same angle have feature differences at different scales; the discrete degree of the image difference between all the same positions in any two adjacent frames of images is used as the feature difference value between any two adjacent frames of images at any scale. The larger the feature difference value, the more significant the difference in local feature changes of the vehicle at different positions at the same angle and scale. The schematic diagram of the feature difference value determination process is shown in the figure. Figure 2 shown.
[0068] In this embodiment, the degree of discreteness of image differences is the coefficient of variation. As other implementation methods, on the basis of the measurable degree of uneven distribution of image differences, the implementer may use other existing technologies for measurement, such as standard deviation, variance, etc., and this application does not impose any special restrictions.
[0069] Step 2.2, based on the similarity of the feature difference values corresponding to each scale at each angle and all other scales, determine the change values of the local significant features of all images at each angle at each scale.
[0070] The feature difference values between any two adjacent frames of images at each angle at each scale are used to form the contrast feature vectors at each scale at each angle; based on the similarity between the contrast feature vectors at each scale at each angle and all other scales, the change values of the local significant features of all images at each angle at each scale are determined, and the expression is:
[0071] ; In the formula, Represents the change value of the local significant features of all images at the vth angle at the xth scale; and They represent the contrast feature vectors of the xth scale and the ith scale at the vth angle, respectively; Y( ) represents the similarity function; exp[ ] represents the exponential function with a natural constant as the base; n represents the number of scale types at each angle; Represents the modulus length function.
[0072] In this embodiment, the similarity between vectors is cosine similarity. As other implementation methods, based on the measurable similarity between vectors, the implementer may use other existing technologies for measurement, such as the reciprocal of the Euclidean distance, the reciprocal of the DTW distance between sequences of vectors arranged in time sequence, etc. This application does not impose any special restrictions.
[0073] It should be noted that: if the calculated change value is larger, it means that the local feature change difference of the image at the vth angle at the xth scale is more significant, that is, the difference in vehicle feature information reflected at the xth scale is more significant. The flow chart of determining the change value is as follows Figure 3 shown.
[0074] Step 2.3, based on the difference in the change value of the local significant feature between each angle and all other angles, determine the prominence value of the significant detail feature in all images at each angle at each scale.
[0075] Based on the above analysis, a comparative analysis is conducted on the changes in inter-frame feature differences between different scales at each angle. The analysis results reflect the significant differences in the changes in local detail features of the vehicle at different scales at each angle. Furthermore, considering that at different angles, the changes in local feature differences presented by the vehicle at the same scale may be different, that is, the greater the difference in local feature changes of the vehicle at different angles at the same scale, the more obvious the changes in vehicle features reflected when performing feature analysis of different angles of the vehicle at the current scale.
[0076] Furthermore, based on the difference in the change value between each angle and all other angles at each scale, the prominent value of all images at each angle having significant detail features at each scale is determined, and the expression is:
[0077] ; In the formula, Indicates that all images at the vth angle have a prominent value of significant detail features at the xth scale; , Respectively represent the change value of the local significant features of all images at the vth angle and the dth angle at the xth scale; exp( ) represents an exponential function with a natural constant as the base; m represents the number of angles; represents the absolute value function.
[0078] It should be noted that the larger the calculated prominence value is, the more significant the local detail features reflected by the current scale at the vth angle are, through the comparative analysis of the changes in local features of the image of the same scale at different angles.
[0079] Step 2.4, based on the prominent value with significant detail features, optimize the value of the Gaussian smoothing parameter in the frequency tuning algorithm.
[0080] For the detail feature analysis results of the image at each angle at each scale, saliency detection analysis is performed on the images at different scales. Specifically, a frequency-tuned (FT) algorithm is used to obtain the saliency map of each frame image at each scale, wherein the value of the Gaussian smoothing parameter in the FT algorithm is determined by the saliency value of the image at each angle at each scale, that is, the more prominent the local detail features at each scale, the smaller the Gaussian smoothing parameter is selected to highlight the detail features, thereby improving the accuracy of feature extraction in the subsequent vehicle re-identification process.
[0081] The salience values of the salient detail features of the images at all angles at any scale are normalized.
[0082] In this embodiment, the Min-Max normalization method is used to normalize the salient values. As other implementation methods, on the basis of being able to normalize the salient values, the implementer may use other existing technologies to normalize the salient values, such as the Z-Score normalization method, the decimal calibration normalization method, etc., and this application does not impose any special restrictions.
[0083] Furthermore, based on the prominent values of significant detail features of all images at all angles at all scales, the value of the Gaussian smoothing parameter is optimized and adjusted, and the expression is:
[0084] ; In the formula, represents the optimized value of the Gaussian smoothing parameter of the x-th scale image at the v-th angle; Indicates the preset initial value of the Gaussian smoothing parameter; The normalized result of the salient value of the image with significant detail features at the xth scale at the vth angle; The preset value is greater than 1 to avoid the optimization value of the Gaussian smoothing parameter being too small. The value of is preset by humans and can be set by the implementer. The value of is 1.5.
[0085] In this embodiment, the preset initial value of the Gaussian smoothing parameter is 1.5. The preset initial value of the Gaussian smoothing parameter is preset manually. On the basis of satisfying that the preset initial value of the Gaussian smoothing parameter is greater than 0, the implementer can set it by himself, and this application does not impose any special restrictions.
[0086] Step 3: Obtain a multi-scale fused salient image of each frame image, and re-identify the vehicle to be identified based on the image of the vehicle to be identified and its salient image.
[0087] Step 3.1, using the optimized frequency tuning algorithm to obtain the saliency map of each frame image at each scale, and combining the distribution of the saliency value at all scales of each frame image to obtain a multi-scale fused saliency image of each frame image.
[0088] For each frame image at each angle obtained in the process of vehicle re-identification for road traffic, the sum of the salient values at all scales of each frame image is calculated, and the proportion of the salient values at each scale of each frame image in the sum is calculated; the larger the proportion, the more obvious the local detail feature information of the vehicle reflected by the salient map at each scale; the proportion is used as the weight of the salient map of each frame image at each scale, and the cascade feature fusion algorithm is used to fuse the salient maps of each frame image at all scales to obtain a multi-scale fused salient image of each frame image. The schematic diagram of the process of determining the multi-scale fused salient image is shown in the figure. Figure 4 The multi-scale fusion salient image is shown in Figure 5 As shown in the figure, a, b and c represent salient images at different scales respectively, d is a multi-scale fused salient image, and the cascade feature fusion algorithm is a technology well known to those skilled in the art, and the specific calculation process will not be repeated here.
[0089] Step 3.2, based on all frame images of any vehicle at all angles and the salient image, a neural network is used to obtain a re-identification result of any vehicle.
[0090] Furthermore, the process of re-identifying the vehicle using the Re-ID technology based on residual neural network is as follows:
[0091] S1, obtaining images of all vehicles in the VeRi-776 dataset and generating the salient images of these images.
[0092] S2, adopting a neural network architecture based on a residual neural network as the basis of a vehicle re-identification model; determining an input layer of the vehicle re-identification model, capable of receiving a vehicle image and its salient image.
[0093] S3, select the triplet loss function as the optimization target; determine the selection strategy of anchor samples, positive samples and negative samples in the triplet loss function.
[0094] S4, input the vehicle images and the salient images in the VeRi-776 dataset into the vehicle re-identification model; use the triplet loss function to calculate the loss value between the current vehicle re-identification model output and the expected output; update the model parameters through the back propagation algorithm to minimize the loss value; repeat the training process until the model converges or reaches a predetermined number of training rounds. Among them, the VeRi-776 dataset is an open source dataset, and implementers can select other existing vehicle re-identification datasets.
[0095] The salient image is used as an additional feature input in the above process to highlight the key areas and important features of the vehicle, assisting the Re-ID technology to better extract vehicle features, thereby improving the accuracy of re-identification. The collected vehicle image to be identified and its salient image are processed using the trained vehicle re-identification model to obtain the re-identification result of the vehicle to be identified, and the re-identification result is specifically a similarity measurement value between the vehicle to be identified and the vehicle in the data set. Since the Re-ID technology based on residual neural network is a well-known technology in the field of vehicle re-identification, this application will not elaborate on its specific identification process in detail.
[0096] It should be noted that re-identifying a vehicle based on a residual neural network is only one embodiment of the present application. As other implementation methods, implementers may also adopt other existing technologies for vehicle re-identification, such as convolutional neural networks, graph neural networks, etc. This application does not impose any special restrictions.
[0097] In this embodiment, the similarity measurement value between vehicles is Euclidean distance. As other implementation methods, on the basis of measurable similarity between vehicles, implementers can use other existing technologies to measure the similarity between vehicles, such as Manhattan distance, cosine similarity, etc., and this application does not impose any special restrictions.
[0098] Based on the same inventive concept as the above method, an embodiment of the present application also provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of any one of the above-mentioned vehicle re-identification methods for road traffic are implemented.
[0099] Based on the same inventive concept as the above method, a computer-readable storage medium is proposed, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the vehicle re-identification method for road traffic as described in the first aspect is implemented. Its specific functions and technical effects can be found in the method embodiment section, which will not be repeated here.
[0100] In summary, the present application analyzes the phenomenon that when taking vehicle images in road traffic, the decoration or modification between different vehicles leads to large differences in local detail features between vehicles. Based on the difference in grayscale distribution at each scale between any two adjacent frames of images at each angle, the feature difference value at each scale between the two adjacent frames of images is determined, and based on the similarity between the feature difference values corresponding to each scale at each angle and all other scales, the change value of the local significant features of all images at each angle at each scale is determined; the change difference of the local detail features of the vehicle at different positions taken at the same angle is fully considered, and the local detail features of the vehicle image at each scale are accurately analyzed;
[0101] Further, based on the difference in the change value of the local significant feature between each angle and all other angles, the prominent value of all images at each angle with significant detail features at each scale is determined; based on the prominent value with significant detail features, the value of the Gaussian smoothing parameter in the frequency tuning algorithm is optimized; and the multi-scale fused significant image of each frame image is obtained; the vehicle images at different scales are analyzed for significance by the prominent value, and a higher weight is given to the salient map at the scale with more obvious local detail feature information during multi-scale fusion, so as to improve the accuracy of the multi-scale fused significant image;
[0102] Furthermore, vehicle re-identification is performed based on multi-scale fused salient images, which fully takes into account the fact that when the vehicle models are the same or similar, the local detail features of the vehicles may differ greatly due to decoration and modification, and uses the salient image obtained based on this feature as an additional input feature for vehicle re-identification, thereby improving the accuracy of feature extraction in the vehicle re-identification process and thus improving the accuracy of the vehicle re-identification results.
[0103] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
[0104] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the basic features of the present application. Therefore, no matter from which point of view, the above embodiments of the present application should be regarded as exemplary and non-restrictive.
Claims
1. A vehicle re-identification method for road traffic, characterized in that: The method comprises the following steps: Obtain multiple frames of images of any vehicle at various angles, and perform downsampling and multi-scale division on each frame of the image; Determine the feature difference value between any two adjacent frames of images at each scale based on the difference in grayscale distribution between any two adjacent frames of images at each angle; Determine the change value of the local significant feature of all images at each angle at each scale based on the similarity of the feature difference value corresponding to each scale and all other scales at each angle; Determine, based on the difference in the change value of the local significant feature between each angle and all other angles, the prominence value of the significant detail feature in all images at each angle at each scale; Based on the salient values with significant detail features, optimizing the value of the Gaussian smoothing parameter in the frequency tuning algorithm; The optimized frequency tuning algorithm is used to obtain the saliency map of each frame image at each scale, and the multi-scale fused saliency image of each frame image is obtained by combining the distribution of the saliency values at all scales of each frame image; Based on all frame images of the any vehicle at all angles and the salient image, using a neural network to obtain a re-identification result of the any vehicle; The expression of the change value of the local significant features of all images at each angle at each scale is: ; In the formula, Represents the change value of the local significant features of all images at the vth angle at the xth scale; and They represent the contrast feature vectors of the xth scale and the ith scale at the vth angle respectively, Y() represents the similarity function; exp[] represents the exponential function with a natural constant as the base; n represents the number of scale types at each angle; represents the modulus length function; The expression of the prominent value with significant detail features is: ; In the formula, Indicates that all images at the vth angle have a prominent value of significant detail features at the xth scale; , Respectively represent the change values of the local significant features of all images at the vth angle and the dth angle at the xth scale; exp() represents an exponential function with a natural constant as the base; m represents the number of angles; represents the absolute value function.
2. The vehicle re-identification method for road traffic according to claim 1, characterized in that: The process of determining the characteristic difference value is as follows: The inter-frame difference method is used to obtain the difference image between any two adjacent frames of images at any angle and at any scale; Obtaining a pixel point with a gray value of 1 in the differential image, and recording a pixel point in the same position as the pixel point with a gray value of 1 in any two adjacent frames of images as a moving pixel point; Calculate the difference in grayscale values within the neighborhood of the moving and changing pixel points at the same position in any two adjacent frames of images, and record it as the image difference; The discrete degrees of the image differences at all the same positions in the any two adjacent frames of images are used as the feature difference values between the any two adjacent frames of images at the any scale.
3. The vehicle re-identification method for road traffic as claimed in claim 2, characterized in that: The process of selecting the value of the Gaussian smoothing parameter in the optimization frequency tuning algorithm is as follows: Normalizing the prominence values of the significant detail features of the images at all angles at any scale; The optimized value of the Gaussian smoothing parameter of the image at any scale at each angle is positively correlated with the preset initial value of the Gaussian smoothing parameter, and is negatively correlated with the normalized result of the prominent value of the significant detail feature of the image at each angle at any scale.
4. The vehicle re-identification method for road traffic as claimed in claim 1, characterized in that: The method for obtaining the salient image is: Calculate the sum of the salient values at all scales in each frame image; Calculate the proportion of the protrusion value in the sum value at each scale in each frame image; The proportion is used as the weight of the salient map of each frame image at each scale, and a feature fusion algorithm is used to fuse the salient maps of each frame image at all scales to obtain a multi-scale fused salient image of each frame image.
5. The vehicle re-identification method for road traffic as claimed in claim 1, characterized in that: The process of obtaining the re-identification result is as follows: Obtain the salient images of all vehicle images in the open source dataset; Training a neural network based on all vehicle images and the salient images in the open source dataset; Based on all images of the any vehicle and the salient image thereof, a re-identification result of the any vehicle is obtained using a trained neural network.
6. The vehicle re-identification method for road traffic as claimed in claim 5, characterized in that: The re-identification result is a similarity measurement value between the any vehicle and the vehicles in the open source dataset.
7. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the vehicle re-identification method for road traffic as claimed in any one of claims 1 to 6 are implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the vehicle re-identification method for road traffic as claimed in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Intelligent truck empty compartment identification and auditing method based on video stream features
CN115830509A
Vehicle identification method and device, and electronic equipment
CN117197758A