Self-adaptive personnel re-identification method, system and equipment for complex environment
By using adaptive data augmentation method and multi-frame feature characterization technology in the oil industry monitoring system, labeled data that meets physical constraints is generated, which solves the recognition accuracy and adaptability of pedestrian image re-recognition technology in complex environments, and significantly improves the performance of the monitoring system.
Patent Information
- Application Number
- CN202510104003.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2045-01-23
AI Technical Summary
The existing pedestrian image re-recognition technology faces the problems of insufficient recognition accuracy and poor adaptability in the complex environment of the oil industry, especially in cross-camera scenarios, problems such as insufficient data and image quality interference are difficult to effectively solve.
An adaptive data augmentation method is proposed, combining pedestrian image detection and tracking algorithm, Copy-Paste data augmentation technology, PCT-Net background fusion and Attention mechanism, a massive labeled data that meets physical constraints is generated, and adaptive training and optimization of pedestrian image re-identification model is carried out.
By generating high-quality training samples that adapt to the changes in different camera perspectives, lighting and backgrounds, the overall performance of the pedestrian image re-identification system is significantly improved, and the accuracy and adaptability of pedestrian re-identification in monitoring scenarios is improved.
Smart Images

Figure CN119541003A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an adaptive person re-identification method, system and device for complex environments. Background Art
[0002] With the development requirements of digital transformation in the petroleum industry, intelligent monitoring technology has been widely used in high-risk scenarios such as oil fields, pipelines, and refineries. The on-site environment of the petroleum industry is complex, with numerous equipment and widely distributed operating areas. The monitoring system is required to have high precision and high stability in order to monitor the operating status of equipment, the behavior of operators, and sudden safety incidents in a timely manner. As one of the core technologies of intelligent monitoring, pedestrian image re-identification technology can track the motion trajectory of the same pedestrian image under multiple cameras and realize cross-camera recognition. This is of great significance to on-site management, safety monitoring, and event tracing in the petroleum industry.
[0003] However, existing pedestrian image re-identification technologies face many challenges. First, in oilfield operation areas and pipeline inspection scenarios, cameras are widely distributed and have varying angles, resulting in huge differences in pedestrian images captured by different cameras, with significant changes in lighting, background, and perspective. Secondly, in the oil industry environment, complex equipment and dynamic lighting conditions will interfere with image quality, and existing pedestrian image re-identification models show insufficient recognition accuracy when dealing with these changes. In addition, the lack of annotated data is also a bottleneck for the promotion and application of this technology in industrial scenarios. Although traditional data augmentation techniques, such as random cropping, rotation, color jittering, etc., can partially alleviate the problem of insufficient data, these methods do not fully consider the geometric constraints of camera imaging, and the generated training data is quite different from the actual scene, and cannot effectively improve the performance of the model in practical applications. Summary of the invention
[0004] The present invention provides an adaptive personnel re-identification method, system and device for complex environments, aiming to solve the accuracy and adaptability problems of pedestrian image re-identification in the monitoring system of the petroleum industry, especially in the cross-camera scenario, by proposing an adaptive data augmentation method to generate massive labeled data that conforms to physical constraints. The present invention combines pedestrian image detection and tracking algorithm, Copy-Paste data augmentation technology, PCT-Net background fusion and multi-frame feature representation under the Attention mechanism, automatically generates labeled data that adapts to the complex environment of the petroleum industry, and adaptively trains and optimizes the pedestrian image re-identification model.
[0005] The present invention is achieved through the following technical solutions: An adaptive person re-identification method for complex environments, comprising: Obtain different surveillance video stream data, and based on the different surveillance video stream data, use pedestrian image detection combined with pedestrian image trajectory tracking algorithm to generate spatiotemporal trajectory data of pedestrian images corresponding to different cameras, wherein the surveillance video stream data is composed of a plurality of original frame image data; Determine a basic camera, and paste pedestrian images with different spatiotemporal trajectory data taken by cameras other than the basic camera into the original frame image data taken by the basic camera based on the set camera constraint conditions, thereby forming a plurality of combined frame image data; Performing background fusion on a plurality of the combined frame image data respectively, so as to form a plurality of fused frame image data simultaneously containing pedestrian images taken by different cameras; Constructing a neural network model based on an attention mechanism to obtain a recognition model, and using the fused frame image data as input of the recognition model and the real fused feature vector of the pedestrian image in the fused frame image data as output of the recognition model to train the recognition model; The person in the fused frame image data is identified by using the trained recognition model.
[0006] As an optimization, the spatiotemporal trajectory data is expressed as: ;
[0007] in, Represents the pedestrian image in the original frame image data at time location information, , is the number of original frame image data of the surveillance video stream data where the pedestrian image is located.
[0008] As an optimization, the camera constraints include the relationship between distance and image coordinates, the scale adjustment constraints when pasting pedestrian images, and the physical constraints of the pasting process, where: The distance and image coordinate relationship constraints are specifically: A camera other than the basic camera is defined as a first camera. The farther the distance between the pedestrian image captured by the first camera and the first camera is, the higher the position of the pedestrian image pasted in the original frame image data captured by the basic camera is. The scale adjustment constraints when pasting pedestrian images are specifically: The higher the position where the pedestrian image is pasted in the original frame image data captured by the basic camera, the larger the size of the pedestrian image; The physical constraints of the pasting process are specifically: ; in, and are the heights of camera A and camera B respectively, The position in the original frame image data taken by camera A The actual position in the corresponding physical world The distance to camera A, Indicates the position where the pedestrian image is pasted in the original frame image data taken by camera B The actual position in the corresponding physical world The distance to camera A.
[0009] As an optimization, the background fusion of the combined frame image data is specifically performed through the PCT-Net conversion network. The conversion formula of the PCT-Net conversion network to fuse the pedestrian image with the background of the original frame image data is: ;
[0010] in, represents the fused image pixels, To paste the pixel value of the pedestrian image, is the pixel value of the background image, is the color conversion matrix.
[0011] As an optimization, the specific process of training the recognition model is: A1. extracting predicted feature vectors of pedestrian images from a plurality of fused frame image data through a deep neural network model; A2. Assigning an attention weight to each of the predicted feature vectors through an attention mechanism; A3, combining each of the feature vectors with the corresponding attention weights for weighted summation, and finally generating a joint feature representation vector h, i.e., a predicted fusion feature vector; A4. Calculate a loss function according to the predicted fusion feature vector and the true fusion feature vector, and adjust the recognition model according to the loss function.
[0012] As an optimization, the loss function is specifically: ;
[0013] in, To identify the accuracy of the model, is the number of samples, is the indicator function, and are the true label and predicted label of the i-th sample, respectively, where a sample contains multiple frames of fused frame image data.
[0014] As an optimization, in A2, the specific process of assigning a weight to each of the feature vectors through the attention mechanism is: A2.1. Calculate the attention score of the predicted feature vector of each frame by dot product method; ;
[0015] in, Indicates The attention score of the predicted feature vector, and is the weight matrix used to learn the query and key, For the Prediction feature vector of frame fusion frame image data; A2.2. Normalize the attention score of each predicted feature vector to obtain the attention weight corresponding to the predicted feature vector : ;
[0016] in, Indicates The weight of the frame prediction feature vector, , is the number of fused frame image data.
[0017] As an optimization, in A3, the specific formula of the joint feature representation vector h is: .
[0018] The present invention also discloses an adaptive person re-identification system for complex environments, which is used to execute the aforementioned adaptive person re-identification method for complex environments, comprising: A trajectory acquisition module is used to obtain different surveillance video stream data, and based on the different surveillance video stream data, use pedestrian image detection combined with pedestrian image trajectory tracking algorithm to generate the spatiotemporal trajectory data of pedestrian images corresponding to different cameras, wherein the surveillance video stream data is composed of a plurality of original frame image data; A pasting module, used to determine a basic camera, and paste pedestrian images of different spatiotemporal trajectory data taken by cameras other than the basic camera into the original frame image data taken by the basic camera based on the set camera constraint conditions, thereby forming a plurality of combined frame image data; A fusion module, used for performing background fusion on a plurality of the combined frame image data respectively, so as to form a plurality of fused frame image data simultaneously containing pedestrian images taken by different cameras; A training module, used for constructing a neural network model based on an attention mechanism to obtain a recognition model, and taking the fused frame image data as the input of the recognition model and the real fused feature vector of the pedestrian image in the fused frame image data as the output of the recognition model to train the recognition model; The recognition module is used to recognize people in the fused frame image data by using the trained recognition model.
[0019] The present invention also discloses an electronic device, comprising at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute an adaptive person re-identification method for a complex environment as described above.
[0020] Compared with the prior art, the present invention has the following advantages and beneficial effects: This paper proposes an adaptive cross-camera pedestrian re-identification method, which is particularly suitable for the complex monitoring environment of the oil industry. By combining multiple advanced algorithms and data processing technologies, high-quality training samples that adapt to different camera perspectives, lighting and background changes are generated, thereby improving the overall performance of the pedestrian image re-identification system and promoting the further improvement of the intelligent level of monitoring in the oil industry.
[0021] The present invention proposes an adaptive cross-camera pedestrian re-identification method, which combines detection and tracking, data augmentation, background fusion and multi-frame feature representation to generate diverse annotated data samples, optimize model training, and improve the pedestrian re-identification performance in surveillance scenarios.
[0022] Aiming at the monitoring data in the field of petroleum industry, the present invention proposes an environment-adaptive massive pedestrian re-identification data annotation generation scheme, which can copy and paste across scenes under multiple cameras based on pedestrian trajectories while ensuring spatiotemporal consistency and geometric and physical constraints of camera imaging.
[0023] In order to ensure the authenticity of the labeled data, the present invention uses PCT-Net (Pixel-wise Color Transformation Network) to achieve pixel-level natural fusion of pasted pedestrian images and backgrounds, ensuring seamless connection of color, lighting and texture, so as to solve the problem of unnatural phenomena after pasting images in the existing Copy-Paste algorithm.
[0024] The present invention introduces the attention mechanism to realize the adaptive weighted fusion of multi-frame image feature information of pedestrians, improve the robustness of pedestrians under different viewing angles and spatiotemporal conditions, and effectively improve the performance of pedestrian re-identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings: Figure 1 A flowchart of an adaptive person re-identification method for complex environments according to the present invention; Figure 2 Generate a flow chart for environment-adaptive annotation data; Figure 3 Generate algorithms for pedestrian trajectories; Figure 4 Generate a flow chart for copying and pasting data for a single frame; Figure 5 Paste the effect diagram of pedestrian trajectory. DETAILED DESCRIPTION
[0026] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.
[0027] like Figure 1 As shown, the core process of the present invention includes video data acquisition, pedestrian detection and tracking, Copy-Paste data augmentation, PCT-Net background fusion, multi-frame sampling and feature extraction, and model feedback optimization and dynamic adjustment. Specifically, based on the multi-camera monitoring data in the petroleum industry monitoring system, the present invention automatically detects and tracks the movement trajectory of personnel in the operating area, and generates spatiotemporal consistency data samples across cameras. Then, the Copy-Paste technology is used to paste pedestrian images under different camera perspectives, and the pixel-level fusion of the pasted image and the background is achieved through PCT-Net to ensure the natural connection between pedestrians and the background, thereby generating visually consistent training samples. Subsequently, multiple frames of images in the pedestrian trajectory are extracted, and joint feature representation of multi-state information is performed to capture the changes of pedestrians under different lighting, perspectives and postures, and improve the recognition robustness of the model. Finally, based on the feedback of the model during the training process, the number, position and posture of pedestrians in the data augmentation process are dynamically adjusted to further optimize the adaptability and accuracy of the model. The entire process achieves efficient pedestrian re-identification in cross-camera scenarios through adaptive data generation and multi-state feature representation.
[0028] Specifically, this embodiment 1 provides an adaptive person re-identification method for complex environments, including: S1. Obtain different surveillance video stream data, and generate the spatiotemporal trajectory data of pedestrian images corresponding to different cameras respectively by using pedestrian image detection combined with pedestrian image trajectory tracking algorithm based on the different surveillance video stream data, wherein the surveillance video stream data is composed of a plurality of original frame image data; In this embodiment, the pedestrian image trajectory tracking algorithm can be implemented based on the existing classic two-stage tracking algorithm framework of pedestrian detection plus feature matching.
[0029] The process of generating massive labeled data in this embodiment is as follows Figure 2 As shown, specifically: Spatial-temporal consistency data enhancement based on pedestrian trajectories: First, based on the pedestrian tracking algorithm, the pedestrian trajectory in the surveillance video is extracted, and the spatiotemporal trajectory data can be expressed as: ;
[0030] in, Represents the pedestrian image in the original frame image data at time location information, , is the number of original frame image data of the surveillance video stream data where the pedestrian image is located.
[0031] The location information here refers to the center of the rectangular frame of the pedestrian image, that is, the coordinates .
[0032] In this invention, the core of the data augmentation and pasting strategy is to paste the pedestrian trajectory under one camera into the perspective of another camera, simulate the movement of pedestrians in a multi-camera environment, and generate cross-camera training samples. To ensure that the pasted image meets the constraints of the physical world, this paper uses a pasting method based on the geometric constraints of the camera space to ensure that the pasted pedestrian trajectory is reasonable and realistic in the new perspective. First, the pedestrian trajectory is generated in camera A through the pedestrian tracking algorithm. , which represents the movement path of the pedestrian under camera A over time: ;
[0033] During data augmentation, pedestrian trajectories Will be pasted into camera B to form the pasted track The pasting process needs to maintain temporal and spatial consistency, that is, the movement trajectory of the pedestrian in camera B should follow the same time and movement rules. For example, if the pedestrian moves from left to right in camera A, when pasting in camera B, it should be adjusted according to the viewing angle to ensure that the trajectory visually shows a reasonable movement path.
[0034] S2, determining a basic camera, and pasting pedestrian images of different spatiotemporal trajectory data taken by cameras other than the basic camera into the original frame image data taken by the basic camera based on the set camera constraint conditions, thereby forming a plurality of combined frame image data; In order to ensure that the pasted image is consistent with the actual physical environment captured by the camera, the present invention pastes based on the following camera constraints: The specific constraints on the relationship between distance and image coordinates are: A camera other than the basic camera is defined as a first camera. The farther the distance between the pedestrian image captured by the first camera and the first camera is, the higher the position of the pedestrian image pasted in the original frame image data captured by the basic camera is. The images captured by the camera reflect the distance information in the physical world. The lower part of the image represents the area closer to the camera, while the upper part of the image represents the area farther from the camera. This physical relationship must be consistent when pasting, that is, the movement of pedestrians at different distances must comply with this spatial constraint. For example, when a pedestrian approaches the camera from a distance, his position in the image should move vertically from top to bottom.
[0035] The scale adjustment constraints when pasting pedestrian images are as follows: The higher the position where the pedestrian image is pasted in the original frame image data captured by the basic camera, the larger the size of the pedestrian image; Based on the spatial constraints of the camera, the distance of the pedestrian from the camera will affect its size in the image. When the pedestrian is pasted to a new perspective, the size of the pedestrian should be adjusted according to its distance from the camera. Specifically, if the pedestrian is located at the top of the image, it means that it is far away from the camera, and the size of the pedestrian should be appropriately reduced; conversely, if it is located at the bottom of the image, it means that the pedestrian is close to the camera, and the size of the pedestrian image should be increased.
[0036] The physical constraints of the pasting process are as follows: ;
[0037] in, and are the heights of camera A and camera B respectively, The position in the original frame image data taken by camera A The actual position in the corresponding physical world The distance to camera A, Indicates the position where the pedestrian image is pasted in the original frame image data taken by camera B The actual position in the corresponding physical world The distance to camera A.
[0038] When pasting pedestrian trajectories, the present invention ensures the rationality of pedestrians in the new perspective through physical geometric constraints. Assume that a certain position in camera A Corresponding distance in the physical world , and the corresponding pasting position in camera B is , and the corresponding distance is According to the projection geometry of the camera, the pasting of pedestrians should meet the following physical constraints: ;
[0039] in, and are the heights of camera A and camera B respectively. This formula ensures that the position of the pedestrian in camera B conforms to the laws of physics, that is, the projection of the change in distance in the image is reasonable.
[0040] Through the above scheme, the present invention can effectively simulate the movement trajectory of pedestrians in cross-camera scenes and generate training samples that meet the constraints of the physical world. This method enhances the adaptability of the pedestrian re-identification model to complex backgrounds and perspective changes in multi-camera scenes.
[0041] S3, performing background fusion on a plurality of the combined frame image data respectively, so as to form a plurality of fused frame image data simultaneously containing pedestrian images taken by different cameras; In order to solve the problem of unnatural fusion of pasted images and backgrounds, the present invention adopts PCT-Net technology for image fusion. PCT-Net is a pixel-level color conversion network that can perform color conversion according to the color and lighting characteristics of pedestrians and backgrounds to ensure the visual naturalness of pasted images. The core mechanism of PCT-Net is to use a pixel-level color conversion matrix to convert the color of pedestrians and backgrounds to ensure the visual naturalness of pasted images. , adjust the color of each pixel of the image so that it blends naturally with the background image. The conversion formula is: ;
[0042] in, represents the fused image pixels, To paste the pixel value of the pedestrian image, is the pixel value of the background image, is the color conversion matrix.
[0043] The pedestrian image is pasted to different camera perspectives by the Copy-Paste method, and the background of the pasted image is fused using PCT-Net. In particular, in the process of implementing the cross-camera track pasting, the solution of the present invention ensures that the camera of the source track and the camera of the target track are consistent in the direction of shooting the pedestrian movement. The fusion data generation process is as follows: Figure 4shown.
[0044] In this way, PCT-Net ensures that the color and illumination distribution of the image and background are coordinated. The image effect after fusion is as follows: Figure 5 shown.
[0045] S4. Construct a neural network model based on the attention mechanism to obtain a recognition model, and use the fused frame image data as the input of the recognition model and the real fused feature vector of the pedestrian image in the fused frame image data as the output of the recognition model to train the recognition model; that is, multi-frame pedestrian information representation based on the attention mechanism.
[0046] In the process of pedestrian re-identification, the changes in pedestrian posture, illumination, and perspective in different frames will affect the accuracy of recognition. In order to make full use of these changes, this paper proposes an attention-based multi-frame feature fusion method, which adaptively pays attention to the importance of each frame, performs weighted fusion of multi-frame features, and generates a more robust feature representation.
[0047] In some embodiments, the specific process of training the recognition model is: A1. extracting predicted feature vectors of pedestrian images from a plurality of fused frame image data through a deep neural network model; First, multiple frames are sampled from the pedestrian’s motion trajectory. Assume that at time arrive The multiple fused frame image data sampled between are: ;
[0048] For time Sampled fused frame image data. is the number of fused frame image data.
[0049] The deep neural network is used to extract features from each frame of image and obtain the predicted feature vector of each fused frame image data: , , ; A2. Assigning an attention weight to each of the predicted feature vectors through an attention mechanism; In order to effectively fuse the features of these multiple frames, the present invention introduces an Attention mechanism, which can adaptively assign weights to the features of each frame, thereby giving higher weights to important frames.
[0050] First, the attention score of each frame feature is calculated by dot product: ;
[0051] in, Indicates The attention score of the predicted feature vector, and is the weight matrix used to learn the query and key, For the The predicted feature vector of the frame image data is fused together, and the attention score of each frame is obtained after the dot product.
[0052] A2.2. Normalize the attention score of each predicted feature vector to obtain the attention weight corresponding to the predicted feature vector : ;
[0053] in, Indicates The weight of the frame prediction feature vector, , is the number of fused frame image data. That is, the score is normalized by the Softmax function to obtain the attention weight of each frame. : A3, combining each of the feature vectors with the corresponding attention weights for weighted summation, and finally generating a joint feature representation vector h, i.e., a predicted fusion feature vector; ;
[0054] Through this attention mechanism, we can better focus on the key information in multiple frames in the trajectory, which not only makes up for the contingency of using a single frame for pedestrian re-identification, but also suppresses the redundant information in multiple frames, thereby obtaining more robust and discriminative pedestrian features.
[0055] A4. Calculate a loss function according to the predicted fusion feature vector and the true fusion feature vector, and adjust the recognition model according to the loss function.
[0056] That is, features are first extracted through the neural network model, then fused through the attention mechanism, and then the loss function is calculated, and then the loss function is used to adjust the neural network model that initially extracted features.
[0057] Multiple frames of images are sampled from pedestrian trajectories, and pedestrian features are extracted and jointly represented through deep neural networks. In this scheme, efficientDet is used as the basic network for single-frame pedestrian feature extraction. The single-frame pedestrian feature output is a 1024-dimensional vector. Three frames (the first frame, the middle frame, and the last frame) are uniformly sampled for each trajectory according to its length. After obtaining three 1024-dimensional features, they are sent to the attention mechanism module in this scheme to learn the attention weights.
[0058] In order to ensure that the generated augmented data has sufficient diversity, this paper designs a feedback mechanism to dynamically adjust the number, posture and position of pedestrians pasted during data augmentation according to the performance of the recognition model on the validation set. The change in model accuracy is evaluated by the following formula (loss function): ;
[0059] in, To identify the accuracy of the model, is the number of samples, is the indicator function, and are the true label and predicted label of the i-th sample respectively, where a sample contains multiple frames of fused frame image data.
[0060] It should be noted that a sample is the fused frame image data mentioned above, that is, the image after fusion.
[0061] Here, a sample refers to a pedestrian image with a clear label, that is, the fused image above. This solution is actually a re-identification model based on multiple frames of images, so strictly speaking, a sample here is: a multi-frame fused image (these frames all belong to one person).
[0062] The input of the loss function is the fused features. The corresponding label is also the fused label, because multiple frames here represent the same person.
[0063] Through this feedback mechanism, the number, position, and posture of pasted pedestrians are adjusted to enhance the challenge and diversity of the training data.
[0064] Based on the model training feedback, the parameters in the augmented data are dynamically adjusted to optimize the generalization performance of the model.
[0065] S5. Identify the person in the fused frame image data by using the trained recognition model.
[0066] Embodiment 2 further discloses an adaptive person re-identification system for complex environments, which is used to execute an adaptive person re-identification method for complex environments of embodiment 1, including: A trajectory acquisition module is used to obtain different surveillance video stream data, and based on the different surveillance video stream data, use pedestrian image detection combined with pedestrian image trajectory tracking algorithm to generate the spatiotemporal trajectory data of pedestrian images corresponding to different cameras, wherein the surveillance video stream data is composed of a plurality of original frame image data; A pasting module, used to determine a basic camera, and paste pedestrian images of different spatiotemporal trajectory data taken by cameras other than the basic camera into the original frame image data taken by the basic camera based on the set camera constraint conditions, thereby forming a plurality of combined frame image data; A fusion module, used for performing background fusion on a plurality of the combined frame image data respectively, so as to form a plurality of fused frame image data simultaneously containing pedestrian images taken by different cameras; A training module, used for constructing a neural network model based on an attention mechanism to obtain a recognition model, and taking the fused frame image data as the input of the recognition model and the real fused feature vector of the pedestrian image in the fused frame image data as the output of the recognition model to train the recognition model; The recognition module is used to recognize people in the fused frame image data by using the trained recognition model.
[0067] Example 3 also discloses an electronic device, characterized in that it includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute an adaptive person re-identification method for complex environments as described in Example 1.
[0068] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. An adaptive person re-identification method for complex environments, characterized in that: include: Obtain different surveillance video stream data, and based on the different surveillance video stream data, use pedestrian image detection combined with pedestrian image trajectory tracking algorithm to generate spatiotemporal trajectory data of pedestrian images corresponding to different cameras, wherein the surveillance video stream data is composed of a plurality of original frame image data; Determine a basic camera, and paste pedestrian images with different spatiotemporal trajectory data taken by cameras other than the basic camera into the original frame image data taken by the basic camera based on the set camera constraint conditions, thereby forming a plurality of combined frame image data; Performing background fusion on a plurality of the combined frame image data respectively, so as to form a plurality of fused frame image data simultaneously containing pedestrian images taken by different cameras; Constructing a neural network model based on an attention mechanism to obtain a recognition model, and using the fused frame image data as input of the recognition model and the real fused feature vector of the pedestrian image in the fused frame image data as output of the recognition model to train the recognition model; The person in the fused frame image data is identified by using the trained recognition model.
2. The adaptive person re-identification method for complex environments according to claim 1, characterized in that: The spatiotemporal trajectory data is expressed as: ; in, Represents the pedestrian image in the original frame image data at time location information, , is the number of original frame image data of the surveillance video stream data where the pedestrian image is located.
3. The adaptive person re-identification method for complex environments according to claim 1, characterized in that: The camera constraints include the relationship between distance and image coordinates, the scale adjustment constraints when pasting pedestrian images, and the physical constraints of the pasting process, wherein: The distance and image coordinate relationship constraints are specifically: A camera other than the basic camera is defined as a first camera. The farther the distance between the pedestrian image captured by the first camera and the first camera is, the higher the position of the pedestrian image pasted in the original frame image data captured by the basic camera is. The scale adjustment constraints when pasting pedestrian images are specifically: The higher the position where the pedestrian image is pasted in the original frame image data captured by the basic camera, the larger the size of the pedestrian image; The physical constraints of the pasting process are specifically: ; in, and are the heights of camera A and camera B respectively, The position in the original frame image data taken by camera A The actual position in the corresponding physical world The distance to camera A, Indicates the position where the pedestrian image is pasted in the original frame image data taken by camera B The actual position in the corresponding physical world The distance to camera A.
4. The adaptive person re-identification method for complex environments according to claim 1, characterized in that: The background fusion of the combined frame image data is specifically performed through the PCT-Net conversion network. The conversion formula of the PCT-Net conversion network to fuse the pedestrian image with the background of the original frame image data is: ; in, represents the fused image pixels, To paste the pixel value of the pedestrian image, is the pixel value of the background image, is the color conversion matrix.
5. The adaptive person re-identification method for complex environments according to claim 1, characterized in that: The specific process of training the recognition model is: A1. extracting predicted feature vectors of pedestrian images from a plurality of fused frame image data through a deep neural network model; A2. Assigning an attention weight to each of the predicted feature vectors through an attention mechanism; A3, combining each of the feature vectors with the corresponding attention weights for weighted summation, and finally generating a joint feature representation vector h, i.e., a predicted fusion feature vector; A4. Calculate a loss function according to the predicted fusion feature vector and the true fusion feature vector, and adjust the recognition model according to the loss function.
6. The adaptive person re-identification method for complex environments according to claim 5, characterized in that: The loss function is specifically: ; in, To identify the accuracy of the model, is the number of samples, is the indicator function, and are the true label and predicted label of the i-th sample, respectively, where a sample contains multiple frames of fused frame image data.
7. The adaptive person re-identification method for complex environments according to claim 5, characterized in that: In A2, the specific process of assigning a weight to each of the feature vectors through the attention mechanism is: A2.
1. Calculate the attention score of the predicted feature vector of each frame by dot product method; ; in, Indicates The attention score of the predicted feature vector, and is the weight matrix used to learn the query and key, For the Prediction feature vector of frame fusion frame image data; A2.
2. Normalize the attention score of each predicted feature vector to obtain the attention weight corresponding to the predicted feature vector : ; in, Indicates The weight of the frame prediction feature vector, , is the number of fused frame image data.
8. The adaptive person re-identification method for complex environments according to claim 7, characterized in that: In A3, the specific formula of the joint feature representation vector h is: 。 9. An adaptive person re-identification system for complex environments, used to execute an adaptive person re-identification method for complex environments according to any one of claims 1 to 8, characterized in that: include: A trajectory acquisition module is used to obtain different surveillance video stream data, and based on the different surveillance video stream data, use pedestrian image detection combined with pedestrian image trajectory tracking algorithm to generate the spatiotemporal trajectory data of pedestrian images corresponding to different cameras, wherein the surveillance video stream data is composed of a plurality of original frame image data; A pasting module, used to determine a basic camera, and paste pedestrian images of different spatiotemporal trajectory data taken by cameras other than the basic camera into the original frame image data taken by the basic camera based on the set camera constraint conditions, thereby forming a plurality of combined frame image data; A fusion module, used for performing background fusion on a plurality of the combined frame image data respectively, so as to form a plurality of fused frame image data simultaneously containing pedestrian images taken by different cameras; A training module, used for constructing a neural network model based on an attention mechanism to obtain a recognition model, and taking the fused frame image data as the input of the recognition model and the real fused feature vector of the pedestrian image in the fused frame image data as the output of the recognition model to train the recognition model; The recognition module is used to recognize people in the fused frame image data by using the trained recognition model.
10. An electronic device, characterized in that: It includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute an adaptive person re-identification method for complex environments as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Shielding pedestrian re-identification method based on multi-feature fusion
CN116978061A
Unmanned system large-span shuttle multi-camera trajectory tracking identification method
CN117218382A
Data enhancement method and system for pedestrian detection data
CN118116032A
Multi-channel video data fusion method and system for personnel identification and tracking
CN118230351A