CN112446311A - Object re-recognition method, electronic device, storage medium and device - Google Patents
Object re-recognition method, electronic device, storage medium and device Download PDFInfo
- Publication number
- CN112446311A CN112446311A CN202011303381.2A CN202011303381A CN112446311A CN 112446311 A CN112446311 A CN 112446311A CN 202011303381 A CN202011303381 A CN 202011303381A CN 112446311 A CN112446311 A CN 112446311A
- Authority
- CN
- China
- Prior art keywords
- picture
- local
- recognized
- identified
- overall
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 40
- 238000013527 convolutional neural network Methods 0.000 claims description 24
- 230000004927 fusion Effects 0.000 claims description 23
- 238000004891 communication Methods 0.000 claims description 17
- 238000012549 training Methods 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 8
- 230000006870 function Effects 0.000 claims description 8
- 238000013528 artificial neural network Methods 0.000 claims description 3
- 238000006243 chemical reaction Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 230000009471 action Effects 0.000 description 3
- 210000000746 body region Anatomy 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 3
- 238000011176 pooling Methods 0.000 description 3
- 238000013507 mapping Methods 0.000 description 2
- 238000012706 support-vector machine Methods 0.000 description 2
- 241001465754 Metazoa Species 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000013136 deep learning model Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/20—Scenes; Scene-specific elements in augmented reality scenes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
- G06F18/253—Fusion techniques of extracted features
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- Molecular Biology (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Mathematical Physics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
Abstract
When the picture to be recognized is recognized, the picture to be recognized is recognized by adopting a pre-trained overall feature recognition model to obtain an overall recognition result, at least one local picture containing local image features of the object to be recognized is recognized by adopting a pre-trained local feature recognition model to obtain a local recognition result, and the overall recognition result and the local recognition result are fused to obtain feature data of the object to be recognized. The method and the device combine the overall image characteristics and the local image characteristics of the object to be recognized to obtain the characteristic data of the object to be recognized. Therefore, when the environment of the object to be recognized is complex, the object to be recognized can be recognized by combining the local image features, and therefore the recognition accuracy is high.
Description
Technical Field
The present application relates to the field of computers, and in particular, to an object re-identification method, an electronic device, a storage medium, and an apparatus.
Background
The pedestrian re-identification is a technology for identifying the identity of a pedestrian under different camera scenes, is a very important part in a video monitoring and analyzing technology, and plays an important role in security monitoring and the like.
At present, the pedestrian re-identification technology is mostly realized based on a deep learning method. Because the human body is a non-rigid body, the posture is variable, the actual environment of the pedestrian is complex, and the background interference is large, the accurate realization of the pedestrian re-identification becomes a technical problem to be solved urgently by the personnel in the field.
Disclosure of Invention
In order to accurately perform pedestrian re-identification, the application provides an object re-identification method, an electronic device, a storage medium and a device, as follows:
in a first aspect, an object re-identification method is provided, including:
acquiring characteristic data of a target object and acquiring a picture to be identified;
when the picture to be recognized contains the overall image characteristics of the object to be recognized of a preset object type, generating at least one local picture containing the local image characteristics of the object to be recognized according to the picture to be recognized;
recognizing the picture to be recognized by utilizing a pre-trained overall feature recognition model to obtain an overall recognition result of the object to be recognized; recognizing the at least one local picture by using a pre-trained local feature recognition model to obtain a local recognition result of the object to be recognized;
fusing the overall recognition result and the local recognition result by adopting a multi-task fusion loss model to obtain the characteristic data of the object to be recognized;
and when the characteristic data of the object to be recognized is consistent with the characteristic data of the target object, determining that the object to be recognized is the target object.
Optionally, generating at least one local picture including local image features of the object to be recognized according to the picture to be recognized, including:
determining the area of the object to be identified in the picture to be identified;
extracting a part of picture from the picture to be recognized, wherein the part of picture is a picture corresponding to the region of the object to be recognized in the picture to be recognized;
and segmenting the partial picture to obtain the at least one local picture.
Optionally, recognizing the picture to be recognized by using a pre-trained overall feature recognition model to obtain an overall recognition result of the object to be recognized; recognizing the at least one local picture by using a pre-trained local feature recognition model to obtain a local recognition result of the object to be recognized, wherein the local recognition result comprises the following steps:
converting the picture to be identified into a first picture with a first preset size; respectively converting each local picture into a second picture with a second preset size, wherein the size of the first picture is different from that of the picture to be identified, the size of the second picture is different from that of the corresponding local picture, and the second preset size is smaller than the first preset size;
respectively acquiring the pre-trained overall feature recognition model and the pre-trained local feature recognition model from a preset block chain node;
inputting the first picture into the pre-trained overall feature recognition model to obtain the overall recognition result; and inputting the second picture into the local feature recognition model to obtain the local recognition result.
Optionally, a multitask fusion loss model is adopted to fuse the overall recognition result and the local recognition result to obtain feature data of the object to be recognized, and the method includes:
determining a multitask fusion loss function corresponding to the multitask fusion loss model, wherein the multitask fusion loss function comprises an input item and an output item;
inputting the whole recognition result and the local recognition result into the input item;
and acquiring characteristic data of the object to be identified from the output item.
Optionally, the global feature recognition model and the local feature recognition model are obtained by training a convolutional neural network, where the convolutional neural network includes a first convolutional neural network and a second convolutional neural network, and the training step of the convolutional neural network includes:
acquiring at least one sample picture, wherein the at least one sample picture comprises N sample pictures including the integral image feature of a sample object and M sample pictures not including the integral image feature of the sample object, and the type of the sample object is the preset object type;
for each sample picture of the N sample pictures, generating at least one local picture including local image features of the sample object;
obtaining a local sample picture set by utilizing the at least one local picture;
training the first convolution neural network by adopting the at least one sample picture to obtain the overall feature recognition model; and training the second convolutional neural network by adopting the local sample picture set to obtain the local feature recognition model.
Optionally, when the feature data of the object to be recognized is consistent with the feature data of the target object, determining that the object to be recognized is the target object includes:
determining similarity between the characteristic data of the object to be identified and the characteristic data of the target object;
and when the similarity meets a preset requirement, determining the object to be identified as the target object.
Optionally, after generating at least one local picture including local image features of the object to be recognized according to the picture to be recognized, the method further includes:
extracting a hash value of the picture to be identified;
respectively extracting the hash value of each local picture in the at least one local picture;
and storing the hash value of the picture to be identified and the hash value of each local picture in the at least one local picture into a preset block chain node.
In a second aspect, a computer-readable storage medium is provided, storing a computer program which, when executed by a processor, implements the method of any of the first aspects.
In a third aspect, an electronic device is provided, including: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory for storing a computer program;
the processor is configured to execute the program stored in the memory to implement the method of any of the first aspect.
In a fourth aspect, an object re-recognition apparatus is provided, including:
the acquisition unit is used for acquiring the characteristic data of the target object and acquiring a picture to be identified;
the generating unit is used for generating at least one local picture containing the local image characteristics of the object to be identified according to the picture to be identified when the picture to be identified contains the overall image characteristics of the object to be identified of a preset object type;
the recognition unit is used for inputting the picture to be recognized into an overall feature recognition model to obtain an overall recognition result; inputting the at least one local picture into a local feature recognition model to obtain a local recognition result;
the fusion unit is used for fusing the overall recognition result and the local recognition result by adopting a multi-task fusion loss model to obtain the characteristic data of the object to be recognized;
and the determining unit is used for determining the object to be identified as the target object when the characteristic data of the object to be identified is consistent with the characteristic data of the target object.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
in the technical scheme provided by the embodiment of the application, when the picture to be recognized is recognized, not only the pre-trained overall feature recognition model is adopted to recognize the picture to be recognized, but also the pre-trained local feature recognition model is adopted to recognize at least one local picture containing the local image feature of the object to be recognized, namely, the application combines the overall image feature and the local image feature of the object to be recognized to obtain the feature data of the object to be recognized, so that when the environment where the object to be recognized is located is complex, the object to be recognized can be recognized by combining the local image feature, and therefore, the recognition accuracy is high.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a diagram illustrating an embodiment of an object re-identification method according to an embodiment of the present disclosure;
fig. 2 is another embodiment of an object re-identification method according to an embodiment of the present disclosure;
fig. 3 is another embodiment of an object re-identification method according to an embodiment of the present disclosure;
fig. 4 is another embodiment of an object re-identification method according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an object re-identification apparatus according to an embodiment of the present disclosure.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments, and the illustrative embodiments and descriptions thereof of the present application are used for explaining the present application and do not constitute a limitation to the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
An embodiment of the present application provides an object re-identification method, which is applied to an electronic device, and as shown in fig. 1, the method includes the following steps:
In the embodiment of the application, the feature data of the target object can be obtained in advance according to the target picture containing the target object. In an optional implementation manner, the deep learning model can be used to identify the target picture in advance, so as to obtain the feature data of the target object. At this time, the feature data of the target object may be a prediction vector obtained based on the target object.
In the embodiment of the application, when the picture to be identified is obtained, one implementation manner can be that one picture is selected as the picture to be identified from a plurality of pictures collected by the monitoring equipment in real time; in another embodiment, an unrecognized picture can be obtained from a preset node of a block chain as a picture to be recognized; in yet another embodiment, a picture may be selected as the picture to be recognized from the locally stored pictures that are not recognized.
And 102, when the picture to be recognized contains the integral image characteristics of the object to be recognized of the preset object type, generating at least one local picture containing the local image characteristics of the object to be recognized according to the picture to be recognized.
The overall image characteristic of the object to be recognized may be an image of the object to be recognized in the picture to be recognized.
It can be understood that, in practical applications, the picture to be recognized may include, in addition to the overall image feature of the object to be recognized, a background image feature of an environment in which the object to be recognized is located.
The preset object type may include a human being, an animal, an object, or the like.
In the embodiment of the application, the object to be identified may be any object in a preset object type.
In the embodiment of the present application, the local picture may include a local image feature of the object to be recognized, for example, the local picture may include an image feature of a head, a hand, a foot, or a torso of the object to be recognized.
In the embodiment of the present application, when generating at least one local picture, an optional implementation manner may be to generate at least one local picture including local image features by segmenting the whole image features; in another alternative embodiment, local image features may be extracted from the global image features to generate at least one local picture containing the local image features.
Optionally, based on consideration of data security, after the picture to be identified and the at least one partial picture are obtained, the hash value of the picture to be identified and the hash value of each of the at least one partial picture may be extracted, and the hash value of the picture to be identified and the hash value of each of the at least one partial picture may be stored in a preset block chain node.
103, identifying the picture to be identified by utilizing a pre-trained overall feature identification model to obtain an overall identification result of the object to be identified; and identifying at least one local picture by using a pre-trained local feature identification model to obtain a local identification result of the object to be identified.
In the embodiment of the application, the overall feature recognition model and the local feature recognition model can be obtained by training the convolutional neural network in advance.
Optionally, in this embodiment of the present application, the convolutional neural network may be constructed in advance. In an alternative embodiment, the constructed convolutional neural network may include a predetermined number of convolutional pooling layers and fully-connected layers.
In the embodiment of the present application, the predetermined number of layers includes, but is not limited to, 4 layers.
When the preset number of layers is 4, in an optional implementation manner, the first three layers of the constructed convolutional neural network may be convolutional pooling layers, and the fourth layer may be a full-link layer.
The convolution kernel of the convolution pooling layer of the first layer can be set to 5 x 5, the step size can be set to 4, and the padding value can be set to 2; the convolution kernels of the second layer through the fourth layer may be set to 3 x 3, the step size may be set to 1, and the padding value may be set to 1.
In the embodiment of the application, the constructed convolutional neural network can be used in cooperation with a classifier (softmax), specifically, the classifier further processes the result output by the full connection layer, so that the classifier can participate in the training of the convolutional neural network or the subsequent identification through the trained convolutional neural network.
When the convolutional neural network and the classifier are used for identifying the picture, the full-connection layer outputs the feature vector corresponding to the picture, and the classifier outputs the prediction vector corresponding to the picture.
The feature vector is used for describing features of an object in the picture, such as the outline, age or color of the object, and the prediction vector is used for predicting who the object in the picture is based on the feature vector, such as the object in the picture is Zhang III or Liqu.
Optionally, the training process of the convolutional neural network may include the following steps:
acquiring at least one sample picture; for each sample picture of the N sample pictures, generating at least one local picture containing local image features of the sample object; obtaining a local sample picture set by utilizing at least one local picture; training the first convolution neural network by adopting at least one sample picture to obtain an overall feature recognition model; and training the second convolutional neural network by adopting a local sample picture set to obtain a local feature recognition model.
The at least one sample picture comprises N sample pictures including the overall image characteristics of the sample object and M sample pictures not including the overall image characteristics of the sample object, wherein the type of the sample object is a preset object type.
Wherein M, N is a positive integer.
In the embodiment of the application, after the overall image feature recognition model and the local image feature recognition model are obtained, the overall image feature recognition model and the local image feature recognition model can be stored in the preset block chain node.
In practical application, at least one sample picture can be acquired in a preset object re-identification data set. In an alternative implementation, the object re-recognition dataset may be the CUHK03 set or the Market-1501 set.
In practical application, before the local sample picture set is obtained by using the at least one local picture, the local picture which does not include the human body region in the at least one local picture can be manually removed.
Optionally, training the first convolutional neural network by using at least one sample picture to obtain an overall feature recognition model; before the local feature recognition model is obtained by training the second convolutional neural network by using the local sample picture set, size conversion can be performed on each sample picture in at least one sample picture, and size conversion can be performed on each local picture in the local picture set.
Optionally, when performing size conversion of the picture, the embodiment of the present application may perform operation of enlarging or reducing the picture, thereby implementing size conversion of the picture.
Optionally, when performing size conversion on each sample picture in the at least one sample picture, the size of each sample picture may be converted into a first preset size, for example, the size of each sample picture is scaled to 64 × 64; in the size conversion of each local picture, the size of each local picture may be converted into a second preset size, for example, the size of the second sample picture is scaled to 16 × 16.
In practical applications, the overall recognition result may indicate who the object to be recognized is, and the local recognition result may indicate which part of the object to be recognized is the local feature in the local picture. For example, it may be roughly determined according to the result to be recognized that the object to be recognized in the picture to be recognized is "three-open", the hand in the local picture may be determined as the "three-open" hand, the foot in the local picture may be the "lie-four" foot, and the like according to the result of the local recognition.
And 104, fusing the overall recognition result and the local recognition result by adopting a multi-task fusion loss model to obtain the characteristic data of the object to be recognized.
And 105, when the characteristic data of the object to be recognized is consistent with the characteristic data of the target object, determining that the object to be recognized is the target object.
When determining whether the feature data of the object to be recognized and the feature data of the target object are consistent, in one embodiment, it may be determined whether the feature data of the object to be recognized and the feature data of the target object are the same, and if the feature data of the object to be recognized and the feature data of the target object are the same, it is determined that the feature data of the object to be recognized and the feature data of the target object are consistent.
In another embodiment, whether the feature data of the object to be recognized is similar to the feature data of the target object may be determined, and if the similarity meets the requirement, it may be determined that the feature data of the object to be recognized is consistent with the feature data of the target object.
Optionally, in order to track the travel track of the target object, when it is determined that the object to be recognized is the target object, the picture to be recognized may be further marked in a preset marking manner. Such as marking the picture to be recognized with a red line frame.
Optionally, when the feature data of the object to be recognized is inconsistent with the feature data of the target object, the picture to be recognized is obtained again, and the above-mentioned flow corresponding to fig. 1 is executed again.
In the technical scheme provided by the embodiment of the application, when the picture to be recognized is recognized, not only the pre-trained overall feature recognition model is adopted to recognize the picture to be recognized, but also the pre-trained local feature recognition model is adopted to recognize at least one local picture containing the local image feature of the object to be recognized, namely, the application combines the overall image feature and the local image feature of the object to be recognized to obtain the feature data of the object to be recognized, so that when the environment where the object to be recognized is located is complex, the object to be recognized can be recognized by combining the local image feature, and therefore, the recognition accuracy is high.
Optionally, when at least one local picture including the local image feature of the object to be recognized is generated according to the picture to be recognized, as shown in fig. 2, step 102 may include the following steps:
Alternatively, when determining the region of the object to be recognized in the picture to be recognized, the method may be implemented by using a method based on histogram of Oriented Gradient (histogram of Oriented Gradient) features and Support Vector Machine (Support Vector Machine) classification.
And the partial picture is a picture corresponding to the region of the object to be identified in the picture to be identified.
And step 203, dividing a part of the picture to obtain at least one local picture.
In practical application, because at least one local picture obtained by segmentation includes a local picture not including a human body region, after the at least one local picture is obtained, the local picture not including the human body region in the at least one local picture can be manually removed.
Optionally, when the to-be-recognized picture is recognized by using a pre-trained global feature recognition model to obtain a global recognition result of the to-be-recognized object, and at least one local picture is recognized by using a pre-trained local feature recognition model to obtain a local recognition result of the to-be-recognized object, as shown in fig. 3, step 103 may include the following steps:
301, converting a picture to be identified into a first picture with a first preset size; and respectively converting each local picture into a second picture with a second preset size.
The size of the first picture is different from that of the picture to be identified, the size of the second picture is different from that of the corresponding local picture, and the second preset size is smaller than the first preset size
Optionally, the first predetermined size includes, but is not limited to, 64 x 64, and the second predetermined size includes, but is not limited to, 16 x 16.
Optionally, when the picture to be recognized is converted into the first picture, the first picture can be obtained by enlarging or reducing the picture to be recognized; when each partial picture is converted into the second picture, the second picture can be obtained by enlarging or reducing each partial picture.
Optionally, when a multitask fusion loss model is adopted to fuse the overall recognition result and the local recognition result to obtain the feature data of the object to be recognized, as shown in fig. 4, step 104 may include the following steps:
Optionally, the multitask fusion loss function may be:
where V is the number of tasks, norm is the normalization operation, Y is the output term,for a mapping corresponding to a global feature recognition model, or a mapping corresponding to a local feature recognition model, WvIs the convolution weight parameter, | W, obtained in the v-th taskvII is the trace of the matrix.
The embodiment of the present application further provides an electronic device, as shown in fig. 5, which includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502 and the memory 503 complete mutual communication through the communication bus 504,
a memory 503 for storing a computer program;
the processor 501, when executing the program stored in the memory 503, implements the following steps:
acquiring characteristic data of a target object and acquiring a picture to be identified;
when the picture to be recognized contains the overall image characteristics of the object to be recognized of the preset object type, generating at least one local picture containing the local image characteristics of the object to be recognized according to the picture to be recognized;
recognizing the picture to be recognized by utilizing a pre-trained overall feature recognition model to obtain an overall recognition result of the object to be recognized; recognizing at least one local picture by using a pre-trained local feature recognition model to obtain a local recognition result of an object to be recognized;
fusing the overall recognition result and the local recognition result by adopting a multi-task fusion loss model to obtain the characteristic data of the object to be recognized;
and when the characteristic data of the object to be recognized is consistent with the characteristic data of the target object, determining the object to be recognized as the target object.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment provided by the present application, there is further provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to execute the object re-identification method of any one of the above embodiments.
In yet another embodiment provided by the present application, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the object re-identification method of any of the above embodiments.
Based on the same inventive concept, an embodiment of the present application further provides an object re-identification apparatus, as shown in fig. 6, including:
an acquiring unit 601, configured to acquire feature data of a target object and acquire a picture to be recognized;
a generating unit 602, configured to generate, according to a picture to be identified, at least one local picture including a local image feature of an object to be identified when the picture to be identified includes an overall image feature of the object to be identified of a preset object type;
the recognition unit 603 is configured to input the picture to be recognized into the overall feature recognition model, so as to obtain an overall recognition result; inputting at least one local picture into a local feature recognition model to obtain a local recognition result;
the fusion unit 604 is configured to fuse the overall recognition result and the local recognition result to obtain feature data of the object to be recognized by using a multi-task fusion loss model;
a determining unit 605, configured to determine that the object to be recognized is the target object when the feature data of the object to be recognized is consistent with the feature data of the target object.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wirelessly (e.g., infrared, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The available media may be magnetic media (e.g., floppy disks, hard disks, tapes, etc.), optical media (e.g., DVDs), or semiconductor media (e.g., solid state drives), among others.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. An object re-recognition method, comprising:
acquiring characteristic data of a target object and acquiring a picture to be identified;
when the picture to be recognized contains the overall image characteristics of the object to be recognized of a preset object type, generating at least one local picture containing the local image characteristics of the object to be recognized according to the picture to be recognized;
recognizing the picture to be recognized by utilizing a pre-trained overall feature recognition model to obtain an overall recognition result of the object to be recognized; recognizing the at least one local picture by using a pre-trained local feature recognition model to obtain a local recognition result of the object to be recognized;
fusing the overall recognition result and the local recognition result by adopting a multi-task fusion loss model to obtain the characteristic data of the object to be recognized;
and when the characteristic data of the object to be recognized is consistent with the characteristic data of the target object, determining that the object to be recognized is the target object.
2. The method according to claim 1, wherein generating at least one local picture containing local image features of the object to be recognized from the picture to be recognized comprises:
determining the area of the object to be identified in the picture to be identified;
extracting a part of picture from the picture to be recognized, wherein the part of picture is a picture corresponding to the region of the object to be recognized in the picture to be recognized;
and segmenting the partial picture to obtain the at least one local picture.
3. The method according to claim 1, characterized in that the picture to be recognized is recognized by using a pre-trained overall feature recognition model to obtain an overall recognition result of the object to be recognized; recognizing the at least one local picture by using a pre-trained local feature recognition model to obtain a local recognition result of the object to be recognized, wherein the local recognition result comprises the following steps:
converting the picture to be identified into a first picture with a first preset size; respectively converting each local picture into a second picture with a second preset size, wherein the size of the first picture is different from that of the picture to be identified, the size of the second picture is different from that of the corresponding local picture, and the second preset size is smaller than the first preset size;
respectively acquiring the pre-trained overall feature recognition model and the pre-trained local feature recognition model from a preset block chain node;
inputting the first picture into the pre-trained overall feature recognition model to obtain the overall recognition result; and inputting the second picture into the local feature recognition model to obtain the local recognition result.
4. The method according to claim 1, wherein fusing the overall recognition result and the local recognition result by using a multitask fusion loss model to obtain feature data of the object to be recognized comprises:
determining a multitask fusion loss function corresponding to the multitask fusion loss model, wherein the multitask fusion loss function comprises an input item and an output item;
inputting the whole recognition result and the local recognition result into the input item;
and acquiring characteristic data of the object to be identified from the output item.
5. The method of claim 1, wherein the global feature recognition model and the local feature recognition model are trained on a convolutional neural network, the convolutional neural network comprises a first convolutional neural network and a second convolutional neural network, and the training step of the convolutional neural network comprises:
acquiring at least one sample picture, wherein the at least one sample picture comprises N sample pictures including the integral image feature of a sample object and M sample pictures not including the integral image feature of the sample object, and the type of the sample object is the preset object type;
for each sample picture of the N sample pictures, generating at least one local picture including local image features of the sample object;
obtaining a local sample picture set by utilizing the at least one local picture;
training the first convolution neural network by adopting the at least one sample picture to obtain the overall feature recognition model; and training the second convolutional neural network by adopting the local sample picture set to obtain the local feature recognition model.
6. The method according to claim 1, wherein determining that the object to be recognized is the target object when the feature data of the object to be recognized is consistent with the feature data of the target object comprises:
determining similarity between the characteristic data of the object to be identified and the characteristic data of the target object;
and when the similarity meets a preset requirement, determining the object to be identified as the target object.
7. The method according to any one of claims 1 to 6, wherein after generating at least one local picture containing local image features of the object to be recognized according to the picture to be recognized, the method further comprises:
extracting a hash value of the picture to be identified;
respectively extracting the hash value of each local picture in the at least one local picture;
and storing the hash value of the picture to be identified and the hash value of each local picture in the at least one local picture into a preset block chain node.
8. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 1 to 7.
9. An electronic device, comprising: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory for storing a computer program;
the processor, executing a program stored in the memory, implementing the method of any of claims 1-7.
10. An object re-recognition apparatus, comprising:
the acquisition unit is used for acquiring the characteristic data of the target object and acquiring a picture to be identified;
the generating unit is used for generating at least one local picture containing the local image characteristics of the object to be identified according to the picture to be identified when the picture to be identified contains the overall image characteristics of the object to be identified of a preset object type;
the recognition unit is used for inputting the picture to be recognized into an overall feature recognition model to obtain an overall recognition result; inputting the at least one local picture into a local feature recognition model to obtain a local recognition result;
the fusion unit is used for fusing the overall recognition result and the local recognition result by adopting a multi-task fusion loss model to obtain the characteristic data of the object to be recognized;
and the determining unit is used for determining the object to be identified as the target object when the characteristic data of the object to be identified is consistent with the characteristic data of the target object.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011303381.2A CN112446311A (en) | 2020-11-19 | 2020-11-19 | Object re-recognition method, electronic device, storage medium and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011303381.2A CN112446311A (en) | 2020-11-19 | 2020-11-19 | Object re-recognition method, electronic device, storage medium and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112446311A true CN112446311A (en) | 2021-03-05 |
Family
ID=74738265
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011303381.2A Pending CN112446311A (en) | 2020-11-19 | 2020-11-19 | Object re-recognition method, electronic device, storage medium and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112446311A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115331262A (en) * | 2022-09-06 | 2022-11-11 | 通号通信信息集团有限公司 | Image recognition method and device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109635825A (en) * | 2018-12-19 | 2019-04-16 | 苏州市科远软件技术开发有限公司 | Vehicle attribute detection method, device and storage medium |
CN110874574A (en) * | 2019-10-30 | 2020-03-10 | 平安科技(深圳)有限公司 | Pedestrian re-identification method and device, computer equipment and readable storage medium |
CN110889428A (en) * | 2019-10-21 | 2020-03-17 | 浙江大搜车软件技术有限公司 | Image recognition method and device, computer equipment and storage medium |
WO2020098158A1 (en) * | 2018-11-14 | 2020-05-22 | 平安科技(深圳)有限公司 | Pedestrian re-recognition method and apparatus, and computer readable storage medium |
CN111814857A (en) * | 2020-06-29 | 2020-10-23 | 浙江大华技术股份有限公司 | Target re-identification method, network training method thereof and related device |
WO2020224406A1 (en) * | 2019-05-08 | 2020-11-12 | 腾讯科技(深圳)有限公司 | Image classification method, computer readable storage medium, and computer device |
CN111932564A (en) * | 2020-09-24 | 2020-11-13 | 平安科技(深圳)有限公司 | Picture identification method and device, electronic equipment and computer readable storage medium |
-
2020
- 2020-11-19 CN CN202011303381.2A patent/CN112446311A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020098158A1 (en) * | 2018-11-14 | 2020-05-22 | 平安科技(深圳)有限公司 | Pedestrian re-recognition method and apparatus, and computer readable storage medium |
CN109635825A (en) * | 2018-12-19 | 2019-04-16 | 苏州市科远软件技术开发有限公司 | Vehicle attribute detection method, device and storage medium |
WO2020224406A1 (en) * | 2019-05-08 | 2020-11-12 | 腾讯科技(深圳)有限公司 | Image classification method, computer readable storage medium, and computer device |
CN110889428A (en) * | 2019-10-21 | 2020-03-17 | 浙江大搜车软件技术有限公司 | Image recognition method and device, computer equipment and storage medium |
CN110874574A (en) * | 2019-10-30 | 2020-03-10 | 平安科技(深圳)有限公司 | Pedestrian re-identification method and device, computer equipment and readable storage medium |
CN111814857A (en) * | 2020-06-29 | 2020-10-23 | 浙江大华技术股份有限公司 | Target re-identification method, network training method thereof and related device |
CN111932564A (en) * | 2020-09-24 | 2020-11-13 | 平安科技(深圳)有限公司 | Picture identification method and device, electronic equipment and computer readable storage medium |
Non-Patent Citations (1)
Title |
---|
甘凯今;蔡晓东;杨超;王丽娟;: "融合整体与局部特征的车辆型号识别方法", 现代电子技术, no. 07, 1 April 2017 (2017-04-01) * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115331262A (en) * | 2022-09-06 | 2022-11-11 | 通号通信信息集团有限公司 | Image recognition method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112990432B (en) | Target recognition model training method and device and electronic equipment | |
CN109508688B (en) | Skeleton-based behavior detection method, terminal equipment and computer storage medium | |
CN109145766B (en) | Model training method and device, recognition method, electronic device and storage medium | |
CN110969066B (en) | Live video identification method and device and electronic equipment | |
CN112052186B (en) | Target detection method, device, equipment and storage medium | |
CN112381837B (en) | Image processing method and electronic equipment | |
CN111753643B (en) | Character gesture recognition method, character gesture recognition device, computer device and storage medium | |
CN108564102A (en) | Image clustering evaluation of result method and apparatus | |
CN111967527B (en) | Peony variety identification method and system based on artificial intelligence | |
CN111597937B (en) | Fish gesture recognition method, device, equipment and storage medium | |
CN111382791B (en) | Deep learning task processing method, image recognition task processing method and device | |
US11423262B2 (en) | Automatically filtering out objects based on user preferences | |
CN112241470B (en) | Video classification method and system | |
CN112446311A (en) | Object re-recognition method, electronic device, storage medium and device | |
US20230386185A1 (en) | Statistical model-based false detection removal algorithm from images | |
CN114708582B (en) | AI and RPA-based electric power data intelligent inspection method and device | |
Khavalko et al. | Classification and Recognition of Medical Images Based on the SGTM Neuroparadigm. | |
CN112784691B (en) | Target detection model training method, target detection method and device | |
CN115311680A (en) | Human body image quality detection method and device, electronic equipment and storage medium | |
CN114445916A (en) | Living body detection method, terminal device and storage medium | |
CN111797075B (en) | Data recovery method and device, storage medium and electronic equipment | |
CN113705643A (en) | Target detection method and device and electronic equipment | |
CN115205906B (en) | Storage operator detection method, device and medium based on human body analysis | |
CN112990145B (en) | Group-sparse-based age estimation method and electronic equipment | |
Mihoub | Algerian license plate detection and recognition using deep learning |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |