WO2021243947A1 - 对象再识别方法及装置、终端和存储介质 - Google Patents

对象再识别方法及装置、终端和存储介质 Download PDF

Info

Publication number
WO2021243947A1
WO2021243947A1 PCT/CN2020/126269 CN2020126269W WO2021243947A1 WO 2021243947 A1 WO2021243947 A1 WO 2021243947A1 CN 2020126269 W CN2020126269 W CN 2020126269W WO 2021243947 A1 WO2021243947 A1 WO 2021243947A1
Authority
WO
WIPO (PCT)
Prior art keywords
image data
clustered
cluster
network
clustering
Prior art date
Application number
PCT/CN2020/126269
Other languages
English (en)
French (fr)
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 商汤集团有限公司
Priority to JP2021549335A priority Critical patent/JP2022548187A/ja
Priority to KR1020217025979A priority patent/KR20210151773A/ko
Publication of WO2021243947A1 publication Critical patent/WO2021243947A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Definitions

  • the present disclosure relates to the field of image processing technology, and in particular to an object re-identification method, device, storage medium and computer equipment.
  • re-identification of objects (such as pedestrians, vehicles, etc.).
  • pseudo-labeling Pseudo-Labelling
  • Pseudo-Labelling Pseudo-Labelling
  • the trained network clusters the image data of the target domain to generate pseudo-labels, and finally uses the image data with pseudo-labels to optimize the network to obtain the final network.
  • the present disclosure provides an object re-identification method, device, storage medium and computer equipment.
  • the present disclosure provides an object re-recognition method, including: obtaining a pre-trained re-recognition network; obtaining an image to be recognized; performing re-recognition processing on the image to be recognized through the re-recognition network to obtain a target in the image to be recognized The re-identification result of the object; wherein the training image data of the re-identification network includes at least first clustered image data and non-clustered instance image data, the first clustered image data and the non-clustered instance image data In order to obtain by performing clustering processing on the first image data set by the initial network corresponding to the re-identification network, the image data in the first image data set does not contain real cluster tags.
  • the embodiments of the present disclosure perform network training by combining outliers that are not in the clustering, which helps to improve the clustering performance of the re-identification network, and further improves the performance of the target object re-identification result obtained by the object re-identification method of the present disclosure. accuracy.
  • the training image data of the re-identification network further includes a second image data set, and the second cluster image data in the second image data set includes a true cluster label; the second image data set The image data domain where the first image data set is located is different from the image data domain where the first image data set is located.
  • the embodiments of the present disclosure help to improve re-identification by providing supervision of the first cluster image data that does not contain real cluster labels, non-cluster instance image data, and the second cluster image data containing real cluster labels.
  • the clustering performance of the network further improves the accuracy of the target object re-recognition result obtained by the object re-recognition method of the present disclosure.
  • the method before acquiring the pre-trained re-identification network, the method further includes: acquiring the initial network; acquiring the training image data; training the initial network through the training image data to obtain the Then identify the network.
  • the embodiments of the present disclosure train the initial network through the acquired training image data to obtain the re-identification network, which can improve the image classification and object recognition capabilities of the re-identification network.
  • the acquiring the training image data includes: acquiring an initial clustering result obtained by performing clustering processing on the first image data set through the initial network; performing the initial clustering result on the initial clustering result Re-clustering processing to obtain the first clustered image data and the non-clustered instance image data.
  • the processing flow for processing the target domain image data in the embodiment of the present disclosure can be understood as a self-defined step size comparison learning strategy, that is, according to the principle of "from simple to difficult", first obtain the most credible cluster, and then Through the re-clustering process, credible clusters are gradually increased, thereby improving the quality of the learning target, and reducing errors by increasing credible clusters.
  • the initial clustering result includes initial clustered image data; the re-clustering process is performed on the initial clustering result to obtain the first clustered image data and the non-clustering instance
  • the image data includes: reducing the number of image data of the first current cluster in the initial clustered image data according to the image feature distance to obtain the second current cluster; and determining the density index of the second current cluster, where the density index is The ratio of the number of image data of the second current cluster to the number of image data of the first current cluster; when the density index reaches a first preset threshold, the second current cluster is used to replace the first A current cluster, the first clustered image data is obtained; the reduced image data is updated to belong to the non-clustered instance image data.
  • re-clustering is performed by evaluating the density of clusters to gradually increase credible clusters, thereby improving the quality of the learning target, and reducing errors by increasing credible clusters.
  • the initial clustering result further includes initial non-clustered image data; the re-clustering process is performed on the initial clustering result to obtain the first clustered image data and the non-clustered image data.
  • the class instance image data includes: adding image data of other clusters and/or image data in the initial non-clustered image data to the third current cluster of the initial clustered image data according to the image feature distance to obtain the first 4.
  • the recognition rate of feature representation can be gradually increased, and more non-clustering data can be added to the new clusters to gradually increase the credible clusters.
  • the training the initial network through the training image data to obtain the re-identification network includes: determining an image data center based on the training image data; The image data center determines the contrast loss, optimizes the parameters of the initial network based on the contrast loss, and obtains an optimized network; clusters the non-clustered instance image data in the training image data through the optimized network, according to The clustering result updates the first clustered image data and the non-clustered instance image data to obtain new training image data; determines a new image data center based on the new training image data, and returns based on the The new training image data and the new image data center determine a new contrast loss step until the training is completed, and the re-identification network is obtained.
  • the embodiments of the present disclosure dynamically optimize the network, update the training data, and update the image data center, so as to improve the training performance of the re-recognition network, thereby improving the accuracy of the target object re-recognition result obtained by the object re-recognition method of the present disclosure. sex.
  • the image data center includes a first cluster center corresponding to the first clustered image data and an instance center corresponding to the non-clustered instance image data; or, the image data center includes all The first cluster center corresponding to the first clustered image data, the instance center corresponding to the non-clustered instance image data, and the second cluster center corresponding to the second clustered image data.
  • the network training can be performed through unsupervised learning, and the second cluster image data can be introduced for training using semi-supervised learning, which provides the flexibility and diversity of network training.
  • the re-identification network includes a residual network.
  • the residual network is a network composed of residual blocks
  • the residual blocks inside the network use jump connections, which helps to solve the problems of gradient disappearance and gradient explosion, and makes the residual network easy to optimize. At the same time, it can improve the performance of image classification and object recognition.
  • the present disclosure provides an object re-identification device, which includes: a network acquisition module configured to acquire a pre-trained re-identification network; an image acquisition module configured to acquire an image to be identified; a re-identification module configured to pair through the re-identification network
  • the image to be recognized is subjected to re-recognition processing to obtain the re-recognition result of the target object in the image to be recognized; wherein the training image data of the re-recognition network includes at least first cluster image data and non-cluster instance image data ,
  • the first clustered image data and the non-clustering instance image data are obtained by clustering the first image data set by the initial network corresponding to the re-identification network, and the images in the first image data set The data does not contain true cluster labels.
  • the present disclosure provides a computer device, including a memory, a processor, and a computer program stored on the memory and capable of running on the processor, and the processor implements the above object re-identification method when the processor executes the program.
  • the present disclosure provides a computer-readable storage medium in which computer-executable instructions are stored, and the computer-executable instructions are configured to implement the above-mentioned object re-identification method when executed by a processor.
  • the embodiments of the present disclosure provide a computer program product, wherein the above-mentioned computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the above-mentioned computer program is operable to cause a computer to perform object recognition as in the embodiments of the present disclosure. Some or all of the steps described in the method.
  • the computer program product may be a software installation package.
  • FIG. 1 is a schematic diagram of a re-identification network obtained through network training in an embodiment of the disclosure
  • FIG. 2 is a schematic diagram of processing target domain image data in an embodiment of the disclosure
  • FIG. 3 is a schematic diagram of performing re-clustering processing on initial clustering results in an embodiment of the disclosure to obtain first clustered image data and non-clustered instance image data;
  • FIG. 4 is an example diagram of calculating an intensive index in an embodiment of the disclosure
  • FIG. 5 is a schematic diagram of performing re-clustering processing on initial clustering results in an embodiment of the present disclosure to obtain first clustered image data and non-clustering instance image data;
  • FIG. 6 is an example diagram of calculating an independent index in an embodiment of the disclosure.
  • FIG. 7 is a schematic diagram of training the initial network through training image data in an embodiment of the disclosure to obtain a re-identification network
  • FIG. 8 is a schematic diagram of object re-identification through a re-identification network in an embodiment of the disclosure.
  • FIG. 9 is a schematic diagram of a method for re-identification network training in an embodiment of the disclosure.
  • FIG. 10a is a schematic diagram of a method of re-clustering processing according to an embodiment of the disclosure.
  • FIG. 10b is a schematic diagram of another re-clustering processing method according to an embodiment of the disclosure.
  • FIG. 11 is a schematic diagram of a re-identification network training device in an embodiment of the disclosure.
  • FIG. 12 is a schematic diagram of an object re-identification device in an embodiment of the disclosure.
  • the words “if” and “if” as used herein can be interpreted as “when” or “when” or “in response to determination” or “in response to detection”.
  • the phrase “if determined” or “if detected (statement or event)” can be interpreted as “when determined” or “in response to determination” or “when detected (statement or event) )” or “in response to detection (statement or event)”.
  • AI Artificial Intelligence
  • digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results.
  • artificial intelligence is a comprehensive technology of computer science. It attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a similar way to human intelligence.
  • Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning and decision-making.
  • Artificial intelligence technology is a comprehensive discipline, covering a wide range of fields, including both hardware-level technology and software-level technology.
  • Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, and mechatronics.
  • Artificial intelligence software technology mainly includes several major directions such as computer vision technology and machine learning/deep learning.
  • Computer Vision is a science that studies how to make machines "see”. In some embodiments of this disclosure, it refers to the use of cameras and computers instead of human eyes to identify, track, and measure objects. , And do graphics processing to make computer processing more suitable for human eyes to observe or send to the instrument to detect images.
  • computer vision studies related theories and technologies, trying to establish an artificial intelligence system that can obtain information from images or multi-dimensional data.
  • Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR (Optical Character Recognition, optical character recognition), video processing, video semantic understanding, video content/behavior recognition, three-dimensional object reconstruction, 3D (three dimensional) , 3D) technology, virtual reality, augmented reality, synchronous positioning and map construction, and other technologies, including common facial recognition, fingerprint recognition and other biometric technology.
  • Machine Learning is a multi-disciplinary interdisciplinary, involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other subjects. Specializing in the study of how computers simulate or realize human learning behaviors in order to acquire new knowledge or skills, and reorganize the existing knowledge structure to continuously improve its own performance.
  • Machine learning is the core of artificial intelligence, the fundamental way to make computers intelligent, and its applications cover all fields of artificial intelligence.
  • Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, teaching learning and other technologies.
  • Target re-recognition is an important issue in the field of computer vision and security monitoring. It is required to retrieve the image of the corresponding target from the data set.
  • the target can be a pedestrian, a vehicle, etc.
  • the network shows an unavoidable performance degradation, which is caused by the difference between image fields, such as camera environment, light, background, shooting equipment, etc. .
  • it is unrealistic to label different training data for each monitoring scene for network training, because labeling requires a lot of manpower and time.
  • the method based on pseudo-labels is a common method.
  • This method aims at self-training by continuously clustering on unlabeled target domains to generate pseudo-labels, and can achieve the most advanced performance.
  • the clustering process will produce certain abnormal points, that is, it cannot be classified into any type of edge samples. In order to ensure the quality of the clustering, these abnormal points are directly discarded and not included in the training set.
  • the process of self-training of the network only the image data with pseudo labels in the target domain is used, and outliers that are not included in the cluster are discarded.
  • outliers may be difficult but valuable sample images Data, thereby limiting the clustering performance of the network, which may have a certain impact on the clustering results of the network.
  • the present disclosure proposes an object re-identification method.
  • the re-identification network used in the method is trained based on at least the first clustered image data and the non-clustered instance image data. Therefore, the present disclosure is not in the cluster by combining Performing network training on the outliers of, helps to improve the clustering performance of the re-identification network, and further improves the accuracy of the target object re-identification result obtained by the object re-identification method of the present disclosure.
  • the object re-recognition method proposed in the embodiments of the present disclosure can be divided into two parts, including a network training part and a network application part; among them, the network training part relates to the technical field of machine learning.
  • machine learning This technique trains the initial network to obtain a trained re-recognition network; in the network application part, by using the re-recognition network trained in the network training part, the re-recognition result of the target object in the image to be recognized is obtained.
  • the method steps of the network training part of the present disclosure can be implemented by a terminal or a server.
  • Fig. 1 is a schematic diagram of a re-identification network obtained through network training in an embodiment of the disclosure. As shown in Fig. 1, the processing flow includes the following steps:
  • the initial network is the initial network to be trained, and the initial network has certain object re-identification capabilities.
  • the initial network can be, for example, a residual network (Residual Network, ResNet), etc.
  • the residual network is a network composed of residual blocks (Residual blocks), and the residual blocks inside the network use skip connections to help solve the disappearance of gradients.
  • the gradient explosion problem makes the residual network easy to optimize, and at the same time improves the performance of image classification and object recognition.
  • the network training method may adopt unsupervised learning.
  • Unsupervised learning refers to a process of network training using only unlabeled image data in a target domain, and the target domain may be the first surveillance scene.
  • the training image data of the re-identification network includes the first clustered image data and the non-clustered instance image data.
  • the first clustered image data and the non-clustered instance image data are obtained by clustering the first image data set by the initial network corresponding to the re-identification network, and the image data in the first image data set does not contain the true cluster label ,
  • the first image data set corresponds to the image data of the target domain.
  • the network training method may adopt semi-supervised learning.
  • Semi-supervised learning refers to a process of network training using both labeled image data in the source domain and unlabeled image data in the target domain.
  • the source domain may be a second surveillance scene.
  • the labeled image data in the source domain has a ground-truth (true value) label.
  • the ground-truth can be manually labeled, and the ground-truth can provide valuable supervision during the network training process.
  • the training image data of the re-identification network includes at least the first clustered image data, the non-clustered instance image data, and the second image data set.
  • the first clustered image data and the non-clustered instance image data are obtained by clustering the first image data set by the initial network corresponding to the re-identification network, and the image data in the first image data set does not contain the true cluster label ,
  • the first image data set corresponds to the image data of the target domain.
  • the second cluster image data in the second image data set contains the true cluster label, and the second image data set corresponds to the image data of the source domain; the image data domain where the second image data set is located is the same as the image data where the first image data set is located The domain is different.
  • the step of obtaining training image data includes obtaining labeled source domain image data, obtaining unlabeled target domain image data, and processing target domain image data A step of.
  • the image data that has been marked can be directly acquired.
  • the step of acquiring training image data includes the steps of acquiring unlabeled target domain image data and processing the target domain image data.
  • S220 Obtain an initial clustering result obtained by performing clustering processing on the first image data set through the initial network
  • S240 Perform re-clustering processing on the initial clustering result to obtain first clustered image data and non-clustered instance image data.
  • the first image data set corresponds to the target domain image data.
  • the first image data set is initially clustered through the initial network to obtain the initial clustering result corresponding to the first image data set, and then the initial clustering result is re-processed
  • the clustering process obtains the first clustered image data and the non-clustered instance image data.
  • the above processing flow for processing the image data of the target domain can be understood as a self-defined step size comparison learning strategy, that is, according to the principle of "from simple to difficult", first obtain the most credible cluster, and then regroup Class processing gradually increases credible clusters, thereby improving the quality of learning objectives, and reducing errors by increasing credible clusters.
  • the initial clustering result includes initial clustering image data
  • FIG. 3 is a schematic diagram of performing re-clustering processing on the initial clustering results in an embodiment of the present disclosure to obtain first clustered image data and non-clustering instance image data. As shown in FIG. 3, the processing flow includes the following steps:
  • S242A according to the image feature distance, reduce the number of image data of the first current cluster in the initial clustered image data to obtain the second current cluster;
  • S244A Determine the density index of the second current cluster, where the density index is the ratio of the number of image data of the second current cluster to the number of image data of the first current cluster;
  • S248A Update the reduced image data to the image data belonging to the non-clustering instance.
  • the image feature distance of each image data meets the clustering criterion, namely ⁇ d ⁇ d1, where ⁇ d is the image feature distance, and d1 is the distance corresponding to the clustering standard .
  • the clustering standard After increasing the clustering standard (reducing the distance corresponding to the clustering standard), for example, the clustering standard becomes d2, and d2 ⁇ d1, it may happen that the image feature distance of some image data is greater than the clustering standard, namely ⁇ d >d2, at this time, retain the image data with ⁇ d ⁇ d2 according to the image feature distance, and remove the image data with ⁇ d>d2 from the first current cluster, the number of image data in the first current cluster is reduced, and a new one is obtained The second current cluster.
  • the density index of the second current cluster is calculated, and the density index is used to evaluate the density of the cluster.
  • Fig. 4 is an example diagram of calculating the density index.
  • the dots represent image data
  • the black dots represent the retained image data
  • the white dots represent the removed image data
  • the solid line area represents the first current cluster clu1
  • the dotted area represents the second current cluster clu2.
  • the density index P is calculated, the density index P is compared with the corresponding first preset threshold ⁇ P, and it is determined whether to retain the new cluster (that is, the second current cluster) according to the comparison result.
  • the density index P of the second current cluster clu2 reaches the preset density requirement.
  • the first current cluster is disbanded, the second current cluster is retained, and the second current cluster pair is used
  • the first cluster image data is updated.
  • the image data that is reduced (removed) in the cluster the image data is updated to belong to the non-cluster instance image data. For example, referring to Fig. 4, when P is 5/7 and ⁇ P is 0.5, P> ⁇ P.
  • the first current cluster is replaced by the second current cluster, and the image data of the first cluster is updated.
  • re-clustering is performed by evaluating the density of clusters, so as to gradually increase credible clusters, thereby improving the quality of the learning target, and reducing errors by increasing credible clusters.
  • a clustering credibility evaluation criterion which re-clusters the initial clustering results by evaluating the independence of the clusters, thereby increasing the number of credible clusters.
  • the initial clustering result includes initial clustered image data and initial non-clustered image data.
  • FIG. 5 is a schematic diagram of performing re-clustering processing on initial clustering results in an embodiment of the disclosure to obtain first clustered image data and non-clustering instance image data. As shown in FIG. 5, the processing flow includes the following steps:
  • S244B Determine the independence index of the fourth current cluster; the independence index is the ratio of the number of image data of the third current cluster to the number of image data of the fourth current cluster;
  • re-clustering is performed by lowering the clustering standard to verify whether the independence of clustering meets the preset requirements.
  • the image feature distance of each image data meets the clustering criterion, namely ⁇ d ⁇ d1, where ⁇ d is the image feature distance, and d1 is the distance corresponding to the clustering standard .
  • the non-current cluster image data of ⁇ d' ⁇ d3 is added to the third current cluster, the number of image data in the third current cluster increases, and a new fourth current cluster is obtained.
  • the added image data may include only image data of other clusters that meet the requirements, may include only image data in the initial non-clustered image data that meets the requirements, or may also include other clusters that meet the requirements. Image data and image data in the initial non-clustered image data.
  • the independence index of the fourth current cluster is calculated, and the independence index is used to evaluate the independence of the cluster.
  • Figure 6 is an example diagram for calculating the independence index.
  • the solid line area represents the existing cluster clusters before re-clustering, that is, the clusters in the initial clustering image data, including the third current cluster clu3 and other clusters clui
  • the dots represent the image data
  • the black dots represent the image data in the initial clustered image data
  • the white dots represent the image data in the initial non-clustered image data
  • the independent index Q is compared with the corresponding second preset threshold ⁇ Q, and it is determined whether to retain the new cluster (that is, the fourth current cluster) according to the comparison result.
  • the independent index Q of the fourth current cluster clu4 meets the preset independence requirement.
  • the third current cluster is disbanded, the fourth current cluster is retained, and the fourth current cluster pair is used
  • the first cluster image data is updated.
  • the added image data includes the image data of other clusters
  • the other clusters are dissolved, for example, when the independence index Q of the fourth current cluster clu4 reaches the preset independence requirement, the other clusters clui (i is Integer representing the cluster label).
  • the added image data includes the image data in the initial non-clustered image data
  • the added image data is updated to not belong to the non-clustered instance image data.
  • the other clusters are retained.
  • the independence index Q of the fourth current cluster clu4 does not meet the preset independence requirement, the other clusters clui are retained.
  • the added image data includes the image data in the initial non-clustered image data
  • the added image data is updated to belong to the non-clustered instance image data.
  • re-clustering is performed by evaluating the independence of clusters, which can gradually increase the recognition rate of feature representations, and add more non-clustered data to the new clusters, so as to gradually increase the credible clusters. , So as to improve the quality of learning objectives, and reduce errors by increasing credible clustering.
  • the corresponding preset threshold can be set according to the actual situation, for example, both ⁇ P and ⁇ Q are set to 0.5.
  • FIG. 7 is a schematic diagram of training the initial network through training image data to obtain the re-identification network in an embodiment of the disclosure. As shown in FIG. 7, the processing flow includes the following steps:
  • S320 Determine an image data center based on the training image data
  • S380 Determine a new image data center based on the new training image data, and return to the step of determining a new contrast loss based on the new training image data and the new image data center, until the training is completed, and the re-identification network is obtained.
  • the training data when semi-supervised learning is used for network training, includes first clustered image data, non-clustered instance image data, and second clustered image data.
  • the image data center includes a first cluster center corresponding to the first clustered image data, an instance center corresponding to the non-clustered instance image data, and a second cluster center corresponding to the second clustered image data.
  • the definition X s represents the second clustered image data in the second image data set (i.e. source domain data), and X t represents the first image data set (i.e. target domain data), Represents the first cluster image data, Represents non-clustering instance image data, then
  • the comparison loss can be calculated by the following formula (1), and the parameters of the initial network can be optimized based on the comparison loss to obtain an optimized network:
  • is set to 0.05
  • ⁇ a, b> represents the inner product between the two feature vectors of a and b, which is used to measure the similarity of feature vectors
  • n s represents the number of clusters in the second cluster image data
  • w k represents the second cluster center corresponding to the second cluster image data
  • c k represents the first cluster center corresponding to the first cluster image data
  • v k represents The instance center corresponding to the non-clustered instance image data.
  • the non-clustered instance image data is clustered through the optimized network, and the first clustered image data and the non-clustered instance image data are updated according to the clustering result.
  • hybrid memory can be used to store the first clustered image data, the non-clustered instance image data, and the second clustered image data, as well as the data corresponding to the first clustered image data.
  • a new image data center is determined based on the new training image data, that is, the image data center stored in the hybrid memory is updated and adjusted.
  • the update of the second cluster center can be adjusted on the basis of the original center; and the update of the first cluster center and the instance center is based on the first cluster image data and non-cluster instance images The updated changes of the data are recalculated.
  • the update of the second cluster center w k can be achieved by the following formula (2):
  • the update of the first cluster center c k can be achieved by the following formula (3):
  • I k is the k-th cluster in the first cluster image data
  • I k represents the number of features in the cluster.
  • step (2) After updating the hybrid memory, return to step (2) to perform network iteration training until the network converges, and the re-identification network is obtained.
  • the method steps of the network application part of the present disclosure may be implemented by a terminal or a server, and the execution subject of the method steps of the network application part may be the same as or different from the execution subject of the method steps of the network training part.
  • FIG. 8 is a schematic diagram of object re-identification through a re-identification network in an embodiment of the disclosure. As shown in FIG. 8, the processing flow includes the following steps:
  • the re-identification network is obtained by training through the method steps of the network training part in the above embodiments of the present disclosure.
  • the training image data of the re-recognition network includes at least the first clustered image data and non-clustered instance image data, the first clustered image data and the non-clustered instance image data
  • the image data in the first image data set does not contain the true clustering label.
  • the training image data of the re-recognition network further includes a second image data set, and the second cluster image data in the second image data set contains the true cluster label;
  • the image data domain where the second image data set is located is different from the image data domain where the first image data set is located.
  • This embodiment provides an object re-identification method.
  • the re-identification network used in the method is trained based on at least the first clustered image data and the non-clustered instance image data. Therefore, the present disclosure combines the separations that are not in the clustering.
  • the network training of the group value helps to improve the clustering performance of the re-identification network, and further improves the accuracy of the target object re-identification result obtained by the object re-identification method of the present disclosure.
  • the purely unsupervised problem aims to learn discriminative features without any labeled data, that is, without the aid of labeled data in the source domain, it can directly and effectively perform target re-identification on the target domain in an unsupervised manner .
  • the method based on pseudo-label is the most effective.
  • This type of method aims at self-training by continuously clustering to generate pseudo-labels on unlabeled target domains, and can achieve the most advanced performance.
  • this type of method has the following shortcomings, which limit their performance improvement: First, because the clustering process will produce certain clustering abnormal samples, that is, they cannot be classified into any type of edge samples. The existing methods are for To ensure the quality of clustering, these clustering abnormal samples are directly discarded, and they are not included in the training set.
  • cluster-based unsupervised domain adaptive algorithms often use source domain data for pre-training, and then the trained model Read in, and train through the pseudo-labels generated by clustering and unlabeled target domain samples to migrate to the target domain.
  • the algorithm discards valuable source domain data during the training process of the target domain, wastes data with real labels in the source domain, and causes loss of source domain performance.
  • the relevant comparative learning loss function only considers instance-level supervision.
  • the method proposed in the embodiments of the present disclosure achieves an advanced recognition degree in the unsupervised domain adaptive pedestrian and vehicle re-recognition problem, and can effectively improve the source domain performance without manual labeling.
  • the method of the embodiments of the present disclosure can be simply extended to the problem of unsupervised target re-identification, that is, by removing source domain data in training and source domain class-level supervision, the performance is significantly improved compared to related methods.
  • the self-step comparison learning strategy proposed in the embodiments of the present disclosure is based on the principle of "from simple to difficult", by first learning the most credible clusters, and then gradually increasing the credible clusters, to improve the quality of the learning objectives, and thus through Increase credible clustering to reduce errors.
  • This strategy provides a cluster credibility evaluation criterion. By evaluating the independence and compactness of the clusters, the most credible clusters are selected for retention, and the remaining clusters will be returned to samples without clusters to provide examples Level supervision.
  • the image encoder of the algorithm of the embodiment of the present disclosure can be used to extract the feature information of the target image; the feature extracted by the algorithm of the embodiment of the present disclosure can be used to retrieve pedestrians or vehicles in the security monitoring scene; the algorithm of the embodiment of the present disclosure can be used, Improve the capability of image encoders without supervision.
  • FIG. 9 is a schematic diagram of a method for training a re-identification network using semi-supervised learning according to an embodiment of the disclosure.
  • the training method of the re-identification network includes the following steps:
  • Step S901 Obtain a residual network (initial network) 901;
  • Step S903 Perform clustering processing on the target domain image data X t in the first image data set through the residual network 901 to obtain an initial clustering result, where the initial clustering result includes the initial clustered image data and the initial non- Cluster image data;
  • Step S905 Determine an image data center based on the training image data
  • the training image data includes the first clustered image data, the non-clustered instance image data, and the second clustered image data;
  • the image data center includes the first clustered image data corresponding The first cluster center, the instance center corresponding to the non-clustering instance image data, and the second cluster center corresponding to the second cluster image data, the determined first cluster center, all the Both the second cluster center and the example center are stored in the hybrid memory 902.
  • step S905 may include the following steps:
  • Step S9051 Determine a comparison loss based on the training image data and the image data center, and perform parameter optimization on the residual network 901 based on the comparison loss to obtain an optimized network;
  • Step S9052 cluster the non-clustered instance image data in the training image data through the optimization network, and perform clustering on the first clustered image data in the hybrid memory 902 and the non-clustered instance image data according to the clustering result.
  • the instance image data is updated to obtain new training image data f s and f t .
  • the f s includes the second cluster image data
  • the f t includes the updated first cluster image data and the non- Clustering instance image data;
  • Step S9053 Determine a new image data center based on the new training image data, return to the step of determining a new contrast loss based on the new training image data and the new image data center, until the training is completed, the Then identify the network.
  • the hybrid memory 902 can be updated according to the new training data f s and f t.
  • the re-clustering process is performed on the initial clustering result in step S904.
  • Figure 10a which may include the following steps:
  • Step S9041 According to the image feature distance, reduce the number of image data of the first current cluster in the initial clustered image data to obtain a second current cluster;
  • Step S9042 Determine the density index of the second current cluster, where the density index is the ratio of the number of image data of the second current cluster to the number of image data of the first current cluster;
  • the number of image data in the second current cluster is 5, and the number of image data in the first current cluster is 7, and the density index of the second current cluster is 5/7.
  • Step S9043 When the density index reaches a first preset threshold, replace the first current cluster with the second current cluster to obtain the first cluster image data 90211;
  • the first cluster image data may be image data in the second current cluster 102a.
  • Step S9044 update the reduced image data to belong to the non-clustering instance image data 90212.
  • the reduced image data 1011a and image data 1012a can be updated to belong to the non-clustering instance image data 90212.
  • the non-clustering instance image data includes the initial non-clustering image data represented by the gray dots, and Image data 1011a and image data 1012a.
  • re-clustering processing is performed on the initial clustering result in step S904, which can be seen in FIG. 10b, including the following steps:
  • Step S9045 Add image data of other clusters and/or image data in the initial non-clustered image data to the third current cluster of the initial clustered image data according to the image feature distance to obtain a fourth current cluster,
  • the other clusters are clusters that are different from the third current cluster in the initial clustered image data;
  • the dots can represent image data
  • the white dots can represent the initial clustered image data
  • the gray dots can represent the initial non-clustered image data; the third current cluster 101b and other clusters that existed before the re-clustering process 102b.
  • the image feature distance changes from d1 to d3, and d3>d1.
  • the image feature distances of the initial non-clustered image data 1011b, the initial non-clustered image data 1012b, and the initial non-clustered image data 1013b are all less than d3 .
  • the initial non-clustered image data 1011b, the initial non-clustered image data 1012b, the initial non-clustered image data 1013b, and the image data in other clusters 102b are added to the third current cluster 101b, and the images in the third current cluster 101b The data increases, and a new fourth current cluster 103b is obtained.
  • Step S9046 Determine the independence index of the fourth current cluster; the independence index is the ratio of the number of image data of the third current cluster to the number of image data of the fourth current cluster;
  • Step S9047 When the independence index reaches a first preset threshold, replace the third current cluster with the fourth current cluster to obtain the first cluster image data;
  • the first cluster image data 90211 may be image data in the fourth current cluster 103a.
  • a re-identification network training device is provided.
  • FIG. 11 is a schematic diagram of a re-identification network training device in an embodiment of the disclosure. As shown in FIG. 11, the device includes the following modules:
  • the first obtaining module 100 is configured to obtain an initial network
  • the network training module 300 is configured to train the initial network through training image data to obtain the re-identification network.
  • Each module in the above-mentioned re-identification network training device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the foregoing modules may be embedded in the form of hardware or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the foregoing modules.
  • an object re-identification device is provided.
  • FIG. 12 is a schematic diagram of an object re-identification device in an embodiment of the disclosure. As shown in FIG. 12, the device includes the following modules:
  • the network acquisition module 400 is configured to acquire a pre-trained re-identification network
  • the image acquisition module 500 is configured to acquire an image to be recognized
  • the re-recognition module 600 is configured to perform re-recognition processing on the image to be recognized through the re-recognition network to obtain the re-recognition result of the target object in the image to be recognized;
  • the training image data of the re-identification network includes at least the first clustered image data and the non-clustered instance image data.
  • the image data set is obtained by performing clustering processing, and the image data in the first image data set does not contain real cluster tags.
  • the training image data of the re-identification network further includes a second image data set, and the second cluster image data in the second image data set includes a true cluster label; the second image data set The image data domain where the first image data set is located is different from the image data domain where the first image data set is located.
  • the device further includes: an initial network acquisition module configured to acquire the initial network; a data acquisition module configured to acquire the training image data; and a training module configured to pass the training image data pair
  • the initial network is trained to obtain the re-identification network.
  • the initial clustering result includes initial clustered image data; the clustering processing unit is configured to reduce the number of image data of the first current cluster in the initial clustered image data according to the distance of the image feature , Obtain the second current cluster; determine the density index of the second current cluster, where the density index is the ratio of the number of image data of the second current cluster to the number of image data of the first current cluster; When the density index reaches the first preset threshold, replace the first current cluster with the second current cluster to obtain the first clustered image data; update the reduced image data to belong to non-clustered instance images data.
  • the initial clustering result further includes initial non-clustered image data;
  • the clustering processing unit is further configured to, according to the image feature distance, in the third current cluster of the initial clustered image data Add image data of other clusters and/or image data in the initial non-clustered image data to obtain a fourth current cluster, where the other clusters are different from the third current cluster in the initial clustered image data Cluster; determine the independence index of the fourth current cluster; the independence index is the ratio of the number of image data of the third current cluster to the number of image data of the fourth current cluster; when the independence index reaches the first In the case of a preset threshold, replace the third current cluster with the fourth current cluster to obtain the first cluster image data; in the case where the added image data includes the image data of the other clusters, dissolve The other clusters; and/or, in the case where the added image data includes the image data in the initial non-clustered image data, the added image data is updated to not belong to the non-clustered instance image data.
  • the training module includes: a first determining unit configured to determine an image data center based on the training image data; an optimization unit configured to determine a comparison based on the training image data and the image data center Loss, parameter optimization of the initial network based on the comparison loss to obtain an optimized network; the clustering unit is configured to cluster the non-clustered instance image data in the training image data through the optimized network, according to The clustering result updates the first clustered image data and the non-clustered instance image data to obtain new training image data; the second determining unit is configured to determine a new image based on the new training image data The data center returns to the step of determining a new contrast loss based on the new training image data and the new image data center, until the training is completed, and the re-identification network is obtained.
  • the image data center includes a first cluster center corresponding to the first clustered image data and an instance center corresponding to the non-clustered instance image data; or, the image data center includes all The first cluster center corresponding to the first clustered image data, the instance center corresponding to the non-clustered instance image data, and the second cluster center corresponding to the second clustered image data.
  • the re-identification network includes a residual network.
  • Each module in the above-mentioned object re-identification device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the foregoing modules may be embedded in the form of hardware or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the foregoing modules.
  • a computer device including: a memory, a processor, and a computer program stored in the memory and capable of running on the processor.
  • the processor executes the program to implement the method of the network training part of the above embodiments Steps, and/or, method steps of the network application part.
  • the present disclosure combines outliers not in the cluster for network training, which helps to improve the re-recognition.
  • the clustering performance of the recognition network further improves the accuracy of the target object re-recognition result obtained by the object re-recognition method of the present disclosure.

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

