WO2022147977A1 - Vehicle re-identification method and system based on depth feature and sparse metric projection - Google Patents

Vehicle re-identification method and system based on depth feature and sparse metric projection Download PDF

Info

Publication number
WO2022147977A1
WO2022147977A1 PCT/CN2021/103200 CN2021103200W WO2022147977A1 WO 2022147977 A1 WO2022147977 A1 WO 2022147977A1 CN 2021103200 W CN2021103200 W CN 2021103200W WO 2022147977 A1 WO2022147977 A1 WO 2022147977A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
depth feature
sparse
feature
target vehicle
Prior art date
Application number
PCT/CN2021/103200
Other languages
French (fr)
Chinese (zh)
Inventor
刘凯
Original Assignee
山东交通学院
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 山东交通学院 filed Critical 山东交通学院
Publication of WO2022147977A1 publication Critical patent/WO2022147977A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition

Definitions

  • the present application relates to the technical field of computer vision, and in particular, to a method and system for vehicle re-identification based on depth feature and sparse metric projection.
  • vehicle re-identification based on vehicle appearance information in surveillance video has attracted the attention of many researchers due to its important practical value, which involves the driving vehicle recognition technology.
  • the task of vehicle re-identification is to find the images of the target vehicle captured by other cameras given the image of the target vehicle in a certain camera, so as to realize relay tracking across cameras.
  • Existing supervised vehicle re-identification methods can be divided into feature learning-based methods and metric learning-based methods.
  • the method based on feature learning expresses vehicle images by designing effective features to improve the matching accuracy of vehicle appearance features. This method has strong interpretability, but the recognition rate is low due to differences in vehicle appearance due to changes in illumination, perspective changes, and occlusions in the actual traffic monitoring environment.
  • the method based on metric learning focuses on using the metric loss function to learn the similarity between vehicle images, and reduces the feature differences caused by illumination changes, viewing angle changes and occlusions through feature projection.
  • the vehicle re-identification method based on metric learning mainly learns a specific feature projection matrix, so that the transformed features can eliminate the problems of intra-class differences and inter-class similarities caused by changes in perspective.
  • Bai et al. in “Improving triplet-wise training of In the paper "convolutional neural network for vehicle re-identification”, a group-sensitive triplet embedding method is designed to perform metric learning in an end-to-end manner.
  • the idea proposed by Liu et al. in "Deep Relative Distance Learning: Tell the Difference between Similar Vehicles” has received a lot of attention from later generations. Deep Relative Distance Learning (DRDL), using the features learned from different branch tasks finally passed the The fully connected layer is integrated to obtain the final mapping feature.
  • DRDL Deep Relative Distance Learning
  • this paper proposes to construct a positive and negative sample set and use the clustered cluster loss function (Coupled Clusters Loss) to replace the triple loss function as a measure. Learning can make vehicles of the same category more aggregated, and vehicles of different categories more discrete.
  • the re-identification model is very sensitive to the position of the image in the feature space.
  • the vehicle re-identification metric learning method has the difference between the feature space of the training set and the test set and the generalization of the re-id model under other cameras.
  • the present application provides a vehicle re-identification method and system based on depth feature and sparse metric projection; fully considering the influence of factors such as lighting conditions, camera parameters, viewing angle and occlusion on vehicle appearance characteristics, through the data space Collection of overcomplete dictionaries and metaprojection matrices.
  • a feature sparse projection matrix is constructed adaptively for each vehicle image feature, which overcomes the diversity of vehicle image feature data distribution, improves the accuracy of vehicle re-identification, and enhances the generalization ability of the re-identification method.
  • the present application provides a vehicle re-identification method based on depth feature and sparse metric projection
  • Vehicle re-identification methods based on deep feature and sparse metric projection including:
  • the distance between the depth feature of the target vehicle image and the depth feature of each image in the set of images to be re-identified is calculated;
  • the present application provides a vehicle re-identification system based on depth feature and sparse metric projection
  • a vehicle re-identification system based on deep feature and sparse metric projection including:
  • an acquisition module which is configured to: acquire an image of the target vehicle; acquire a set of images to be re-identified;
  • a feature extraction module which is configured to: perform depth feature extraction on each image in the target vehicle image and the image set to be re-identified to obtain the depth feature of each image;
  • the projection matrix calculation module is configured to: calculate the adaptive sparse projection matrix corresponding to the depth feature of the target vehicle image; at the same time, calculate the adaptive sparse projection matrix corresponding to the depth feature of each image in the set of images to be re-identified ;
  • a distance calculation module which is configured to: based on the depth feature and the adaptive sparse projection matrix corresponding to the depth feature, calculate the distance between the depth feature of the target vehicle image and the depth feature of each image in the set of images to be re-identified;
  • the output module is configured to: repeat the steps of the distance calculation module until the distance between the depth feature of the target image and the depth features of all images in the set of images to be re-identified is calculated; select the image corresponding to the minimum distance as the target vehicle the re-identified image.
  • the present application also provides an electronic device, comprising: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and one or more of the above
  • the computer program is stored in the memory, and when the electronic device runs, the processor executes one or more computer programs stored in the memory, so that the electronic device performs the method described in the first aspect above.
  • the present application further provides a computer-readable storage medium for storing computer instructions, and when the computer instructions are executed by a processor, the method described in the first aspect is completed.
  • the present application also provides a computer program (product), including a computer program, which when run on one or more processors, is used to implement the method of any one of the foregoing first aspects.
  • the vehicle image imaging process is easily affected by the shooting environment (including lighting conditions, camera parameters, shooting angle and external occlusion and many other factors), and the corresponding features of each vehicle image have a unique data distribution.
  • Vehicle re-identification methods based on traditional metric learning cannot cope with the uniqueness of this feature distribution, resulting in low accuracy of feature distance calculation and vehicle re-identification.
  • the present invention proposes a vehicle re-identification method based on deep feature and sparse metric projection, which introduces an adaptive strategy into the traditional metric projection matrix learning process, and learns for each image feature by constructing a data space overcomplete dictionary and a meta-projection matrix.
  • the adaptive sparse projection matrix ensures that all image features are in the same data space after projection.
  • the model maintains good nearest neighbor calculation performance under various data distributions; on the other hand, the distance metric can be better adapted to different types. Practical application scenarios to improve the generalization ability of the system.
  • the experimental results on the vehicle re-identification task confirm the effectiveness of the method proposed in the present invention.
  • FIG. 2 is a flowchart of a data space adaptive sparse metric projection learning algorithm according to an embodiment of the present application
  • This embodiment provides a vehicle re-identification method based on depth feature and sparse metric projection
  • Vehicle re-identification methods based on deep feature and sparse metric projection including:
  • S101 Obtain an image of a target vehicle; obtain a set of images to be re-identified;
  • S102 Perform depth feature extraction on the target vehicle image and each image in the set of images to be re-identified to obtain the depth feature of each image;
  • S104 Based on the depth feature and the adaptive sparse projection matrix corresponding to the depth feature, calculate the distance between the depth feature of the target vehicle image and the depth feature of each image in the image set to be re-identified;
  • S105 Repeat S104 until the distance between the depth feature of the target image and the depth features of all images in the set of images to be re-identified is calculated; the image corresponding to the minimum distance is selected as the re-identified image of the target vehicle.
  • the S102 perform depth feature extraction on the target vehicle image and each image in the image set to be re-identified to obtain the depth feature of each image; specifically including:
  • the improved VGG-19 network is used to extract the depth feature, and the depth feature of each image is obtained;
  • the improved VGG-19 network is pre-trained with the ImageNet dataset.
  • the S103 the calculation step of calculating the adaptive sparse projection matrix corresponding to the depth feature of the target vehicle image corresponds to the calculation step of the depth feature of each image in the image set to be re-identified
  • the calculation steps of the adaptive sparse projection matrix are consistent.
  • the S103 Calculate the adaptive sparse projection matrix corresponding to the depth feature of the target vehicle image; specifically include:
  • the overcomplete dictionary is obtained using training data.
  • the obtaining step includes:
  • S10311 Initialize the overcomplete dictionary D as the K cluster center in the training data space; initialize each element of the sparse coefficient matrix; the training data includes: a known target vehicle image and a known target vehicle re-identification image;
  • S10313 According to the feature sparse coding loss function, adopt an iterative training strategy, first fix the overcomplete dictionary D, use the gradient descent method to update the sparse coefficient matrix, then fix the sparse coefficient matrix, and use the gradient descent method to update the overcomplete dictionary D.
  • F is the characteristic matrix of the training data set
  • is the sparse coefficient matrix
  • is the balance coefficient
  • meta-projection matrix is also obtained using training data.
  • the step of obtaining the meta-projection matrix includes:
  • a gradient descent strategy is used to calculate the gradient value of the composite projection matrix, and update the gradient value of the composite projection matrix, that is, to obtain each element projection matrix.
  • the method includes the following steps:
  • is the step size of iterative update.
  • the S104 based on the depth feature and the adaptive sparse projection matrix corresponding to the depth feature, calculate the difference between the depth feature of the target vehicle image and the depth feature of each image in the image set to be re-identified distance; specific steps include:
  • the distance between the first product and the second product is the distance between the depth feature of the target vehicle image and the depth feature of each image in the image set to be re-identified.
  • S101-S105 also includes a training phase and a testing phase; the details are as follows: the method collects images of the same vehicle under different cameras, and the vehicle The images are divided into training image sets and test image sets, and feature extraction is performed on the images to form training data sets and test data sets respectively. Above, use the data space adaptive sparse metric projection matrix to transform image features, and perform distance calculation based on the transformed image features to complete vehicle re-identification.
  • the training phase and the testing phase include the following steps:
  • Step 1) Collect images of the same vehicle under different cameras
  • Step 2) Divide the vehicle image into a training image set and a test image set, perform feature extraction on the image, and form a training data set and a test data set respectively;
  • Step 3 on the training data set, learn the calculation method of the data space adaptive sparse metric projection matrix
  • Step 4) On the test data set, use the data space adaptive sparse metric projection matrix to perform image feature transformation, and perform distance calculation based on the transformed image features to complete vehicle re-identification.
  • Described step 1) for M vehicles, collect images of each vehicle under camera A and camera B to form image sets X and Y respectively.
  • Described step 2) randomly select N vehicles from M vehicles, extract images belonging to the N vehicles in the image sets X and Y to form a training image set, and images belonging to the remaining M-N vehicles form a test image set.
  • Step 2) Randomly select N vehicles from M vehicles, extract images belonging to the N vehicles in the image set X and Y to form a training image set, a total of 2*N images, and the images of the remaining M-N vehicles form a test image set , a total of 2*(M-N) images.
  • Described step 3 is carried out on the training data set, including:
  • the projection matrix that defines the feature sample x is:
  • Described step 4) is carried out on the test data set, including:
  • step 4.2 Repeat step 4.2) until the distance calculation between x test and all the image features to be re-identified in the test data set is completed, and it is considered that the image corresponding to the minimum distance and x test belong to the same vehicle.
  • Described step 1) comprises:
  • step 1.1) The image obtained in step 1.1) is sent to the VGG-19 network for feature extraction to obtain a 4096-dimensional feature vector;
  • the 16 convolutional layers and the first fully connected layer of the VGG-19 network are used as the feature extraction part, and the last two fully connected layers of the VGG-19 are removed.
  • PCA is further used to perform dimension reduction operation on the feature vector, and a feature vector of 127 dimensions is finally obtained under the condition of retaining 80% of the feature values.
  • VGG-19 network pre-trained based on the ImageNet dataset, remove the last 2 fully connected layers of the VGG-19 network, and retain the 16 convolutional layers and the first fully connected layer of the VGG-19 network as a deep feature extraction network .
  • the image is sent to the deep feature extraction network for feature extraction, and a 4096-dimensional feature vector is obtained;
  • this method uses PCA to perform dimensionality reduction operations on the original features, and finally obtains a 127-dimensional feature vector while retaining 80% of the eigenvalues.
  • Step 3 On the training data set, learn the data space adaptive sparse projection matrix calculation method.
  • the data space adaptation refers to learning an adaptive projection matrix for the image feature vectors, so that all image feature vectors are projected in the same data space, thereby ensuring the effectiveness of the nearest neighbor comparison.
  • the approximate learning method based on sparse coding constructs an over-complete dictionary and a meta-projection matrix in the data space, uses the over-complete dictionary to sparsely encode the feature data, and compares the coding coefficients with the meta-projection matrix.
  • a data space adaptive sparse projection matrix is constructed.
  • Step 4) On the basis of the data space adaptive sparse projection matrix calculation method learned in step 3), vehicle re-identification is performed on the test data set; the specific implementation method is as follows:
  • step 4.1) The M-N distance calculation results obtained in step 4.1) are sorted from small to large, and the camera B image corresponding to the distance calculation result in the first place is the image that belongs to the same vehicle as the camera A image provided by this method;
  • the present application provides a vehicle re-identification method based on depth feature and sparse metric projection.
  • the method collects images of the same vehicle under different cameras, divides the vehicle images into a training image set and a test image set, and characterizes the images. Extract, respectively form a training data set and a test data set.
  • learn the calculation method of the data space adaptive sparse metric projection matrix, and on the test data set use the data space adaptive sparse metric projection matrix to perform image feature transformation , and calculate the distance based on the transformed image features to complete the vehicle re-identification.
  • This application considers that in the traffic monitoring network, the shooting environment (including factors such as illumination, camera angle, camera parameters, occlusion, etc.) of each vehicle image is different, resulting in unique data distribution of corresponding features.
  • the data space is overcomplete with dictionary and meta-projection matrix, and an adaptive sparse projection matrix is learned for each image feature, so that the projected feature samples are all in the same feature space, thus ensuring the effectiveness of the nearest neighbor comparison.
  • the present application belongs to a method based on metric learning, and the goal is to project all feature vectors into a unified feature space, so that the features of the same car are closer, and the features of different cars are farther away.
  • This embodiment provides a vehicle re-identification system based on depth feature and sparse metric projection
  • a vehicle re-identification system based on deep feature and sparse metric projection including:
  • an acquisition module which is configured to: acquire an image of the target vehicle; acquire a set of images to be re-identified;
  • a feature extraction module which is configured to: perform depth feature extraction on each image in the target vehicle image and the image set to be re-identified to obtain the depth feature of each image;
  • the projection matrix calculation module is configured to: calculate the adaptive sparse projection matrix corresponding to the depth feature of the target vehicle image; at the same time, calculate the adaptive sparse projection matrix corresponding to the depth feature of each image in the set of images to be re-identified ;
  • a distance calculation module which is configured to: based on the depth feature and the adaptive sparse projection matrix corresponding to the depth feature, calculate the distance between the depth feature of the target vehicle image and the depth feature of each image in the set of images to be re-identified;
  • the output module is configured to: repeat the steps of the distance calculation module until the distance between the depth feature of the target image and the depth features of all images in the set of images to be re-identified is calculated; select the image corresponding to the minimum distance as the target vehicle the re-identified image.
  • the above-mentioned acquisition module, feature extraction module, projection matrix calculation module, distance calculation module and output module correspond to steps S101 to S105 in the first embodiment, and the examples and The application scenarios are the same, but are not limited to the content disclosed in the first embodiment. It should be noted that the above modules can be executed in a computer system such as a set of computer-executable instructions as part of the system.
  • the proposed system can be implemented in other ways.
  • the system embodiments described above are only illustrative.
  • the division of the above modules is only a logical function division.
  • multiple modules may be combined or integrated into other A system, or some feature, can be ignored, or not implemented.
  • This embodiment also provides an electronic device, including: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are Stored in the memory, when the electronic device runs, the processor executes one or more computer programs stored in the memory, so that the electronic device executes the method described in the first embodiment.
  • the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors, DSPs, application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices. , discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory may include read-only memory and random access memory and provide instructions and data to the processor, and a portion of the memory may also include non-volatile random access memory.
  • the memory may also store device type information.
  • each step of the above-mentioned method can be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software.
  • the method in the first embodiment may be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
  • the software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware. To avoid repetition, detailed description is omitted here.
  • This embodiment also provides a computer-readable storage medium for storing computer instructions, and when the computer instructions are executed by a processor, the method described in the first embodiment is completed.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Image Analysis (AREA)
  • Traffic Control Systems (AREA)

