Pedestrian geographic trajectory extraction method, and device
Through the target detection and tracking technology of UAV video images, combined with the deep learning algorithm, the problem of low accuracy and easy interference of pedestrian geographical trajectory extraction in the existing technology has been solved, and high-precision, real-time pedestrian geographical trajectory extraction has been achieved, which is suitable for in complex environments.
Patent Information
- Application Number
- PCT/CN2023/137639
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-28
- Filing Date
- 2023-12-08
- Publication Date
- 2024-10-31
AI Technical Summary
Existing pedestrian geographic trajectory extraction technology has problems such as low navigation accuracy, vulnerability to environmental interference, and reliance on user-activated functions. It cannot meet the needs for efficient and accurate extraction of pedestrian trajectory data.
UAV video images are used for target detection and tracking, combined with the improved YOLOv5 network and DeepSORT algorithm to identify pedestrian pixel trajectories, and the mapping relationship between the pixel coordinates and geographical coordinates of the UAV image is obtained through the improved UNet network and feature matching algorithm to achieve Extraction of pedestrian geographic trajectories.
It achieves high-precision, real-time pedestrian geographic trajectory extraction, is suitable for indoor and outdoor environments, avoids the influence of signal obstruction and other factors, and improves the reliability and practical value of trajectory data.
Smart Images