本公开实施例提供一种对象再识别方法、装置、存储介质及计算机设备,该方法包括获取预训练的再识别网络;获取待识别图像;通过所述再识别网络对所述待识别图像进行再识别处理,得到所述待识别图像中目标对象的再识别结果。其中,所述再识别网络的训练图像数据至少包括第一聚类图像数据以及非聚类实例图像数据,所述第一聚类图像数据和所述非聚类实例图像数据为由所述再识别网络对应的初始网络对第一图像数据集进行聚类处理得到,所述第一图像数据集中的图像数据不包含真实聚类标签。

Description

对象再识别方法及装置、终端和存储介质
相关申请的交叉引用
本公开基于申请号为202010499288.7、申请日为2020年06月04日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以全文引入的方式引入本公开。
技术领域
本公开涉及图像处理技术领域,尤其涉及一种对象再识别方法、装置、存储介质及计算机设备。
背景技术
近些年来,在人工智能领域,使用领域自适应策略来解决图像的识别、分类、检测等任务成为热点。应用例如对象(如行人、车辆等)的再识别(re-identification,re-ID)等。
相关技术中,通常采用伪标签(Pseudo-Labelling)技术实现跨领域的对象再识别,即通过对源域图像数据添加对应的真实标签,并使用源域图像数据对网络进行预训练,再使用预训练后的网络对目标域图像数据进行聚类生成伪标签,最后使用带有伪标签的图像数据对网络进行优化,得到最终的网络。
相关技术在对网络进行优化的情况下,仅用到目标域中带有伪标签的图像数据,而丢弃了不包含在聚类中的离群值,然而,离群值可能是困难但有价值的样本图像数据,从而限制了网络的聚类性能,进而可能对网络的聚类结果产生一定影响。
发明内容
本公开提供一种对象再识别方法、装置、存储介质及计算机设备。
本公开提供一种对象再识别方法,包括:获取预训练的再识别网络;获取待识别图像;通过所述再识别网络对所述待识别图像进行再识别处理,得到所述待识别图像中目标对象的再识别结果;其中,所述再识别网络的训练图像数据至少包括第一聚类图像数据以及非聚类实例图像数据,所述第一聚类图像数据和所述非聚类实例图像数据为由所述再识别网络对应的初始网络对第一图像数据集进行聚类处理得到,所述第一图像数据集中的图像数据不包含真实聚类标签。
这样,本公开实施例通过结合不在聚类中的离群值进行网络训练,有助于提高再识别网络的聚类性能,进而提高通过本公开的对象再识别方法得到的目标对象再识别结果的准确性。
在一个实施例中,所述再识别网络的训练图像数据还包括第二图像数据集,所述第二图像数据集中的第二聚类图像数据包含真实聚类标签;所述第二图像数据集所在的图像数据域与所述第一图像数据集所在的图像数据域不同。
这样,本公开实施例通过提供不包含真实聚类标签的第一聚类图像数据、非聚类实例图像数据以及包含真实聚类标签的第二聚类图像数据的监督,有助于提高再识别网络的聚类性能,进而提高通过本公开的对象再识别方法得到的目标对象再识别结果的准确性。
在一个实施例中,所述获取预训练的再识别网络之前,还包括:获取所述初始网络;获取所述训练图像数据;通过所述训练图像数据对所述初始网络进行训练,得到所述再识别网络。
这样,本公开实施例通过获取到的训练图像数据对初始网络进行训练,以得到再识 别网络,能够提高再识别网络的图像分类和物体识别能力。
在一个实施例中,所述获取所述训练图像数据,包括:获取通过所述初始网络对所述第一图像数据集进行聚类处理得到的初始聚类结果;对所述初始聚类结果进行再聚类处理,得到所述第一聚类图像数据以及所述非聚类实例图像数据。
这样,对于本公开实施例对目标域图像数据进行处理的处理流程,可以理解为自定步长对比学习策略,即根据“由简入难”的原则,首先得到最可信的聚类,然后通过再聚类处理逐渐增加可信的聚类,从而提升学习目标的质量,通过增加可信聚类减小误差。
在一个实施例中,所述初始聚类结果包括初始聚类图像数据;所述对所述初始聚类结果进行再聚类处理,得到所述第一聚类图像数据以及所述非聚类实例图像数据,包括:根据图像特征距离,减少所述初始聚类图像数据中第一当前集群的图像数据数量,得到第二当前集群;确定所述第二当前集群的密集指数,所述密集指数为所述第二当前集群的图像数据数量与所述第一当前集群的图像数据数量的比值;在所述密集指数达到第一预设阈值的情况下,通过所述第二当前集群替换所述第一当前集群,得到所述第一聚类图像数据;将减少的图像数据更新为属于非聚类实例图像数据。
这样,通过评价聚类的密集性来进行再聚类处理,以逐渐增加可信的聚类,从而提升学习目标的质量,通过增加可信聚类减小误差。
在一个实施例中,所述初始聚类结果还包括初始非聚类图像数据;所述对所述初始聚类结果进行再聚类处理,得到所述第一聚类图像数据以及所述非聚类实例图像数据,包括:根据图像特征距离,在所述初始聚类图像数据的第三当前集群中增加其他集群的图像数据和/或所述初始非聚类图像数据中的图像数据,得到第四当前集群,所述其他集群为所述初始聚类图像数据中与所述第三当前集群不同的集群;确定所述第四当前集群的独立指数;所述独立指数为所述第三当前集群的图像数据数量与所述第四当前集群的图像数据数量的比值;在所述独立指数达到第一预设阈值的情况下,通过所述第四当前集群替换所述第三当前集群,得到所述第一聚类图像数据;在增加的图像数据包括所述其他集群的图像数据的情况下,解散所述其他集群;和/或,在增加的图像数据包括所述初始非聚类图像数据中的图像数据的情况下,将增加的图像数据更新为不属于非聚类实例图像数据。
这样,通过评价聚类的独立性来进行再聚类处理,可以逐步提高特征表示的识别率,将更多的非聚类数据加入到新的聚类中,以逐渐增加可信的聚类,从而提升学习目标的质量,通过增加可信聚类减小误差。
在一个实施例中,所述通过所述训练图像数据对所述初始网络进行训练,得到所述再识别网络,包括:基于所述训练图像数据确定图像数据中心;基于所述训练图像数据以及所述图像数据中心确定对比损失,基于所述对比损失对所述初始网络进行参数优化,得到优化网络;通过所述优化网络对所述训练图像数据中的非聚类实例图像数据进行聚类,根据聚类结果对所述第一聚类图像数据以及所述非聚类实例图像数据进行更新,得到新的训练图像数据;基于所述新的训练图像数据确定新的图像数据中心,返回基于所述新的训练图像数据以及所述新的图像数据中心确定新的对比损失的步骤,直至训练完成,得到所述再识别网络。
这样,本公开实施例通过动态优化网络、更新训练数据、更新图像数据中心,从而能够提供提高再识别网络的训练性能,进而提高通过本公开的对象再识别方法得到的目标对象再识别结果的准确性。
在一个实施例中,所述图像数据中心包括所述第一聚类图像数据对应的第一聚类中心以及所述非聚类实例图像数据对应的实例中心;或者,所述图像数据中心包括所述第一聚类图像数据对应的第一聚类中心、所述非聚类实例图像数据对应的实例中心以及所 述第二聚类图像数据对应的第二聚类中心。
这样,既可以通过无监督学习进行网络训练,又可以引入第二聚类图像数据采用半监督学习进行训练,提供了网络训练的灵活性和多样性。
在一个实施例中,所述再识别网络包括残差网络。
这样,由于残差网络是由残差块(Residual block)组成的网络,网络内部的残差块使用跳跃连接,有助于解决梯度消失和梯度***问题,使得残差网络具备容易优化的特点,同时又能提高图像分类和物体识别性能。
本公开提供一种对象再识别装置,包括:网络获取模块,配置为获取预训练的再识别网络;图像获取模块,配置为获取待识别图像;再识别模块,配置为通过所述再识别网络对所述待识别图像进行再识别处理,得到所述待识别图像中目标对象的再识别结果;其中,所述再识别网络的训练图像数据至少包括第一聚类图像数据以及非聚类实例图像数据,所述第一聚类图像数据和所述非聚类实例图像数据为由所述再识别网络对应的初始网络对第一图像数据集进行聚类处理得到,所述第一图像数据集中的图像数据不包含真实聚类标签。
本公开提供一种计算机设备,包括:存储器,处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现上述对象再识别方法。
本公开提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,所述计算机执行指令被处理器执行时配置为实现上述对象再识别方法。
本公开实施例提供了一种计算机程序产品,其中,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如本公开实施例对象再识别方法中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开实施例。
根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。
图1为本公开实施例中通过网络训练得到再识别网络的示意图;
图2为本公开实施例中对目标域图像数据进行处理的示意图;
图3为本公开实施例中对初始聚类结果进行再聚类处理,得到第一聚类图像数据以及非聚类实例图像数据的示意图;
图4为本公开实施例中计算密集指数的示例图;
图5为本公开实施例中对初始聚类结果进行再聚类处理,得到第一聚类图像数据以及非聚类实例图像数据的示意图;
图6为本公开实施例中计算独立指数的示例图;
图7为本公开实施例中通过训练图像数据对初始网络进行训练,得到再识别网络的示意图;
图8为本公开实施例中通过再识别网络进行对象再识别的示意图;
图9为本公开实施例中进行再识别网络训练的方法示意图;
图10a为本公开实施例一种再聚类处理的方法示意图;
图10b为本公开实施例另一种再聚类处理的方法示意图;
图11为本公开实施例中再识别网络训练装置的示意图;
图12为本公开实施例中对象再识别装置的示意图。
通过上述附图,已示出本公开明确的实施例,后文中将有更详细的描述。这些附图和文字描述并不是为了通过任何方式限制本公开构思的范围,而是通过参考特定实施例为本领域技术人员说明本公开的概念。
具体实施方式
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
在本公开实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本公开。在本公开实施例中所使用的单数形式的“一种”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。
应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
取决于语境,如在此所使用的词语“如果”、“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的商品或者***不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种商品或者***所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的商品或者***中还存在另外的相同要素。
人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用***。换句话说,人工智能是计算机科学的一个综合技术,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式做出反应的智能机器。人工智能也就是研究各种智能机器的设计原理与实现方法,使机器具有感知、推理与决策的功能。
人工智能技术是一门综合学科,涉及领域广泛,既有硬件层面的技术也有软件层面的技术。人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互***、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术以及机器学习/深度学习等几大方向。
计算机视觉技术(Computer Vision,CV)一门研究如何使机器“看”的科学,在本公开的一些实施例中,就是指用摄影机和电脑代替人眼对目标进行识别、跟踪和测量等机器视觉,并做图形处理,使电脑处理成为更适合人眼观察或传送给仪器检测的图像。作为一个科学学科,计算机视觉研究相关的理论和技术,试图建立能够从图像或者多维数据中获取信息的人工智能***。计算机视觉技术通常包括图像处理、图像识别、图像语义理解、图像检索、OCR(Optical Character Recognition,光学字符识别)、视频处理、视频语义理解、视频内容/行为识别、三维物体重建、3D(three dimensional,三维)技术、虚拟现实、增强现实、同步定位与地图构建等技术,还包括常见的人脸识别、指 纹识别等生物特征识别技术。
机器学习(Machine Learning,ML)是一门多领域交叉学科,涉及概率论、统计学、逼近论、凸分析、算法复杂度理论等多门学科。专门研究计算机怎样模拟或实现人类的学习行为,以获取新的知识或技能,重新组织已有的知识结构使之不断改善自身的性能。机器学习是人工智能的核心,是使计算机具有智能的根本途径,其应用遍及人工智能的各个领域。机器学习和深度学习通常包括人工神经网络、置信网络、强化学习、迁移学习、归纳学习、示教学习等技术。
目标再识别是计算机视觉以及安防监控领域的重要问题,要求从数据集中检索出对应目标的图像,该目标可以为行人、车辆等。然而在直接将训练好的网络应用于不同的监控场景的情况下,网络表现出无法避免的性能下降,这是图像领域间的差异所导致的,如摄像环境、光线、背景、拍摄设备等等。另外,针对每个监控场景标注不同的训练数据用于网络训练是不现实的,因为标注需要耗费大量的人力和时间。
目前在针对不同领域自适应(Domain Adaptation,迁移学习的一种)的目标再识别的方法中,基于伪标签的方法是一种常用方法。该方法旨在通过在无标注的目标域上不断地聚类以生成伪标签来进行自我训练,可以取得最先进的性能。然而,由于聚类的过程会产生一定的异常点,即无法分入任何一类的边缘样本,相关方法为了确保聚类的质量,均直接丢弃这些异常点,不将其归入训练集,即在网络进行自我训练的过程中仅用到目标域中带有伪标签的图像数据,而丢弃了不包含在聚类中的离群值,然而,离群值可能是困难但有价值的样本图像数据,从而限制了网络的聚类性能,进而可能对网络的聚类结果产生一定影响。
基于此,本公开提出一种对象再识别方法,该方法所使用的再识别网络为至少基于第一聚类图像数据以及非聚类实例图像数据训练得到,从而,本公开通过结合不在聚类中的离群值进行网络训练,有助于提高再识别网络的聚类性能,进而提高通过本公开的对象再识别方法得到的目标对象再识别结果的准确性。
在本公开实施例中提出的对象再识别方法可分为两部分,包括网络训练部分和网络应用部分;其中,网络训练部分涉及到机器学习这一技术领域,在网络训练部分中,通过机器学习这一技术训练初始网络以得到训练好的再识别网络;在网络应用部分中,通过使用在网络训练部分训练得到的再识别网络,获得待识别图像中目标对象的再识别结果。
为了便于理解,首先对本公开方案中的网络训练部分进行解释说明。
可以理解,本公开中网络训练部分的方法步骤可以由终端或者服务器实现。
图1为本公开实施例中通过网络训练得到再识别网络的示意图,如图1所示,该处理流程包括以下步骤:
S100、获取初始网络;
S200、获取训练图像数据;
S300、通过训练图像数据对初始网络进行训练,得到再识别网络。
其中,初始网络为初始待训练的网络,该初始网络具备一定的对象再识别能力。
其中,初始网络可以是例如残差网络(Residual Network,ResNet)等,残差网络是由残差块(Residual block)组成的网络,网络内部的残差块使用跳跃连接,有助于解决梯度消失和梯度***问题,使得残差网络具备容易优化的特点,同时又提高了图像分类和物体识别性能。
在一些实施例中,网络训练方法可以采用无监督学习。无监督学习是指仅使用目标域中无标注的图像数据进行网络训练的处理过程,所述目标域可以是第一监控场景。
在采用无监督学习进行网络训练的情况下,再识别网络的训练图像数据包括第一聚 类图像数据以及非聚类实例图像数据。其中,第一聚类图像数据和非聚类实例图像数据为由再识别网络对应的初始网络对第一图像数据集进行聚类处理得到,第一图像数据集中的图像数据不包含真实聚类标签,第一图像数据集对应目标域的图像数据。
在一些实施例中,网络训练方法可以采用半监督学习。半监督学习是指同时使用源域中有标注的图像数据以及目标域中无标注的图像数据进行网络训练的处理过程,所述源域可以是第二监控场景。源域中有标注的图像数据带有ground-truth(真值)标签,ground-truth可以是采用人工标记,ground-truth可以在网络训练过程中提供有价值的监督。
其中,在采用半监督学习进行网络训练的情况下,再识别网络的训练图像数据至少包括第一聚类图像数据、非聚类实例图像数据以及第二图像数据集。
其中,第一聚类图像数据和非聚类实例图像数据为由再识别网络对应的初始网络对第一图像数据集进行聚类处理得到,第一图像数据集中的图像数据不包含真实聚类标签,第一图像数据集对应目标域的图像数据。
第二图像数据集中的第二聚类图像数据包含真实聚类标签,第二图像数据集对应源域的图像数据;第二图像数据集所在的图像数据域与第一图像数据集所在的图像数据域不同。
在一个实施例中,在采用半监督学习进行网络训练的情况下,获取训练图像数据的步骤包括获取有标注的源域图像数据、获取无标注的目标域图像数据以及对目标域图像数据进行处理的步骤。
其中,获取源域图像数据时,可以是直接获取已完成标注的图像数据即可。
在一些实施例中,在采用无监督学习进行网络训练的情况下,获取训练图像数据的步骤包括获取无标注的目标域图像数据以及对目标域图像数据进行处理的步骤。
图2为对目标域图像数据进行处理的示意图,如图2所示,该处理流程包括以下步骤:
S220、获取通过初始网络对第一图像数据集进行聚类处理得到的初始聚类结果;
S240、对初始聚类结果进行再聚类处理,得到第一聚类图像数据以及非聚类实例图像数据。
其中,第一图像数据集对应目标域图像数据。在获取无标注的目标域图像数据后,首先通过初始网络对第一图像数据集进行初始聚类处理,得到第一图像数据集对应的初始聚类结果,然后,再对初始聚类结果进行再聚类处理,得到第一聚类图像数据以及非聚类实例图像数据。
其中,对于以上对目标域图像数据进行处理的处理流程,可以理解为自定步长对比学习策略,即根据“由简入难”的原则,首先得到最可信的聚类,然后通过再聚类处理逐渐增加可信的聚类,从而提升学习目标的质量,通过增加可信聚类减小误差。
在一个实施例中,提供一种聚类可信度评价准则,该准则通过评价聚类的密集性来对初始聚类结果进行再聚类处理,从而增加可信的聚类数量。
本实施例中,初始聚类结果包括初始聚类图像数据;
图3为本公开实施例中对初始聚类结果进行再聚类处理,得到第一聚类图像数据以及非聚类实例图像数据的示意图,如图3所示,该处理流程包括以下步骤:
S242A,根据图像特征距离,减少初始聚类图像数据中第一当前集群的图像数据数量,得到第二当前集群;
S244A,确定第二当前集群的密集指数,密集指数为第二当前集群的图像数据数量与第一当前集群的图像数据数量的比值;
S246A,在密集指数达到第一预设阈值的情况下,通过第二当前集群替换第一当前集群,得到第一聚类图像数据;
S248A,将减少的图像数据更新为属于非聚类实例图像数据。
本实施例通过提高聚类标准来进行再聚类处理,以验证聚类的密集性是否达到预设要求。
对于归为同一聚类中的各图像数据,可以理解为各图像数据的图像特征距离满足聚类标准,即△d≤d1,其中,△d为图像特征距离,d1为聚类标准对应的距离。
在提高聚类标准(减小聚类标准对应的距离)后,例如聚类标准变为d2,且d2<d1,则可能出现部分图像数据的图像特征距离大于聚类标准的情况,即△d>d2,此时,根据图像特征距离保留△d≤d2的图像数据,并将△d>d2的图像数据从第一当前集群中剔除,第一当前集群中的图像数据数量减少,得到新的第二当前集群。
在得到第二当前集群后,计算第二当前集群的密集指数,该密集指数用于评价聚类的密集性。密集指数可以通过以下公式计算得到:P=n2/n1,其中,P为密集指数,n1为第一当前集群的图像数据数量,n2为第二当前集群的图像数据数量。
图4为计算密集指数的示例图,如图4所示,圆点表示图像数据,黑色圆点表示保留的图像数据,白色圆点表示被剔除的图像数据,实线区域表示第一当前集群clu1,虚线区域表示第二当前集群clu2,根据图4可以看出,第一当前集群clu1的图像数据数量为7,第二当前集群clu2的图像数据数量为5,则第二当前集群clu2的密集指数P为:P=n2/n1=5/7。
在计算得到密集指数P后,将密集指数P与相应的第一预设阈值△P进行比较,根据比较结果确定是否保留新的集群(即第二当前集群)。
其中,在P≥△P的情况下,说明第二当前集群clu2的密集指数P达到预设密集性要求,此时,解散第一当前集群,保留第二当前集群,并使用第二当前集群对第一聚类图像数据进行更新。同时,对于集群中减少(被剔除)的图像数据,将该图像数据更新为属于非聚类实例图像数据。例如,参考图4,在P为5/7,△P为0.5的情况下,P>△P,此时,通过第二当前集群替换第一当前集群,对第一聚类图像数据进行更新。
在P<△P的情况下,说明第二当前集群clu2的密集指数P未达到预设密集性要求,此时,解散第二当前集群,保留第一当前集群。
本实施例通过评价聚类的密集性来进行再聚类处理,以逐渐增加可信的聚类,从而提升学习目标的质量,通过增加可信聚类减小误差。
在一个实施例中,提供一种聚类可信度评价准则,该准则通过评价聚类的独立性来对初始聚类结果进行再聚类处理,从而增加可信的聚类数量。
本实施例中,初始聚类结果包括初始聚类图像数据以及初始非聚类图像数据。
图5为本公开实施例中对初始聚类结果进行再聚类处理,得到第一聚类图像数据以及非聚类实例图像数据的示意图,如图5所示,该处理流程包括以下步骤:
S242B,根据图像特征距离,在初始聚类图像数据的第三当前集群中增加其他集群的图像数据和/或初始非聚类图像数据中的图像数据,得到第四当前集群,其他集群为初始聚类图像数据中与第三当前集群不同的集群;
S244B,确定第四当前集群的独立指数;独立指数为第三当前集群的图像数据数量与第四当前集群的图像数据数量的比值;
S246B,在独立指数达到第一预设阈值的情况下,通过第四当前集群替换第三当前集群,得到第一聚类图像数据;
S248B,在增加的图像数据包括其他集群的图像数据的情况下,解散其他集群;和/ 或,在增加的图像数据包括初始非聚类图像数据中的图像数据的情况下,将增加的图像数据更新为不属于非聚类实例图像数据。
本实施例通过降低聚类标准来进行再聚类处理,以验证聚类的独立性是否达到预设要求。
对于归为同一聚类中的各图像数据,可以理解为各图像数据的图像特征距离满足聚类标准,即△d≤d1,其中,△d为图像特征距离,d1为聚类标准对应的距离。
在降低聚类标准(增大聚类标准对应的距离)后,例如聚类标准变为d3,且d3>d1,则可能出现非当前集群的图像数据(例如其他集群的图像数据和/或初始非聚类图像数据中的图像数据)的图像特征距离达到聚类标准的情况,即△d'≤d3,其中,△d'为非当前集群的图像数据的图像特征距离。
此时,根据图像特征距离将△d'≤d3的非当前集群图像数据添加至第三当前集群,第三当前集群中的图像数据数量增加,得到新的第四当前集群。
可以理解,增加的图像数据,可以是仅包括符合要求的其他集群的图像数据,可以是仅包括符合要求的初始非聚类图像数据中的图像数据,还可以是同时包括符合要求的其他集群的图像数据以及初始非聚类图像数据中的图像数据。
在得到第四当前集群后,计算第四当前集群的独立指数,该独立指数用于评价聚类的独立性。独立指数可以通过以下公式计算得到:Q=n3/n4,其中,Q为独立指数,n3为第三当前集群的图像数据数量,n4为第四当前集群的图像数据数量。
图6为计算独立指数的示例图,如图6所示,实线区域表示再聚类之前已有的聚类集群,即初始聚类图像数据中的集群,包括第三当前集群clu3以及其他集群clui,圆点表示图像数据,黑色圆点表示初始聚类图像数据中的图像数据,白色圆点表示初始非聚类图像数据中的图像数据,虚线区域表示第四当前集群clu4,根据图6可以看出,第三当前集群clu3的图像数据数量为2,第四当前集群clu4的图像数据数量为7,则第四当前集群clu4的独立指数Q为:Q=n3/n4=2/7。
在计算得到独立指数Q后,将独立指数Q与相应的第二预设阈值△Q进行比较,根据比较结果确定是否保留新的集群(即第四当前集群)。
其中,在Q≥△Q的情况下,说明第四当前集群clu4的独立指数Q达到预设独立性要求,此时,解散第三当前集群,保留第四当前集群,并使用第四当前集群对第一聚类图像数据进行更新。
其中,在增加的图像数据包括其他集群的图像数据的情况下,解散其他集群,例如,在第四当前集群clu4的独立指数Q达到预设独立性要求的情况下,解散其他集群clui(i为表示集群标号的整数)。
其中,在增加的图像数据包括初始非聚类图像数据中的图像数据的情况下,将增加的图像数据更新为不属于非聚类实例图像数据。
在Q<△Q的情况下,说明第四当前集群clu4的独立指数Q未达到预设独立性要求,此时,解散第四当前集群,保留第三当前集群。
其中,在增加的图像数据包括其他集群的图像数据的情况下,保留其他集群,例如,在第四当前集群clu4的独立指数Q未达到预设独立性要求的情况下,保留其他集群clui。
其中,在增加的图像数据包括初始非聚类图像数据中的图像数据的情况下,将增加的图像数据更新为属于非聚类实例图像数据。
例如,参考图6,在Q为2/7,△Q为0.5的情况下,Q<△P,此时,解散第四当前集群clu4,保留第三当前集群clu3以及其他集群clui,同时,增加的未聚类图像数据更新为属于非聚类实例图像数据。
本实施例通过评价聚类的独立性来进行再聚类处理,可以逐步提高特征表示的识别率,将更多的非聚类数据加入到新的聚类中,以逐渐增加可信的聚类,从而提升学习目标的质量,通过增加可信聚类减小误差。
在一个实施例中,提供一种聚类可信度评价准则,该准则通过评价聚类的独立性以及密集性来对初始聚类结果进行再聚类处理,从而增加可信的聚类数量。
关于通过独立性以及密集性来对初始聚类结果进行再聚类处理的处理流程,可以参考上述实施例中的分别通过评价聚类的独立性来进行再聚类处理以及通过评价聚类的密集性来进行再聚类处理的处理步骤,在此不再赘述。
其中,在同时结合独立性以及密集性进行再聚类处理的情况下,对应的预设阈值可以根据实际情况设置,例如,设定△P和△Q都为0.5等。
本实施例通过评价聚类的独立性以及密集性来进行再聚类处理,以逐渐增加可信的聚类,从而提升学习目标的质量,通过增加可信聚类减小误差。
在一个实施例中,对网络训练的处理步骤进行解释说明。
图7为本公开实施例中通过训练图像数据对初始网络进行训练,得到再识别网络的示意图,如图7所示,该处理流程包括以下步骤:
S320、基于训练图像数据确定图像数据中心;
S340、基于训练图像数据以及图像数据中心确定对比损失,基于对比损失对初始网络进行参数优化,得到优化网络;
S360、通过优化网络对训练图像数据中的非聚类实例图像数据进行聚类,根据聚类结果对第一聚类图像数据以及非聚类实例图像数据进行更新,得到新的训练图像数据;
S380、基于新的训练图像数据确定新的图像数据中心,返回基于新的训练图像数据以及新的图像数据中心确定新的对比损失的步骤,直至训练完成,得到再识别网络。
在一些实施例中,在采用无监督学习进行网络训练的情况下,训练数据包括第一聚类图像数据以及非聚类实例图像数据,对应的,图像数据中心包括第一聚类图像数据对应的第一聚类中心以及非聚类实例图像数据对应的实例中心。
在一些实施例中,在采用半监督学习进行网络训练的情况下,训练数据包括第一聚类图像数据、非聚类实例图像数据以及第二聚类图像数据。对应的,图像数据中心包括第一聚类图像数据对应的第一聚类中心、非聚类实例图像数据对应的实例中心以及第二聚类图像数据对应的第二聚类中心。
其中,以采用半监督学习进行网络训练为例进行解释说明。
(1)首先基于获取的训练图像数据确定初始的图像数据中心。
在基于第一聚类图像数据确定对应的第一聚类中心的情况下,对于第一聚类图像数据中的每个聚类,可以使用各聚类中图像数据的平均特征向量作为各聚类对应的第一聚类中心。可以理解,在第一聚类图像数据包括多个聚类的情况下,第一聚类中心的数量对应为多个。
在基于非聚类实例图像数据确定对应的实例中心的情况下,对于非聚类实例图像数据中的每个单独实例,各单独实例对应的特征向量即为各单独实例的实例中心。可以理解,在非聚类实例图像数据包括多个单独实例的情况下,实例中心的数量对应为多个。
在基于第二聚类图像数据确定对应的第二聚类中心的情况下,对于第二聚类图像数据中的每个聚类,可以使用各聚类中图像数据的平均特征向量作为各聚类对应的第二聚类中心。可以理解,在第二聚类图像数据包括多个聚类的情况下,第二聚类中心的数量对应为多个。
(2)基于训练图像数据以及图像数据中心确定对比损失,基于对比损失对初始网 络进行参数优化,得到优化网络。
其中,定义X s表示第二图像数据集中的第二聚类图像数据(即源域数据),X t表示第一图像数据集(即目标域数据),
Figure PCTCN2020126269-appb-000001
表示第一聚类图像数据,
Figure PCTCN2020126269-appb-000002
表示非聚类实例图像数据,则
Figure PCTCN2020126269-appb-000003
对于特征向量
Figure PCTCN2020126269-appb-000004
可以通过以下公式(1)计算对比损失,并基于对比损失对初始网络进行参数优化,得到优化网络:
Figure PCTCN2020126269-appb-000005
其中,τ设定为0.05,<a,b>表示a、b两个特征向量之间的内积,用于度量特征向量的相似性,n s表示第二聚类图像数据中聚类的数量,
Figure PCTCN2020126269-appb-000006
表示第一聚类图像数据中聚类的数量,
Figure PCTCN2020126269-appb-000007
表示非聚类实例图像数据中单独实例的数量,w k表示第二聚类图像数据对应的第二聚类中心,c k表示第一聚类图像数据对应的第一聚类中心,v k表示非聚类实例图像数据对应的实例中心。
另外,Z +表示特征向量f对应的数据中心,例如,在f=fθ(x),x∈X S的情况下,Z +=w k;在
Figure PCTCN2020126269-appb-000008
的情况下,Z +=c k;在
Figure PCTCN2020126269-appb-000009
的情况下,Z +=v k
(3)在得到优化网络后,通过优化网络对非聚类实例图像数据进行聚类,根据聚类结果对第一聚类图像数据以及非聚类实例图像数据进行更新。
其中,在本公开的处理过程中,可以使用混合内存(hybrid memory)保存第一聚类图像数据、非聚类实例图像数据以及第二聚类图像数据,以及,第一聚类图像数据对应的第一聚类中心、非聚类实例图像数据对应的实例中心以及第二聚类图像数据对应的第二聚类中心。
可以理解,在每次迭代中,每次处理的特征向量都参与混合内存的更新。
在使用优化网络进行聚类的过程中,由于会出现新的聚类结果,所以会导致第一聚类图像数据以及非聚类实例图像数据的更新变化,即得到新的训练图像数据。在得到新的训练图像数据后,根据其更新变化对混合内存进行更新即可。
(4)在得到新的训练图像数据后,基于新的训练图像数据确定新的图像数据中心,即对混合内存中保存的图像数据中心进行更新和调整。
可以理解,对于第二聚类中心的更新,可以是在原中心的基础上进行调整;而对于第一聚类中心以及实例中心的更新,则是根据第一聚类图像数据以及非聚类实例图像数据的更新变化重新计算。
其中,第二聚类中心w k的更新可以通过以下公式(2)实现:
Figure PCTCN2020126269-appb-000010
其中,β k为当前处理中属于第二聚类图像数据的特征,m s∈[0,1]为更新第二聚类中心的动量系数,例如,m s可以设置为0.2。
第一聚类中心c k的更新可以通过以下公式(3)实现:
Figure PCTCN2020126269-appb-000011
其中,Ι k为第一聚类图像数据中的第k个聚类集群,|Ι k|表示集群中的特征数量。
实例中心v k的更新可以通过以下公式(4)实现:
Figure PCTCN2020126269-appb-000012
其中,m t∈[0,1]为更新实例中心的动量系数,例如,m t可以设置为0.2。给定非聚类实例图像数据中的图像数据,在通过优化网络确定该图像数据属于第k个聚类集群的情况下,则使用第一聚类中心c k的更新公式更新第一聚类中心c k
(5)在对混合内存进行更新后,返回步骤(2)进行网络迭代训练,直至网络收敛,即得到再识别网络。
在一个实施例中,在采用无监督学习进行网络训练的情况下,除了训练图像数据不包括第二聚类图像数据,图像数据中心不包括第二聚类图像数据对应的第二聚类中心之外,其原理与采用半监督学习进行网络训练的原理类似,在此不再赘述。
在一个实施例中,对本公开方案中的网络应用部分进行解释说明。
可以理解,本公开中网络应用部分的方法步骤可以由终端或者服务器实现,网络应用部分的方法步骤的执行主体可以与网络训练部分的方法步骤的执行主体相同或不同。
图8为本公开实施例中通过再识别网络进行对象再识别的示意图,如图8所示,该处理流程包括以下步骤:
S400、获取预训练的再识别网络;
S500、获取待识别图像;
S600、通过再识别网络对待识别图像进行再识别处理,得到待识别图像中目标对象的再识别结果;
其中,再识别网络为通过本公开以上各实施例中网络训练部分的方法步骤训练得到。
在通过无监督学习训练得到再识别网络的情况下,再识别网络的训练图像数据至少包括第一聚类图像数据以及非聚类实例图像数据,第一聚类图像数据和非聚类实例图像数据为由再识别网络对应的初始网络对第一图像数据集进行聚类处理得到,第一图像数据集中的图像数据不包含真实聚类标签。
其中,在通过半监督学习训练得到再识别网络的情况下,再识别网络的训练图像数据还包括第二图像数据集,第二图像数据集中的第二聚类图像数据包含真实聚类标签;第二图像数据集所在的图像数据域与第一图像数据集所在的图像数据域不同。
本实施例提供一种对象再识别方法,该方法所使用的再识别网络为至少基于第一聚类图像数据以及非聚类实例图像数据训练得到,从而,本公开通过结合不在聚类中的离群值进行网络训练,有助于提高再识别网络的聚类性能,进而提高通过本公开的对象再识别方法得到的目标对象再识别结果的准确性。
目标再识别是计算机视觉以及安防监控领域的重要问题,要求从数据集中检索出对应目标的图片,该目标可以为行人、车辆等。然而在直接将训练好的模型应用于不同的监控场景的情况下,模型表现出无法避免的性能下降,这是由于领域间的差异,如摄像环境、光线、背景、拍摄设备等等。另外,针对每个监控场景标注不同的训练数据用于网络训练是不现实的,因为标注需要耗费大量的人力和时间。
无监督领域自适应问题旨在将源域上利用有标注的数据训练好的模型迁移到无标注的目标域上,使其在目标域上可以学习到有辨别力的特征,从而有效地进行目标再识别,所述源域可以是监控场景A,所述目标域可以是监控场景B。由于源域与目标域的目标身份不重合,目标再识别的无监督领域自适应问题是一类开放集的问题,所述目标可以是行人或车辆等。
纯无监督问题旨在无需任何有标注的数据而能够学习到有辨别力的特征,即无需源域的有标注的数据辅助而能够直接以无监督的方式在目标域上有效地进行目标再识别。
目前在针对无监督或无监督领域自适应的目标再识别的方法中,基于伪标签的方法最为有效。该类方法旨在在无标注的目标域上通过不断地聚类以生成伪标签来进行自我训练,可以取得最先进的性能。但该类方法存在以下几个缺陷,限制了他们的性能提升:第一,由于聚类的过程会产生一定的聚类异常样本,即无法分入任何一类的边缘样本,已有的方法为了确保聚类的质量,均直接丢弃这些聚类异常样本,不将其归入训练集。然而,这些聚类异常样本可以被视作有价值的困难样本,应该进行学习;第二,基于聚类的无监督领域自适应算法往往利用源域的数据进行预训练,再将训练好的模型读入,并通过聚类生成的伪标签及无标注的目标域样本进行训练,从而迁移到目标域。该算法在目标域的训练过程中丢弃了有价值的源域数据,浪费了源域上具有真实标签的数据,使得源域性能丢失。第三,在无监督领域自适应的目标再识别问题上识别度欠缺,其中无监督目标再识别问题不曾被探索。第四,相关的对比学习损失函数只考虑实例级监督。
本公开实施例提供一种在无监督目标再识别上的自步对比学习方法,提供一个统一的对比学习框架用以同时在源域和目标域上对所有的样本进行特征学习,该框架通过动态更新一个混合记忆模块,从而同时提供源域真实的类级、目标域的聚类级以及目标域未聚类的实例级的监督。
本公开实施例提出一种自步对比学习策略以及一个新颖的聚类可信度评价准则,以通过可信的聚类减小训练误差。该策略可以逐渐生成更多的可信聚类以提升特征学习,从而获得更有效的特征帮助聚类。
本公开实施例提出的方法在无监督领域自适应的行人及车辆再识别问题上达到先进的识别度,并且可以在无需人力标注的情况下有效提升源域性能。本公开实施例的方法可以简单的推广到无监督的目标再识别问题上,即通过去除训练中的源域数据以及源域类级的监督,性能比相关方法显著提升。
本公开实施例提出的统一对比学习框架包括一个基于卷积神经网络的图像编码器,以及混合记忆模块,该混合记忆模块通过图像编码器输出的图像特征进行动态更新,并且实时提供源域类级、目标域聚类级以及目标域未聚类的实例级的监督。具体来说,混合记忆模块将源域类质心、目标域聚类质心、目标域未聚类的示例特征作为监督。其中,源域编码特征用以直接更新源域类质心,而目标域编码特征用以更新实例级特征,目标域聚类质心由更新的示例特征实时计算。
本公开实施例提出的自步对比学习策略本着“由简入难”的原则,通过先学习最可信的聚类,再逐渐增加可信的聚类,来提升学习目标的质量,从而通过增加可信的聚类减小误差。该策略提供了一种聚类可信度评价准则,通过评价聚类的独立性与紧密性来选择最可信的聚类进行保留,其余聚类将退回为无聚类的样本,以提供实例级监督。
该统一对比学习框架的训练步骤主要以下两步,并不断交替执行:
通过聚类以及聚类可信度评价准则,将无标注的目标域样本分为聚类集和非聚类集两部分,分别提供聚类级和非聚类的示例级监督。
在混合记忆模块提供的源域类级、目标域聚类级以及目标域未聚类的实例级的监督基础上,通过提出的统一对比学习损失进行训练,从而优化图像编码器;图像编码器产 生的图像特征用以动态更新混合记忆模块,其中源域图像以类为单位进行更新,而目标域图像以实例为单位进行更新。
本公开实施例提出一种统一对比学习框架,通过同时学习源域和目标域所有训练样本,可以获得先进的性能;本公开实施例还提出一种自步学习策略,提供了一种聚类可信度评价准则,以通过可信的聚类减小训练误差;在领域自适应学习过程中,可以同时提升源域性能;通过统一对比学习损失函数同时提供了类级、聚类级、实例级的监督;在行人再识别、车辆再识别的无监督领域自适应问题上达到了更先进的识别效果;可以更有效地利用无标注的目标域数据进行训练,以提升有标注的源域性能;通过用无标注数据扩充训练集以提升训练性能。
可以利用本公开实施例算法的图像编码器,提取目标图像的特征信息;可以利用本公开实施例算法提取的特征,对安防监控场景下的行人或车辆进行检索;可以利用本公开实施例算法,在无监督的情况下提升图像编码器的能力。
图9为本公开实施例提供的一种采用半监督学习进行再识别网络训练的方法示意图,参见图9,所述再识别网络的训练方法包括以下步骤:
步骤S901:获取残差网络(初始网络)901;
步骤S902:从混合内存902中获取第一图像数据集9021和第二图像数据集9022,所述第一图像数据集9021中包括无标注的目标域图像数据X t,所述第二图像数据集9022中包括包含真实聚类标签的源域图像数据X s,所述源域图像数据又称第二聚类图像数据;
步骤S903:通过所述残差网络901对所述第一图像数据集中的目标域图像数据X t进行聚类处理得到初始聚类结果,所述初始聚类结果包括初始聚类图像数据和初始非聚类图像数据;
步骤S904:对所述初始聚类结果进行再聚类处理,得到所述第一聚类图像数据以及所述非聚类实例图像数据;
步骤S905:基于所述训练图像数据确定图像数据中心;
其中,所述训练图像数据包括所述第一聚类图像数据、所述非聚类实例图像数据、所述第二聚类图像数据;所述图像数据中心包括所述第一聚类图像数据对应的第一聚类中心、所述非聚类实例图像数据对应的实例中心以及所述第二聚类图像数据对应的第二聚类中心,可以将确定出的所述第一聚类中心、所述第二聚类中心和所述实例中心均保存在混合内存902中。
在一些实施例中,步骤S905可以包括以下步骤:
步骤S9051:基于所述训练图像数据以及所述图像数据中心确定对比损失,基于所述对比损失对所述残差网络901进行参数优化,得到优化网络;
步骤S9052:通过所述优化网络对所述训练图像数据中的非聚类实例图像数据进行聚类,根据聚类结果对所述混合内存902中的第一聚类图像数据以及所述非聚类实例图像数据进行更新,得到新的训练图像数据f s和f t,所述f s中包括第二聚类图像数据,所述f t中包括更新后的第一聚类图像数据以及所述非聚类实例图像数据;
步骤S9053:基于所述新的训练图像数据确定新的图像数据中心,返回基于所述新的训练图像数据以及所述新的图像数据中心确定新的对比损失的步骤,直至训练完成,得到所述再识别网络。
其中,可以根据新的训练数据f s和f t对混合内存902进行更新。
在一些实施例中,步骤S904中对所述初始聚类结果进行再聚类处理,可以参见图 10a,可以包括以下步骤:
步骤S9041:根据图像特征距离,减少所述初始聚类图像数据中第一当前集群的图像数据数量,得到第二当前集群;
参见图10a,圆点可以表示图像数据,白色圆点可以表示初始聚类图像数据,灰色圆点可以表示初始非聚类图像数据;假设图像特征距离由d1变为d2,且d2<d1,此时由于第一当前集群101a中的图像数据1011a和图像数据1012a的图像特征距离大于d2,被从第一当前集群101a中剔除,第一当前集群101a中的图像数据减少,得到新的第二当前集群102a。
步骤S9042:确定所述第二当前集群的密集指数,所述密集指数为所述第二当前集群的图像数据数量与所述第一当前集群的图像数据数量的比值;
参见图10a,第二当前集群中的图像数据数量为5,第一当前集群中的图像数据数量为7,则第二当前集群的密集指数为5/7。
步骤S9043:在所述密集指数达到第一预设阈值的情况下,通过所述第二当前集群替换所述第一当前集群,得到所述第一聚类图像数据90211;
其中,假设第一预设阈值为0.5,则由于密集指数大于第一预设阈值,则第一聚类图像数据可以是第二当前集群102a中的图像数据。
步骤S9044:将减少的图像数据更新为属于非聚类实例图像数据90212。
参见图10a,可以将减少的图像数据1011a和图像数据1012a更新为属于非聚类实例图像数据90212,此时,非聚类实例图像数据中包括灰色圆点表示的初始非聚类图像数据,以及图像数据1011a和图像数据1012a。
在一些实施例中,步骤S904中对所述初始聚类结果进行再聚类处理,可以参见图10b,包括以下步骤:
步骤S9045:根据图像特征距离,在所述初始聚类图像数据的第三当前集群中增加其他集群的图像数据和/或所述初始非聚类图像数据中的图像数据,得到第四当前集群,所述其他集群为所述初始聚类图像数据中与所述第三当前集群不同的集群;
参见图10b,圆点可以表示图像数据,白色圆点可以表示初始聚类图像数据,灰色圆点可以表示初始非聚类图像数据;再聚类处理之前已有的第三当前集群101b和其他集群102b,假设图像特征距离由d1变为d3,且d3>d1,此时由于初始非聚类图像数据1011b、初始非聚类图像数据1012b和初始非聚类图像数据1013b的图像特征距离均小于d3,初始非聚类图像数据1011b、初始非聚类图像数据1012b、初始非聚类图像数据1013b和其他集群102b中的图像数据被从加入第三当前集群101b中,第三当前集群101b中的图像数据增加,得到新的第四当前集群103b。
步骤S9046:确定所述第四当前集群的独立指数;所述独立指数为所述第三当前集群的图像数据数量与所述第四当前集群的图像数据数量的比值;
参见图10b,第三当前集群101b中的图像数据数量为3,第四当前集群103b中的图像数据数量为9,则第四当前集群103b的独立指数为3/9。
步骤S9047:在所述独立指数达到第一预设阈值的情况下,通过所述第四当前集群替换所述第三当前集群,得到所述第一聚类图像数据;
其中,假设第一预设阈值为0.3,则由于独立指数大于第一预设阈值,则第一聚类图像数据90211可以是第四当前集群103a中的图像数据。
步骤S9048:在增加的图像数据包括所述其他集群的图像数据的情况下,解散所述其他集群;和/或,在增加的图像数据包括所述初始非聚类图像数据中的图像数据的情况下,将增加的图像数据更新为不属于非聚类实例图像数据90212。
其中,可以解散其他集群102b和第三集群101b,由于增加的图像数据包括初始聚 类图像数据中的图像数据1011b、图像数据1012b和图像数据1013b,则将图像数据1011b、图像数据1012b和图像数据1013b更新为不属于非聚类实例图像数据,即非聚类实例图像数据中不包括图像数据1011b、图像数据1012b和图像数据1013b。
应该理解的是,虽然上述实施例中的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
在一个实施例中,提供一种再识别网络训练装置。
图11为本公开实施例中再识别网络训练装置的示意图,如图11所示,该装置包括以下模块:
第一获取模块100,配置为获取初始网络;
第二获取模块200,配置为获取训练图像数据;
网络训练模块300,配置为通过训练图像数据对初始网络进行训练,得到再识别网络。
关于再识别网络训练装置的限定可以参见上文中对于再识别网络训练方法的限定,在此不再赘述。上述再识别网络训练装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供一种对象再识别装置。
图12为本公开实施例中对象再识别装置的示意图,如图12所示,该装置包括以下模块:
网络获取模块400,配置为获取预训练的再识别网络;
图像获取模块500,配置为获取待识别图像;
再识别模块600,配置为通过再识别网络对待识别图像进行再识别处理,得到待识别图像中目标对象的再识别结果;
其中,再识别网络的训练图像数据至少包括第一聚类图像数据以及非聚类实例图像数据,第一聚类图像数据和非聚类实例图像数据为由再识别网络对应的初始网络对第一图像数据集进行聚类处理得到,第一图像数据集中的图像数据不包含真实聚类标签。
在一个实施例中,所述再识别网络的训练图像数据还包括第二图像数据集,所述第二图像数据集中的第二聚类图像数据包含真实聚类标签;所述第二图像数据集所在的图像数据域与所述第一图像数据集所在的图像数据域不同。
在一个实施例中,所述装置还包括:初始网络获取模块,配置为获取所述初始网络;数据获取模块,配置为获取所述训练图像数据;训练模块,配置为通过所述训练图像数据对所述初始网络进行训练,得到所述再识别网络。
在一个实施例中,所述数据获取模块,包括:结果获取单元,配置为获取通过所述初始网络对所述第一图像数据集进行聚类处理得到的初始聚类结果;聚类处理单元,配置为对所述初始聚类结果进行再聚类处理,得到所述第一聚类图像数据以及所述非聚类实例图像数据。
在一个实施例中,所述初始聚类结果包括初始聚类图像数据;所述聚类处理单元, 配置为根据图像特征距离,减少所述初始聚类图像数据中第一当前集群的图像数据数量,得到第二当前集群;确定所述第二当前集群的密集指数,所述密集指数为所述第二当前集群的图像数据数量与所述第一当前集群的图像数据数量的比值;在所述密集指数达到第一预设阈值的情况下,通过所述第二当前集群替换所述第一当前集群,得到所述第一聚类图像数据;将减少的图像数据更新为属于非聚类实例图像数据。
在一个实施例中,所述初始聚类结果还包括初始非聚类图像数据;所述聚类处理单元,还配置为根据图像特征距离,在所述初始聚类图像数据的第三当前集群中增加其他集群的图像数据和/或所述初始非聚类图像数据中的图像数据,得到第四当前集群,所述其他集群为所述初始聚类图像数据中与所述第三当前集群不同的集群;确定所述第四当前集群的独立指数;所述独立指数为所述第三当前集群的图像数据数量与所述第四当前集群的图像数据数量的比值;在所述独立指数达到第一预设阈值的情况下,通过所述第四当前集群替换所述第三当前集群,得到所述第一聚类图像数据;在增加的图像数据包括所述其他集群的图像数据的情况下,解散所述其他集群;和/或,在增加的图像数据包括所述初始非聚类图像数据中的图像数据的情况下,将增加的图像数据更新为不属于非聚类实例图像数据。
在一个实施例中,所述训练模块,包括:第一确定单元,配置为基于所述训练图像数据确定图像数据中心;优化单元,配置为基于所述训练图像数据以及所述图像数据中心确定对比损失,基于所述对比损失对所述初始网络进行参数优化,得到优化网络;聚类单元,配置为通过所述优化网络对所述训练图像数据中的非聚类实例图像数据进行聚类,根据聚类结果对所述第一聚类图像数据以及所述非聚类实例图像数据进行更新,得到新的训练图像数据;第二确定单元,配置为基于所述新的训练图像数据确定新的图像数据中心,返回基于所述新的训练图像数据以及所述新的图像数据中心确定新的对比损失的步骤,直至训练完成,得到所述再识别网络。
在一个实施例中,所述图像数据中心包括所述第一聚类图像数据对应的第一聚类中心以及所述非聚类实例图像数据对应的实例中心;或者,所述图像数据中心包括所述第一聚类图像数据对应的第一聚类中心、所述非聚类实例图像数据对应的实例中心以及所述第二聚类图像数据对应的第二聚类中心。
在一个实施例中,所述再识别网络包括残差网络。
关于对象再识别装置的限定可以参见上文中对于对象再识别方法的限定,在此不再赘述。上述对象再识别装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
本公开实施例还提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,该计算机程序使得计算机执行如上述方法实施例中记载的任何一种对象再识别方法的部分或全部步骤。
在一个实施例中,提供一种计算机设备,包括:存储器,处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行程序时实现以上各实施例中网络训练部分的方法步骤,和/或,网络应用部分的方法步骤。
在一个实施例中,提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机执行指令,计算机执行指令被处理器执行时用于实现以上各实施例中网络训练部分的方法步骤,和/或,网络应用部分的方法步骤。
本领域技术人员在考虑说明书及实践这里公开的申请后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知 常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求书指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求书来限制。
工业实用性
本实施例中,通过获取预训练的再识别网络;获取待识别图像;通过所述再识别网络对所述待识别图像进行再识别处理,得到所述待识别图像中目标对象的再识别结果。该方法所使用的再识别网络为至少基于第一聚类图像数据以及非聚类实例图像数据训练得到,从而,本公开通过结合不在聚类中的离群值进行网络训练,有助于提高再识别网络的聚类性能,进而提高通过本公开的对象再识别方法得到的目标对象再识别结果的准确性。