Abstract

Disclosed are a vehicle re-identification method and system based on a depth feature and a sparse metric projection. The method comprises: acquiring a target vehicle image; acquiring an image set to be re-identified; performing depth feature extraction on the target vehicle image and each image in said image set to obtain a depth feature of each image; calculating an adaptive sparse projection matrix corresponding to the depth feature of the target vehicle image; calculating an adaptive sparse projection matrix corresponding to the depth feature of each image in said image set; calculating the distance between the depth feature of the target vehicle image and the depth feature of each image in said image set on the basis of the depth feature and the adaptive sparse projection matrix corresponding to the depth feature; repeating the step of a distance calculation module until the distances between the depth feature of the target image and depth features of all the images in said image set are calculated; and selecting an image corresponding to the minimum distance as a re-identification image of the target vehicle.

Description

基于深度特征和稀疏度量投影的车辆重识别方法及系统Vehicle re-identification method and system based on deep feature and sparse metric projection 技术领域technical field
本申请涉及计算机视觉技术领域,特别是涉及基于深度特征和稀疏度量投影的车辆重识别方法及系统。The present application relates to the technical field of computer vision, and in particular, to a method and system for vehicle re-identification based on depth feature and sparse metric projection.
背景技术Background technique
本部分的陈述仅仅是提到了与本申请相关的背景技术,并不必然构成现有技术。The statements in this section merely mention the background art related to the present application and do not necessarily constitute prior art.
当前,监控摄像头被广泛安装在城市、郊区以及高速公路上,大量的车辆监控图像被实时采集并存储,对不同区域出现的目标车辆进行跨摄像机检索和连续跟踪成为现实需求,传统方法主要采用车牌识别技术实现以上功能,但是在真实交通环境下,车辆存在着车牌遮挡、套牌、伪造、移除等情况,在该情况下,使用车牌信息进行检索,无法准确定位目标车辆。At present, surveillance cameras are widely installed in cities, suburbs and highways, and a large number of vehicle surveillance images are collected and stored in real time. Cross-camera retrieval and continuous tracking of target vehicles appearing in different areas has become a reality. Traditional methods mainly use license plates. The recognition technology realizes the above functions, but in the real traffic environment, the vehicle has license plate occlusion, duplication, forgery, removal, etc. In this case, the license plate information is used for retrieval, and the target vehicle cannot be accurately located.
近年来,随着计算机视觉和多媒体技术的不断发展,基于监控视频中车辆外观信息的车辆重识别由于其重要的实用价值得到了诸多研究者的关注,这涉及到行车辆识别技术。车辆再识别的任务是在给定目标车辆在某一摄像机中的图像,找到目标车辆在其他摄像头下被拍摄到的图像,以实现跨摄像头的接力跟踪。In recent years, with the continuous development of computer vision and multimedia technology, vehicle re-identification based on vehicle appearance information in surveillance video has attracted the attention of many researchers due to its important practical value, which involves the driving vehicle recognition technology. The task of vehicle re-identification is to find the images of the target vehicle captured by other cameras given the image of the target vehicle in a certain camera, so as to realize relay tracking across cameras.
但是由于摄像头的位置不同会产生光照变化、视角变化及分辨率的差异,再加上复杂的监控场景下,车辆之间存在不同程度的遮挡,这导致类内差异(同一车辆在不同视角下产生自身差别)和类间相似(不同车辆因型号相同形成类间相似),使得车辆重识别问题变得更加棘手。However, due to the different positions of the cameras, there will be differences in illumination changes, viewing angles and resolutions. In addition, in complex monitoring scenarios, there are different degrees of occlusion between vehicles, which leads to intra-class differences (the same vehicle is generated from different viewing angles) self-difference) and inter-class similarity (different vehicles form inter-class similarity due to the same model), which makes the vehicle re-identification problem more difficult.
现有的有监督车辆再识别方法可以分为基于特征学习的方法和基于度量学习的方法。基于特征学习的方法通过设计有效的特征对车辆图像进行表达,以提高车辆外观特征的匹配准确率。这种方法的可解释性较强,但是由于实际交通监控环境下光照变化、视角变化以及遮挡等都会引起车辆外观的差异,因此识别率较低。基于度量学习的方法着重利用度量损失函数学习车辆图像之间的相似度,通过特征投影来减小光照变化、视角变化以及遮挡等造成的特征差异。Existing supervised vehicle re-identification methods can be divided into feature learning-based methods and metric learning-based methods. The method based on feature learning expresses vehicle images by designing effective features to improve the matching accuracy of vehicle appearance features. This method has strong interpretability, but the recognition rate is low due to differences in vehicle appearance due to changes in illumination, perspective changes, and occlusions in the actual traffic monitoring environment. The method based on metric learning focuses on using the metric loss function to learn the similarity between vehicle images, and reduces the feature differences caused by illumination changes, viewing angle changes and occlusions through feature projection.
现在基于度量学习的车辆重识别方法主要是学习特定的特征投影矩阵,使得变换后的特征能够消除视角变化引起的类内差异和类间相似的问题,Bai等人在“Improving triplet-wise training of convolutional neural network for vehicle re-identification”一文中设计了一个组内敏感的三元组嵌入(group-sensitive triplet embedding)方法,使用端到端的方式进行度量学习。Liu等人在“Deep Relative Distance Learning:Tell the Difference between Similar Vehicles”提出的思想得到后人大量的关注,深度相对距离学习(Deep Relative Distance Learning,DRDL),利用不同分支任务学习到的特征最后通过全连接层整合,得到最后的映射特征,并且本文针对三元损失函数训练的不稳定的特点,提出构造正负样本集并利用聚集簇损失函数(Coupled Clusters Loss)替代三元组损失函数做度量学习,能够让相同类别的车辆更加聚合,不同类别的车辆更加离散。但是在度量学习过程中,重识别模型对图像在特征空间中的位置十分敏感,现在车辆重识别度量学习方法在训练集合和测试集合特征空间的差异性以及重识别模型在其他摄像头下的泛化能力没有做深入的研究。At present, the vehicle re-identification method based on metric learning mainly learns a specific feature projection matrix, so that the transformed features can eliminate the problems of intra-class differences and inter-class similarities caused by changes in perspective. Bai et al. in "Improving triplet-wise training of In the paper "convolutional neural network for vehicle re-identification", a group-sensitive triplet embedding method is designed to perform metric learning in an end-to-end manner. The idea proposed by Liu et al. in "Deep Relative Distance Learning: Tell the Difference between Similar Vehicles" has received a lot of attention from later generations. Deep Relative Distance Learning (DRDL), using the features learned from different branch tasks finally passed the The fully connected layer is integrated to obtain the final mapping feature. In view of the unstable characteristics of the training of the ternary loss function, this paper proposes to construct a positive and negative sample set and use the clustered cluster loss function (Coupled Clusters Loss) to replace the triple loss function as a measure. Learning can make vehicles of the same category more aggregated, and vehicles of different categories more discrete. However, in the process of metric learning, the re-identification model is very sensitive to the position of the image in the feature space. Now the vehicle re-identification metric learning method has the difference between the feature space of the training set and the test set and the generalization of the re-id model under other cameras. Ability not to do in-depth research.
发明内容SUMMARY OF THE INVENTION
为了解决现有技术的不足,本申请提供了基于深度特征和稀疏度量投影的车 辆重识别方法及系统;充分考虑光照条件、摄像机参数、视角和遮挡等因素对车辆外观特征的影响,通过数据空间过完备字典和元投影矩阵集合。为每一个车辆图像特征适应性的构建特征稀疏投影矩阵,克服车辆图像特征数据分布的多样性,提高车辆重识别的准确率,同时增强了重识别方法的泛化能力。In order to solve the deficiencies of the prior art, the present application provides a vehicle re-identification method and system based on depth feature and sparse metric projection; fully considering the influence of factors such as lighting conditions, camera parameters, viewing angle and occlusion on vehicle appearance characteristics, through the data space Collection of overcomplete dictionaries and metaprojection matrices. A feature sparse projection matrix is constructed adaptively for each vehicle image feature, which overcomes the diversity of vehicle image feature data distribution, improves the accuracy of vehicle re-identification, and enhances the generalization ability of the re-identification method.
第一方面,本申请提供了基于深度特征和稀疏度量投影的车辆重识别方法;In a first aspect, the present application provides a vehicle re-identification method based on depth feature and sparse metric projection;
基于深度特征和稀疏度量投影的车辆重识别方法,包括:Vehicle re-identification methods based on deep feature and sparse metric projection, including:
获取目标车辆图像;获取待重识别的图像集合;Obtain the target vehicle image; obtain the image set to be re-identified;
对目标车辆图像和待重识别的图像集合中的每一幅图像,均进行深度特征提取,得到每一幅图像的深度特征;Perform depth feature extraction on the target vehicle image and each image in the set of images to be re-identified to obtain the depth feature of each image;
计算目标车辆图像的深度特征所对应的自适应稀疏投影矩阵;同时,计算待重识别图像集合中每一幅图像的深度特征所对应的自适应稀疏投影矩阵;Calculate the adaptive sparse projection matrix corresponding to the depth feature of the target vehicle image; at the same time, calculate the adaptive sparse projection matrix corresponding to the depth feature of each image in the image set to be re-identified;
基于深度特征和深度特征对应的自适应稀疏投影矩阵,计算出目标车辆图像的深度特征与待重识别图像集合中每一幅图像深度特征之间的距离;Based on the depth feature and the adaptive sparse projection matrix corresponding to the depth feature, the distance between the depth feature of the target vehicle image and the depth feature of each image in the set of images to be re-identified is calculated;
重复上一步的步骤,直到计算出目标图像的深度特征与待重识别图像集合中所有幅图像深度特征之间的距离;选择最小距离所对应的图像作为目标车辆的重识别图像。Repeat the steps of the previous step until the distance between the depth feature of the target image and the depth features of all images in the set of images to be re-identified is calculated; the image corresponding to the minimum distance is selected as the re-identified image of the target vehicle.
第二方面,本申请提供了基于深度特征和稀疏度量投影的车辆重识别系统;In a second aspect, the present application provides a vehicle re-identification system based on depth feature and sparse metric projection;
基于深度特征和稀疏度量投影的车辆重识别系统,包括:A vehicle re-identification system based on deep feature and sparse metric projection, including:
获取模块,其被配置为:获取目标车辆图像;获取待重识别的图像集合;an acquisition module, which is configured to: acquire an image of the target vehicle; acquire a set of images to be re-identified;
特征提取模块,其被配置为:对目标车辆图像和待重识别的图像集合中的每一幅图像,均进行深度特征提取,得到每一幅图像的深度特征;a feature extraction module, which is configured to: perform depth feature extraction on each image in the target vehicle image and the image set to be re-identified to obtain the depth feature of each image;
投影矩阵计算模块,其被配置为:计算目标车辆图像的深度特征所对应的 自适应稀疏投影矩阵;同时,计算待重识别图像集合中每一幅图像的深度特征所对应的自适应稀疏投影矩阵;The projection matrix calculation module is configured to: calculate the adaptive sparse projection matrix corresponding to the depth feature of the target vehicle image; at the same time, calculate the adaptive sparse projection matrix corresponding to the depth feature of each image in the set of images to be re-identified ;
距离计算模块,其被配置为:基于深度特征和深度特征对应的自适应稀疏投影矩阵,计算出目标车辆图像的深度特征与待重识别图像集合中每一幅图像深度特征之间的距离;a distance calculation module, which is configured to: based on the depth feature and the adaptive sparse projection matrix corresponding to the depth feature, calculate the distance between the depth feature of the target vehicle image and the depth feature of each image in the set of images to be re-identified;
输出模块,其被配置为:重复距离计算模块的步骤,直到计算出目标图像的深度特征与待重识别图像集合中所有幅图像深度特征之间的距离;选择最小距离所对应的图像作为目标车辆的重识别图像。The output module is configured to: repeat the steps of the distance calculation module until the distance between the depth feature of the target image and the depth features of all images in the set of images to be re-identified is calculated; select the image corresponding to the minimum distance as the target vehicle the re-identified image.
第三方面,本申请还提供了一种电子设备,包括:一个或多个处理器、一个或多个存储器、以及一个或多个计算机程序;其中,处理器与存储器连接,上述一个或多个计算机程序被存储在存储器中,当电子设备运行时,该处理器执行该存储器存储的一个或多个计算机程序,以使电子设备执行上述第一方面所述的方法。In a third aspect, the present application also provides an electronic device, comprising: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and one or more of the above The computer program is stored in the memory, and when the electronic device runs, the processor executes one or more computer programs stored in the memory, so that the electronic device performs the method described in the first aspect above.
第四方面,本申请还提供了一种计算机可读存储介质,用于存储计算机指令,所述计算机指令被处理器执行时,完成第一方面所述的方法。In a fourth aspect, the present application further provides a computer-readable storage medium for storing computer instructions, and when the computer instructions are executed by a processor, the method described in the first aspect is completed.
第五方面,本申请还提供了一种计算机程序(产品),包括计算机程序,所述计算机程序当在一个或多个处理器上运行的时候用于实现前述第一方面任意一项的方法。In a fifth aspect, the present application also provides a computer program (product), including a computer program, which when run on one or more processors, is used to implement the method of any one of the foregoing first aspects.
与现有技术相比,本申请的有益效果是:Compared with the prior art, the beneficial effects of the present application are:
在实际的交通监控场景下,车辆图像成像过程易受到拍摄环境(包括光照条件、摄像机参数、拍摄视角和外部遮挡等诸多因素)的影响,每一张车辆图像对应特征具有独特的数据分布。基于传统度量学习的车辆重识别方法无法应 对这种特征分布的独特性,导致特征距离计算和车辆重识别的准确度不高。基于此,本发明提出基于深度特征和稀疏度量投影的车辆重识别方法,它将自适应策略引入传统度量投影矩阵学习过程,通过构建数据空间过完备字典和元投影矩阵,为每一个图像特征学习自适应的稀疏投影矩阵,保证所有图像特征经过投影后处于相同的数据空间,一方面使得模型在多种数据分布下保持良好的最近邻计算性能;另一方面使得距离度量可以更好适应不同类型实际应用场景,提高系统的泛化能力。在车辆重识别任务上的实验结果证实了本发明提出方法的有效性。In the actual traffic monitoring scene, the vehicle image imaging process is easily affected by the shooting environment (including lighting conditions, camera parameters, shooting angle and external occlusion and many other factors), and the corresponding features of each vehicle image have a unique data distribution. Vehicle re-identification methods based on traditional metric learning cannot cope with the uniqueness of this feature distribution, resulting in low accuracy of feature distance calculation and vehicle re-identification. Based on this, the present invention proposes a vehicle re-identification method based on deep feature and sparse metric projection, which introduces an adaptive strategy into the traditional metric projection matrix learning process, and learns for each image feature by constructing a data space overcomplete dictionary and a meta-projection matrix. The adaptive sparse projection matrix ensures that all image features are in the same data space after projection. On the one hand, the model maintains good nearest neighbor calculation performance under various data distributions; on the other hand, the distance metric can be better adapted to different types. Practical application scenarios to improve the generalization ability of the system. The experimental results on the vehicle re-identification task confirm the effectiveness of the method proposed in the present invention.
本申请附加方面的优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。Advantages of additional aspects of the present application will be set forth in part in, and in part will become apparent from, the following description, or may be learned by practice of the present application.
附图说明Description of drawings
构成本申请的一部分的说明书附图用来提供对本申请的进一步理解,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。The accompanying drawings that form a part of the present application are used to provide further understanding of the present application, and the schematic embodiments and descriptions of the present application are used to explain the present application and do not constitute improper limitations on the present application.
图1为本申请实施例的流程图;1 is a flowchart of an embodiment of the application;
图2为本申请实施例数据空间自适应稀疏度量投影学习算法流程图;2 is a flowchart of a data space adaptive sparse metric projection learning algorithm according to an embodiment of the present application;
具体实施方式Detailed ways
应该指出,以下详细说明都是示例性的,旨在对本申请提供进一步的说明。除非另有指明,本文使用的所有技术和科学术语具有与本申请所属技术领域的普通技术人员通常理解的相同含义。It should be noted that the following detailed description is exemplary and intended to provide further explanation of the application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
需要注意的是,这里所使用的术语仅是为了描述具体实施方式,而非意图限制根据本申请的示例性实施方式。如在这里所使用的,除非上下文另外明确指出,否则单数形式也意图包括复数形式,此外,还应当理解的是,术语“包括” 和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terminology used herein is for the purpose of describing specific embodiments only, and is not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly dictates otherwise, the singular is intended to include the plural as well, furthermore, it is to be understood that the terms "including" and "having" and any conjugations thereof are intended to cover the non-exclusive A process, method, system, product or device comprising, for example, a series of steps or units is not necessarily limited to those steps or units expressly listed, but may include those steps or units not expressly listed or for such processes, methods, Other steps or units inherent to the product or equipment.
在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The embodiments in this application and the features in the embodiments may be combined with each other without conflict.
实施例一Example 1
本实施例提供了基于深度特征和稀疏度量投影的车辆重识别方法;This embodiment provides a vehicle re-identification method based on depth feature and sparse metric projection;
基于深度特征和稀疏度量投影的车辆重识别方法,包括:Vehicle re-identification methods based on deep feature and sparse metric projection, including:
S101:获取目标车辆图像;获取待重识别的图像集合;S101: Obtain an image of a target vehicle; obtain a set of images to be re-identified;
S102:对目标车辆图像和待重识别的图像集合中的每一幅图像,均进行深度特征提取,得到每一幅图像的深度特征;S102: Perform depth feature extraction on the target vehicle image and each image in the set of images to be re-identified to obtain the depth feature of each image;
S103:计算目标车辆图像的深度特征所对应的自适应稀疏投影矩阵;S103: Calculate the adaptive sparse projection matrix corresponding to the depth feature of the target vehicle image;
同时,计算待重识别图像集合中每一幅图像的深度特征所对应的自适应稀疏投影矩阵;At the same time, calculating the adaptive sparse projection matrix corresponding to the depth feature of each image in the set of images to be re-identified;
S104:基于深度特征和深度特征对应的自适应稀疏投影矩阵,计算出目标车辆图像的深度特征与待重识别图像集合中每一幅图像深度特征之间的距离;S104: Based on the depth feature and the adaptive sparse projection matrix corresponding to the depth feature, calculate the distance between the depth feature of the target vehicle image and the depth feature of each image in the image set to be re-identified;
S105:重复S104,直到计算出目标图像的深度特征与待重识别图像集合中所有幅图像深度特征之间的距离;选择最小距离所对应的图像作为目标车辆的重识别图像。S105: Repeat S104 until the distance between the depth feature of the target image and the depth features of all images in the set of images to be re-identified is calculated; the image corresponding to the minimum distance is selected as the re-identified image of the target vehicle.
作为一个或多个实施例,所述S102:对目标车辆图像和待重识别的图像集合中的每一幅图像,均进行深度特征提取,得到每一幅图像的深度特征;具体包括:As one or more embodiments, the S102: perform depth feature extraction on the target vehicle image and each image in the image set to be re-identified to obtain the depth feature of each image; specifically including:
对目标车辆图像和待重识别的图像集合中的每一幅图像,均采用改进后的VGG-19网络进行深度特征提取,得到每一幅图像的深度特征;For each image in the target vehicle image and the image set to be re-identified, the improved VGG-19 network is used to extract the depth feature, and the depth feature of each image is obtained;
所述改进后的VGG-19网络,为将VGG-19网络的最后两个全连接层去掉,只保留前16个卷积层和第一个全连接层。In the improved VGG-19 network, in order to remove the last two fully connected layers of the VGG-19 network, only the first 16 convolutional layers and the first fully connected layer are retained.
所述改进后的VGG-19网络,采用ImageNet数据集预训练。The improved VGG-19 network is pre-trained with the ImageNet dataset.
作为一个或多个实施例,所述S103:计算目标车辆图像的深度特征所对应的自适应稀疏投影矩阵的计算步骤,与所述计算待重识别图像集合中每一幅图像的深度特征所对应的自适应稀疏投影矩阵的计算步骤是一致的。As one or more embodiments, the S103: the calculation step of calculating the adaptive sparse projection matrix corresponding to the depth feature of the target vehicle image corresponds to the calculation step of the depth feature of each image in the image set to be re-identified The calculation steps of the adaptive sparse projection matrix are consistent.
作为一个或多个实施例,所述S103:计算目标车辆图像的深度特征所对应的自适应稀疏投影矩阵;具体包括:As one or more embodiments, the S103: Calculate the adaptive sparse projection matrix corresponding to the depth feature of the target vehicle image; specifically include:
S1031:根据过完备字典,计算目标车辆图像的深度特征所对应的稀疏系数;S1031: Calculate the sparse coefficient corresponding to the depth feature of the target vehicle image according to the overcomplete dictionary;
S1032:将目标车辆图像的深度特征所对应的稀疏系数视为权重,对元投影矩阵进行加权求和,得到目标车辆图像的深度特征所对应的自适应稀疏投影矩阵。S1032: Taking the sparse coefficient corresponding to the depth feature of the target vehicle image as a weight, and performing a weighted summation on the meta-projection matrix to obtain an adaptive sparse projection matrix corresponding to the depth feature of the target vehicle image.
进一步地,所述过完备字典是利用训练数据获得的。Further, the overcomplete dictionary is obtained using training data.
进一步地,所述过完备字典,获取步骤包括:Further, for the overcomplete dictionary, the obtaining step includes:
S10311:初始化过完备字典D为训练数据空间的K聚类中心;初始化稀疏系数矩阵各个元素;所述训练数据,包括:已知目标车辆图像,和已知目标车辆的重识别图像;S10311: Initialize the overcomplete dictionary D as the K cluster center in the training data space; initialize each element of the sparse coefficient matrix; the training data includes: a known target vehicle image and a known target vehicle re-identification image;
S10312:计算特征稀疏编码损失函数;S10312: Calculate feature sparse coding loss function;
S10313:根据特征稀疏编码损失函数,采用迭代训练策略,首先固定过完备字典D,使用梯度下降法更新稀疏系数矩阵,然后固定稀疏系数矩阵,使用 梯度下降法更新过完备字典D。S10313: According to the feature sparse coding loss function, adopt an iterative training strategy, first fix the overcomplete dictionary D, use the gradient descent method to update the sparse coefficient matrix, then fix the sparse coefficient matrix, and use the gradient descent method to update the overcomplete dictionary D.
示例性的,计算过完备字典和稀疏系数具体步骤包括:Exemplarily, the specific steps for calculating the overcomplete dictionary and sparse coefficients include:
(11)初始化过完备字典D为训练数据空间的K聚类中心,初始化稀疏系数矩阵各个元素为1/K。(11) Initialize the overcomplete dictionary D as K cluster centers in the training data space, and initialize each element of the sparse coefficient matrix to 1/K.
(12)计算特征稀疏编码损失函数,所述损失函数如公式(1)所述:(12) Calculate the feature sparse coding loss function, the loss function is as described in formula (1):
Figure PCTCN2021103200-appb-000001
Figure PCTCN2021103200-appb-000001
其中:F为训练数据集合特征矩阵,α为稀疏系数矩阵,λ为平衡系数。Among them: F is the characteristic matrix of the training data set, α is the sparse coefficient matrix, and λ is the balance coefficient.
(13)根据公式(1)采用迭代训练策略,首先固定过完备字典D,使用梯度下降法更新稀疏系数矩阵α,然后固定稀疏系数矩阵α,使用梯度下降法更新过完备字典D。(13) According to formula (1), an iterative training strategy is adopted. First, the overcomplete dictionary D is fixed, and the gradient descent method is used to update the sparse coefficient matrix α, and then the sparse coefficient matrix α is fixed, and the gradient descent method is used to update the overcomplete dictionary D.
进一步地,所述元投影矩阵也是利用训练数据获得的。Further, the meta-projection matrix is also obtained using training data.
进一步地,所述元投影矩阵,获取步骤包括:Further, the step of obtaining the meta-projection matrix includes:
S10321:采用联合训练策略,拼接元投影矩阵构建复合投影矩阵;S10321: Using a joint training strategy, splicing the element projection matrix to construct a composite projection matrix;
S10322:计算复合投影矩阵的损失函数;S10322: Calculate the loss function of the composite projection matrix;
S10323:根据复合投影矩阵的损失函数,采用梯度下降策略,计算复合投影矩阵的梯度值,对复合投影矩阵的梯度值进行更新,即获得各元投影矩阵。S10323: According to the loss function of the composite projection matrix, a gradient descent strategy is used to calculate the gradient value of the composite projection matrix, and update the gradient value of the composite projection matrix, that is, to obtain each element projection matrix.
示例性的,计算元投影矩阵集合,所述方法包括如下步骤:Exemplarily, calculating a set of meta-projection matrices, the method includes the following steps:
采用联合训练策略,定义复合投影矩阵
Figure PCTCN2021103200-appb-000002
复合特征向量
Figure PCTCN2021103200-appb-000003
Figure PCTCN2021103200-appb-000004
Figure PCTCN2021103200-appb-000005
Using a joint training strategy to define a composite projection matrix
Figure PCTCN2021103200-appb-000002
Compound eigenvectors
Figure PCTCN2021103200-appb-000003
Figure PCTCN2021103200-appb-000004
and
Figure PCTCN2021103200-appb-000005
(21)计算复合投影矩阵损失函数;所述损失函数如公式(2)所述:(21) Calculate the composite projection matrix loss function; the loss function is as described in formula (2):
Figure PCTCN2021103200-appb-000006
Figure PCTCN2021103200-appb-000006
其中:
Figure PCTCN2021103200-appb-000007
如果样本
Figure PCTCN2021103200-appb-000008
和样本
Figure PCTCN2021103200-appb-000009
属于 同一辆车;则s il=1,否则,s il=0;如果
Figure PCTCN2021103200-appb-000010
Figure PCTCN2021103200-appb-000011
的k近邻之一,同时
Figure PCTCN2021103200-appb-000012
Figure PCTCN2021103200-appb-000013
属于同一辆车,则η ij=1;否则η ij=0。
in:
Figure PCTCN2021103200-appb-000007
If the sample
Figure PCTCN2021103200-appb-000008
and sample
Figure PCTCN2021103200-appb-000009
belong to the same vehicle; then sil = 1, otherwise, sil = 0; if
Figure PCTCN2021103200-appb-000010
Yes
Figure PCTCN2021103200-appb-000011
one of the k-nearest neighbors of , while
Figure PCTCN2021103200-appb-000012
and
Figure PCTCN2021103200-appb-000013
belong to the same vehicle, then η ij =1; otherwise, η ij =0.
(22)根据公式(2)采用梯度下降策略,计算
Figure PCTCN2021103200-appb-000014
的梯度,得到公式(3)
(22) According to formula (2), the gradient descent strategy is adopted to calculate
Figure PCTCN2021103200-appb-000014
The gradient of , we get formula (3)
Figure PCTCN2021103200-appb-000015
Figure PCTCN2021103200-appb-000015
其中:σ β(·)=(1+e -βx) -1
Figure PCTCN2021103200-appb-000016
η ij和s il与公式(2)参数对应;
Where: σ β (·)=(1+e -βx ) -1 ,
Figure PCTCN2021103200-appb-000016
ηij and sil correspond to the parameters of formula (2);
(23)在公式(3)的基础上对
Figure PCTCN2021103200-appb-000017
进行更新,更新规则为:
(23) On the basis of formula (3),
Figure PCTCN2021103200-appb-000017
To update, the update rule is:
Figure PCTCN2021103200-appb-000018
Figure PCTCN2021103200-appb-000018
其中:λ为迭代更新的步长。Where: λ is the step size of iterative update.
作为一个或多个实施例,所述S104:基于深度特征和深度特征对应的自适应稀疏投影矩阵,计算出目标车辆图像的深度特征与待重识别图像集合中每一幅图像深度特征之间的距离;具体步骤包括:As one or more embodiments, the S104: based on the depth feature and the adaptive sparse projection matrix corresponding to the depth feature, calculate the difference between the depth feature of the target vehicle image and the depth feature of each image in the image set to be re-identified distance; specific steps include:
将目标车辆图像的深度特征,与目标车辆图像的深度特征对应的自适应稀疏投影矩阵相乘得到第一乘积;Multiply the depth feature of the target vehicle image and the adaptive sparse projection matrix corresponding to the depth feature of the target vehicle image to obtain the first product;
将待重识别图像集合中某一幅图像深度特征,与待重识别图像集合中该幅图像深度特征对应的自适应稀疏投影矩阵相乘得到第二乘积;Multiplying the depth feature of a certain image in the set of images to be re-identified with the adaptive sparse projection matrix corresponding to the depth feature of the image in the set of images to be re-identified to obtain a second product;
计算第一乘积与第二乘积的距离;Calculate the distance between the first product and the second product;
第一乘积与第二乘积的距离,即为目标车辆图像的深度特征与待重识别图像集合中每一幅图像深度特征之间的距离。The distance between the first product and the second product is the distance between the depth feature of the target vehicle image and the depth feature of each image in the image set to be re-identified.
由于过完备字典和元投影矩阵都是通过训练数据集合得到的,所以,S101-S105之前还包括训练阶段和测试阶段;具体如下:所述方法收集同一辆车在不同摄像机下的图像,将车辆图像划分为训练图像集合和测试图像集合,对 图像进行特征提取,分别形成训练数据集合和测试数据集合,在训练数据集合上,学习数据空间自适应稀疏度量投影矩阵的计算方法,在测试数据集合上,使用数据空间自适应稀疏度量投影矩阵进行图像特征变换,基于变换后的图像特征进行距离计算,完成车辆重识别。Since the over-complete dictionary and meta-projection matrix are both obtained through the training data set, S101-S105 also includes a training phase and a testing phase; the details are as follows: the method collects images of the same vehicle under different cameras, and the vehicle The images are divided into training image sets and test image sets, and feature extraction is performed on the images to form training data sets and test data sets respectively. Above, use the data space adaptive sparse metric projection matrix to transform image features, and perform distance calculation based on the transformed image features to complete vehicle re-identification.
如图1所示,所述训练阶段和测试阶段包括如下步骤:As shown in Figure 1, the training phase and the testing phase include the following steps:
步骤1):收集同一辆车在不同摄像机下的图像;Step 1): Collect images of the same vehicle under different cameras;
步骤2):将车辆图像划分为训练图像集合和测试图像集合,对图像进行特征提取,分别形成训练数据集合和测试数据集合;Step 2): Divide the vehicle image into a training image set and a test image set, perform feature extraction on the image, and form a training data set and a test data set respectively;
步骤3):在训练数据集合上,学习数据空间自适应稀疏度量投影矩阵的计算方法;Step 3): on the training data set, learn the calculation method of the data space adaptive sparse metric projection matrix;
步骤4):在测试数据集合上,使用数据空间自适应稀疏度量投影矩阵进行图像特征变换,基于变换后的图像特征进行距离计算,完成车辆重识别。Step 4): On the test data set, use the data space adaptive sparse metric projection matrix to perform image feature transformation, and perform distance calculation based on the transformed image features to complete vehicle re-identification.
所述的步骤1):针对M辆车,收集每一辆车在摄像机A和摄像机B下的图像,分别形成图像集合X和Y。Described step 1): for M vehicles, collect images of each vehicle under camera A and camera B to form image sets X and Y respectively.
所述的步骤2):从M辆车中随机选取N辆车,将图像集合X和Y中属于这N车辆的图像抽取出来组成训练图像集合,属于剩余M-N辆车的图像组成测试图像集合。Described step 2): randomly select N vehicles from M vehicles, extract images belonging to the N vehicles in the image sets X and Y to form a training image set, and images belonging to the remaining M-N vehicles form a test image set.
步骤2)从M辆车中随机选取N辆车,抽取图像集合X和Y中属于这N辆车的图像构成训练图像集合,共计2*N张图像,剩余M-N辆车的图像构成测试图像集合,共计2*(M-N)张图像。对训练图像集合中所有图像进行深度特征提取,形成训练数据集合;对测试图像集合中所有图像进行深度特征提取,形成测试数据集合。Step 2) Randomly select N vehicles from M vehicles, extract images belonging to the N vehicles in the image set X and Y to form a training image set, a total of 2*N images, and the images of the remaining M-N vehicles form a test image set , a total of 2*(M-N) images. Perform depth feature extraction on all images in the training image set to form a training data set; perform depth feature extraction on all images in the test image set to form a test data set.
所述的步骤3)在训练数据集合上进行,包括:Described step 3) is carried out on the training data set, including:
定义特征样本x的投影矩阵为:The projection matrix that defines the feature sample x is:
Figure PCTCN2021103200-appb-000019
Figure PCTCN2021103200-appb-000019
其中
Figure PCTCN2021103200-appb-000020
是样本空间过完备字典
Figure PCTCN2021103200-appb-000021
对应的元投影矩阵集合,
Figure PCTCN2021103200-appb-000022
是稀疏系数。
in
Figure PCTCN2021103200-appb-000020
is the sample space overcomplete dictionary
Figure PCTCN2021103200-appb-000021
the corresponding set of meta-projection matrices,
Figure PCTCN2021103200-appb-000022
is the sparse coefficient.
所述的步骤4)在测试数据集合上进行,包括:Described step 4) is carried out on the test data set, including:
4.1)针对测试数据集合中任意一个图像特征x test,计算其自适应稀疏投影矩阵
Figure PCTCN2021103200-appb-000023
所述方法包括如下步骤:
4.1) For any image feature x test in the test data set, calculate its adaptive sparse projection matrix
Figure PCTCN2021103200-appb-000023
The method includes the following steps:
4.1.1)固定完备字典D,按照步骤(11)、(12)和(13)计算x test的稀疏系数; 4.1.1) Fix the complete dictionary D, and calculate the sparse coefficient of x test according to steps (11), (12) and (13);
4.1.2)按照公式(5)计算x test的自适应投影矩阵
Figure PCTCN2021103200-appb-000024
4.1.2) Calculate the adaptive projection matrix of x test according to formula (5)
Figure PCTCN2021103200-appb-000024
4.2)计算目标图像特征x test与第一个待重识别图像特征y 1之间的距离,如公式(6)所示: 4.2) Calculate the distance between the target image feature x test and the first image feature y 1 to be re-identified, as shown in formula (6):
Figure PCTCN2021103200-appb-000025
Figure PCTCN2021103200-appb-000025
4.3)重复步骤4.2),直到x test与测试数据集合中所有待重识别图像特征完成距离计算,并认为最小距离对应图像与x test属于同一辆车。 4.3) Repeat step 4.2) until the distance calculation between x test and all the image features to be re-identified in the test data set is completed, and it is considered that the image corresponding to the minimum distance and x test belong to the same vehicle.
所述的步骤1)包括:Described step 1) comprises:
1.1)给定一张车辆图像,将尺寸调整为224*224像素;1.1) Given a vehicle image, adjust the size to 224*224 pixels;
1.2)将步骤1.1)获得的图像送入VGG-19网络进行特征提取,得到4096维度特征向量;1.2) The image obtained in step 1.1) is sent to the VGG-19 network for feature extraction to obtain a 4096-dimensional feature vector;
所述VGG-19网络的16个卷积层和第1个全连接层作为特征提取部分,将所述VGG-19的后2个全连接层去掉。The 16 convolutional layers and the first fully connected layer of the VGG-19 network are used as the feature extraction part, and the last two fully connected layers of the VGG-19 are removed.
在所述1.2)之后,进一步使用PCA对特征向量进行降维操作,在保留80%特征值的情况下,最终得到127维度的特征向量。After the above 1.2), PCA is further used to perform dimension reduction operation on the feature vector, and a feature vector of 127 dimensions is finally obtained under the condition of retaining 80% of the feature values.
在本实施例中,对上述特征提取方法具体实现做如下说明:In this embodiment, the specific implementation of the above feature extraction method is described as follows:
构建基于ImageNet数据集预训练的VGG-19网络,去掉VGG-19网络的最后2个全连接层,保留保留VGG-19网络的16个卷积层和第1个全连接层作为深度特征提取网络。Construct a VGG-19 network pre-trained based on the ImageNet dataset, remove the last 2 fully connected layers of the VGG-19 network, and retain the 16 convolutional layers and the first fully connected layer of the VGG-19 network as a deep feature extraction network .
将车辆图像尺寸归一化为224*224像素;Normalize the vehicle image size to 224*224 pixels;
将图像送入深度特征提取网络进行特征提取,得到4096维度特征向量;The image is sent to the deep feature extraction network for feature extraction, and a 4096-dimensional feature vector is obtained;
为减少模型参数个数,提高模型泛化能力,本方法使用PCA对原始特征进行降维操作,在保留80%特征值的情况下,最终得到127维度的特征向量。In order to reduce the number of model parameters and improve the generalization ability of the model, this method uses PCA to perform dimensionality reduction operations on the original features, and finally obtains a 127-dimensional feature vector while retaining 80% of the eigenvalues.
步骤3)在训练数据集合上,学习数据空间自适应稀疏投影矩阵计算方法。Step 3) On the training data set, learn the data space adaptive sparse projection matrix calculation method.
所述的数据空间自适应是指针对图像特征向量学习一个自适应的投影矩阵,使得所有图像特征向量投影后处于同一个数据空间,从而保证了最近邻比较的有效性。在实际操作中,为了提高算法效率,基于稀疏编码的近似学习方法,在数据空间中构建过完备字典和元投影矩阵,使用过完备字典对特征数据进行稀疏编码,并将编码系数与元投影矩阵相结合,构建数据空间自适应稀疏投影矩阵。The data space adaptation refers to learning an adaptive projection matrix for the image feature vectors, so that all image feature vectors are projected in the same data space, thereby ensuring the effectiveness of the nearest neighbor comparison. In practice, in order to improve the efficiency of the algorithm, the approximate learning method based on sparse coding constructs an over-complete dictionary and a meta-projection matrix in the data space, uses the over-complete dictionary to sparsely encode the feature data, and compares the coding coefficients with the meta-projection matrix. Combined, a data space adaptive sparse projection matrix is constructed.
如图2所示,实施例中提出的学习数据空间自适应稀疏投影矩阵计算方法的流程图,具体学习过程如下:As shown in Figure 2, the flow chart of the learning data space adaptive sparse projection matrix calculation method proposed in the embodiment, the specific learning process is as follows:
3.1)初始化过完备字典D和稀疏系数矩阵α3.1) Initialize overcomplete dictionary D and sparse coefficient matrix α
3.2)使用公式(1)计算特征稀疏编码损失函数;3.2) Use formula (1) to calculate the feature sparse coding loss function;
3.3)使用迭代梯度优化策略,迭代更新过完备字典D和稀疏系数矩阵α 完成过完备字典D和稀疏系数矩阵α的优化3.3) Use the iterative gradient optimization strategy to iteratively update the overcomplete dictionary D and sparse coefficient matrix α to complete the optimization of the overcomplete dictionary D and sparse coefficient matrix α
3.4)使用更新后的过完备字典D和稀疏系数矩阵α,根据公式(1)计算损失函数,如果ΔΩ>ε 1,则转到步骤3.3,否则判定为收敛,输出对应的D和α。 3.4) Use the updated overcomplete dictionary D and the sparse coefficient matrix α to calculate the loss function according to formula (1). If ΔΩ>ε 1 , go to step 3.3, otherwise it is judged to be converged, and the corresponding D and α are output.
3.5)使用公式(2)计算复合投影矩阵损失函数;3.5) Calculate the composite projection matrix loss function using formula (2);
3.6)使用公式(3)和公式(4),利用梯度优化策略,更新
Figure PCTCN2021103200-appb-000026
3.6) Using formula (3) and formula (4), using the gradient optimization strategy, update
Figure PCTCN2021103200-appb-000026
3.7)使用更新后的
Figure PCTCN2021103200-appb-000027
根据公式(2)计算损失函数,如果ΔΨ>ε 2,则转到步骤3.6,否则判定为收敛,输出对应的
Figure PCTCN2021103200-appb-000028
3.7) Using the updated
Figure PCTCN2021103200-appb-000027
Calculate the loss function according to formula (2). If ΔΨ>ε 2 , go to step 3.6, otherwise it is determined to be converged, and the corresponding output is
Figure PCTCN2021103200-appb-000028
步骤4):在步骤3)学习得到的数据空间自适应稀疏投影矩阵计算方法的基础上,在测试数据集合上进行车辆重识别;具体实现方法如下:Step 4): On the basis of the data space adaptive sparse projection matrix calculation method learned in step 3), vehicle re-identification is performed on the test data set; the specific implementation method is as follows:
4.1)在测试数据集合中,将摄像头A下的第一辆车的图像特征与摄像头B下的所有车辆(共M-N辆)的特征按照公式(6)进行距离计算,得到M-N个距离计算结果;4.1) In the test data set, the image characteristics of the first vehicle under camera A and the characteristics of all vehicles (M-N vehicles in total) under camera B are calculated according to formula (6) to obtain M-N distance calculation results;
4.2)将步骤4.1)得到的M-N距离计算结果从小到大排序,排在第一位的距离计算结果对应的摄像头B图像即为本方法给出的与摄像头A图像属于同一辆车的图像;4.2) The M-N distance calculation results obtained in step 4.1) are sorted from small to large, and the camera B image corresponding to the distance calculation result in the first place is the image that belongs to the same vehicle as the camera A image provided by this method;
4.3)重复步骤4.1)和4.2),完成摄像头A下所有图像特征与摄像头B下所有图像特征的距离计算和车辆一致性判定。4.3) Repeat steps 4.1) and 4.2) to complete the distance calculation and vehicle consistency determination between all image features under camera A and all image features under camera B.
本申请提供了一种基于深度特征和稀疏度量投影的车辆重识别方法,所述方法收集同一辆车在不同摄像机下的图像,将车辆图像划分为训练图像集合和测试图像集合,对图像进行特征提取,分别形成训练数据集合和测试数据集合,在训练数据集合上,学习数据空间自适应稀疏度量投影矩阵的计算方法,在测试数据集合上,使用数据空间自适应稀疏度量投影矩阵进行图像特征变换,基 于变换后的图像特征进行距离计算,完成车辆重识别。The present application provides a vehicle re-identification method based on depth feature and sparse metric projection. The method collects images of the same vehicle under different cameras, divides the vehicle images into a training image set and a test image set, and characterizes the images. Extract, respectively form a training data set and a test data set. On the training data set, learn the calculation method of the data space adaptive sparse metric projection matrix, and on the test data set, use the data space adaptive sparse metric projection matrix to perform image feature transformation , and calculate the distance based on the transformed image features to complete the vehicle re-identification.
本申请考虑到在交通监控网络中,每一张车辆图像的拍摄环境(包括光照、摄像机角度、摄像机参数、遮挡等因素)都各不相同,导致对应特征具有独特的数据分布,本申请通过构建数据空间过完备字典和元投影矩阵,为每一个图像特征学习自适应的稀疏投影矩阵,使得经过投影后的特征样本都处于相同的特征空间中,从而保证了最近邻比较的有效性。This application considers that in the traffic monitoring network, the shooting environment (including factors such as illumination, camera angle, camera parameters, occlusion, etc.) of each vehicle image is different, resulting in unique data distribution of corresponding features. The data space is overcomplete with dictionary and meta-projection matrix, and an adaptive sparse projection matrix is learned for each image feature, so that the projected feature samples are all in the same feature space, thus ensuring the effectiveness of the nearest neighbor comparison.
本申请属于基于度量学习的方法,目标是将所有特征向量都投影到统一的特征空间中,实现同一辆车的特征更加靠近,而不同车的特征更加远离。The present application belongs to a method based on metric learning, and the goal is to project all feature vectors into a unified feature space, so that the features of the same car are closer, and the features of different cars are farther away.
实施例二Embodiment 2
本实施例提供了基于深度特征和稀疏度量投影的车辆重识别系统;This embodiment provides a vehicle re-identification system based on depth feature and sparse metric projection;
基于深度特征和稀疏度量投影的车辆重识别系统,包括:A vehicle re-identification system based on deep feature and sparse metric projection, including:
获取模块,其被配置为:获取目标车辆图像;获取待重识别的图像集合;an acquisition module, which is configured to: acquire an image of the target vehicle; acquire a set of images to be re-identified;
特征提取模块,其被配置为:对目标车辆图像和待重识别的图像集合中的每一幅图像,均进行深度特征提取,得到每一幅图像的深度特征;a feature extraction module, which is configured to: perform depth feature extraction on each image in the target vehicle image and the image set to be re-identified to obtain the depth feature of each image;
投影矩阵计算模块,其被配置为:计算目标车辆图像的深度特征所对应的自适应稀疏投影矩阵;同时,计算待重识别图像集合中每一幅图像的深度特征所对应的自适应稀疏投影矩阵;The projection matrix calculation module is configured to: calculate the adaptive sparse projection matrix corresponding to the depth feature of the target vehicle image; at the same time, calculate the adaptive sparse projection matrix corresponding to the depth feature of each image in the set of images to be re-identified ;
距离计算模块,其被配置为:基于深度特征和深度特征对应的自适应稀疏投影矩阵,计算出目标车辆图像的深度特征与待重识别图像集合中每一幅图像深度特征之间的距离;a distance calculation module, which is configured to: based on the depth feature and the adaptive sparse projection matrix corresponding to the depth feature, calculate the distance between the depth feature of the target vehicle image and the depth feature of each image in the set of images to be re-identified;
输出模块,其被配置为:重复距离计算模块的步骤,直到计算出目标图像的深度特征与待重识别图像集合中所有幅图像深度特征之间的距离;选择最小 距离所对应的图像作为目标车辆的重识别图像。The output module is configured to: repeat the steps of the distance calculation module until the distance between the depth feature of the target image and the depth features of all images in the set of images to be re-identified is calculated; select the image corresponding to the minimum distance as the target vehicle the re-identified image.
此处需要说明的是,上述获取模块、特征提取模块、投影矩阵计算模块、距离计算模块和输出模块对应于实施例一中的步骤S101至步骤S105,上述模块与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例一所公开的内容。需要说明的是,上述模块作为系统的一部分可以在诸如一组计算机可执行指令的计算机系统中执行。It should be noted here that the above-mentioned acquisition module, feature extraction module, projection matrix calculation module, distance calculation module and output module correspond to steps S101 to S105 in the first embodiment, and the examples and The application scenarios are the same, but are not limited to the content disclosed in the first embodiment. It should be noted that the above modules can be executed in a computer system such as a set of computer-executable instructions as part of the system.
上述实施例中对各个实施例的描述各有侧重,某个实施例中没有详述的部分可以参见其他实施例的相关描述。The description of each embodiment in the foregoing embodiments has its own emphasis. For the part that is not described in detail in a certain embodiment, reference may be made to the relevant description of other embodiments.
所提出的系统,可以通过其他的方式实现。例如以上所描述的系统实施例仅仅是示意性的,例如上述模块的划分,仅仅为一种逻辑功能划分,实际实现时,可以有另外的划分方式,例如多个模块可以结合或者可以集成到另外一个系统,或一些特征可以忽略,或不执行。The proposed system can be implemented in other ways. For example, the system embodiments described above are only illustrative. For example, the division of the above modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into other A system, or some feature, can be ignored, or not implemented.
实施例三Embodiment 3
本实施例还提供了一种电子设备,包括:一个或多个处理器、一个或多个存储器、以及一个或多个计算机程序;其中,处理器与存储器连接,上述一个或多个计算机程序被存储在存储器中,当电子设备运行时,该处理器执行该存储器存储的一个或多个计算机程序,以使电子设备执行上述实施例一所述的方法。This embodiment also provides an electronic device, including: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are Stored in the memory, when the electronic device runs, the processor executes one or more computer programs stored in the memory, so that the electronic device executes the method described in the first embodiment.
应理解,本实施例中,处理器可以是中央处理单元CPU,处理器还可以是其他通用处理器、数字信号处理器DSP、专用集成电路ASIC,现成可编程门阵列FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in this embodiment, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors, DSPs, application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices. , discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
存储器可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据、存储器的一部分还可以包括非易失性随机存储器。例如,存储器还可以存储设备类型的信息。The memory may include read-only memory and random access memory and provide instructions and data to the processor, and a portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information.
在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。In the implementation process, each step of the above-mentioned method can be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software.
实施例一中的方法可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器、闪存、只读存储器、可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。The method in the first embodiment may be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor. The software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware. To avoid repetition, detailed description is omitted here.
本领域普通技术人员可以意识到,结合本实施例描述的各示例的单元及算法步骤,能够以电子硬件或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those skilled in the art can realize that the units and algorithm steps of each example described in conjunction with this embodiment can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
实施例四Embodiment 4
本实施例还提供了一种计算机可读存储介质,用于存储计算机指令,所述计算机指令被处理器执行时,完成实施例一所述的方法。This embodiment also provides a computer-readable storage medium for storing computer instructions, and when the computer instructions are executed by a processor, the method described in the first embodiment is completed.
以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above descriptions are only preferred embodiments of the present application, and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included within the protection scope of this application.

