A pedestrian re-identification method, device and system based on image enhancement technology
By performing image enhancement and random erasure processing on pedestrian images, combined with feature extraction and matching of deep neural network models, the problem of low recognition rate of blurred and occluded images in existing pedestrian re-identification methods is solved, and the application in intelligent video surveillance and Efficient identification in the security field.
Patent Information
- Application Number
- CN202010650381.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-08
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-07-08
AI Technical Summary
Existing pedestrian re-identification methods have low recognition rates and large amounts of calculation when processing blurred and occluded pedestrian images, making it difficult to be widely used in the fields of intelligent video surveillance and intelligent security.
A method based on image enhancement technology is used to process the images of pedestrians to be identified, and the training sample image set is randomly erased to increase the number of occluded pedestrian images. Features are extracted through a deep neural network model and dimensionality reduction matching is performed to improve the recognition rate.
It improves the recognition rate of blurred and occluded pedestrian images, reduces computing costs, and is suitable for intelligent video surveillance and intelligent security fields.
Smart Images

Figure CN111914668B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital image processing, and in particular to a pedestrian re-identification method, device and system based on image enhancement technology. Background Art
[0002] Person re-identification, also known as pedestrian re-identification, is a technology that uses computer vision technology to determine whether a specific pedestrian exists in an image or video sequence. With the rapid development of video surveillance, pedestrian re-identification plays an increasingly important role in intelligent surveillance.
[0003] For the problem of pedestrian re-identification, the usual steps are to first extract the features of the pedestrian, measure the distance of the pedestrian features to obtain a similarity score, and then sort them according to the similarity score to finally obtain the identity of the pedestrian. However, in real life, due to the differences between different camera devices, pedestrians have both rigid and flexible characteristics, and their appearance is easily affected by clothing, scale, occlusion, posture and perspective, resulting in some of the collected pedestrian images being blurred or occluded to varying degrees. The commonly used pedestrian re-identification methods are mainly aimed at clear pedestrian images, and do not consider processing blurred and occluded pedestrian images. The few pedestrian re-identification methods for blurred and occluded pedestrian images have very large computational complexity and strict requirements on hardware resources, and cannot be widely used in intelligent video surveillance, intelligent security and other fields. It can be seen that the existing pedestrian re-identification methods have the problems of low recognition rate for blurred and occluded pedestrian images and poor user experience. Summary of the invention
[0004] The embodiments of the present application provide a pedestrian re-identification method, device and system based on image enhancement technology, which are used to solve the technical problems of low recognition rate for blurred and occluded pedestrian images and poor user experience in existing pedestrian re-identification methods.
[0005] In the first aspect, in order to solve the above technical problems, the embodiment of the present application provides a pedestrian re-identification method based on image enhancement technology, and the technical solution of the method is as follows:
[0006] Performing image enhancement processing on the first pedestrian image to be identified to obtain a second pedestrian image to be identified;
[0007] Performing random erasing processing on the training sample images in the first training sample image set to obtain a second training sample image set, wherein the random erasing processing is to randomly select a rectangular area of random size in the image and assign random pixel values to pixels in the rectangular area;
[0008] Inputting the second training sample image set into a deep neural network model for training to obtain a pre-trained model, and performing feature extraction processing on the second pedestrian image to be identified according to the pre-trained model to obtain a first feature vector of the second pedestrian image to be identified, wherein the pre-trained model is a functional relationship model of the training sample image and the feature vector;
[0009] Performing dimensionality reduction processing on the first feature vector to obtain a second feature vector of the second pedestrian image to be identified;
[0010] According to the second feature vector and the feature vector set corresponding to the test sample image set, feature matching processing is performed on the second pedestrian image to be identified to obtain a pedestrian re-identification result of the second pedestrian image to be identified.
[0011] In the embodiment of the present application, firstly, the first pedestrian image to be identified is subjected to image enhancement processing to obtain the second pedestrian image to be identified, and then the training sample images in the first training sample image set are subjected to random erasure processing to obtain the second training sample image set, and then the second training sample image set is input into the deep neural network model for training to obtain the pre-training model, and according to the pre-training model, the second pedestrian image to be identified is subjected to feature extraction processing to obtain the first feature vector of the second pedestrian image to be identified, and the first feature vector is subjected to dimensionality reduction processing to obtain the second feature vector of the second pedestrian image to be identified, and according to the second feature vector and the feature vector set corresponding to the test sample image set, the second pedestrian image to be identified is subjected to feature matching processing to obtain the pedestrian re-identification result of the second image to be identified. By performing image enhancement processing on the first pedestrian image to be identified and performing random erasure processing on the training sample images in the first training sample image set, some required information in the first pedestrian image to be identified is highlighted, some unnecessary information is weakened or removed, and at the same time, the number of occluded pedestrian images in the training sample image set is increased, thereby improving the recognition rate of blurred and occluded pedestrian images.
[0012] In an optional implementation, performing image enhancement processing on the first image of the pedestrian to be identified to obtain the second image of the pedestrian to be identified includes:
[0013] Performing histogram normalization and equalization processing on the first pedestrian image to be identified to obtain a first pedestrian image;
[0014] Performing channel separation, image compensation, channel merging, image correction and linear stretching processing on the first pedestrian image to be identified to obtain a second pedestrian image;
[0015] The first pedestrian image and the second pedestrian image are weightedly processed to obtain the second pedestrian image to be identified.
[0016] In an optional implementation manner, performing channel separation, image compensation, channel merging, image correction, and linear stretching processing on the first pedestrian image to be identified to obtain a second pedestrian image includes:
[0017] Performing channel separation processing on the first pedestrian image to be identified to obtain corresponding R, G, and B channel images;
[0018] Performing brightness estimation on the images of the three channels, and performing image compensation processing on the images of the three channels according to the brightness estimation results;
[0019] Channel merging, image correction and linear stretching are performed on the images of the three channels after the compensation processing to obtain the second pedestrian image.
[0020] In an optional implementation, performing random erasing processing on the training sample images in the first training sample image set to obtain the second training sample image set includes:
[0021] Randomly selecting N original pedestrian images from the original pedestrian image set of the first training sample image set, wherein the first training sample image set includes the original pedestrian image set and the non-pedestrian image set;
[0022] Performing M random erasing processes on each of the selected original pedestrian images to obtain a set of occluded pedestrian images, wherein N is any integer within a first preset range, and M is any integer within a second preset range;
[0023] Perform image affine and mirror processing on the occluded pedestrian images in the occluded pedestrian image set to obtain the second training sample image set, wherein the second training sample image set includes the occluded pedestrian image set after the image affine and mirror processing and the non-pedestrian image set.
[0024] In an optional implementation manner, performing M random erasing processes on each of the selected original pedestrian images includes:
[0025] Performing M replication processing on each of the selected original pedestrian images to obtain corresponding M original pedestrian images;
[0026] A rectangular area of random size is randomly selected from the original pedestrian image, and random pixel values are assigned to pixels within the rectangular area.
[0027] In an optional implementation, the random pixel value is any integer within a third preset range or an ImageNet average pixel value.
[0028] In an optional implementation, performing feature matching processing on the second image of pedestrian to be identified according to the second feature vector and a feature vector set corresponding to the test sample image set to obtain a pedestrian re-identification result of the second image of pedestrian to be identified includes:
[0029] According to the second feature vector and the feature vector set corresponding to the test sample image set, obtaining the distance between the second feature vector and the feature vector in the feature set, wherein the distance is the Euclidean distance between the two feature vectors;
[0030] Select a target distance less than a preset threshold value from the distances, and obtain a target feature vector corresponding to the target distance;
[0031] The test sample image corresponding to the target feature vector is used as the pedestrian re-identification result of the second image to be identified.
[0032] In a second aspect, an embodiment of the present application provides a pedestrian re-identification device based on image enhancement technology, comprising:
[0033] A first obtaining module is used to perform image enhancement processing on the first pedestrian image to be identified to obtain a second pedestrian image to be identified;
[0034] A second obtaining module is used to perform random erasing processing on the training sample images in the first training sample image set to obtain a second training sample image set, wherein the random erasing processing is to randomly select a rectangular area of random size in the image and assign random pixel values to pixels in the rectangular area;
[0035] a third obtaining module, configured to input the second training sample image set into a deep neural network model for training to obtain a pre-trained model, and perform feature extraction processing on the second pedestrian image to be identified according to the pre-trained model to obtain a first feature vector of the second pedestrian image to be identified, wherein the pre-trained model is a functional relationship model of the training sample image and the feature vector;
[0036] a fourth obtaining module, configured to perform dimensionality reduction processing on the first feature vector to obtain a second feature vector of the second pedestrian image to be identified;
[0037] The fifth acquisition module is used to perform feature matching processing on the second image of pedestrian to be identified according to the second feature vector and the feature vector set corresponding to the test sample image set, so as to obtain the pedestrian re-identification result of the second image to be identified.
[0038] In an optional implementation manner, the first obtaining module is specifically configured to:
[0039] Performing histogram normalization and equalization processing on the first pedestrian image to be identified to obtain a first pedestrian image;
[0040] Performing channel separation, image compensation, channel merging, image correction and linear stretching processing on the first pedestrian image to be identified to obtain a second pedestrian image;
[0041] The first pedestrian image and the second pedestrian image are weightedly processed to obtain the second pedestrian image to be identified.
[0042] In an optional implementation manner, the first obtaining module is specifically configured to:
[0043] Performing channel separation processing on the first pedestrian image to be identified to obtain corresponding R, G, and B channel images;
[0044] Performing brightness estimation on the images of the three channels, and performing image compensation processing on the images of the three channels according to the brightness estimation results;
[0045] Channel merging, image correction and linear stretching are performed on the images of the three channels after the compensation processing to obtain the second pedestrian image.
[0046] In an optional implementation manner, the second obtaining module is specifically configured to:
[0047] Randomly selecting N original pedestrian images from the original pedestrian image set of the first training sample image set, wherein the first training sample image set includes the original pedestrian image set and the non-pedestrian image set;
[0048] Performing M random erasing processes on each of the selected original pedestrian images to obtain a set of occluded pedestrian images, wherein N is any integer within a first preset range, and M is any integer within a second preset range;
[0049] Perform image affine and mirror processing on the occluded pedestrian images in the occluded pedestrian image set to obtain the second training sample image set, wherein the second training sample image set includes the occluded pedestrian image set after the image affine and mirror processing and the non-pedestrian image set.
[0050] In an optional implementation manner, the second obtaining module is specifically configured to:
[0051] Performing M replication processing on each of the selected original pedestrian images to obtain corresponding M original pedestrian images;
[0052] A rectangular area of random size is randomly selected from the original pedestrian image, and random pixel values are assigned to pixels within the rectangular area.
[0053] In an optional implementation, the random pixel value is any integer within a third preset range or an ImageNet average pixel value.
[0054] In an optional implementation manner, the fifth obtaining module is specifically configured to:
[0055] According to the second feature vector and the feature vector set corresponding to the test sample image set, obtaining the distance between the second feature vector and the feature vector in the feature set, wherein the distance is the Euclidean distance between the two feature vectors;
[0056] Select a target distance less than a preset threshold value from the distances, and obtain a target feature vector corresponding to the target distance;
[0057] The test sample image corresponding to the target feature vector is used as the pedestrian re-identification result of the second image to be identified.
[0058] In a third aspect, the embodiment of the present application provides a pedestrian re-identification system based on image enhancement technology, including:
[0059] A memory for storing program instructions;
[0060] The processor is used to call the program instructions stored in the memory, and execute the steps included in any one of the implementations of the first aspect according to the obtained program instructions.
[0061] In a fourth aspect, an embodiment of the present application provides a storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to enable a computer to execute the steps included in any one of the implementations in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for describing the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application.
[0063] Figure 1 A schematic diagram of the structure of a pedestrian re-identification system based on image enhancement technology in an embodiment of the present application;
[0064] Figure 2 A flowchart of a pedestrian re-identification method based on image enhancement technology in an embodiment of the present application;
[0065] Figure 3 Schematic diagram of the structure of a pedestrian re-identification device based on image enhancement technology in an embodiment of the present application;
[0066] Figure 4Schematic diagram of the structure of a pedestrian re-identification system based on image enhancement technology in an embodiment of the present application. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be arbitrarily combined with each other. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0068] The terms "first" and "second" in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any variation thereof are intended to cover non-exclusive protection. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0069] In the embodiment of the present application, "at least one" may mean at least two, for example, two, three or more, and the embodiment of the present application does not limit this.
[0070] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article, unless otherwise specified, generally indicates that the associated objects before and after are in an "or" relationship.
[0071] For the problem of pedestrian re-identification, the usual steps are to first extract the features of the pedestrian, measure the distance of the pedestrian features to obtain a similarity score, and then sort them according to the similarity score to finally obtain the identity of the pedestrian. However, in real life, due to the differences between different camera devices, pedestrians have both rigid and flexible characteristics, and their appearance is easily affected by clothing, scale, occlusion, posture and perspective, resulting in some of the collected pedestrian images being blurred or occluded to varying degrees. The commonly used pedestrian re-identification methods are mainly aimed at clear pedestrian images, and do not consider processing blurred and occluded pedestrian images. The few pedestrian re-identification methods for blurred and occluded pedestrian images have very large computational complexity and strict requirements on hardware resources, and cannot be widely used in intelligent video surveillance, intelligent security and other fields. It can be seen that the existing pedestrian re-identification methods have the problems of low recognition rate for blurred and occluded pedestrian images and poor user experience.
[0072] In view of this, an embodiment of the present application provides a pedestrian re-identification method based on image enhancement technology. The method first performs image enhancement processing on a first pedestrian image to be identified to obtain a second pedestrian image to be identified. Secondly, a random erasing processing is performed on the training sample images in the first training sample image set to obtain a second training sample image set. The second training sample image set is then input into a deep neural network model for training to obtain a pre-trained model. According to the pre-trained model, feature extraction processing is performed on the second pedestrian image to be identified to obtain a first feature vector of the second pedestrian image to be identified. Dimensionality reduction processing is performed on the first feature vector to obtain a second feature vector of the second pedestrian image to be identified. According to the second feature vector and the feature vector set corresponding to the test sample image set, feature matching processing is performed on the second pedestrian image to be identified to obtain a pedestrian re-identification result of the second image to be identified. By performing image enhancement processing on the first pedestrian image to be identified and randomly erasing the training sample images in the first training sample image set, certain required information in the first pedestrian image to be identified is highlighted, certain unnecessary information is weakened or removed, and the number of occluded pedestrian images in the training sample image set is increased, thereby improving the recognition rate of blurred and occluded pedestrian images.
[0073] In order to better understand the above technical scheme, the technical scheme of the present application is described in detail below through the accompanying drawings and specific embodiments of the specification. It should be understood that the embodiments of the present application and the specific features in the embodiments are detailed descriptions of the technical scheme of the present application, rather than limitations on the technical scheme of the present application. In the absence of conflict, the embodiments of the present application and the technical features in the embodiments can be combined with each other.
[0074] Figure 1The structure of a pedestrian re-identification system based on image enhancement technology to which the method provided in the embodiment of the present application is applicable. Of course, the method provided in the embodiment of the present application can be applied to a variety of pedestrian re-identification systems based on image enhancement technology. It should be understood that Figure 1 The pedestrian re-identification system based on image enhancement technology shown is a detailed description of the pedestrian re-identification system based on image enhancement technology that can be applied to the method provided in the embodiment of the present application, rather than a limitation of the pedestrian re-identification system based on image enhancement technology that can be applied to the method provided in the embodiment of the present application.
[0075] Figure 1 The illustrated pedestrian re-identification system based on image enhancement technology includes a memory 101, a processor 102, and a bus interface 103. The memory 101 and the processor 102 are connected via the bus interface 103. The memory 101 is used to store program instructions. The processor 102 is used to call the program instructions stored in the memory 101, and execute all steps included in the pedestrian re-identification method based on image enhancement technology according to the obtained program instructions.
[0076] See also Figure 2 , is a pedestrian re-identification method based on image enhancement technology provided in an embodiment of the present application, the method can be Figure 1 The pedestrian re-identification system based on image enhancement technology is shown in FIG. The specific process of the method is described as follows.
[0077] Step 201: Perform image enhancement processing on a first image of a pedestrian to be identified to obtain a second image of a pedestrian to be identified.
[0078] In an embodiment of the present application, because the grayscale of the blurred pedestrian image is basically distributed in a region with lower grayscale values, in order to make the relatively blurred region in the first pedestrian image to be identified clearer and the visual effect better, image enhancement processing is performed on the first pedestrian image to be identified to highlight certain required information in the first pedestrian image to be identified. At the same time, certain unnecessary information is weakened or removed, that is, the low grayscale value portion is expanded accordingly and the high grayscale value portion is compressed accordingly, thereby improving the quality of the first pedestrian image to be identified and obtaining a second pedestrian image to be identified that is more suitable for human visual characteristics and machine recognition systems.
[0079] In the specific implementation process, the first step is to perform histogram normalization processing on the first pedestrian image to be identified, and then perform equalization processing to obtain the first pedestrian image. Specifically, the histogram of the first pedestrian image to be identified is used to represent the grayscale range of the image, the frequency and distribution of the grayscale, the average brightness and contrast of the image and other general descriptions. According to the normalized histogram of the first pedestrian image to be identified, the first pedestrian image to be identified can be equalized, that is, the darker part of the first pedestrian image to be identified is enhanced, and the exposed part is compressed to obtain the first pedestrian image.
[0080] The second step is to perform channel separation, image compensation, channel merging, image correction and linear stretching on the first pedestrian image to be identified to obtain a second pedestrian image. Specifically, the first pedestrian image to be identified is subjected to channel separation to obtain corresponding R, G, and B channel images, and brightness estimation is performed on the three channel images, wherein MSRCR (Multi-Scale Retinex with Color Restoration) can be used to estimate the brightness of the three channel images. According to the brightness estimation result, image compensation is performed on the three channel images, and channel merging, image correction and linear stretching are performed on the compensated three channel images to obtain the second pedestrian image.
[0081] The third step is to perform weighted processing on the first pedestrian image and the second pedestrian image, wherein the weighted coefficient is alpha, and its value is determined based on the contribution value of the first pedestrian image to be identified after the first step of processing and the contribution value of the image to be identified after the second step of processing, and is a range value, such as {0.35,...,0.85}, thereby improving the information entropy of the pedestrian image to be identified and the overall quality of the image, and obtaining the second pedestrian image to be identified.
[0082] Step 202: Perform random erasing processing on the training sample images in the first training sample image set to obtain a second training sample image set, wherein the random erasing processing is to randomly select a rectangular area of random size in the image and assign random pixel values to the pixels in the rectangular area.
[0083] In an embodiment of the present application, during the training of the deep neural network model, due to the small number of occluded pedestrian images in the training sample image set, serious overfitting problems are prone to occur during the training process, resulting in poor generalization performance of the trained model. The recognition rate of occluded pedestrian images in the training sample image set is often very high, while the recognition rate of occluded pedestrian images in the test sample image set is very low. Therefore, the second training sample image set is obtained by randomly erasing the training sample images in the first training sample image set, wherein the random erasing process is to randomly select a rectangular area of random size in the image, assign random pixel values to the pixels in the rectangular area, and increase the number of occluded pedestrian images in the training sample image set to improve the recognition rate of occluded pedestrian images.
[0084] In a specific implementation process, the first training sample image set includes an original pedestrian image set and a non-pedestrian image set. N original pedestrian images are randomly selected from the original pedestrian image set of the first training sample image set, and each selected original pedestrian image is randomly erased M times to obtain an occluded pedestrian image set, wherein N is any integer within the first preset range, and M is any integer within the second preset range. When performing the erasing process, it is generally best not to keep only the upper body or only the lower body in the erasing range, and do not set the erased rectangular area to be larger than 1 / 5 of the original image, otherwise some useful key point features in the image will be lost after erasing. Specifically, each selected original pedestrian image is copied M times to obtain the corresponding M original pedestrian images, and a rectangular area of random size in the original pedestrian image is randomly selected, and random pixel values are assigned to the pixels in the rectangular area, wherein the random pixel value is any integer within the third preset range or the average pixel value of the ImageNet.
[0085] To facilitate understanding, the following is explained in the form of an example:
[0086] For example, the original pedestrian image set includes 20 original pedestrian images, the first preset range is {4,…,10}, and the second preset range is {5…,15}. If N=4 and M=12, 4 original pedestrian images are randomly selected from the 20 original pedestrian images, and each selected original pedestrian image is copied 12 times to obtain 48 original pedestrian images. A rectangular area of random size is randomly selected from each original pedestrian image, and random pixel values are assigned to the pixels in the rectangular area.
[0087] After obtaining the occluded pedestrian image set, the occluded pedestrian images in the occluded pedestrian image set are subjected to image affine and mirror processing to obtain a second training sample image set, wherein the second training sample image set includes the occluded pedestrian image set and the non-pedestrian image set after image affine and mirror processing.
[0088] Step 203: Input the second training sample image set into the deep neural network model for training to obtain a pre-trained model, and perform feature extraction processing on the second pedestrian image to be identified based on the pre-trained model to obtain a first feature vector of the second pedestrian image to be identified, wherein the pre-trained model is a functional relationship model of the training sample image and the feature vector.
[0089] In an embodiment of the present application, after obtaining the second training sample image set, the second training sample image set is input into the deep neural network model for training to obtain a pre-trained model. The second training sample image set includes an occluded pedestrian image set obtained by randomly erasing the original pedestrian image set of the first training sample image set and a non-pedestrian image set of the first training sample image set. Compared with the first training sample image set, the second training sample image set increases the number of occluded pedestrian images, thereby avoiding the serious overfitting problem that is prone to occur during the training process of the deep neural network model, so that the obtained pre-trained model has better generalization performance, and not only has a high recognition rate for occluded pedestrian images in the training sample image set, but also has a high recognition rate for occluded pedestrian images in the test sample image set.
[0090] After obtaining the pre-training model, the second pedestrian image to be identified is input into the pre-training model of the functional relationship model of the training sample image and the feature vector, and feature extraction processing is performed on the second pedestrian image to be identified to obtain the first feature vector of the second pedestrian image to be identified.
[0091] Step 204: Perform dimensionality reduction processing on the first feature vector to obtain a second feature vector of the second pedestrian image to be identified.
[0092] In an embodiment of the present application, after obtaining the first feature vector of the second pedestrian image to be identified, the feature dimension of the first feature vector obtained is usually high. If subsequent calculations are performed, the calculation cost and the resource requirements for the hardware platform will be very high. Therefore, it is necessary to perform dimensionality reduction processing on the first feature vector to obtain the second feature vector of the second pedestrian image to be identified, wherein PCA (Principal Components Analysis, principal component analysis technology) can be used to perform dimensionality reduction processing on the first feature vector.
[0093] Step 205: Perform feature matching processing on the second image of pedestrian to be identified according to the second feature vector and the feature vector set corresponding to the test sample image set to obtain a pedestrian re-identification result of the second image of pedestrian to be identified.
[0094] In an embodiment of the present application, after obtaining the second feature vector of the second pedestrian image to be identified, feature matching processing is performed on the second pedestrian image to be identified based on the second feature vector and the feature vector set corresponding to the test sample image set to obtain a pedestrian re-identification result of the second pedestrian image to be identified.
[0095] In the specific implementation process, first, based on the second feature vector and the feature vector set corresponding to the test sample image set, the distance between the second feature vector and the feature vector in the feature set is obtained, wherein the distance is the Euclidean distance between the two feature vectors, and then a target distance less than a preset threshold is selected from the distance to obtain the target feature vector corresponding to the target distance, and the test sample image corresponding to the target feature vector is used as the pedestrian re-identification result of the second image to be identified.
[0096] Based on the same inventive concept, the embodiment of the present application provides a pedestrian re-identification device based on image enhancement technology, which can realize the functions corresponding to the aforementioned pedestrian re-identification method based on image enhancement technology. The pedestrian re-identification device based on image enhancement technology can be a hardware structure, a software module, or a hardware structure plus a software module. The pedestrian re-identification device based on image enhancement technology can be implemented by a chip system, which can be composed of chips or include chips and other discrete devices. Please refer to Figure 3 As shown, the pedestrian re-identification device based on image enhancement technology includes a first acquisition module 301, a second acquisition module 302, a third acquisition module 303, a fourth acquisition module 304, and a fifth acquisition module 305, wherein:
[0097] A first obtaining module 301 is used to perform image enhancement processing on the first pedestrian image to be identified to obtain a second pedestrian image to be identified;
[0098] The second obtaining module 302 is used to perform random erasing processing on the training sample images in the first training sample image set to obtain a second training sample image set, wherein the random erasing processing is to randomly select a rectangular area of random size in the image and assign random pixel values to pixels in the rectangular area;
[0099] The third obtaining module 303 is used to input the second training sample image set into the deep neural network model for training to obtain a pre-training model, and perform feature extraction processing on the second pedestrian image to be identified according to the pre-training model to obtain a first feature vector of the second pedestrian image to be identified, wherein the pre-training model is a functional relationship model of the training sample image and the feature vector;
[0100] A fourth obtaining module 304 is used to perform dimensionality reduction processing on the first feature vector to obtain a second feature vector of the second pedestrian image to be identified;
[0101] The fifth obtaining module 305 is used to perform feature matching processing on the second image of pedestrian to be identified according to the second feature vector and the feature vector set corresponding to the test sample image set, so as to obtain a pedestrian re-identification result of the second image of pedestrian to be identified.
[0102] In an optional implementation manner, the first obtaining module 301 is specifically configured to:
[0103] Performing histogram normalization and equalization processing on the first pedestrian image to be identified to obtain a first pedestrian image;
[0104] Performing channel separation, image compensation, channel merging, image correction and linear stretching processing on the first pedestrian image to be identified to obtain a second pedestrian image;
[0105] The first pedestrian image and the second pedestrian image are weightedly processed to obtain the second pedestrian image to be identified.
[0106] In an optional implementation manner, the first obtaining module 301 is specifically configured to:
[0107] Performing channel separation processing on the first pedestrian image to be identified to obtain corresponding R, G, and B channel images;
[0108] Performing brightness estimation on the images of the three channels, and performing image compensation processing on the images of the three channels according to the brightness estimation results;
[0109] Channel merging, image correction and linear stretching are performed on the images of the three channels after the compensation processing to obtain the second pedestrian image.
[0110] In an optional implementation manner, the second obtaining module 302 is specifically configured to:
[0111] Randomly selecting N original pedestrian images from the original pedestrian image set of the first training sample image set, wherein the first training sample image set includes the original pedestrian image set and the non-pedestrian image set;
[0112] Performing M random erasing processes on each of the selected original pedestrian images to obtain a set of occluded pedestrian images, wherein N is any integer within a first preset range, and M is any integer within a second preset range;
[0113] Perform image affine and mirror processing on the occluded pedestrian images in the occluded pedestrian image set to obtain the second training sample image set, wherein the second training sample image set includes the occluded pedestrian image set after the image affine and mirror processing and the non-pedestrian image set.
[0114] In an optional implementation manner, the second obtaining module 302 is specifically configured to:
[0115] Performing M replication processing on each of the selected original pedestrian images to obtain corresponding M original pedestrian images;
[0116] A rectangular area of random size is randomly selected from the original pedestrian image, and random pixel values are assigned to pixels within the rectangular area.
[0117] In an optional implementation, the random pixel value is any integer within a third preset range or an ImageNet average pixel value.
[0118] In an optional implementation manner, the fifth obtaining module 305 is specifically configured to:
[0119] According to the second feature vector and the feature vector set corresponding to the test sample image set, obtaining the distance between the second feature vector and the feature vector in the feature set, wherein the distance is the Euclidean distance between the two feature vectors;
[0120] Select a target distance less than a preset threshold value from the distances, and obtain a target feature vector corresponding to the target distance;
[0121] The test sample image corresponding to the target feature vector is used as the pedestrian re-identification result of the second image to be identified.
[0122] Based on the same inventive concept, the present application embodiment provides a pedestrian re-identification system based on image enhancement technology, see Figure 4 The pedestrian re-identification system based on image enhancement technology includes at least one processor 402 and a memory 401 connected to the at least one processor. The specific connection medium between the processor 402 and the memory 401 is not limited in the embodiment of the present application. Figure 4 For example, the processor 402 and the memory 401 are connected via a bus 400. Figure 4 The bus 400 is represented by a bold line, and the connection between other components is only for schematic illustration and is not limited thereto. The bus 400 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0123] In the embodiment of the present application, the memory 401 stores instructions that can be executed by at least one processor 402. At least one processor 402 can execute the steps included in the aforementioned pedestrian re-identification method based on image enhancement technology by calling the instructions stored in the memory 401. Among them, the processor 402 is the control center of the pedestrian re-identification system based on image enhancement technology, and can use various interfaces and lines to connect the various parts of the entire pedestrian re-identification system based on image enhancement technology. By executing the instructions stored in the memory 401, various functions of the pedestrian re-identification system based on image enhancement technology are realized. Optionally, the processor 402 may include one or more processing units, and the processor 402 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application program, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 402. In some embodiments, the processor 402 and the memory 401 can be implemented on the same chip, and in some embodiments, they can also be implemented separately on independent chips.
[0124] The memory 401 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 401 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 401 is any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 401 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0125] Processor 402 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, which may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the pedestrian re-identification method based on image enhancement technology disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0126] By designing and programming the processor 402, the code corresponding to the pedestrian re-identification method based on image enhancement technology introduced in the aforementioned embodiment can be solidified into the chip, so that the chip can execute the steps of the aforementioned pedestrian re-identification method based on image enhancement technology during operation. How to design and program the processor 402 is a technology well known to those skilled in the art and will not be repeated here.
[0127] Based on the same inventive concept, an embodiment of the present application further provides a storage medium storing computer instructions. When the computer instructions are executed on a computer, the computer executes the steps of the aforementioned method for pedestrian re-identification based on image enhancement technology.
[0128] In some possible implementations, various aspects of the pedestrian re-identification method based on image enhancement technology provided by the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on a pedestrian re-identification system based on image enhancement technology, the program code is used to enable the pedestrian re-identification system based on image enhancement technology to perform the steps of the pedestrian re-identification method based on image enhancement technology according to various exemplary embodiments of the present application described above in this specification.
[0129] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0130] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0131] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0132] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0133] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A pedestrian re-identification method based on image enhancement technology, characterized in that: include: Performing histogram normalization and equalization processing on the first pedestrian image to be identified to obtain a first pedestrian image; Performing channel separation, image compensation, channel merging, image correction and linear stretching processing on the first pedestrian image to be identified to obtain a second pedestrian image; Performing weighted processing on the first pedestrian image and the second pedestrian image to obtain a second pedestrian image to be identified; Performing random erasing processing on the training sample images in the first training sample image set to obtain a second training sample image set, wherein the random erasing processing is to randomly select a rectangular area of random size in the image and assign random pixel values to pixels in the rectangular area; Inputting the second training sample image set into a deep neural network model for training to obtain a pre-trained model, and performing feature extraction processing on the second pedestrian image to be identified according to the pre-trained model to obtain a first feature vector of the second pedestrian image to be identified, wherein the pre-trained model is a functional relationship model of the training sample image and the feature vector; Performing dimensionality reduction processing on the first feature vector to obtain a second feature vector of the second pedestrian image to be identified; According to the second feature vector and the feature vector set corresponding to the test sample image set, feature matching processing is performed on the second pedestrian image to be identified to obtain a pedestrian re-identification result of the second pedestrian image to be identified.
2. The method according to claim 1, characterized in that The first pedestrian image to be identified is subjected to channel separation, image compensation, channel merging, image correction, and linear stretching processing to obtain a second pedestrian image, including: Performing channel separation processing on the first pedestrian image to be identified to obtain corresponding R, G, and B channel images; Performing brightness estimation on the images of the three channels, and performing image compensation processing on the images of the three channels according to the brightness estimation results; Channel merging, image correction and linear stretching are performed on the images of the three channels after the compensation processing to obtain the second pedestrian image.
3. The method according to claim 1, characterized in that Performing random erasing processing on the training sample images in the first training sample image set to obtain a second training sample image set includes: Randomly selecting N original pedestrian images from the original pedestrian image set of the first training sample image set, wherein the first training sample image set includes the original pedestrian image set and the non-pedestrian image set; Performing M random erasing processes on each of the selected original pedestrian images to obtain a set of occluded pedestrian images, wherein N is any integer within a first preset range, and M is any integer within a second preset range; Perform image affine and mirror processing on the occluded pedestrian images in the occluded pedestrian image set to obtain the second training sample image set, wherein the second training sample image set includes the occluded pedestrian image set after the image affine and mirror processing and the non-pedestrian image set.
4. The method according to claim 3, characterized in that Performing M random erasing processes on each of the selected original pedestrian images, including: Performing M replication processing on each of the selected original pedestrian images to obtain corresponding M original pedestrian images; A rectangular area of random size is randomly selected from the original pedestrian image, and random pixel values are assigned to pixels within the rectangular area.
5. The method according to claim 4, characterized in that The random pixel value is any integer within a third preset range or an ImageNet average pixel value.
6. The method according to claim 1, characterized in that According to the second feature vector and the feature vector set corresponding to the test sample image set, feature matching processing is performed on the second pedestrian image to be identified to obtain a pedestrian re-identification result of the second pedestrian image to be identified, including: According to the second feature vector and the feature vector set corresponding to the test sample image set, obtaining the distance between the second feature vector and the feature vector in the feature vector set, wherein the distance is the Euclidean distance between the two feature vectors; Select a target distance less than a preset threshold value from the distances, and obtain a target feature vector corresponding to the target distance; The test sample image corresponding to the target feature vector is used as the pedestrian re-identification result of the second pedestrian image to be identified.
7. A pedestrian re-identification device based on image enhancement technology, characterized in that: include: A first obtaining module, used for performing histogram normalization and equalization processing on the first pedestrian image to be identified to obtain a first pedestrian image; Performing channel separation, image compensation, channel merging, image correction and linear stretching processing on the first pedestrian image to be identified to obtain a second pedestrian image; Performing weighted processing on the first pedestrian image and the second pedestrian image to obtain a second pedestrian image to be identified; A second obtaining module is used to perform random erasing processing on the training sample images in the first training sample image set to obtain a second training sample image set, wherein the random erasing processing is to randomly select a rectangular area of random size in the image and assign random pixel values to pixels in the rectangular area; a third obtaining module, configured to input the second training sample image set into a deep neural network model for training to obtain a pre-trained model, and perform feature extraction processing on the second pedestrian image to be identified according to the pre-trained model to obtain a first feature vector of the second pedestrian image to be identified, wherein the pre-trained model is a functional relationship model of the training sample image and the feature vector; a fourth obtaining module, configured to perform dimensionality reduction processing on the first feature vector to obtain a second feature vector of the second pedestrian image to be identified; The fifth acquisition module is used to perform feature matching processing on the second image of pedestrian to be identified according to the second feature vector and the feature vector set corresponding to the test sample image set, so as to obtain the pedestrian re-identification result of the second image of pedestrian to be identified.
8. A pedestrian re-identification system based on image enhancement technology, characterized in that: include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the steps included in the method according to any one of claims 1 to 6 according to the obtained program instructions.
9. A storage medium, characterized in that: The storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the steps included in the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Image identification method and device
CN107229952A
A pedestrian reidentification data enhancement method based on stochastic linear interpolation
CN109635634A
Pedestrian re-identification method and a related product
CN109657533A