Figure CN2023137639_31102024_PF_FP_ABST
Abstract
Description
Pedestrian geographic trajectory extraction method and device Technical Field
[0001] The present application relates to the technical field of target detection and tracking, and in particular to a method and device for extracting pedestrian geographic trajectories. Background Art
[0002] With the development of mobile devices and positioning technology, more and more people are beginning to use devices such as smartphones and watches to record their location information in their daily lives. This location information can be used to extract pedestrian geographic trajectories, thereby revealing people's behavior patterns and movement patterns, which has important research value in urban planning, traffic management, public safety and other fields. Technical issues
[0003] Current pedestrian geographic trajectory extraction technologies primarily use the following: Inertial Navigation System (INS), Global Navigation Satellite System (GNSS), or WiFi technology to obtain pedestrian trajectories. However, INS positioning errors accumulate over time, resulting in low navigation accuracy. GPS has low autonomy and is susceptible to environmental interference. WiFi technology relies on users enabling the corresponding function to locate their location. Therefore, none of the above existing pedestrian geographic trajectory extraction technologies can meet the requirements for efficient and accurate extraction of pedestrian trajectory data.
[0004] Therefore, the existing technology needs to be further improved and enhanced. Technical Solutions
[0005] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide users with a pedestrian geographic trajectory extraction method and device to overcome the defects of the prior art that are easily affected by environmental interference and have low trajectory extraction accuracy.
[0006] The technical solutions adopted by the present invention to solve the technical problems are as follows:
[0007] In a first aspect, this embodiment provides a method for extracting pedestrian geographic trajectories, which includes:
[0008] Obtain each drone image corresponding to the drone video, and use the target detection algorithm to identify the target pedestrian in each drone image;
[0009] The multi-target tracking algorithm is used to extract the pixel trajectory of the target pedestrians identified in each drone image to obtain the pedestrian pixel trajectory;
[0010] Identifying geographic coordinates in the drone image using an image registration algorithm to obtain a mapping relationship between pixel coordinates of the drone image and geographic coordinates;
[0011] The geographic trajectory of the pedestrian is obtained based on the mapping relationship between the pixel coordinates of the drone and the geographic coordinates and the pixel trajectory of the pedestrian.
[0012] Optionally, the target detection algorithm is an improved YOLOv5 network with an added CBAM attention mechanism unit; the YOLOv5 network includes: a Backbone network module; the CBAM attention mechanism unit is added between the CSP unit and the CBL unit of the Backbone network module; the CBAM attention mechanism unit includes: a channel attention subunit and a spatial attention subunit.
[0013] Optionally, the step of identifying target pedestrians in each drone image using a target detection algorithm further includes:
[0014] Use the KMeans++ algorithm to cluster the pedestrian target prior boxes in the training images in the training dataset and select K initial cluster centers;
[0015] Using the K initial cluster centers to perform KMeans algorithm on the drone image to cluster; where K is a positive integer;
[0016] The clustered drone images are input into the improved YOLOv5 network for target pedestrian recognition.
[0017] Optionally, the multi-target tracking algorithm is an improved DeepSORT algorithm; the improved DeepSORT algorithm is obtained by adding a trajectory confidence during the cascade matching process of the DeepSORT algorithm; the trajectory confidence is the similarity between the predicted pedestrian pixel trajectory extracted by the target tracking algorithm and the actual pedestrian trajectory;
[0018] The step of extracting pixel trajectories of target pedestrians identified in each drone image using a multi-target tracking algorithm includes:
[0019] When using the improved DeepSORT algorithm for cascade matching, the appearance similarity, motion similarity, shape similarity and trajectory confidence are calculated respectively;
[0020] The weighted values of appearance similarity, motion similarity, shape similarity and trajectory confidence are calculated according to the preset weight coefficients, and the calculated weighted values are compared with the preset similarity threshold, and the pedestrian pixel trajectories whose weighted values exceed the preset similarity threshold are deleted.
[0021] [Corrected 23.01.2024 in accordance with Rule 26] Optionally, the trajectory confidence is calculated as:
[0022] [Corrected 23.01.2024 according to Rule 26] Where, L represents the length of the pedestrian's trajectory, w represents the number of missed detection frames, is the starting moment of the pedestrian’s unobstructed trajectory, is the end time of the pedestrian’s unobstructed trajectory; k represents the kth frame of the drone image in the drone video, k is a positive integer; β represents a constant with a value range of [0,1], ∧(T i , x i ) represents the similarity between pedestrians.
[0023] [Corrected 23.01.2024 in accordance with Article 26]
[0024] Optionally, the image registration algorithm consists of an improved UNet network and a feature matching algorithm; wherein, the improved UNet network is a UNet network with an ASPP module and a CA module added.
[0025] Optionally, the step of identifying the geographic coordinates in the drone image using an image registration algorithm to obtain a mapping relationship between the pixel coordinates of the drone image and the geographic coordinates includes:
[0026] The UAV image is input into the improved UNet network, and the road segmentation information of the UAV image is obtained using the improved UNet network;
[0027] Extracting feature points from the road segmentation information of the UAV image using the feature matching algorithm to obtain road feature points;
[0028] The road feature points are matched with the feature points stored in the feature point database to obtain a registered image containing a mapping relationship between the pixel coordinates of the drone image and the geographic coordinates, wherein the feature points stored in the feature point database are obtained by extracting road feature points based on the reference map.
[0029] Optionally, the step of obtaining a pedestrian trajectory based on a mapping relationship between pixel coordinates of the drone and geographic coordinates and the pedestrian pixel trajectory includes:
[0030] Obtaining the geographic coordinates of the drone image based on a mapping relationship between the pixel coordinates of the drone and the geographic coordinates;
[0031] The geographic trajectory of pedestrians is determined through the pixel trajectory of pedestrians and the geographic coordinates of drone images.
[0032] In a second aspect, this embodiment further discloses an information processing terminal, comprising a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the steps of the method when executing the computer program.
[0033] In a third aspect, this embodiment further discloses a computer-readable storage medium on which a computer program is stored, wherein the computer program implements the steps of the described method when executed by a processor. Beneficial effects
[0034] This embodiment discloses a method and device for extracting the geographic trajectory of pedestrians. The method obtains each drone image corresponding to a drone video, uses a target detection algorithm to identify the target pedestrian in each drone image, and uses a multi-target tracking algorithm to extract the pixel trajectory of the target pedestrian identified in the drone image to obtain the pedestrian pixel trajectory. The image registration algorithm is used to identify the geographic coordinates in the drone image to obtain the mapping relationship between the pixel coordinates of the drone image and the geographic coordinates. The pedestrian trajectory is obtained based on the mapping relationship between the pixel coordinates of the drone and the geographic coordinates and the pedestrian pixel trajectory. The pedestrian geographic trajectory extraction method disclosed in this embodiment accurately locates the image through geographic registration technology, and the trajectory extraction accuracy is high. Compared with the trajectory extraction method based on GPS and other devices, it is not affected by factors such as signal blocking, and can achieve real-time pedestrian geographic trajectory extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] FIG1 is a schematic diagram showing the principle of extracting the geographical trajectory of pedestrians according to an embodiment of the present invention.
[0036] FIG2 is a flow chart of a method for extracting pedestrian geographic trajectories according to an embodiment of the present invention;
[0037] FIG3 is a schematic diagram of the structure of a YOLOv5 network according to an embodiment of the present invention;
[0038] FIG4 is a schematic diagram of the structure of a CBAM attention mechanism unit according to an embodiment of the present invention;
[0039] FIG5 is a schematic diagram of the structure of the Backbone module in the improved YOLOv5 network according to an embodiment of the present invention;
[0040] FIG6 is a schematic diagram of the structure of the DeepSORT algorithm according to an embodiment of the present invention;
[0041] FIG7 is a schematic diagram of the structure of an improved UNet network in an embodiment of the present invention;
[0042] FIG8 is a schematic flow chart of steps for identifying geographic coordinates in the drone image using an image registration algorithm in an embodiment of the present invention. Best Mode for Carrying Out the Invention
[0043] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0044] Pedestrian geographic trajectory extraction refers to the process of extracting pedestrian trajectories from their location data. Because pedestrian trajectories reveal behavioral patterns and movement patterns, they hold significant research value in fields such as urban planning, traffic management, and public safety. In particular, in public safety monitoring, pedestrian geographic trajectories contain rich behavioral information and event patterns, reflecting the current location of individual pedestrians or groups of pedestrians as a whole, thus possessing significant research value.
[0045] Currently, pedestrian geographic trajectories are commonly obtained through inertial navigation systems (INS) or global navigation satellite systems (GNSS). Methods based on WiFi signal strength use a mobile phone or other mobile device to scan for WiFi signals and calculate the signal strength. This strength is then used to determine the mobile device's location, thereby extracting the pedestrian's geographic trajectory. Methods based on inertial measurement units (IMUs) use accelerometer data from mobile phones or other mobile devices to determine a pedestrian's motion state and direction, thereby extracting their trajectory.
[0046] In recent years, with the widespread use of video surveillance equipment and the rapid development of computer vision technology, the use of video surveillance technology to capture and analyze pedestrian motion trajectories and thus extract pedestrian trajectories has become a mainstream research approach. Some researchers have proposed a pedestrian trajectory extraction method based on a single fisheye camera, which can achieve comprehensive indoor space monitoring without blind spots. This method can detect and track people on flat or uneven terrain with or without markers. In addition, some researchers have proposed a deep learning-based pedestrian detection and tracking method that uses a time series model to model pedestrian trajectories, converting pedestrian motion behaviors into trajectories, enabling accurate tracking of pedestrians in videos. Other researchers have proposed a pedestrian association algorithm based on trajectory similarity, which can associate pedestrian trajectories in different videos and quickly retrieve them from a pedestrian trajectory database. This method can achieve efficient and accurate pedestrian trajectory extraction and association retrieval in indoor video surveillance scenarios.
[0047] Although INS can achieve fully autonomous navigation without relying on any external information, possesses excellent stealth and anti-interference capabilities, and can operate 24 / 7, its positioning errors accumulate rapidly over time, and navigation accuracy is significantly affected by system equipment. GNSS positioning offers high accuracy and error-free accumulation. The Global Positioning System (GPS) boasts extremely high global coverage, but GPS has low autonomy and is susceptible to environmental interference. Furthermore, trajectory information acquired through inertial navigation systems or global navigation satellite systems requires active user input and cannot be obtained arbitrarily, limiting data acquisition. Because WiFi signal coverage and signal strength are affected by environmental factors such as walls and pedestrian traffic, the accuracy of pedestrian geographic trajectory extraction in indoor environments is limited. Furthermore, due to factors such as multipath effects, WiFi signal strength cannot accurately reflect location information. Furthermore, trajectory extraction based on WiFi signals requires the user's phone to have WiFi enabled and connected to an available WiFi network; otherwise, WiFi signal strength information cannot be obtained. Furthermore, the wide coverage of WiFi signals may raise privacy concerns. IMU-based methods for extracting pedestrian geographic trajectories suffer from cumulative errors in IMU measurements, which accumulate over time and lead to a decrease in trajectory accuracy. Furthermore, IMU measurements are susceptible to environmental interference, such as vibration and temperature fluctuations, which can easily generate noise and affect trajectory accuracy. Consequently, the limitations of existing methods for extracting pedestrian geographic trajectories mean that the extracted trajectory information cannot meet high-precision requirements.
[0048] To overcome the above-mentioned problems, the present embodiment provides a method and apparatus for extracting the geographic trajectory of pedestrians. As shown in FIG1 , the present method detects and tracks the target pedestrian in the drone image to obtain the pedestrian pixel trajectory. At the same time, the drone image is geo-coordinated to obtain the mapping relationship between the pixel coordinates of the drone image and the geographic coordinates. Based on the mapping relationship between the pedestrian pixel trajectory and the pixel coordinates of the acquired drone image and the geographic coordinates, the mapping relationship between the pixel trajectory and the geographic trajectory is obtained, thereby achieving the extraction of the pedestrian geographic trajectory. The method for extracting the pedestrian geographic trajectory provided in the present embodiment is applicable to both indoor and outdoor environments, and can also cope well with complex environments and scenes. It can obtain higher-precision trajectory information, which is conducive to further research and application of pedestrian geographic trajectories and makes the trajectory data more practical. Modes for Carrying Out the Invention
[0049] The following is a detailed description of a pedestrian geographic trajectory extraction method and device provided by this embodiment with reference to the accompanying drawings.
[0050] This embodiment provides a method for extracting pedestrian geographic trajectories, as shown in FIG2 , and the method includes:
[0051] Step S1: Obtain each drone image corresponding to the drone video, and use the target detection algorithm to identify the target pedestrian in each drone image.
[0052] Prior to this step, a drone camera is first used to capture the area of the pedestrian's geographic trajectory, generating a drone video of the area. This drone video is then processed to produce a series of video frames corresponding to the drone video. In this embodiment, each frame in the video is a drone image. Because the pedestrian's motion trajectory needs to be captured, the drone images in this step are temporally continuous video frames. By performing target detection and information extraction on this series of video frames, the pedestrian's geographic trajectory in the image is extracted.
[0053] After acquiring a series of drone images, they need to be preprocessed so that the processed drone images can be input into the improved YOLOv5 network to more accurately identify the target pedestrian. Therefore, this step also includes:
[0054] The KMeans++ algorithm is used to cluster the pedestrian target prior boxes in the training images in the training dataset, and K initial cluster centers are selected. The KMeans algorithm is then used to cluster the drone images using the K initial cluster centers, where K is a positive integer. The clustered drone images are input into the improved YOLOv5 network for target pedestrian recognition.
[0055] Since the size of target pedestrians varies greatly at different flight altitudes of drones, the higher the flight altitude, the smaller the size of pedestrians in the drone video. In order to make drone images more suitable for pedestrian detection, the KMeans++ clustering method is used to cluster the prior frames. Therefore, it is necessary to first determine the various prior frames in the drone image.
[0056] In this step, the KMeans++ algorithm is used to cluster the prior boxes determined in the drone image to obtain the clustered drone image. The specific steps are as follows:
[0057] First, the original dataset is filtered to obtain the VisDrone2019-pedestrian dataset. Only the width and height of the pedestrian target box are retained to form a sample set. A sample is randomly selected from the sample set as the initial cluster center. The distance between each sample and its nearest cluster center is calculated. The intersection-over-union ratio is used as the distance metric. The probability of each sample becoming a cluster center is calculated. The sample with a larger probability is selected as the new cluster center. The selection is repeated multiple times until multiple cluster centers are selected. The KMeans algorithm is executed using the selected multiple cluster centers.
[0058] After clustering the a priori bounding boxes in the drone images using the aforementioned clustering method, a target pedestrian detection algorithm is used to identify pedestrians in each drone image. Specifically, various target detection algorithms exist; in this embodiment, a pedestrian detection algorithm based on YOLOv5 is used to detect target pedestrians in drone images.
[0059] The YOLOv5 network is a highly efficient object detection algorithm in the YOLO family. Its overall structure is shown in Figure 3. The YOLOv5 network consists of an input layer, a backbone network module, a neck network module, and an output layer. Drone images are first fed into the input layer, where they undergo mosaic data augmentation, adaptive image scaling, and adaptive anchor box processing before being fed into the backbone network module. Feature extraction is then performed in the backbone network module, which then feeds the resulting features into the neck network module. The output of the neck network module undergoes convolution processing before being output.
[0060] To achieve better results in detecting pedestrian targets, the YOLOv5 network used in this embodiment is an improved YOLOv5 network. As shown in Figures 4 and 5 , a CBAM attention mechanism unit has been added to the Backbone network module of this YOLOv5 network. This CBAM attention mechanism unit is located between the CSP unit and the CBL unit of the Backbone network module. The CBAM attention mechanism unit includes a channel attention subunit and a spatial attention subunit to extract small target features, preventing false detection or missed detection of pedestrian targets in drone images due to their small size.
[0061] Furthermore, the Backbone network module before the improvement includes: a Focus unit, a first CBL unit, a CSP1_1 unit, a second CBL unit, a CSP1_2 unit, a third CBL unit, a CSP1_3 unit, a fourth CBL unit, an SPP unit, a CSP2_1 unit, a fifth CBL unit, and an SPP unit, which are connected in sequence. In the improved Backbone network module, a CBAM attention mechanism unit is arranged between each CSP unit and a CBL unit. That is, the improved Backbone network module includes: a Focus unit, a first CBL unit, a CSP1_1 unit, a first CBAM attention mechanism unit, a second CBL unit, a CSP1_2 unit, a second CBAM attention mechanism unit, a third CBL unit, a CSP1_3 unit, a third CBAM attention mechanism unit, a fourth CBL unit, an SPP unit, a CSP2_1 unit, a fourth CBAM attention mechanism unit, a fifth CBL unit, and an SPP unit, which are connected in sequence.
[0062] In this step, the improved YOLOv5 network is used to detect target pedestrians in drone images and identify their features. Since the CBAM module is integrated into the backbone network of the YOLOv5 network, the features of small target pedestrians in drone images can be effectively extracted, making the small target features easier to be learned by the network, thereby improving the detection performance of the entire model.
[0063] Step S2: Use a multi-target tracking algorithm to extract pixel trajectories of target pedestrians identified in each drone image to obtain pedestrian pixel trajectories.
[0064] Due to the complex background of drone images and the small size of target pedestrians in the images, they are easily obscured, making it impossible to accurately track pedestrians and extract stable pedestrian geographic trajectories. Therefore, in this step, a multi-target tracking algorithm is used to extract pixel trajectories of target pedestrians identified in drone images to achieve pedestrian tracking in drone images.
[0065] Specifically, the multi-target tracking algorithm used in this step is an improved DeepSORT algorithm, which is obtained by adding trajectory confidence to the cascade matching process of the DeepSORT algorithm. This embodiment adds a trajectory confidence metric to the cascade matching of the DeepSORT algorithm and uses the improved DeepSORT algorithm to track the identified target pedestrians, thereby achieving accurate matching of the trajectory with the target detection results.
[0066] Trajectory confidence is a similarity metric that measures the similarity between the calculated trajectory and the true trajectory, taking into account factors such as trajectory length and occlusion. The DeepSORT algorithm's cascade matching includes metrics for appearance similarity, motion similarity, and shape similarity. This embodiment adds a trajectory confidence metric to these similarity metrics to improve the stability of pedestrian tracking.
[0067] When using the improved DeepSORT algorithm for cascade matching, the appearance similarity, motion similarity, shape similarity and trajectory confidence are calculated respectively;
[0068] The weighted values of appearance similarity, motion similarity, shape similarity and trajectory confidence are calculated according to the preset weight coefficients, and the calculated weighted values are compared with the preset similarity threshold, and the pedestrian pixel trajectories whose weighted values exceed the preset similarity threshold are deleted.
[0069] [Corrected 23.01.2024 in accordance with Rule 26] Furthermore, the calculation formula for the trajectory confidence is:
[0070] [Corrected 23.01.2024 according to Rule 26] Where, L represents the length of the pedestrian's trajectory, w represents the number of missed detection frames, is the starting moment of the pedestrian’s unobstructed trajectory, is the end time of the pedestrian’s unobstructed trajectory; k represents the kth frame of the drone image in the drone video, k is a positive integer; β represents a constant with a value range of [0,1], ∧(T i , x i ) represents the similarity between pedestrians.
[0071] [Corrected 23.01.2024 in accordance with Article 26]
[0072] Since the trajectory confidence is taken into consideration in the DeepSORT algorithm when tracking target pedestrians, the matching accuracy between the true trajectory and the target detected trajectory during cascade matching and the stability of pedestrian geographic tracking are improved.
[0073] Step S3: Using an image registration algorithm to identify the geographic coordinates in the drone image, and obtaining a mapping relationship between the pixel coordinates of the drone image and the geographic coordinates.
[0074] In this step, the geographic coordinates in the drone image are identified using an image registration algorithm. The image registration algorithm used in this embodiment consists of an improved UNet network and a feature matching algorithm based on road semantic constraints.
[0075] The improved UNet network disclosed in this embodiment adds Atrous Spatial Pyramid Pooling (ASPP) and CoordAttention (CA) modules to the traditional UNet network to achieve more accurate feature extraction and higher accuracy of model segmentation.
[0076] As shown in Figure 7, the UNet network includes multiple convolutional layers. In its U-shaped structure, the left convolutional network part extracts features from the image by downsampling, and the right convolutional network part restores the output feature map to the original image size by upsampling. The downsampling convolutional layer includes the first down convolutional layer X 0,0 , the second convolutional layer X 1,0 , the third convolutional layer X 2,0 , the fourth convolutional layer X 3,0 , the fifth convolutional layer X 4,0 The upsampling convolution layer includes the first upsampling convolution layer X from bottom to top. 3,1 , the second convolutional layer X 2,1, the third convolutional layer X 1,1 , the fourth convolutional layer X 0,1 The improved UNet network provided in this embodiment adds an ASPP module between the downsampling convolution layer and its corresponding upsampling convolution layer. Specifically, the improved UNet network structure has an ASPP module in the first downsampling convolution layer X. 0,0 And the fourth convolutional layer X 0,1 The first ASPP module is added between the second convolutional layer X 1,0 And the third convolutional layer X 1,1 A second ASPP module is added between the third convolutional layer X 2,0 and the second convolutional layer X 2,1 A third ASPP module is added between the fourth convolutional layer X 3,0 And the first convolutional layer X 3,1 The fourth ASPP module is added between the two layers, and the fifth convolution layer X is added between the two layers. 4,0 And the first convolutional layer X 3,1 The CA module was added. While the ASPP module helps the network better handle scale variations and segment objects of varying scales, the CA module helps the network better focus on and utilize features that are meaningful to the segmentation task. This improves network performance in practical applications, resulting in more accurate and reliable segmentation results. As a result, the improved UNet achieves better feature extraction.
[0077] As shown in Figure 8, the improved UNet semantic segmentation network is used to segment the roads in the drone image to obtain the road segmentation result of the drone image. The feature matching algorithm is then used to extract feature points from the drone image with the segmented road to obtain road feature points. Finally, the obtained road feature points are matched with the benchmark feature points to obtain the pixel correspondence between the drone image and the benchmark image.
[0078] Step S4: Obtaining the pedestrian's geographic trajectory based on the mapping relationship between the pixel coordinates of the drone and the geographic coordinates and the pedestrian's pixel trajectory.
[0079] After obtaining the pedestrian pixel trajectory in the drone image in the above step S2 and the mapping relationship between the drone pixel coordinates and the geographic coordinates in step S3, the corresponding relationship between the drone image pixel coordinates and the geographic coordinates can be obtained. The pedestrian's geographic trajectory can be inferred through the pedestrian pixel trajectory and the geographic coordinates of the drone image, thereby realizing the extraction of the pedestrian's geographic trajectory.
[0080] To address the difficulties in obtaining pedestrian geographic trajectories and the low trajectory accuracy, this embodiment proposes a pedestrian geographic trajectory extraction method. This method uses computer vision, image georegistration and other technical means, based on the YOLOv5+DeepSORT pedestrian detection and tracking model. In addition, based on the problems of small size and easy occlusion of target pedestrians, improved strategies such as KMeans++ prior box clustering, CBAM attention mechanism and trajectory confidence are used to effectively improve detection accuracy and tracking effect, making the obtained pedestrian pixel trajectory more continuous and reliable.
[0081] The specific application examples of this method are further described in detail below.
[0082] The steps of the method of the present invention in specific application implementation include the following:
[0083] Step H1: Use the YOLOv5 target detection algorithm to detect target pedestrians in the drone image.
[0084] Aiming at the problems that the size of pedestrian targets changes significantly at different flight altitudes of drones and the position selection of the KMeans algorithm when randomly initializing k centroids has a great impact on the clustering results and running time, the present invention first uses the KMeans++ clustering method to cluster the prior boxes, making it more suitable for pedestrian detection in drone images.
[0085] Specifically, the steps of the target box clustering algorithm based on KMeans++ are as follows:
[0086] Step 1: Since the VisDrone2019 dataset contains 10 categories, the original dataset is first filtered to obtain the VisDrone2019-pedestrian dataset, retaining only the width and height of the pedestrian target box to form a sample set.
[0087] Step 2: Randomly select a sample from the sample set obtained in step 1 as the initial cluster center .
[0088] Step 3: Calculate the distance D(x) between each sample and its nearest cluster center, using the intersection over union (IoU) as the distance metric. The calculation of D(x) is shown in formula (2):
[0089] (2)
[0090] Step 4. Calculate the probability p(x) of each sample becoming a cluster center:
[0091] (3)
[0092] Step 5: Select the sample with a higher probability as the new cluster center, and repeat steps 3 and 4 until k cluster centers are selected;
[0093] Step 6: Use these k initial cluster centers to perform the standard KMeans algorithm.
[0094] Furthermore, since pedestrian targets in drone images are small, their feature information is easily lost in deep networks, leading to problems such as false detection and missed detection. Therefore, when performing pedestrian target detection, the CBAM attention mechanism is added to the YOLOv5 network to effectively extract the features of small targets through the channel attention module and spatial attention module in the CBAM attention mechanism, making the small target information easier to be learned by the network.
[0095] This example specifically integrates the CBAM module into the Backbone module of the YOLOv5 network to effectively extract the features of small pedestrian objects in drone images, making them easier for the network to learn and thus improving the detection performance of the entire model.
[0096] Step H2: Track the detected pedestrian target to obtain the pedestrian pixel trajectory.
[0097] Simple Online and Realtime Tracking (SORT) is a widely used algorithm for tracking multiple objects in video or image sequences. SORT uses a Kalman filter to estimate the state (position, velocity, and size) of each object and predict its position in the next frame. It then uses the Hungarian algorithm to assign detections to existing tracks, using the Intersection over Union (IoU) metric between the predicted and detected boxes as the distance metric.
[0098] DeepSORT is an improved version of the SORT multi-object tracking algorithm. It significantly improves the identity switching phenomenon caused by SORT's reliance on distance matching between bounding boxes while ignoring content features. DeepSORT uses a cascade matching strategy to reduce the number of identity switches by integrating appearance information with the bounding box Intersection over Union (IoU) metric. Finally, a verification mechanism is used to predict the generated trajectories, improving their accuracy.
[0099] As shown in Figure 6, the DeepSORT algorithm uses Kalman filtering to Each trajectory in the frame is predicted and the trajectory is obtained in The prediction results in the frame are matched by the cascade matching strategy. The prediction results in the frame are The target detection results in the frame are matched, and if they are successfully matched, The target detection results in the frame are added to the corresponding track; the Hungarian algorithm is used to solve the optimal matching scheme of the target detection results and tracks that have not been successfully matched in cascade matching, usually using IoU as the matching cost; the target detection results that are successfully matched by the Hungarian algorithm are added to the corresponding track; for the detection results that have not been matched yet, their status is marked as "tentative". If the subsequent three frames are successfully matched, it is confirmed to become a new track, otherwise it is deleted; for the track that has not been matched successfully, a life cycle threshold is set. When the unmatched time of the track exceeds the threshold, it is considered that the target has left the scene and the track is deleted.
[0100] Since the present embodiment aims to obtain the pixel trajectory of pedestrians, drone images are usually shot at a high altitude and cover a wide viewing angle, resulting in a complex background in the drone image. Small-target pedestrians are easily obscured in the drone's shooting scene, resulting in poor pedestrian tracking effect and the inability to effectively obtain a stable and continuous trajectory of pedestrians.
[0101] To address the above issues, this step introduces the concept of trajectory confidence in the cascade matching stage of the DeepSORT algorithm to enrich the calculation of the cascade matching metric, thereby improving the matching effect between the trajectory and the target detection results and enhancing the stability of pedestrian tracking.
[0102] [Corrected 23.01.2024 according to Rule 26] Specifically, trajectory confidence is a similarity measure of trajectories. It uses trajectory length, trajectory occlusion, and similarity between pedestrians in the trajectory as measurement indicators to calculate the similarity between the trajectory obtained by the target tracking algorithm and the actual trajectory. The value of trajectory confidence is usually initialized to 1, and its calculation formula is:
[0103] [Corrected 23.01.2024 according to Rule 26] Wherein, L represents the length of the trajectory. Usually, the trajectory length is proportional to the tracking reliability, that is, the longer the trajectory, the higher the tracking reliability, and vice versa; w represents the number of missed frames, Usually, the number of missed frames is inversely proportional to the tracking reliability, that is, the fewer the number of missed frames, the higher the tracking reliability; β represents a constant in the range of [0,1], and its value changes dynamically with the performance of the target detection model. ∧(T i , x i ) represents the similarity between pedestrians. Since the pedestrian features obtained by the target detection model may be similar, a trajectory may contain multiple pedestrian trajectory segments. Therefore, the higher the similarity between different pedestrians, the less reliable the trajectory.
[0104] [Corrected 23.01.2024 in accordance with Article 26]
[0105] Specifically, in the cascade matching stage of the DeepSORT algorithm, appearance similarity, motion similarity, shape similarity and trajectory confidence are calculated respectively, and the weighted values of appearance similarity, motion similarity, shape similarity and trajectory confidence are calculated according to the preset weight coefficients. The calculated weighted values are compared with the preset similarity threshold, and the pedestrian pixel trajectories whose weighted values exceed the preset similarity threshold are deleted.
[0106] Step H3: Geo-register the drone image using a semantic segmentation-based drone image geo-registration algorithm to obtain the geographic coordinate information of the drone image.
[0107] The UAV image georegistration algorithm consists of an improved UNet network and a feature matching algorithm based on road semantic constraints.
[0108] The improved UNet semantic segmentation network incorporates the ASPP and CA modules, making feature extraction more efficient and improving segmentation accuracy. By incorporating road semantic constraints, the feature extraction focus is focused on the road area. This strategy effectively reduces redundant features and improves feature matching efficiency. During the feature matching phase, the RANSAC algorithm is used to filter matching feature point pairs, effectively eliminating mismatches and improving image registration accuracy.
[0109] Simple Online and Realtime Tracking (SORT) is a widely used algorithm for tracking multiple objects in video or image sequences. The SORT algorithm uses a Kalman filter to estimate the state (position, velocity, and size) of each object and predict its position in the next frame. The Hungarian algorithm uses the IoU metric between the predicted and detected boxes as a distance metric to assign detection results to existing tracks. DeepSORT is an improved version of the SORT multi-object tracking algorithm, significantly improving the SORT algorithm's reliance on distance matching between bounding boxes while ignoring identity changes caused by content features. DeepSORT uses a cascade matching strategy to reduce the number of identity switches by integrating appearance information with the bounding box IoU metric. Finally, a verification mechanism is used to predict the generated tracks, improving their accuracy.
[0110] As shown in Figure 8, a reference map is first acquired. Road semantic constraints are then applied to the reference map based on semantic constraints. Road feature points are pre-extracted from the road semantically constrained reference map, and the extracted road feature points are stored in a feature point database. Simultaneously, the drone image is subjected to attitude calculation to obtain an orthophoto of the drone image. This orthophoto is then segmented based on a semantic segmentation model to obtain a segmented road segmentation result. Feature point extraction is performed based on the segmented road image to obtain road feature points in the drone image. The road feature points in the drone image are then matched with feature points in the feature point database to obtain a registration image that maps the feature points, thereby obtaining the geographic coordinates of each pixel in the drone image. In this step, feature matching is used to obtain the correspondence between the pixel coordinates in the drone image and the pixel coordinates in the reference map. Combined with the mapping between the pixel coordinates in the reference map and the geographic coordinates, the geographic coordinates of each pixel in the drone image can ultimately be solved, achieving geographic registration of the drone image.
[0111] Step H4: extracting the pedestrian's geographic trajectory based on the correspondence between the pedestrian's pixel trajectory and the pixel coordinates of the drone image and the geographic coordinates.
[0112] Through steps H1 and H2, a stable and continuous pixel trajectory of pedestrians in the drone video can be obtained. After step H3, the geo-registration result of the drone image can be obtained, and then the correspondence between the pixel coordinates of the drone image and the geographic coordinates can be obtained. Through the pedestrian pixel trajectory-drone image geographic coordinates, the pedestrian's geographic trajectory can be calculated and the pedestrian geographic trajectory extraction can be realized.
[0113] The advantage of the present invention is that it proposes a method for extracting the geographic trajectory of pedestrians based on geo-referenced images, which solves the problem of difficulty in obtaining the geographic trajectory of pedestrians and low trajectory accuracy. The present invention uses the pedestrian detection and tracking algorithm in deep learning to realize the extraction of pedestrian pixel trajectories, and by combining it with the geo-referenced technology of drone images, the correspondence between the pixel coordinates of drone images and the geographic coordinates is obtained, and the geographic trajectory of pedestrians is further obtained. The present invention can accurately locate the image through geo-referenced technology without relying on GPS and other equipment, thereby extracting the accurate location information of pedestrians, and the trajectory extraction accuracy is relatively high. Compared with traditional trajectory extraction methods based on GPS and other equipment, the present invention is not affected by factors such as signal blocking, and can achieve real-time pedestrian trajectory extraction. In addition, this embodiment does not require the cooperation of pedestrians or special equipment, and therefore has better non-invasiveness.
[0114] In addition to the above method, this embodiment further discloses an information processing terminal, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method when executing the computer program.
[0115] The processor typically controls the overall operation of the device, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processor can perform all or part of the steps of the above method. In addition, the processor can include one or more modules to facilitate interaction between the processor and other components. For example, the processor can include a multimedia module to facilitate interaction between multimedia components and the processor. In some embodiments, the processor can be a central processing unit (CPU), a microprocessor, or other data processing chip, which is used to run program code stored in the memory or process data, such as executing the steps of extracting pedestrian geographic trajectories.
[0116] The memory is configured to store various types of data to support the operation of the device. Examples of this data include instructions for any application or method operating on the device, contact data, phone book data, messages, pictures, videos, etc. The memory can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0117] In some embodiments, the memory may be an internal storage unit of the playback device, such as a hard disk or memory of a smart TV. In other embodiments, the memory may also be an external storage device of the playback device, such as a plug-in hard disk equipped on the smart TV, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Furthermore, the memory may include both an internal storage unit of the playback device and an external storage device. The memory is used to store application software and various types of data installed on the playback device, such as the program code of the smart TV. The memory may also be used to temporarily store data that has been output or is to be output. In one embodiment, a control program of a pedestrian geographic trajectory extraction method is stored on the memory, and the control program of the pedestrian geographic trajectory extraction method can be executed by a processor, thereby realizing the pedestrian geographic trajectory extraction method in this embodiment.
[0118] In an exemplary embodiment, the apparatus may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0119] Other embodiments of the present invention will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the invention being indicated by the following claims.
[0120] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A method for extracting pedestrian geographic trajectories, characterized in that: The method comprises: Obtain each drone image corresponding to the drone video, and use the target detection algorithm to identify the target pedestrian in each drone image; The pixel trajectory of the target pedestrians identified in each UAV image is extracted using a multi-target tracking algorithm to obtain the pedestrian pixel trajectory; Using an image registration algorithm to identify the geographic coordinates in the drone image, and obtain a mapping relationship between the pixel coordinates of the drone image and the geographic coordinates; The geographic trajectory of the pedestrian is obtained based on the mapping relationship between the pixel coordinates of the drone and the geographic coordinates and the pixel trajectory of the pedestrian.
2. The method for extracting pedestrian geographic trajectories according to claim 1, characterized in that: The target detection algorithm is an improved YOLOv5 network with a CBAM attention mechanism unit added; the YOLOv5 network includes: a Backbone network module; the CBAM attention mechanism unit is added between the CSP unit and the CBL unit of the Backbone network module; the CBAM attention mechanism unit includes: a channel attention subunit and a spatial attention subunit.
3. The method for extracting pedestrian geographic trajectories according to claim 2, characterized in that: The step of using the target detection algorithm to identify the target pedestrians in each drone image includes: Use the KMeans++ algorithm to cluster the pedestrian target prior boxes of the training images in the training data set and select K initial cluster centers; Using the K initial cluster centers to perform KMeans algorithm on the drone images for clustering; wherein K is a positive integer; The clustered drone images are input into the improved YOLOv5 network for target pedestrian recognition.
4. The method for extracting pedestrian geographic trajectories according to claim 1 or 3, characterized in that: The multi-target tracking algorithm is an improved DeepSORT algorithm; The improved DeepSORT algorithm is obtained by adding trajectory confidence in the cascade matching process of the DeepSORT algorithm; the trajectory confidence is the similarity between the predicted pedestrian pixel trajectory extracted by the target tracking algorithm and the actual pedestrian trajectory; The step of extracting pixel trajectories of target pedestrians identified in each drone image using a multi-target tracking algorithm comprises: When using the improved DeepSORT algorithm for cascade matching, the appearance similarity, motion similarity, shape similarity and trajectory confidence are calculated respectively; The weighted values of appearance similarity, motion similarity, shape similarity and trajectory confidence are calculated according to the preset weight coefficients, and the calculated weighted values are compared with the preset similarity threshold, and the pedestrian pixel trajectories whose weighted values exceed the preset similarity threshold are deleted.
5. [Corrected 23.01.2024 in accordance with Rule 26] The method for extracting the geographical trajectory of a pedestrian according to claim 4, characterized in that: The calculation formula of the trajectory confidence is: Among them, L represents the length of the pedestrian's motion trajectory, w represents the number of missed detection frames, is the starting time of the pedestrian’s unobstructed trajectory, is the end time of the pedestrian’s unobstructed trajectory; k represents the kth frame of the drone image in the drone video, k is a positive integer; β represents a constant in the range of [0,1], ∧(T i , x i ) represents the similarity between pedestrians.
6. The method for extracting pedestrian geographic trajectories according to claim 1, characterized in that: The image registration algorithm is composed of an improved UNet network and a feature matching algorithm; wherein the improved UNet network is a UNet network with an ASPP module and a CA module added.
7. The method for extracting pedestrian geographic trajectories according to claim 6, characterized in that: The step of using an image registration algorithm to identify the geographic coordinates in the drone image to obtain a mapping relationship between the pixel coordinates of the drone image and the geographic coordinates includes: The UAV image is input into the improved UNet network, and the road segmentation information of the UAV image is obtained using the improved UNet network; Using the feature matching algorithm to extract feature points from the road segmentation information of the UAV image to obtain road feature points; The road feature points are matched with the feature points stored in the feature point database to obtain a registered image containing a mapping relationship between pixel coordinates of the drone image and geographic coordinates, wherein the feature points stored in the feature point database are obtained by extracting road feature points based on a reference map.
8. The method for extracting pedestrian geographic trajectories according to claim 7, characterized in that: The step of obtaining the pedestrian trajectory based on the mapping relationship between the pixel coordinates of the drone and the geographic coordinates and the pedestrian pixel trajectory comprises: Obtaining the geographic coordinates of the drone image according to the mapping relationship between the pixel coordinates of the drone and the geographic coordinates; The geographic trajectory of pedestrians is determined through the pixel trajectory of pedestrians and the geographic coordinates of drone images.
9. An information processing terminal, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Unmanned aerial vehicle motion target tracking and positioning method under geographic information space-time constraint
CN105352509A
Unmanned aerial vehicle real-time moving target classification and detection method based on vision
CN107909600A
A multi-target tracking method and a multi-target tracking system fused with geographic space information
CN109934844A
Unmanned aerial vehicle aerial video track high-precision extraction method based on deep learning
CN110751099A
Multi-target tracking positioning and motion state estimation method based on unmanned aerial vehicle
CN113269098A
Cited By
Infrared unmanned aerial vehicle multi-target tracking method
CN119850679A
Construction turnover material trajectory tracking method and system
CN120163848A
Himalaya marmot monitoring method based on monitoring video image
CN120452069A
Forest stand boundary extraction method and system
CN120931948A
Target identification method, system and device based on binocular vision and medium
CN121544872A