Claims (10)

  1. 基于深度特征和稀疏度量投影的车辆重识别方法,其特征是,包括:The vehicle re-identification method based on deep feature and sparse metric projection is characterized by including:
    获取目标车辆图像;获取待重识别的图像集合;Obtain the target vehicle image; obtain the image set to be re-identified;
    对目标车辆图像和待重识别的图像集合中的每一幅图像,均进行深度特征提取,得到每一幅图像的深度特征;Perform depth feature extraction on the target vehicle image and each image in the set of images to be re-identified to obtain the depth feature of each image;
    计算目标车辆图像的深度特征所对应的自适应稀疏投影矩阵;同时,计算待重识别图像集合中每一幅图像的深度特征所对应的自适应稀疏投影矩阵;Calculate the adaptive sparse projection matrix corresponding to the depth feature of the target vehicle image; at the same time, calculate the adaptive sparse projection matrix corresponding to the depth feature of each image in the image set to be re-identified;
    基于深度特征和深度特征对应的自适应稀疏投影矩阵,计算出目标车辆图像的深度特征与待重识别图像集合中每一幅图像深度特征之间的距离;Based on the depth feature and the adaptive sparse projection matrix corresponding to the depth feature, the distance between the depth feature of the target vehicle image and the depth feature of each image in the set of images to be re-identified is calculated;
    重复上一步的步骤,直到计算出目标图像的深度特征与待重识别图像集合中所有幅图像深度特征之间的距离;选择最小距离所对应的图像作为目标车辆的重识别图像。Repeat the steps of the previous step until the distance between the depth feature of the target image and the depth features of all images in the set of images to be re-identified is calculated; the image corresponding to the minimum distance is selected as the re-identified image of the target vehicle.
  2. 如权利要求1所述的基于深度特征和稀疏度量投影的车辆重识别方法,其特征是,对目标车辆图像和待重识别的图像集合中的每一幅图像,均进行深度特征提取,得到每一幅图像的深度特征;具体包括:The vehicle re-identification method based on depth feature and sparse metric projection as claimed in claim 1, wherein depth feature extraction is performed on each image in the target vehicle image and the image set to be re-identified to obtain each image. Depth features of an image; specifically include:
    对目标车辆图像和待重识别的图像集合中的每一幅图像,均采用改进后的VGG-19网络进行深度特征提取,得到每一幅图像的深度特征;For each image in the target vehicle image and the image set to be re-identified, the improved VGG-19 network is used to extract the depth feature, and the depth feature of each image is obtained;
    所述改进后的VGG-19网络,为将VGG-19网络的最后两个全连接层去掉,只保留前16个卷积层和第一个全连接层。In the improved VGG-19 network, in order to remove the last two fully connected layers of the VGG-19 network, only the first 16 convolutional layers and the first fully connected layer are retained.
  3. 如权利要求1所述的基于深度特征和稀疏度量投影的车辆重识别方法,其特征是,计算目标车辆图像的深度特征所对应的自适应稀疏投影矩阵;具体包括:The vehicle re-identification method based on depth feature and sparse metric projection as claimed in claim 1, wherein the adaptive sparse projection matrix corresponding to the depth feature of the target vehicle image is calculated; specifically, it includes:
    根据过完备字典,计算目标车辆图像的深度特征所对应的稀疏系数;Calculate the sparse coefficient corresponding to the depth feature of the target vehicle image according to the overcomplete dictionary;
    将目标车辆图像的深度特征所对应的稀疏系数视为权重,对元投影矩阵进行加权求和,得到目标车辆图像的深度特征所对应的自适应稀疏投影矩阵。The sparse coefficients corresponding to the depth features of the target vehicle image are regarded as weights, and the meta-projection matrix is weighted and summed to obtain the adaptive sparse projection matrix corresponding to the depth features of the target vehicle image.
  4. 如权利要求3所述的基于深度特征和稀疏度量投影的车辆重识别方法,其特征是,所述过完备字典,获取步骤包括:The vehicle re-identification method based on depth feature and sparse metric projection as claimed in claim 3, wherein, in the overcomplete dictionary, the obtaining step comprises:
    初始化过完备字典D为训练数据空间的K聚类中心;初始化稀疏系数矩阵各个元素;所述训练数据,包括:已知目标车辆图像,和已知目标车辆的重识别图像;Initialize the overcomplete dictionary D as the K cluster center in the training data space; initialize each element of the sparse coefficient matrix; the training data includes: known target vehicle images and re-identified images of known target vehicles;
    计算特征稀疏编码损失函数;Calculate the feature sparse coding loss function;
    根据特征稀疏编码损失函数,采用迭代训练策略,首先固定过完备字典D,使用梯度下降法更新稀疏系数矩阵,然后固定稀疏系数矩阵,使用梯度下降法更新过完备字典D。According to the feature sparse coding loss function, an iterative training strategy is adopted. First, the overcomplete dictionary D is fixed, and the sparse coefficient matrix is updated by the gradient descent method, and then the sparse coefficient matrix is fixed, and the overcomplete dictionary D is updated by the gradient descent method.
  5. 如权利要求3所述的基于深度特征和稀疏度量投影的车辆重识别方法,其特征是,所述元投影矩阵,获取步骤包括:The vehicle re-identification method based on depth feature and sparse metric projection as claimed in claim 3, wherein, in the element projection matrix, the obtaining step comprises:
    采用联合训练策略,拼接元投影矩阵构建复合投影矩阵;Using the joint training strategy, splicing the element projection matrix to construct the composite projection matrix;
    计算复合投影矩阵的损失函数;Calculate the loss function of the composite projection matrix;
    根据复合投影矩阵的损失函数,采用梯度下降策略,计算复合投影矩阵的梯度值,对复合投影矩阵的梯度值进行更新,即获得各元投影矩阵。According to the loss function of the composite projection matrix, using the gradient descent strategy, the gradient value of the composite projection matrix is calculated, and the gradient value of the composite projection matrix is updated, that is, each element projection matrix is obtained.
  6. 如权利要求1所述的基于深度特征和稀疏度量投影的车辆重识别方法,其特征是,基于深度特征和深度特征对应的自适应稀疏投影矩阵,计算出目标车辆图像的深度特征与待重识别图像集合中每一幅图像深度特征之间的距离;具体步骤包括:The vehicle re-identification method based on depth feature and sparse metric projection according to claim 1, wherein the depth feature of the target vehicle image and the to-be-re-identified vehicle image are calculated based on the depth feature and the adaptive sparse projection matrix corresponding to the depth feature. The distance between the depth features of each image in the image set; the specific steps include:
    将目标车辆图像的深度特征,与目标车辆图像的深度特征对应的自适应稀 疏投影矩阵相乘得到第一乘积;Multiply the depth feature of the target vehicle image and the adaptive sparse projection matrix corresponding to the depth feature of the target vehicle image to obtain the first product;
    将待重识别图像集合中某一幅图像深度特征,与待重识别图像集合中该幅图像深度特征对应的自适应稀疏投影矩阵相乘得到第二乘积;Multiplying the depth feature of a certain image in the set of images to be re-identified with the adaptive sparse projection matrix corresponding to the depth feature of the image in the set of images to be re-identified to obtain a second product;
    计算第一乘积与第二乘积的距离;Calculate the distance between the first product and the second product;
    第一乘积与第二乘积的距离,即为目标车辆图像的深度特征与待重识别图像集合中每一幅图像深度特征之间的距离。The distance between the first product and the second product is the distance between the depth feature of the target vehicle image and the depth feature of each image in the image set to be re-identified.
  7. 如权利要求2所述的基于深度特征和稀疏度量投影的车辆重识别方法,其特征是,所述改进后的VGG-19网络,采用ImageNet数据集预训练。The method for vehicle re-identification based on deep feature and sparse metric projection according to claim 2, wherein the improved VGG-19 network is pre-trained with ImageNet dataset.
  8. 基于深度特征和稀疏度量投影的车辆重识别系统,其特征是,包括:The vehicle re-identification system based on deep feature and sparse metric projection is characterized by including:
    获取模块,其被配置为:获取目标车辆图像;获取待重识别的图像集合;an acquisition module, which is configured to: acquire an image of the target vehicle; acquire a set of images to be re-identified;
    特征提取模块,其被配置为:对目标车辆图像和待重识别的图像集合中的每一幅图像,均进行深度特征提取,得到每一幅图像的深度特征;a feature extraction module, which is configured to: perform depth feature extraction on each image in the target vehicle image and the image set to be re-identified to obtain the depth feature of each image;
    投影矩阵计算模块,其被配置为:计算目标车辆图像的深度特征所对应的自适应稀疏投影矩阵;同时,计算待重识别图像集合中每一幅图像的深度特征所对应的自适应稀疏投影矩阵;The projection matrix calculation module is configured to: calculate the adaptive sparse projection matrix corresponding to the depth feature of the target vehicle image; at the same time, calculate the adaptive sparse projection matrix corresponding to the depth feature of each image in the set of images to be re-identified ;
    距离计算模块,其被配置为:基于深度特征和深度特征对应的自适应稀疏投影矩阵,计算出目标车辆图像的深度特征与待重识别图像集合中每一幅图像深度特征之间的距离;a distance calculation module, which is configured to: based on the depth feature and the adaptive sparse projection matrix corresponding to the depth feature, calculate the distance between the depth feature of the target vehicle image and the depth feature of each image in the image set to be re-identified;
    输出模块,其被配置为:重复距离计算模块的步骤,直到计算出目标图像的深度特征与待重识别图像集合中所有幅图像深度特征之间的距离;选择最小距离所对应的图像作为目标车辆的重识别图像。The output module is configured to: repeat the steps of the distance calculation module until the distance between the depth feature of the target image and the depth features of all images in the set of images to be re-identified is calculated; select the image corresponding to the minimum distance as the target vehicle the re-identified image.
  9. 一种电子设备,其特征是,包括:一个或多个处理器、一个或多个存储 器、以及一个或多个计算机程序;其中,处理器与存储器连接,上述一个或多个计算机程序被存储在存储器中,当电子设备运行时,该处理器执行该存储器存储的一个或多个计算机程序,以使电子设备执行上述权利要求1-7任一项所述的方法。An electronic device is characterized by comprising: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are stored in In the memory, when the electronic device is running, the processor executes one or more computer programs stored in the memory, so that the electronic device executes the method of any one of the above claims 1-7.
  10. 一种计算机可读存储介质,其特征是,用于存储计算机指令,所述计算机指令被处理器执行时,完成权利要求1-7任一项所述的方法。A computer-readable storage medium, characterized in that it is used for storing computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1-7 is completed.