Claims (21)

  1. 一种对象再识别方法,包括:
    获取预训练的再识别网络;
    获取待识别图像;
    通过所述再识别网络对所述待识别图像进行再识别处理,得到所述待识别图像中目标对象的再识别结果;
    其中,所述再识别网络的训练图像数据至少包括第一聚类图像数据以及非聚类实例图像数据,所述第一聚类图像数据和所述非聚类实例图像数据为由所述再识别网络对应的初始网络对第一图像数据集进行聚类处理得到,所述第一图像数据集中的图像数据不包含真实聚类标签。
  2. 根据权利要求1所述的方法,其中,所述再识别网络的训练图像数据还包括第二图像数据集,所述第二图像数据集中的第二聚类图像数据包含真实聚类标签;
    所述第二图像数据集所在的图像数据域与所述第一图像数据集所在的图像数据域不同。
  3. 根据权利要求1或2所述的方法,其中,所述获取预训练的再识别网络之前,还包括:
    获取所述初始网络;
    获取所述训练图像数据;
    通过所述训练图像数据对所述初始网络进行训练,得到所述再识别网络。
  4. 根据权利要求3所述的方法,其中,所述获取所述训练图像数据,包括:
    获取通过所述初始网络对所述第一图像数据集进行聚类处理得到的初始聚类结果;
    对所述初始聚类结果进行再聚类处理,得到所述第一聚类图像数据以及所述非聚类实例图像数据。
  5. 根据权利要求4所述的方法,其中,所述初始聚类结果包括初始聚类图像数据;
    所述对所述初始聚类结果进行再聚类处理,得到所述第一聚类图像数据以及所述非聚类实例图像数据,包括:
    根据图像特征距离,减少所述初始聚类图像数据中第一当前集群的图像数据数量,得到第二当前集群;
    确定所述第二当前集群的密集指数,所述密集指数为所述第二当前集群的图像数据数量与所述第一当前集群的图像数据数量的比值;
    在所述密集指数达到第一预设阈值的情况下,通过所述第二当前集群替换所述第一当前集群,得到所述第一聚类图像数据;
    将减少的图像数据更新为属于非聚类实例图像数据。
  6. 根据权利要求5所述的方法,其中,所述初始聚类结果还包括初始非聚类图像数据;
    所述对所述初始聚类结果进行再聚类处理,得到所述第一聚类图像数据以及所述非聚类实例图像数据,包括:
    根据图像特征距离,在所述初始聚类图像数据的第三当前集群中增加其他集群的图像数据和/或所述初始非聚类图像数据中的图像数据,得到第四当前集群,所述其他集群为所述初始聚类图像数据中与所述第三当前集群不同的集群;
    确定所述第四当前集群的独立指数;所述独立指数为所述第三当前集群的图像数据数量与所述第四当前集群的图像数据数量的比值;
    在所述独立指数达到第一预设阈值的情况下,通过所述第四当前集群替换所述第三当前集群,得到所述第一聚类图像数据;
    在增加的图像数据包括所述其他集群的图像数据的情况下,解散所述其他集群;和/或,在增加的图像数据包括所述初始非聚类图像数据中的图像数据的情况下,将增加的图像数据更新为不属于非聚类实例图像数据。
  7. 根据权利要求3所述的方法,其中,所述通过所述训练图像数据对所述初始网络进行训练,得到所述再识别网络,包括:
    基于所述训练图像数据确定图像数据中心;
    基于所述训练图像数据以及所述图像数据中心确定对比损失,基于所述对比损失对所述初始网络进行参数优化,得到优化网络;
    通过所述优化网络对所述训练图像数据中的非聚类实例图像数据进行聚类,根据聚类结果对所述第一聚类图像数据以及所述非聚类实例图像数据进行更新,得到新的训练图像数据;
    基于所述新的训练图像数据确定新的图像数据中心,返回基于所述新的训练图像数据以及所述新的图像数据中心确定新的对比损失的步骤,直至训练完成,得到所述再识别网络。
  8. 根据权利要求7所述的方法,其中,所述图像数据中心包括所述第一聚类图像数据对应的第一聚类中心以及所述非聚类实例图像数据对应的实例中心;
    或者,
    所述图像数据中心包括所述第一聚类图像数据对应的第一聚类中心、所述非聚类实例图像数据对应的实例中心以及所述第二聚类图像数据对应的第二聚类中心。
  9. 根据权利要求1-8任一项所述的方法,其中,所述再识别网络包括残差网络。
  10. 一种对象再识别装置,包括:
    网络获取模块,配置为获取预训练的再识别网络;
    图像获取模块,配置为获取待识别图像;
    再识别模块,配置为通过所述再识别网络对所述待识别图像进行再识别处理,得到所述待识别图像中目标对象的再识别结果;
    其中,所述再识别网络的训练图像数据至少包括第一聚类图像数据以及非聚类实例图像数据,所述第一聚类图像数据和所述非聚类实例图像数据为由所述再识别网络对应的初始网络对第一图像数据集进行聚类处理得到,所述第一图像数据集中的图像数据不包含真实聚类标签。
  11. 根据权利要求10所述的装置,其中,所述再识别网络的训练图像数据还包括第二图像数据集,所述第二图像数据集中的第二聚类图像数据包含真实聚类标签;
    所述第二图像数据集所在的图像数据域与所述第一图像数据集所在的图像数据域不同。
  12. 根据权利要求10或11所述的装置,其中,所述装置还包括:初始网络获取模块,配置为获取所述初始网络;数据获取模块,配置为获取所述训练图像数据;训练模块,配置为通过所述训练图像数据对所述初始网络进行训练,得到所述再识别网络。
  13. 根据权利要求12所述的装置,其中,所述数据获取模块,包括:结果获取单元,配置为获取通过所述初始网络对所述第一图像数据集进行聚类处理得到的初始聚类结果;聚类处理单元,配置为对所述初始聚类结果进行再聚类处理,得到所述第一聚类图像数据以及所述非聚类实例图像数据。
  14. 根据权利要求13所述的装置,其中,所述初始聚类结果包括初始聚类图像数据;
    所述聚类处理单元,配置为根据图像特征距离,减少所述初始聚类图像数据中第一当前集群的图像数据数量,得到第二当前集群;确定所述第二当前集群的密集指数,所述密集指数为所述第二当前集群的图像数据数量与所述第一当前集群的图像数据数量的比值;在所述密集指数达到第一预设阈值的情况下,通过所述第二当前集群替换所述第一当前集群,得到所述第一聚类图像数据;将减少的图像数据更新为属于非聚类实例图像数据。
  15. 根据权利要求14所述的装置,其中,所述初始聚类结果还包括初始非聚类图像数据;
    所述聚类处理单元,还配置为根据图像特征距离,在所述初始聚类图像数据的第三当前集群中增加其他集群的图像数据和/或所述初始非聚类图像数据中的图像数据,得到第四当前集群,所述其他集群为所述初始聚类图像数据中与所述第三当前集群不同的集群;确定所述第四当前集群的独立指数;所述独立指数为所述第三当前集群的图像数据数量与所述第四当前集群的图像数据数量的比值;在所述独立指数达到第一预设阈值的情况下,通过所述第四当前集群替换所述第三当前集群,得到所述第一聚类图像数据;在增加的图像数据包括所述其他集群的图像数据的情况下,解散所述其他集群;和/或,在增加的图像数据包括所述初始非聚类图像数据中的图像数据的情况下,将增加的图像数据更新为不属于非聚类实例图像数据。
  16. 根据权利要求12所述的装置,其中,所述训练模块,包括:
    第一确定单元,配置为基于所述训练图像数据确定图像数据中心;优化单元,配置为基于所述训练图像数据以及所述图像数据中心确定对比损失,基于所述对比损失对所述初始网络进行参数优化,得到优化网络;聚类单元,配置为通过所述优化网络对所述训练图像数据中的非聚类实例图像数据进行聚类,根据聚类结果对所述第一聚类图像数据以及所述非聚类实例图像数据进行更新,得到新的训练图像数据;第二确定单元,配置为基于所述新的训练图像数据确定新的图像数据中心,返回基于所述新的训练图像数据以及所述新的图像数据中心确定新的对比损失的步骤,直至训练完成,得到所述再识别网络。
  17. 根据权利要求16所述的装置,其中,所述图像数据中心包括所述第一聚类图像数据对应的第一聚类中心以及所述非聚类实例图像数据对应的实例中心;
    或者,
    所述图像数据中心包括所述第一聚类图像数据对应的第一聚类中心、所述非聚类实例图像数据对应的实例中心以及所述第二聚类图像数据对应的第二聚类中心。
  18. 根据权利要求10至17任一项所述的装置,其中,所述再识别网络包括残差网络。
  19. 一种计算机设备,包括:存储器,处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现如上述权利要求1至9任一项所述的对象再识别方法。
  20. 一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,所述计算机执行指令被处理器执行时配置为实现如权利要求1至9任一项所述的对象再识别方法。
  21. 一种计算机程序产品,包括计算机可读代码,在所述计算机可读代码在电子设备中运行的情况下,所述电子设备中的处理器执行如权利要求1至9任一项所述的方法。