PCT/CN2021/103200 2021-01-05 2021-06-29 Vehicle re-identification method and system based on depth feature and sparse metric projection WO2022147977A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110014228.6 2021-01-05
CN202110014228.6A CN112699829B (en) 2021-01-05 2021-01-05 Vehicle weight identification method and system based on depth feature and sparse measurement projection

Publications (1)

Publication Number Publication Date
WO2022147977A1 true WO2022147977A1 (en) 2022-07-14

Family

ID=75514949

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/103200 WO2022147977A1 (en) 2021-01-05 2021-06-29 Vehicle re-identification method and system based on depth feature and sparse metric projection

Country Status (2)

Country Link
CN (1) CN112699829B (en)
WO (1) WO2022147977A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112699829B (en) * 2021-01-05 2022-08-30 山东交通学院 Vehicle weight identification method and system based on depth feature and sparse measurement projection

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107085206A (en) * 2017-03-22 2017-08-22 南京航空航天大学 A kind of one-dimensional range profile recognition methods for keeping projecting based on adaptive sparse
CN108875445A (en) * 2017-05-08 2018-11-23 上海荆虹电子科技有限公司 A kind of pedestrian recognition methods and device again
CN109145777A (en) * 2018-08-01 2019-01-04 北京旷视科技有限公司 Vehicle recognition methods, apparatus and system again
CN109635728A (en) * 2018-12-12 2019-04-16 中山大学 A kind of isomery pedestrian recognition methods again based on asymmetric metric learning
CN110765960A (en) * 2019-10-29 2020-02-07 黄山学院 Pedestrian re-identification method for adaptive multi-task deep learning
CN112699829A (en) * 2021-01-05 2021-04-23 山东交通学院 Vehicle weight identification method and system based on depth feature and sparse measurement projection

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106056141B (en) * 2016-05-27 2019-04-19 哈尔滨工程大学 A kind of target identification of use space sparse coding and angle rough estimate calculating method
CN106682087A (en) * 2016-11-28 2017-05-17 东南大学 Method for retrieving vehicles on basis of sparse codes of features of vehicular ornaments
CN108509854B (en) * 2018-03-05 2020-11-17 昆明理工大学 Pedestrian re-identification method based on projection matrix constraint and discriminative dictionary learning
CN109241981B (en) * 2018-09-03 2022-07-12 哈尔滨工业大学 Feature detection method based on sparse coding
CN109492610B (en) * 2018-11-27 2022-05-10 广东工业大学 Pedestrian re-identification method and device and readable storage medium
EP3722998A1 (en) * 2019-04-11 2020-10-14 Teraki GmbH Data analytics on pre-processed signals

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107085206A (en) * 2017-03-22 2017-08-22 南京航空航天大学 A kind of one-dimensional range profile recognition methods for keeping projecting based on adaptive sparse
CN108875445A (en) * 2017-05-08 2018-11-23 上海荆虹电子科技有限公司 A kind of pedestrian recognition methods and device again
CN109145777A (en) * 2018-08-01 2019-01-04 北京旷视科技有限公司 Vehicle recognition methods, apparatus and system again
CN109635728A (en) * 2018-12-12 2019-04-16 中山大学 A kind of isomery pedestrian recognition methods again based on asymmetric metric learning
CN110765960A (en) * 2019-10-29 2020-02-07 黄山学院 Pedestrian re-identification method for adaptive multi-task deep learning
CN112699829A (en) * 2021-01-05 2021-04-23 山东交通学院 Vehicle weight identification method and system based on depth feature and sparse measurement projection

Also Published As

Publication number Publication date
CN112699829B (en) 2022-08-30
CN112699829A (en) 2021-04-23

Similar Documents

Publication Publication Date Title
Garg et al. Don't look back: Robustifying place categorization for viewpoint-and condition-invariant place recognition
CN113222041B (en) High-order association discovery fine-grained image identification method and device of graph structure representation
WO2020228525A1 (en) Place recognition method and apparatus, model training method and apparatus for place recognition, and electronic device
CN109800692B (en) Visual SLAM loop detection method based on pre-training convolutional neural network
CN108681746B (en) Image identification method and device, electronic equipment and computer readable medium
CN110543581B (en) Multi-view three-dimensional model retrieval method based on non-local graph convolution network
CN108229347B (en) Method and apparatus for deep replacement of quasi-Gibbs structure sampling for human recognition
EP3847580A1 (en) Multi-view image clustering techniques using binary compression
US11270425B2 (en) Coordinate estimation on n-spheres with spherical regression
CN114830131A (en) Equal-surface polyhedron spherical gauge convolution neural network
WO2022147977A1 (en) Vehicle re-identification method and system based on depth feature and sparse metric projection
CN104036296A (en) Method and device for representing and processing image
CN114612698A (en) Infrared and visible light image registration method and system based on hierarchical matching
Pultar Improving the hardnet descriptor
CN114202694A (en) Small sample remote sensing scene image classification method based on manifold mixed interpolation and contrast learning
CN112860936A (en) Visual pedestrian re-identification method based on sparse graph similarity migration
CN111027609B (en) Image data weighted classification method and system
CN110929801B (en) Improved Euclid distance KNN classification method and system
CN110674689B (en) Vehicle re-identification method and system based on feature embedding space geometric constraint
Wang et al. Image splicing tamper detection based on deep learning and attention mechanism
CN116704187A (en) Real-time semantic segmentation method, system and storage medium for semantic alignment
CN114663861A (en) Vehicle re-identification method based on dimension decoupling and non-local relation
CN116012744A (en) Closed loop detection method, device, equipment and storage medium
CN112287995A (en) Low-resolution image identification method based on multilayer coupling mapping
CN115929495B (en) Engine valve fault diagnosis method based on Markov transition field and improved Gaussian prototype network

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21917023

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21917023

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 23.10.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21917023

Country of ref document: EP

Kind code of ref document: A1