PCT/CN2020/126269 2020-06-04 2020-11-03 对象再识别方法及装置、终端和存储介质 WO2021243947A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2021549335A JP2022548187A (ja) 2020-06-04 2020-11-03 対象再識別方法および装置、端末並びに記憶媒体
KR1020217025979A KR20210151773A (ko) 2020-06-04 2020-11-03 대상 재인식 방법 및 장치, 단말 및 저장 매체

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010499288.7A CN111612100B (zh) 2020-06-04 2020-06-04 对象再识别方法、装置、存储介质及计算机设备
CN202010499288.7 2020-06-04

Publications (1)

Publication Number Publication Date
WO2021243947A1 true WO2021243947A1 (zh) 2021-12-09

Family

ID=72202637

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/126269 WO2021243947A1 (zh) 2020-06-04 2020-11-03 对象再识别方法及装置、终端和存储介质

Country Status (5)

Country Link
JP (1) JP2022548187A (zh)
KR (1) KR20210151773A (zh)
CN (1) CN111612100B (zh)
TW (1) TWI780567B (zh)
WO (1) WO2021243947A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111612100B (zh) * 2020-06-04 2023-11-03 商汤集团有限公司 对象再识别方法、装置、存储介质及计算机设备
CN113221820B (zh) * 2021-05-28 2022-07-19 杭州网易智企科技有限公司 一种对象识别方法、装置、设备及介质
CN116682043B (zh) * 2023-06-13 2024-01-26 西安科技大学 基于SimCLR无监督深度对比学习异常视频清洗方法

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090034791A1 (en) * 2006-12-04 2009-02-05 Lockheed Martin Corporation Image processing for person and object Re-identification
CN106022293A (zh) * 2016-05-31 2016-10-12 华南农业大学 一种基于自适应共享小生境进化算法的行人再识别方法
CN108921107A (zh) * 2018-07-06 2018-11-30 北京市新技术应用研究所 基于排序损失和Siamese网络的行人再识别方法
CN109740653A (zh) * 2018-12-25 2019-05-10 北京航空航天大学 一种融合视觉表观与时空约束的车辆再识别方法
CN109961051A (zh) * 2019-03-28 2019-07-02 湖北工业大学 一种基于聚类和分块特征提取的行人重识别方法
CN111210269A (zh) * 2020-01-02 2020-05-29 平安科技(深圳)有限公司 基于大数据的对象识别方法、电子装置及存储介质
CN111612100A (zh) * 2020-06-04 2020-09-01 商汤集团有限公司 对象再识别方法、装置、存储介质及计算机设备

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108288051B (zh) * 2018-02-14 2020-11-27 北京市商汤科技开发有限公司 行人再识别模型训练方法及装置、电子设备和存储介质
US10176405B1 (en) * 2018-06-18 2019-01-08 Inception Institute Of Artificial Intelligence Vehicle re-identification techniques using neural networks for image analysis, viewpoint-aware pattern recognition, and generation of multi- view vehicle representations
US11537817B2 (en) * 2018-10-18 2022-12-27 Deepnorth Inc. Semi-supervised person re-identification using multi-view clustering
CN110263697A (zh) * 2019-06-17 2019-09-20 哈尔滨工业大学(深圳) 基于无监督学习的行人重识别方法、装置及介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090034791A1 (en) * 2006-12-04 2009-02-05 Lockheed Martin Corporation Image processing for person and object Re-identification
CN106022293A (zh) * 2016-05-31 2016-10-12 华南农业大学 一种基于自适应共享小生境进化算法的行人再识别方法
CN108921107A (zh) * 2018-07-06 2018-11-30 北京市新技术应用研究所 基于排序损失和Siamese网络的行人再识别方法
CN109740653A (zh) * 2018-12-25 2019-05-10 北京航空航天大学 一种融合视觉表观与时空约束的车辆再识别方法
CN109961051A (zh) * 2019-03-28 2019-07-02 湖北工业大学 一种基于聚类和分块特征提取的行人重识别方法
CN111210269A (zh) * 2020-01-02 2020-05-29 平安科技(深圳)有限公司 基于大数据的对象识别方法、电子装置及存储介质
CN111612100A (zh) * 2020-06-04 2020-09-01 商汤集团有限公司 对象再识别方法、装置、存储介质及计算机设备

Also Published As

Publication number Publication date
CN111612100B (zh) 2023-11-03
TWI780567B (zh) 2022-10-11
KR20210151773A (ko) 2021-12-14
JP2022548187A (ja) 2022-11-17
TW202147156A (zh) 2021-12-16
CN111612100A (zh) 2020-09-01

Similar Documents

Publication Publication Date Title
CN111814854B (zh) 一种无监督域适应的目标重识别方法
Han et al. A unified metric learning-based framework for co-saliency detection
CN110414432B (zh) 对象识别模型的训练方法、对象识别方法及相应的装置
CN111709409B (zh) 人脸活体检测方法、装置、设备及介质
CN108960080B (zh) 基于主动防御图像对抗攻击的人脸识别方法
WO2021243947A1 (zh) 对象再识别方法及装置、终端和存储介质
CN111754596B (zh) 编辑模型生成、人脸图像编辑方法、装置、设备及介质
CN109558823B (zh) 一种以图搜图的车辆识别方法及***
CN109948475B (zh) 一种基于骨架特征和深度学习的人体动作识别方法
CN107133569B (zh) 基于泛化多标记学习的监控视频多粒度标注方法
CN112395951B (zh) 一种面向复杂场景的域适应交通目标检测与识别方法
CN113569615A (zh) 基于图像处理的目标识别模型的训练方法和装置
CN111046732A (zh) 一种基于多粒度语义解析的行人重识别方法及存储介质
Jemilda et al. Moving object detection and tracking using genetic algorithm enabled extreme learning machine
Xiong et al. Contrastive learning for automotive mmWave radar detection points based instance segmentation
CN113065409A (zh) 一种基于摄像分头布差异对齐约束的无监督行人重识别方法
CN115223020A (zh) 图像处理方法、装置、电子设备以及可读存储介质
CN110222772B (zh) 一种基于块级别主动学习的医疗图像标注推荐方法
CN110751005B (zh) 融合深度感知特征和核极限学习机的行人检测方法
Qin et al. Application of video scene semantic recognition technology in smart video
KR102356438B1 (ko) 요소 간 관계 추출 기반 이종 얼굴 인식 장치 및 방법
CN113095199A (zh) 一种高速行人识别方法及装置
CN113076963B (zh) 一种图像识别方法、装置和计算机可读存储介质
CN112487927B (zh) 一种基于物体关联注意力的室内场景识别实现方法及***
CN113420608A (zh) 一种基于密集时空图卷积网络的人体异常行为识别方法

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2021549335

Country of ref document: JP

Kind code of ref document: A

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

Ref document number: 20939442

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: 20939442

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 19/05/2023)