A pedestrian crossing detection method, device, computer equipment and storage medium

Through multi-scale processing and candidate rotation frame prediction technology, the accuracy and efficiency of crosswalk detection in satellite images are improved, and the problem of low detection accuracy in the existing technology is solved.

CN112446231BActive Publication Date: 2024-10-25丰图科技(深圳)有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910797712.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-08-27
Publication Date
2024-10-25
Estimated Expiration
2039-08-27

AI Technical Summary

Technical Problem

The existing technology has low accuracy in detecting crosswalks in satellite images, cannot meet the needs of practical applications, is inefficient, and relies on manual operation.

Method used

Using a multi-scale processing method, we obtain satellite image data, perform segmentation processing and multi-scale feature extraction, use multiple scale feature maps to detect crosswalks, and combine the category probability and position offset prediction of candidate rotation frames to improve detection accuracy. .

Benefits of technology

It significantly improves the accuracy and efficiency of crosswalk detection, can effectively identify crosswalks of different sizes and aspect ratios in satellite images, and reduces manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112446231B_ABST
    Figure CN112446231B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention disclose a method, device, computer equipment and storage medium for detecting a pedestrian crossing, and relate to the field of data processing technology. Obtain target satellite image data; segment the target satellite image data to obtain a target image; perform multi-scale processing on the target image to extract multiple scale feature maps of the target image; perform pedestrian crossing detection on the target image according to the multiple scale feature maps, and mark the detected pedestrian crossings. The embodiments of the present invention can improve the accuracy of pedestrian crossing detection by extracting multiple scale feature maps of the target image to detect pedestrian crossings in satellite image data using the multi-scale features of the target image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a pedestrian crossing detection method, device, computer equipment and storage medium. Background Art

[0002] The pedestrian crossing data in satellite images is important road data, which can provide important information for navigation, mapping, etc. Therefore, how to accurately extract the pedestrian crossing data in satellite images is becoming more and more important. In the past, manual methods were used to extract the location of pedestrian crossings in satellite images. This method requires a lot of manpower, is inefficient, has a low update frequency, and the quality of extraction depends on the level of manual work. With the advancement of technology, algorithms can also be used to extract pedestrian crossing data in satellite maps. However, for pedestrian crossings in satellite images, due to the large range of variations in their size and aspect ratio, the accuracy of using existing algorithms to identify pedestrian crossings is very low and cannot meet the needs of practical applications. Summary of the invention

[0003] Embodiments of the present invention provide a method, device, computer equipment and storage medium for detecting a pedestrian crossing, which can improve the accuracy of identifying a pedestrian crossing.

[0004] An embodiment of the present invention provides a method for detecting a pedestrian crossing, including:

[0005] Acquire target satellite image data;

[0006] Slicing the target satellite image data to obtain a target image;

[0007] Performing multi-scale processing on the target image to extract multiple scale feature maps of the target image;

[0008] According to the multiple scale feature maps, crosswalk detection is performed on the target image, and the detected crosswalks are marked.

[0009] The embodiment of the present invention further provides a pedestrian crossing detection device, comprising:

[0010] An acquisition unit, used for acquiring target satellite image data;

[0011] A preprocessing unit, used for segmenting the target satellite image data to obtain a target image;

[0012] A feature extraction unit, used for performing multi-scale processing on the target image to extract multiple scale feature maps of the target image;

[0013] A detection unit is used to perform crosswalk detection on the target image according to the multiple scale feature maps, and mark the detected crosswalks.

[0014] An embodiment of the present invention also provides a computer device, comprising: one or more processors; a memory; and one or more applications, wherein the processor is connected to the memory, the one or more applications are stored in the memory, and are configured so that the processor executes the above-mentioned crosswalk detection method.

[0015] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. The computer program is loaded by a processor to execute the above-mentioned pedestrian crossing detection method.

[0016] The embodiment of the present invention performs segmentation processing on the acquired satellite image data to obtain a target image; performs multi-scale processing on the target image to extract multiple scale feature maps of the target image; and performs crosswalk detection on the target image based on the multiple scale feature maps, and marks the detected crosswalks. The embodiment of the present invention extracts multiple scale feature maps of the target image. Since each scale feature map is an expression of different features of the target image, the feature map with a larger pixel size is used to extract the features of smaller crosswalks in the target image, and the feature map with a smaller pixel size is used to extract the features of larger crosswalks in the target image. Therefore, using the multi-scale feature map of the target image to detect crosswalks in satellite image data can improve the accuracy of crosswalk detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1a is a flow chart of a pedestrian crossing detection method provided by an embodiment of the present invention;

[0019] Figure 1b is a schematic diagram of multiple scale feature maps of a target image provided by an embodiment of the present invention;

[0020] Figure 1c is a schematic diagram of a sub-process of a pedestrian crossing detection method provided by an embodiment of the present invention;

[0021] Figure 1d is a schematic diagram of different aspect ratios of a configuration provided by an embodiment of the present invention;

[0022] Figure 1e is a schematic diagram of a region frame rotating at different angles provided by an embodiment of the present invention;

[0023] Figure 1f is a schematic diagram of a representation method of a candidate rotation box provided by an embodiment of the present invention;

[0024] Figure 1g It is a schematic diagram of a sub-process of the pedestrian crossing detection method provided by an embodiment of the present invention;

[0025] Figure 1h is a schematic diagram of three different rotation intersection results provided by an embodiment of the present invention;

[0026] Figure 1i It is a schematic diagram of a sub-process of the pedestrian crossing detection method provided by an embodiment of the present invention;

[0027] Figure 2a is another flow chart of the pedestrian crossing detection method provided by an embodiment of the present invention;

[0028] Figure 2b is a convolutional network diagram of a single-point multi-box detector model provided by an embodiment of the present invention;

[0029] Figure 2c is another sub-process diagram of the pedestrian crossing detection method provided by an embodiment of the present invention;

[0030] Figure 2d is another sub-process diagram of the pedestrian crossing detection method provided by an embodiment of the present invention;

[0031] Figure 2e is another sub-process diagram of the pedestrian crossing detection method provided by an embodiment of the present invention;

[0032] Figure 2f is a schematic diagram of a pedestrian crossing detection result provided by an embodiment of the present invention;

[0033] Figure 3 is a schematic block diagram of a pedestrian crossing detection device provided by an embodiment of the present invention;

[0034] Figure 4 is another schematic block diagram of a pedestrian crossing detection device provided by an embodiment of the present invention;

[0035] Figure 5 It is a schematic block diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0037] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0038] In the present invention, the word "exemplary" is used to mean "used as an example, illustration or description". Any embodiment described as "exemplary" in the present invention is not necessarily to be construed as being preferred or advantageous over other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other instances, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present invention.

[0039] The embodiments of the present invention provide a pedestrian crossing detection method, device, computer equipment and storage medium. The pedestrian crossing detection method is run in a terminal device, which can be a server or a terminal, such as a mobile phone, a pad, a desktop computer and the like. The following are detailed descriptions.

[0040] Figure 1a FIG1 is a flow chart of a pedestrian crossing detection method provided by an embodiment of the present invention. As shown in FIG1 , the specific flow of the method is as follows:

[0041] 101, obtain target satellite image data.

[0042] The target satellite image data may be obtained from other devices, such as sending an acquisition instruction to other devices, and the other devices send satellite image data after receiving the acquisition instruction; it may also be obtained locally, such as storing satellite image data locally; it may also be downloaded locally through third-party software and then obtained, such as downloading through satellite image services, such as downloading the target satellite image data through a web map service (WMS). It may also be obtained through other methods.

[0043] 102, segmenting the target satellite image data to obtain a target image.

[0044] According to the GPS coordinates, the target satellite image data is segmented, such as a large satellite image data is segmented into multiple images according to the GPS coordinates, and the segmented images are used as the target image. Among them, the target image includes a crosswalk. There are many specific segmentation methods, such as using segmentation software to segment according to the GPS coordinates, and the specific segmentation method is not limited.

[0045] 103 , performing multi-scale processing on the target image to extract multiple scale feature maps of the target image.

[0046] If there are multiple target images, multi-scale processing is performed on each target image to extract multiple scale feature maps of the target image. Multi-scale processing can be understood as using different convolution kernels to perform convolution processing on the target image to obtain multiple different feature maps of the convolution processing, and the multiple different feature maps obtained by the convolution processing are used as multiple scale feature maps, which can also be called multi-scale feature maps or multi-scale convolution feature maps. Multiple scale feature maps are represented as feature maps of multiple different scales. For example, 3×3, 8×8, and 15×15 convolution kernels can be used to perform convolution processing on the target image to obtain feature maps of three different scales.

[0047] Among them, each scale feature map is an expression of different features of the target image. For example, if the size of the target image is 300×300 (pixel size), 6 feature maps of different scales such as 38×38, 19×19, 10×10, 5×5, 3×3, and 1×1 can be obtained. Among them, the feature map with a larger pixel size corresponds to a smaller field of view of the target image through upsampling, which is used to extract smaller features in the target image, such as extracting a smaller crosswalk in the target image, that is, the feature map with a larger pixel size is an expression of a smaller feature of the target image; the feature map with a smaller pixel size corresponds to a larger field of view of the target image through upsampling, which is used to extract larger features in the target image, such as extracting a larger crosswalk in the target image, that is, the feature map with a smaller pixel size is an expression of a larger feature of the target image.

[0048] 104 . Perform crosswalk detection on the target image according to the multiple scale feature maps, and mark the detected crosswalks.

[0049] Since the feature maps of multiple different scales express multiple different features of the target image, crosswalk detection is performed on the extracted feature maps of multiple different scales respectively, and the detected crosswalks are marked.

[0050] like Figure 1b As shown in the figure, the target image corresponds to four feature maps of different scales, namely feature map 1, feature map 2, feature map 3, feature map 4, feature map 5, feature map 6, feature map 7, feature map 8, feature map 9, feature map 10, feature map 11, feature map 12, feature map 13, feature map 14, feature map 15, feature map 16, feature map 17, feature map 18, feature map 19, feature map Figure 3 ,feature Figure 4 It should be noted that Figure 1b The feature maps in the figure are only for illustrative purposes and do not limit the number of feature maps of different scales. Crosswalk detection is performed on each feature map, and the detected crosswalks are marked. Since feature maps of different scales express different features of the target image, crosswalk detection is performed on each feature map, so that different crosswalks in the target image can be detected. Compared with detecting crosswalks on only one feature map, the accuracy of crosswalk detection is greatly improved.

[0051] In one embodiment, if Figure 1c As shown, step 104 includes 1041-1043:

[0052] 1041 , determining a plurality of candidate rotation frames in each scale feature map, wherein the plurality of candidate rotation frames are obtained by rotating preset region frames of different aspect ratios at different angles.

[0053] The area frame refers to a frame in the image used to detect the target, that is, a frame used to detect the crosswalk. The area frame may include a rectangle, a square, or other shapes.

[0054] Among them, according to the aspect ratio of the crosswalk in the satellite image data, the preset different aspect ratios are determined. For example, the aspect ratio of the crosswalk in the satellite image data may be relatively large, even exceeding 3:1. Therefore, according to the crosswalk in the satellite image data, the aspect ratio exceeding 3:1 can be set, such as 0.707:0.707, 1:1, 1:2.5, 2.5:1, 1:4, 4:1 area frames. Figure 1d As shown, the set area frames with different length-width ratios are used as preset area frames with different length-width ratios. It should be noted that the length-width ratio set here can also be other values.

[0055] In each feature map of different scales, multiple region frames with different aspect ratios are set, such as setting 6 region frames with different aspect ratios, such as Figure 1dAs shown. It can be understood that the reason for setting the area frames with different aspect ratios is that there may be multiple different targets in each target image, that is, there may be multiple crosswalks of different sizes. Among them, for each area frame with different aspect ratios, different angles of rotation are performed to obtain the rotated area frame. For example, if a region frame is rotated at seven different angles, then a region frame obtains seven area frames rotated at different angles. If there are six area frames with different aspect ratios, and each area frame with an aspect ratio is rotated at seven different angles, 6×7=42 different rotated area frames are obtained. It can be understood that the reason for rotating the area frame at different angles is that the crosswalks in the satellite image data are affected by the satellite shooting angle, the crosswalk angle, etc., and in most cases the crosswalks are inclined. If only the area frame (the area frame is positive) is used to detect the crosswalk, the detection accuracy will be reduced due to the influence of non-crosswalk feature pixels.

[0056] like Figure 1e The figure shows a schematic diagram of a region frame rotating at different angles. It should be noted that Figure 1e Only the area frames corresponding to different rotation angles are shown (for ease of understanding, multiple rotated area frames do not overlap). Specifically, the area frame is rotated every 15 degrees with the center point of the area frame as the origin to obtain multiple rotated area frames, and the multiple rotated area frames overlap. The rotation range of the area frame angle is In this way, the area frame will obtain seven rotated area frames in total. The angles of the seven rotated area frames are -π / 12, 0, π / 12, π / 6, π / 4, π / 3, and 5π / 12 respectively. It can be understood that the seven different rotation angles are set because the seven different rotation angles basically cover all the crosswalk angles in the target image.

[0057] In a feature map of a certain scale, assuming that the pixel size of the feature map of this scale is M×N, there are a region boxes with different aspect ratios corresponding to the feature map of this scale. For each region box with different aspect ratios, b different angles of rotation are performed, and M×N×a×b candidate rotation boxes will be generated in the target image. If the pixel size of a feature map of a certain scale is 38×38, there are six region boxes with different aspect ratios corresponding to each region box with different aspect ratios. Seven different angles of rotation are performed for each region box with different aspect ratios, and 38×38×6×7 candidate rotation boxes will be generated in the target image. It can be understood that the target image is divided into 38×38 small blocks, and candidate rotation boxes with different aspect ratios are generated based on the center point of each small block. The above processing is performed on the feature map of each scale, so that multiple candidate rotation boxes of feature maps of multiple different scales can be obtained.

[0058] 1042 , calculate category probability prediction values ​​and position offset prediction values ​​of the multiple candidate rotation boxes.

[0059] Use a pre-trained predictor to calculate the category probability prediction values ​​and position offset prediction values ​​of multiple candidate rotation boxes, such as using a pre-trained softmax predictor.

[0060] Specifically, the predictor includes a set of m×n×p convolution kernels, such as 5×5×p convolution kernels or 3×3×p convolution kernels, which are used to perform sliding window processing on the corresponding images in multiple candidate rotation frames to generate prediction values. For a feature map of M×N×p scale, assuming that the number of detected target categories is C, the aspect ratios of the candidate rotation frames are a, and each aspect ratio is rotated at b different angles, a×b×C 5×5×p convolution kernels are used to predict the category probability (category confidence) of each candidate rotation frame for C different categories, and a×b×k 5×5×p convolution kernels are used to predict the position offset of each candidate rotation frame.

[0061] Among them, k represents the number of parameters of each candidate rotation box. For example, if (x, y, w, h, theta) is used to represent a candidate rotation box, then k is 5. Among them, (x, y, w, h, theta) represent the coordinates of the center point of the candidate rotation box, the width, the height, and the rotation angle equivalent to the x-axis. For example, if (ax, ay, bx, by, h) is used to represent a candidate rotation box, then k is also 5. Among them, (ax, ay, bx, by, h) represent the coordinates of two points along the clockwise direction of the candidate rotation box and the height of the candidate rotation box. The height of the candidate rotation box is the height perpendicular to the line connecting the two points (ax, ay) and (bx, by). For the specific representation of the candidate rotation box, please refer to Figure 1f .

[0062] In this way, the feature map will produce M×N×a×b×(C+k) output results, and for each candidate rotation box, there will be (C+k) dimensions of prediction information. For crosswalk detection, there are two categories: crosswalk and background, so C=2. If the (ax,ay,bx,by,h) representation is used to represent a candidate rotation box, then k=5. That is, for each candidate rotation box, there will be 7 dimensions of prediction information, which are the category probability prediction value of the candidate rotation box for the background, the category probability prediction value of the candidate rotation box for the crosswalk, and the position offset prediction value of the candidate rotation box.

[0063] The same processing is performed on feature maps of different scales to calculate the category probability prediction values ​​and position offset prediction values ​​of multiple candidate rotation boxes.

[0064] It should be noted that the above calculation of the category probability prediction values ​​and the position offset prediction values ​​of multiple candidate rotation boxes is only one calculation method, and other calculation methods can also be used to calculate the category probability prediction values ​​and the position offset prediction values ​​of multiple candidate rotation boxes.

[0065] 1043. Determine a target frame from multiple candidate rotation frames according to the category probability prediction value and the position offset prediction value, and use the crosswalk in the target frame as the detected crosswalk.

[0066] First, a candidate rotation frame including a crosswalk is determined from multiple candidate rotation frames according to the category probability prediction value, and then the candidate rotation frame including the crosswalk is redundantly processed. Finally, a target frame is determined from the redundantly processed candidate rotation frame according to the position offset prediction value.

[0067] In one embodiment, if Figure 1g As shown, step 1043 includes 1043a-1043d:

[0068] 1043a, obtaining a preset probability threshold.

[0069] The preset probability threshold may be pre-set or set in real time. The preset probability threshold is a value greater than or equal to 0.5 and less than 1. For example, the preset probability threshold is set to 0.6.

[0070] 1043b, delete the candidate rotation boxes whose category probability prediction values ​​are less than a preset probability threshold from the multiple candidate rotation boxes.

[0071] Obtain category probability prediction values ​​of multiple candidate rotation boxes; determine whether the category probability prediction value of each candidate rotation box is less than a preset probability threshold; delete the candidate rotation boxes whose category probability prediction value is less than the preset probability threshold. It can be understood that if the category probability prediction value is less than the preset probability threshold, the candidate rotation box is considered to be the background, not the crosswalk, and the candidate rotation box as the background is deleted to increase the detection speed.

[0072] 1043c, performing redundancy processing on the candidate rotation boxes after the deletion processing to eliminate redundant candidate rotation boxes.

[0073] Specifically, redundancy processing can be performed by non-maximum suppression (NMS) to obtain a locally optimal candidate rotation box. Redundancy processing can also be performed by other methods to obtain a locally optimal candidate rotation box.

[0074] The step of performing redundant processing by non-maximum suppression includes: arranging the candidate rotation frames after the deletion processing according to the category probability prediction value, such as arranging them in descending order according to the category probability prediction value; traversing the arranged candidate rotation frames in turn, and performing rotation intersection over union calculation on the currently traversed candidate rotation frame and the remaining candidate rotation frames (wherein the intersection over union can be expressed as IOU (Intersection over Union) and the rotation intersection over union is expressed as rIOU) to obtain the intersection over union calculation result; deleting the candidate rotation frames whose intersection over union calculation result is greater than a first preset intersection over union threshold until all the arranged candidate rotation frames are processed; and taking the remaining candidate rotation frames as candidate target frames, so as to obtain the candidate target frame.

[0075] Among them, non-maximum suppression is used to perform redundant processing of candidate rotation frames, so that a large number of redundant candidate rotation frames can be deleted and the locally optimal candidate rotation frame can be obtained, thereby improving the efficiency and speed of crosswalk detection and the accuracy of crosswalk detection.

[0076] For example, suppose there are four candidate rotation boxes A, B, C, and D, and the corresponding class probability prediction values ​​are 0.97, 0.94, 0.87, and 0.9, respectively. First, the candidate rotation frame A with the largest probability is sorted in descending order to obtain 0.97 (A), 0.94 (B), 0.9 (D), and 0.87 (C); the candidate rotation frame A with the largest probability is taken out, and the rotation I / O calculation is performed with the remaining candidate rotation frames B, C, and D respectively to obtain the I / O calculation result; assuming that the I / O calculation result of the candidate rotation frame A and B exceeds the first preset I / O threshold, while the I / O calculation results of the candidate rotation frames A and C, and A and D do not exceed the first preset I / O threshold, then the candidate rotation frame B is deleted, and the candidate rotation frame A is retained as the local optimal candidate rotation frame; after the candidate rotation frames are sorted in descending order, D and C are left, and the candidate rotation frame D with a larger category probability prediction value is taken out, and the candidate rotation frame D is rotated and I / O calculation is performed with the candidate rotation frame C to obtain the I / O calculation result (the I / O calculation result here refers to a specific value); assuming that the I / O calculation result of the candidate rotation frame D and C exceeds the first preset I / O threshold, then the candidate rotation frame C is deleted, and the candidate rotation frame D is used as the local optimal candidate rotation frame. Thus, two candidate target boxes A and D are obtained, and the corresponding class probability prediction values ​​are 0.97 and 0.9 respectively. It can be understood that two different candidate crosswalks are detected.

[0077] The rotation intersection-to-union ratio refers to the ratio of the intersection (area intersection) of two candidate rotation boxes to the union (area union) of the two candidate rotation boxes.

[0078] like Figure 1h As shown in the figure, it is a schematic diagram of three different rotation intersection results. It should be noted that Figure 1hThese are just three examples, and the rotation intersection results also include diagrams of other situations. Figure 1h The steps of calculating the rotation intersection ratio are briefly described by taking the schematic diagram of the third rotation intersection result in as an example. In the schematic diagram of the third rotation intersection result, the middle parts of the two candidate rotation boxes overlap to form an irregular octagon; the four corners of each candidate rotation box do not overlap, thus forming 8 different corners, and each side of each candidate rotation box has two intersection points with another candidate rotation box.

[0079] Specifically, Figure 1h As shown, first, the intersection points of the two candidate rotation boxes are connected clockwise into a polygon IJKLMNOP; then the area of ​​the polygon IJKLMNOP is calculated, and the area is used as the area intersection InterArea of ​​the two candidate rotation boxes; then the area union Union of the two candidate rotation boxes is calculated; finally, the rotation intersection ratio of the two candidate rotation boxes is calculated based on the area intersection InterArea and the area union Union of the two candidate rotation boxes.

[0080] Among them, the area of ​​the polygon IJKLMNOP can be calculated in the following way: cut the polygon into 6 different triangles: IPO, ION, INM, IML, ILK, and IKJ; calculate the areas of the 6 different triangles; add the calculated areas of the 6 different triangles to obtain the area of ​​the polygon IJKLMNOP.

[0081] The area union of the two candidate rotation boxes is the sum of the areas R1 and R2 of the two candidate rotation boxes, minus the area intersection of the two candidate rotation boxes. Specifically, the area union of the two candidate rotation boxes is Union=R1+R2-InterArea.

[0082] It can be understood that the steps of calculating the rotation intersection-over-union ratio in other cases are similar to the above steps, and the rotation intersection-over-union ratio in each case can be calculated in a similar manner, which will not be repeated here.

[0083] 1043d, according to the predicted value of the position offset, determine the target box from the candidate rotation boxes after redundant processing.

[0084] Specifically, according to the corresponding position offset prediction value, the position and shape of each candidate rotation frame in the candidate rotation frame after redundant processing are adjusted to obtain the target frame. Among them, each candidate rotation frame is adjusted with the position offset prediction value corresponding to the candidate rotation frame. For example, the four candidate rotation frames A, B, C, and D with category probability prediction values ​​of 0.97, 0.94, 0.87, and 0.9 listed above are redundancy eliminated using the non-maximum suppression method to obtain two candidate target frames A and D. The candidate target frame A is adjusted with the position offset prediction value corresponding to the candidate target frame A to obtain the target frame A', and the candidate target frame D is adjusted with the position offset prediction value corresponding to the candidate target frame D to obtain the target frame D', so that the target frames A' and D' are finally obtained, and the images included in the target frames A' and D' are used as the detected crosswalks, and the target frames A' and D' are marked.

[0085] The method embodiment extracts multiple scale feature maps of the target image. Since the multiple scale feature maps can represent different features of the target image, the multiple scale feature maps can be used to extract features of larger crosswalks in the target image, as well as features of smaller crosswalks in the target image. Each feature map in the multiple scale feature maps is then used to detect crosswalks in satellite image data, thereby improving the accuracy of crosswalk detection.

[0086] In one embodiment, after step 104 , the pedestrian crossing detection method further includes step 105 .

[0087] 105, de-duplication processing is performed on the marked crosswalks.

[0088] It is understandable that the marked crosswalks may contain noise and redundancy due to thresholds, sample imbalance, and a large number of pixels in satellite images that are similar to crosswalk pixels, and the marked crosswalks need to be deduplicated. Deduplication is performed on the marked crosswalks to remove noise and redundancy, such as removing erroneously detected crosswalks, to further improve the accuracy of crosswalk detection. Specifically, step 105 includes: performing road network matching deduplication on the marked crosswalks. In other embodiments, other deduplication processes may also be performed.

[0089] In one embodiment, if Figure 1i As shown, step 105 includes the following steps 1051-1055.

[0090] 1051, obtain the position coordinates of the marked crosswalk.

[0091] The marked crosswalk has a corresponding target frame, and the coordinates (pixel coordinates) of the target frame are used as the position coordinates (pixel coordinates) of the marked crosswalk.

[0092] 1052. Determine the range domain of the GPS coordinates corresponding to the marked crosswalk according to the position coordinates.

[0093] Because each target image is segmented according to GPS coordinates, each target image has corresponding GPS coordinates. Assume that the position coordinates of the marked crosswalk are pixel coordinates based on the target image. For example, the pixel coordinates of the upper left corner of the target image are set to (0,0), and the pixel coordinates of the lower right corner are set to (w,h). Therefore, the position coordinates of the marked crosswalk can be converted into GPS coordinates according to the GPS coordinates corresponding to the target image. In this way, the range domain of the GPS coordinates corresponding to the marked crosswalk (target frame) can be determined.

[0094] 1053, determine the road network within the circular area centered on the range domain of the GPS coordinates.

[0095] The road network information can be obtained based on public map information, such as through the public OpenStreet Map. Step 1053 includes: determining a circular area with the center of the range domain of the GPS coordinates as the center, such as determining a circular area with a radius of r; and obtaining the road network within the circular area. It should be noted that in other embodiments, the road network within a rectangular area with the center of the range domain of the GPS coordinates as the center can also be determined, wherein the rectangular area can overlap with the range domain of the GPS coordinates or can be larger than the range domain of the GPS coordinates.

[0096] 1054, determine the incorrectly marked crosswalk based on the range domain of the GPS coordinates and the determined road network.

[0097] Specifically, step 1054 includes: determining whether the range domain of the GPS coordinates intersects with the determined road network, such as comparing and determining the coordinates of the determined road network with the coordinates in the range domain of the GPS coordinates to determine whether the range domain of the GPS coordinates intersects with the determined road network; if the range domain of the GPS coordinates intersects with the determined road network, then determining that the marked crosswalk is correctly marked; if the range domain of the GPS coordinates does not intersect with the determined road network, then determining that the marked crosswalk is incorrectly marked. It can be understood that if the range domain of the GPS coordinates does not intersect with the determined road network, that is, the range domain of the GPS coordinates is not on the determined road network, that is, the marked crosswalk is not on the determined road network, then it can be determined that the marked crosswalk is an incorrectly marked crosswalk.

[0098] 1055, delete the incorrectly marked crosswalk.

[0099] If the marked crosswalk is incorrectly marked, the incorrectly marked crosswalk is deleted to filter out the incorrectly marked crosswalk.

[0100] This embodiment further performs road network matching deduplication processing on the detected and marked crosswalks to remove noise and redundancy, such as deleting wrongly marked crosswalks, to further improve the accuracy of crosswalk detection.

[0101] In one embodiment, a crosswalk detection model can be used to detect crosswalks in a target image. The crosswalk detection model can be a multi-scale detection model based on a single shot multibox detector (SSD), or other multi-scale detection models. Specifically, the crosswalk detection method includes: acquiring target satellite image data; segmenting the target satellite image data to obtain a target image; performing multi-scale processing on the target image through a crosswalk detection model to extract multiple scale feature maps of the target image; and performing crosswalk detection on the target image based on the multiple scale feature maps using a crosswalk detection model, and marking the detected crosswalks. The target image is detected using a crosswalk detection model to improve the speed and accuracy of crosswalk detection.

[0102] In one embodiment, after performing crosswalk detection on the target image using the crosswalk detection model according to the multiple scale feature maps and marking the detected crosswalks, the crosswalk detection method further includes: performing deduplication processing on the marked crosswalks to remove noise and redundancy, thereby further improving the accuracy of crosswalk detection.

[0103] In one embodiment, before the target image is subjected to multi-scale processing by the crosswalk detection model to extract multiple scale feature maps of the target image, the crosswalk detection method further includes: training the initial multi-scale detection model to obtain the crosswalk detection model; or modifying the initial multi-scale detection model and training the modified multi-scale detection model to obtain the crosswalk detection model. This embodiment further relates to the training of the initial multi-scale detection model or the modified multi-scale detection model. The initial multi-scale detection model may be a single point multi-box detector (SSD) model, such as training the single point multi-box detector model to obtain a crosswalk detection model, which is a multi-scale detection model based on the single point multi-box detector; such as modifying the single point multi-box detector model and training the modified single point multi-box detector model to obtain the crosswalk detection model, which is also a multi-scale detection model based on the single point multi-box detector.

[0104] Figure 2a FIG. 2 is another flow chart of the pedestrian crossing detection method provided by an embodiment of the present invention. Figure 2a As shown, the specific process of the pedestrian crossing detection method includes the following steps 201-206.

[0105] 201, modifying the initial multi-scale detection model to obtain a modified multi-scale detection model.

[0106] Among them, multiple scale feature maps of the image can be extracted in the multi-scale detection model, and the crosswalk can be detected according to the multiple scale feature maps. In this embodiment, the initial multi-scale detection model is a single shot multibox detector (SSD) model. The single shot multibox detector model uses VGGNet (VGG16) as the basic network, and makes some modifications to VGGNet, such as converting the fully connected layers FC6 and FC7 of VGGNet into convolutional feature layers Conv6 and Conv7 respectively. On the basis of VGGNet, 4 additional layers of network are added.

[0107] Specifically, Figure 2bAs shown, it is a convolutional network diagram of the single-point multi-box detector model. Among them, the convolutional feature layers Conv4-3, Conv7, and four additional networks in VGGNet form 6 convolutional feature maps of different scales to complete the training of convolutional features. Among them, the four additional networks are Conv8-2, Conv9-2, Conv10-2, and pool11. Among them, the pixel sizes of the 6 convolutional feature maps of different scales are 38×38, 19×19, 10×10, 5×5, 3×3, and 1×1, respectively. It can be understood that the convolutional feature map with a larger pixel size corresponds to a smaller field of view of the original image through upsampling, which is used to detect smaller-sized crosswalks, and the convolutional feature map with a smaller pixel size corresponds to a larger field of view of the original image through upsampling, which is used to detect larger-sized crosswalks. Among them, multiple convolutional feature maps of different scales can also be called multiple-scale feature maps or multi-scale feature maps or multiple-scale convolutional feature maps or multi-scale convolutional feature maps. Since feature maps of different scales express different features of the image, the features extracted from the feature maps of multiple scales are subsequently used to train the modified multi-scale detection model (i.e., the modified single-point multi-box detector model), so that the trained crosswalk detection model can extract different features of the image, thereby improving the detection capability of the crosswalk detection model for the target (crosswalk), such as improving the detection accuracy.

[0108] In one embodiment, if Figure 2c As shown, step 201 includes the following steps 2011-2015.

[0109] 2011, Modify the multiple aspect ratios of the region boxes in each scale feature map in the initial multi-scale detection model.

[0110] Among them, in the single-point multi-box detector model, the multiple different aspect ratios of the region boxes in each scale feature map are 0.707:0.707, 1:1, 1:2, 2:1, 1:3, 3:1. Considering that the aspect ratio of the crosswalk in the satellite image data may be relatively large, which may exceed the maximum aspect ratios of 3:1 and 1:3 set in the single-point multi-box detector model, the multiple different aspect ratios of the region boxes in each scale feature map in the single-point multi-box detector model are modified. The modified multiple different aspect ratios of the region boxes are: 0.707:0.707, 1:1, 1:2.5, 2.5:1, 1:4, 4:1. Specifically, the multiple different aspect ratios of the modified region boxes are as follows: Figure 1d The content described in the specific step 1041 will not be repeated here.

[0111] In 2012, each region frame with modified aspect ratio is rotated at different angles to obtain multiple candidate rotation frames.

[0112] Each region frame with modified aspect ratio is rotated at different angles with the center point of the region frame as the center to obtain the rotated region frame. The range of the region frame angle rotation is [-π / 12, 5π / 12], and each rotation is 15 degrees. Thus, there are seven rotated region frames corresponding to one region frame, and each has a different angle. In a feature map of a scale, assuming that the pixel size of the feature map of the scale is M×N, there are a region frames with different aspect ratios corresponding to the feature map of the scale. For each region frame with different aspect ratio, b different angles are rotated, and M×N×a×b candidate rotation frames will be generated in the target image. The above processing is performed on the feature map of each scale, so that multiple candidate rotation frames of feature maps of multiple different scales can be obtained.

[0113] Specifically, for details of the steps of rotating each region frame with modified aspect ratio at different angles to obtain multiple candidate rotation frames, please refer to Figure 1e The contents shown and the contents described in step 1041 are not repeated here.

[0114] 2013, Modify the representation of candidate rotation boxes.

[0115] In the embodiment of the present invention, each candidate rotation box is represented by (ax, ay, bx, by, h), where ax, ay, bx, by represent two points along the candidate rotation box in a clockwise direction, and h represents the height of the candidate rotation box, i.e., the height perpendicular to the line connecting the two points (ax, ay) and (bx, by). Specifically, Figure 1f shown.

[0116] It should be noted that the candidate rotation box in this embodiment does not use (x1, y1, x2, y2, x3, y3, x4, y4) to represent the four clockwise points of the candidate rotation box because this representation method represents a quadrilateral of any shape (including an inclined rectangle) and does not directly represent the rotation angle. On the other hand, this representation method has too many parameters, which will affect the performance of pedestrian crossing detection. At the same time, the candidate rotation box in this embodiment is not represented by a horizontal box and a rotation angle, such as (x, y, w, h, theta), where x, y, w, h represent the center coordinates and the width and height of the rectangle respectively, and theta represents the rotation angle of the rectangle along the x-axis. This is because this representation method will produce ambiguity, such as -90 and 90 originally represent the same rotation, but for computer programs, these two parameters are very different. It should be noted that the representation method of the candidate rotation box in the embodiment of the present invention improves the performance of pedestrian crossing detection and the accuracy of pedestrian crossing detection.

[0117] 2014. According to the representation method of the candidate rotation box, a position regression loss function based on the candidate rotation box is set.

[0118] According to the representation of the candidate rotation box (ax,ay,bx,by,h). Let the coordinates corresponding to the i-th candidate rotation box be The area of ​​the i-th candidate rotation box is Indicates that the width of the i-th candidate rotation box is Indicates that the high usage of the i-th candidate rotation box If , then the following formulas (1), (2), and (3) hold:

[0119]

[0120]

[0121]

[0122] The position regression loss function based on the candidate rotation box is set as shown in formula (4):

[0123]

[0124] In the position regression loss function, pos represents a set of candidate rotation frames belonging to positive samples, wherein the candidate rotation frames are matched with the true frames to determine the matching candidate rotation frames as positive samples, wherein the true frames refer to the area frames of the marked crosswalks in the training set; x represents whether the matched candidate rotation frame is a crosswalk, and the value is (0,1), if it is a crosswalk, the value is 1, if it is not a crosswalk, the value is 0; N represents all candidate rotation frames currently input, that is, the total number of candidate rotation frames; C represents the number of categories, and in this embodiment, the value is 2 (i.e., crosswalk and background); Indicates whether the i-th candidate rotated box matches the j-th real box with respect to category C. If they match, the value is 1, indicating a crosswalk. If they do not match, the value is 0, indicating background. Represents the offset value of the predicted i-th candidate rotation box; Represents the offset value of the jth real box g relative to the candidate rotation box. Among them, The values ​​in are shown in formulas (5), (6), and (7).

[0125]

[0126]

[0127]

[0128] Among them, the smoothL1(x) function is expressed as shown in formula (8):

[0129]

[0130] 2015, a weighted sum of the position regression loss function and the category confidence loss function based on the candidate rotation box is performed to obtain the loss function of the multi-scale detection model.

[0131] Among them, the category confidence loss function is set as shown in formula (9):

[0132]

[0133] Among them, neg represents the set of candidate rotation boxes belonging to negative samples, The value of is shown in formula (10):

[0134]

[0135] Among them, c represents the category confidence, Indicates that the i-th candidate rotated box matches the j-th real box. If the category is p, the value is 1, indicating a crosswalk, and the value is 0, indicating the background; represents the probability value that the i-th candidate rotation box is a crosswalk, Represents the probability value that the i-th candidate rotation box is the background.

[0136] The position regression loss function and the category confidence loss function based on the candidate rotation box are weighted summed to obtain the loss function of the single-point multi-box detector model. Specifically, the loss function of the single-point multi-box detector model is shown in formula (11):

[0137]

[0138] It can be understood that since the single-point multi-box detector model is an end-to-end training process, the total loss function is determined by a category confidence loss function and a position regression loss function. For the various parameters in formula (11), please refer to the description of the corresponding formula above and will not be repeated here.

[0139] This embodiment further details how to modify the single-point multi-box detector model to obtain a modified multi-scale detection model (modified single-point multi-box detector model). Improve the accuracy of the single-point multi-box detector model in detecting crosswalks.

[0140] 202, the modified multi-scale detection model is trained to obtain a pedestrian crossing detection model.

[0141] The modified multi-scale detection model is the modified single-point multi-box detector model, and the modified single-point multi-box detector model is trained using a data set of real boxes marked with crosswalks to obtain a crosswalk detection model.

[0142] In one embodiment, if Figure 2d As shown, step 202 includes the following steps:

[0143] 2021. Obtain an image dataset, wherein the image dataset includes marked crosswalks.

[0144] The image data set may be obtained from other devices, such as sending a data set acquisition instruction to other devices, and the other devices send the image data set after receiving the data set acquisition instruction; it may also be obtained locally, that is, the image data set is stored locally; it may also be obtained by downloading satellite image data to the local through third-party software and processing the downloaded satellite image data, such as downloading through a satellite image service, such as downloading the satellite image data through a web map service (WMS, Web Map Service). After downloading the satellite image data, the specific processing method includes: segmenting the satellite image data to obtain segmented images, such as segmenting according to GPS coordinates, and the pixel size of the segmented image is such as 256×256; selecting a data set including crosswalks from the segmented images, and marking the crosswalks in the data set to obtain an image data set. Specifically, a dataset including crosswalks is selected from the sliced ​​images, and the crosswalks in the dataset are marked. This can be achieved in a variety of ways: for example, manually finding images with crosswalks, and determining the crosswalks in the image by manual data annotation; for example, finding images with crosswalks by target detection or image matching, and marking the crosswalks in the image; for example, first finding images with crosswalks by target detection or image matching, and marking them, and then finding the correctly marked images manually. Among them, since the image dataset is used to train a multi-scale detection model (single-point multi-box detector model), the downloaded satellite image data is relatively large, so that a sufficient image dataset can be obtained after processing. It should be noted that image datasets can also be obtained by other means.

[0145] 2022. Input the image dataset into the modified multi-scale detection model for multi-scale processing to extract multiple scale feature maps in the image dataset.

[0146] The image dataset is input into the modified single-point multi-box detector model for multi-scale processing to obtain Conv4-3, Conv7, and four additional layers of networks, that is, a total of 6 feature maps of different scales. The pixel sizes of the 6 feature maps of different scales are 38×38, 19×19, 10×10, 5×5, 3×3, and 1×1, respectively. For details, please refer to the description in step 201, and Figure 2b I will not go into details here.

[0147] 2023. Acquire multiple candidate rotation boxes in each scale feature map, wherein the multiple candidate rotation boxes are obtained by rotating the region boxes of different aspect ratios of the multi-scale detection model at different angles.

[0148] In this step, multiple candidate rotation boxes in each scale feature map in the modified single-point multi-box detector model are obtained. As for how to obtain the multiple candidate rotation boxes and how to rotate the area boxes with different aspect ratios at different angles, please refer to the description of steps 2011 and 2012 and Figure 1e The contents in will not be repeated here.

[0149] 2024. Calculate the category confidence and position confidence of each candidate rotation frame according to the real frame of the crosswalk marked in the image dataset and the multiple candidate rotation frames.

[0150] Specifically, the real box of the crosswalk marked in the image dataset is matched with multiple candidate rotated boxes, and the category confidence and position confidence of each candidate rotated box are calculated according to the matching results.

[0151] In one embodiment, if Figure 2e As shown, step 2024 includes:

[0152] 2024a, matching the real box of the marked crosswalk in the image dataset with multiple candidate rotation boxes to determine positive samples and negative samples in the candidate rotation boxes.

[0153] For example, upsampling each point on the feature map of each scale will obtain 6×7=42 candidate rotation boxes, and the 42 candidate rotation boxes are matched with the real box of the point to select positive samples and negative samples.

[0154] Specifically, the rotation intersection-and-union ratio of the real box of the marked crosswalk in the image dataset and multiple candidate rotation boxes is calculated; the angle difference between the real box of the marked crosswalk in the image dataset and multiple candidate rotation boxes is calculated; and the positive samples and negative samples in the multiple candidate rotation boxes are determined according to the calculated rotation intersection-and-union ratio and the angle difference.

[0155] The step of calculating the rotation intersection-and-union ratio of the real box of the marked crosswalk in the image dataset and the multiple candidate rotation boxes is consistent with the method of calculating the rotation intersection-and-union ratio described in step 1043c. For details, please refer to the content described in step 1043, and Figure 1h The contents in will not be repeated here.

[0156] The step of calculating the difference between the angles of the real frame of the marked crosswalk in the image dataset and the multiple candidate rotation frames includes calculating the angles of the real frame and the marked crosswalk in the image dataset, calculating the angles of the multiple candidate rotation frames, and then calculating the difference between the angles of the real frame and the angles of the candidate rotation frames. Specifically, the angle of the real frame or the candidate rotation frame can be calculated by formula (12).

[0157]

[0158] The step of determining the positive samples and negative samples in the plurality of candidate rotation frames according to the calculated rotation intersection and union ratio and the angle difference comprises: if the calculated rotation intersection and union ratio value is greater than the second preset intersection and union ratio threshold value, and the angle difference is less than 15°, then the candidate rotation frame is determined to be a positive sample; if the calculated rotation intersection and union ratio value is less than the difference between 1 and the second preset intersection and union ratio threshold value (i.e., 1-second preset intersection and union ratio threshold value), then the candidate rotation frame is determined to be a negative sample; if the calculated rotation intersection and union ratio value is greater than the second preset intersection and union ratio threshold value, and the angle difference is greater than 15°, then the candidate rotation frame is considered to be a negative sample. The second preset intersection and union ratio threshold value can be set to 0.7. The candidate rotation frame whose rotation intersection and union ratio value is between [1-second preset intersection and union ratio threshold value, second preset intersection and union ratio threshold value] is discarded. If the second preset intersection and union ratio threshold value is 0.7, the candidate rotation frame whose rotation intersection and union ratio value is between [0.3,0.7] is discarded.

[0159] If the angle of the candidate rotation box is recorded as v θ , the angle of the real frame is recorded as g θ , then the mathematical description formula of the positive sample is shown in formula (13), and the mathematical description formula of the negative sample is shown in formula (14).

[0160]

[0161]

[0162] Among them, rIOU(g,v) represents the value of the rotation intersection-over-union ratio between the candidate rotation box and the real box.

[0163] All rotated candidate boxes are selected as positive samples and negative samples by rotating the intersection-over-union ratio (rIOU) and the angle. The positive sample represents the candidate rotated box that may include a crosswalk and will be used for the subsequent candidate rotated box regression operation. The coordinates of the candidate rotated boxes of the negative sample are all assigned to 0.

[0164] The ground-truth box marked as a crosswalk in an image in the image dataset is represented as Among them, g j represents the real box of the jth crosswalk, c represents the category, including the crosswalk and the background, represented by 1 and 0. A candidate rotation box is represented as Among them, v i represents the i-th candidate rotation box.

[0165] 2024b, predict the position offset of the candidate rotation box of the positive sample, predict the category confidence of the candidate rotation box of the positive sample and the negative sample, and output the position prediction amount prediction result and the category probability prediction result.

[0166] The predictor in the modified single-shot multi-box detector model includes a set of m×n×p convolution kernels. During the training phase of the modified single-shot multi-box detector model, candidate rotation boxes of different scales and different aspect ratios will predict the position offset of the candidate rotation box and the category probability (category confidence) of each category. For a feature map of one scale, assume that the number of detection target categories for training the single-shot multi-box detector model is C, such as C=2, that is, two categories, and the aspect ratios of the candidate rotation box are a, such as a=6, that is, 6, and each aspect ratio is rotated at b different angles, such as b=7, that is, 7 different angles. In this way, a×b×C (i.e. 6×7×2) m×n×p convolution kernels are used to predict the category probability (category confidence) of each candidate selection box for C different categories, and a×b×k (6×7×5) m×n×p convolution kernels are used to predict the position offset of each candidate rotation box. Wherein, k represents the number of parameters of each candidate rotation box. For example, if (ax, ay, bx, by, h) represent the coordinates of two points along the clockwise direction of the candidate rotation box and the height of the candidate rotation box, then k = 5. The category confidence is obtained by classification using a softmax classifier.

[0167] It can be understood that a feature map with a pixel size of M×N generates M×N×a×b candidate rotation boxes, and finally generates M×N×a×b×(C+5) output results, where a×b=6×7=42, C represents the number of categories of the detected target, and 5 represents the parameters of each candidate rotation box (ax, ay, bx, by, h), that is, each layer generates M×N×42×(2+5) output results. For each candidate rotation box, (C+5)=7 dimensions of prediction information are output, and the prediction information of the 7 dimensions are respectively the category probability prediction result of the candidate rotation box for the background (the category probability prediction value for the background), the category probability prediction result of the candidate rotation box for the crosswalk (the category probability prediction value for the crosswalk), and the position offset prediction result of the candidate rotation box (the position offset prediction value).

[0168] 2024c, input the candidate rotation box, the real box, the position prediction result and the category probability prediction result into the loss function of the multi-scale detection model to calculate the category confidence and position confidence of each candidate rotation box.

[0169] The candidate rotation box, the true box, the position prediction result, and the category probability prediction result are input into formula (11), that is, input into the loss function to calculate the category confidence and position confidence of each candidate rotation box.

[0170] 2025. According to the category confidence and position confidence of each candidate rotation box, modify the parameters in the loss function of the multi-scale detection model so that the loss function converges, and use the multi-scale detection model after the loss function converges as the crosswalk detection model.

[0171] According to the category confidence and position confidence of each candidate rotation box, the modified multi-scale detection model is continuously adjusted through multiple trainings, that is, a series of parameters in the loss function of the modified single-point multi-box detector model are adjusted, wherein the parameters of the loss function include the prior box parameters (the parameters of the candidate rotation box of the positive sample, the prior box parameters in the embodiment of the present invention are 5 values), the learning rate, the training step size, etc., and finally a modified single-point multi-box detector model with the minimum loss value of the loss function after convergence is obtained, and the modified single-point multi-box detector model is used as the pedestrian crossing detection model. In some embodiments, the image data set is cleaned once for each training, and some incorrectly marked pedestrian crossings are deleted to improve the accuracy of the multi-scale detection model.

[0172] In one embodiment, the acquired image data set is divided into a training set and a test set, such as using a portion of the image data set as a training set and another portion as a test set, and the training set is usually larger than the test set. For example, 80% of the images in the image data set are used as a training set, and the other 20% are used as a test set; for example, if the data set has 4,000 images, 3,000 of them are used as a training set, and 1,000 are used as a test set, etc.

[0173] The modified multi-scale detection model, i.e., the modified single-point multi-box detector model, is trained using the training set to obtain a pedestrian crossing detection model, and the trained pedestrian crossing detection model is tested using the test set to calculate whether the detection accuracy and recall of the pedestrian crossing detection model meet the requirements, such as judging whether the accuracy is greater than the preset accuracy and whether the recall is greater than the preset recall. If the accuracy is greater than the preset accuracy and the recall is greater than the preset recall, it is determined that the requirements are met, otherwise, it is determined that the requirements are not met; if the requirements are not met, the modified multi-scale detection model is retrained to obtain a pedestrian crossing detection model. The test set is used to test the trained pedestrian crossing detection model, which is actually to input the test set into the pedestrian crossing detection model for detection and labeling, and the results of detection and labeling by the pedestrian crossing detection model are compared with the labeling results in the test set to calculate the accuracy and recall of the pedestrian crossing detection model.

[0174] The above steps 201-202 involve a process of modifying and training the initial multi-scale detection model, that is, a process of modifying the single-point multi-box detector model and training the modified single-point multi-box detector model.

[0175] 203, obtain target satellite image data.

[0176] 204, segmenting the target satellite image data to obtain a target image.

[0177] 205 , performing multi-scale processing on the target image through a crosswalk detection model to extract multiple scale feature maps of the target image.

[0178] According to the trained single-point multi-box detector model, the target image is processed at multiple scales to obtain Conv4-3, Conv7, and four additional layers of networks, that is, a total of 6 feature maps of different scales. Specifically, the multi-scale processing of the target image is the same as the multi-scale processing in the training process of the single-point multi-box detector model. For details, please refer to the relevant content of the multi-scale processing involved in the above training process.

[0179] 206 , performing crosswalk detection on the target image according to the multiple scale feature maps using a crosswalk detection model, and marking the detected crosswalks.

[0180] Specifically, multiple candidate rotation frames in multiple scale feature maps are determined, and the category probability prediction values ​​and position offset prediction values ​​of the multiple candidate rotation frames are calculated, that is, the predictor outputs (C+5) dimensional information of each candidate rotation frame, and the target frame is determined from the multiple candidate rotation frames according to the category probability prediction values ​​and the position offset prediction values, and the crosswalk in the target frame is used as the detected crosswalk. Specifically, according to the category probability prediction values ​​and the position offset prediction values, the target frame is determined from the multiple candidate rotation frames, and the crosswalk in the target frame is used as the detected crosswalk, including: obtaining a preset probability threshold; deleting the candidate rotation frames whose category probability prediction values ​​are less than the preset probability threshold from the multiple candidate rotation frames; performing non-maximum suppression processing on the candidate rotation frames after the deletion processing to eliminate redundant candidate rotation frames; and determining the target frame from the redundantly processed candidate rotation frames according to the position offset prediction values. Among them, please refer to the corresponding description in step 1043c for the specific steps of the non-maximum suppression processing.

[0181] The contents of each step in step 206 can refer to the contents of the corresponding steps in step 104, which will not be repeated here. The pedestrian crossing detection is performed using the preset single-point multi-box detector model, and the results obtained are as follows: Figure 2f As shown. Figure 2f The target box of the detected crosswalk is marked in the crosswalk detection result.

[0182] It should be noted that the feature extraction and predictor in the process of pedestrian crossing detection of the target image using the pedestrian crossing detection model uses trained parameters. In addition, the matching process of the candidate rotation box and the real box is not involved in the process of pedestrian crossing detection. There is no loss function and feedback adjustment part. Instead, non-maximum suppression processing is used to eliminate redundant candidate rotation boxes and finally determine the target box.

[0183] It should be noted that the crosswalk detection model is mentioned in steps 205-206. It can be understood that the multi-scale processing of the target image involved in step 205 to extract multiple scale feature maps of the target image, and the crosswalk detection of the target image involved in step 206 and marking the detected crosswalks are all achieved through the crosswalk detection model. It is only necessary to input the target image (unmarked crosswalk) into the crosswalk detection model, and there is only one input.

[0184] Steps 203-206 are a process of realizing crosswalk detection using a trained multi-scale detection model, namely a crosswalk detection model (trained using a modified single-point multi-frame detection model).

[0185] This embodiment modifies the single-point multi-box detector model, that is, modifies the SSD model, and uses the image data set to train the modified single-point multi-box detector model to obtain a crosswalk detection model, and uses the crosswalk detection model to detect the crosswalk of the target image. Among them, for example, modifying the different aspect ratios of the region box in the single-point multi-box detector model can improve the accuracy of the detection result by at least 5%; for example, using the candidate rotation box to detect the crosswalk in the satellite image data also improves the accuracy of the crosswalk detection; for example, modifying the representation of the candidate rotation box to modify the corresponding loss function, so that the training result is more accurate. In addition, since the single-point multi-box detector model extracts multiple scale feature maps, the multiple scale feature maps can express different features of the target image, so using multiple scale feature maps can extract the features of the larger crosswalk in the target image, and can also extract the features of the smaller crosswalk in the target image; then using each feature map to detect the crosswalk in the satellite image data can improve the accuracy of the crosswalk detection.

[0186] In one embodiment, after step 206, the pedestrian crossing detection method preferably includes:

[0187] 207, de-duplication processing is performed on the marked crosswalks.

[0188] Specifically, the marked crosswalks can be processed by road network matching and deduplication. For details on the steps of performing road network matching and deduplication on the marked crosswalks and the beneficial effects that can be achieved, please refer to Figure 1i The contents described in the embodiments will not be repeated here.

[0189] In order to better implement the pedestrian crossing detection method in the embodiment of the present invention, on the basis of the pedestrian crossing detection method, the embodiment of the present invention also provides a pedestrian crossing detection device. The pedestrian crossing detection device is applied in a terminal device, which can be a server or a terminal, such as a mobile phone, a pad, a desktop computer and other devices.

[0190] Figure 3 3 is a schematic block diagram of a pedestrian crossing detection device provided by an embodiment of the present invention. The pedestrian crossing detection device comprises an acquisition unit 301 , a preprocessing unit 302 , a feature extraction unit 303 , and a detection unit 304 .

[0191] The acquisition unit 301 is used to acquire target satellite image data.

[0192] The pre-processing unit 302 is used to perform segmentation processing on the target satellite image data to obtain a target image.

[0193] The feature extraction unit 303 is used to perform multi-scale processing on the target image to extract multiple scale feature maps of the target image.

[0194] The detection unit 304 is configured to perform crosswalk detection on the target image according to the multiple scale feature maps, and mark the detected crosswalks.

[0195] In one embodiment, the pedestrian crossing detection device further includes a deduplication unit 305:

[0196] The deduplication unit 305 is used to perform deduplication processing on the marked crosswalks.

[0197] In one embodiment, the detection unit 304 includes: a rotation frame determination unit, a prediction value calculation unit, and a target frame determination unit.

[0198] The rotation frame determination unit is used to determine a plurality of candidate rotation frames in each scale feature map, wherein the plurality of candidate rotation frames are obtained by rotating the region frames of different preset aspect ratios at different angles.

[0199] A prediction value calculation unit is used to calculate the category probability prediction values ​​and position offset prediction values ​​of the multiple candidate rotation boxes.

[0200] A target frame determination unit is used to determine a target frame from multiple candidate rotation frames according to the category probability prediction value and the position offset prediction value, and use the crosswalk in the target frame as the detected crosswalk.

[0201] In one embodiment, the target frame determination unit includes: a threshold acquisition unit, a frame deletion unit, a redundancy processing unit, and a target detection frame determination unit. The threshold acquisition unit is used to obtain a preset probability threshold. The frame deletion unit is used to delete a candidate rotation frame whose category probability prediction value is less than a preset probability threshold from multiple candidate rotation frames. The redundancy processing unit is used to perform redundancy processing on the candidate rotation frame after the deletion processing to eliminate the redundant candidate rotation frame. The target detection frame determination unit is used to determine the target frame from the candidate rotation frame after the redundant processing according to the position offset prediction value.

[0202] In one embodiment, the deduplication unit 305 includes: a coordinate acquisition unit, a GPS coordinate determination unit, a road network determination unit, an error determination unit, and an error deletion unit.

[0203] A coordinate acquisition unit, for acquiring the position coordinates of the marked crosswalk. A GPS coordinate determination unit, for determining the range domain of the GPS coordinates corresponding to the marked crosswalk based on the position coordinates. A road network determination unit, for determining the road network within a circular area centered on the range domain of the GPS coordinates. An error determination unit, for determining an erroneously marked crosswalk based on the range domain of the GPS coordinates and the determined road network. An error deletion unit, for deleting the erroneously marked crosswalk.

[0204] Figure 4 4 is another schematic block diagram of a pedestrian crossing detection device provided by an embodiment of the present invention. The pedestrian crossing detection device comprises a modification unit 401 , a training unit 402 , an acquisition unit 403 , a preprocessing unit 404 , a feature extraction unit 405 , and a detection unit 406 .

[0205] The modifying unit 401 is used to modify the initial multi-scale detection model to obtain a modified multi-scale detection model.

[0206] The training unit 402 is used to train the modified multi-scale detection model to obtain a pedestrian crossing detection model.

[0207] The acquisition unit 403 is used to acquire target satellite image data.

[0208] The pre-processing unit 404 is used to perform segmentation processing on the target satellite image data to obtain a target image.

[0209] The feature extraction unit 405 is used to perform multi-scale processing on the target image through a crosswalk detection model to extract multiple scale feature maps of the target image.

[0210] The detection unit 406 is used to perform crosswalk detection on the target image according to the multiple scale feature maps and use a crosswalk detection model, and mark the detected crosswalks.

[0211] In one embodiment, the pedestrian crossing detection device further includes: a deduplication unit 407 .

[0212] The deduplication unit 407 is used to perform deduplication processing on the marked crosswalks.

[0213] In one embodiment, the modification unit 401 includes: an aspect ratio modification unit, a rotation unit, a representation modification unit, a position function setting unit, and a total loss function determination unit.

[0214] An aspect ratio modification unit, used to modify multiple different aspect ratios of the region boxes in each scale feature map in the initial multi-scale detection model. A rotation unit, used to rotate each region box with modified aspect ratio at different angles to obtain multiple candidate rotation boxes. A representation modification unit, used to modify the representation of the candidate rotation box. A position function setting unit, used to set a position regression loss function based on the candidate rotation box according to the representation of the candidate rotation box. A total loss function determination unit, used to weighted sum the position regression loss function based on the candidate rotation box and the category confidence loss function to obtain the loss function of the modified multi-scale detection model.

[0215] In one embodiment, the training unit 402 includes: a data set acquisition unit, a feature map extraction unit, a rotation box acquisition unit, a confidence calculation unit, and a regression unit.

[0216] The data set acquisition unit is used to acquire an image data set, wherein the image data set includes a marked crosswalk.

[0217] The feature map extraction unit is used to input the image data set into the modified multi-scale detection model for multi-scale processing to extract multiple scale feature maps in the image data set.

[0218] The rotation frame acquisition unit is used to acquire multiple candidate rotation frames in each scale feature map, wherein the multiple candidate rotation frames are obtained by rotating the region frames of different aspect ratios of the multi-scale detection model at different angles.

[0219] The confidence calculation unit is used to calculate the category confidence and position confidence of each candidate rotation frame according to the real frame of the pedestrian crossing marked in the image data set and the multiple candidate rotation frames.

[0220] The regression unit is used to modify the parameters in the loss function of the multi-scale detection model according to the category confidence and the position confidence of each candidate rotation box so that the loss function converges, and use the multi-scale detection model after the loss function converges as the crosswalk detection model.

[0221] In one embodiment, the confidence calculation unit includes: a positive and negative sample determination unit, a prediction result output unit,

[0222] A positive and negative sample determination unit is used to match the real frame of the marked crosswalk in the image data set with multiple candidate rotation frames to determine the positive samples and negative samples in the candidate rotation frames. A prediction result output unit is used to predict the position offset of the candidate rotation frame of the positive sample, predict the category confidence of the candidate rotation frames of the positive sample and the negative sample, and output the position prediction amount prediction result and the category probability prediction result. A box confidence calculation unit is used to input the candidate rotation frame, the real frame, the position prediction amount prediction result and the category probability prediction result into the loss function of the multi-scale detection model to calculate the category confidence and position confidence of each candidate rotation frame.

[0223] It should be noted that technicians in the relevant field can clearly understand that the specific implementation process and beneficial effects achieved by the above-mentioned devices and each unit can refer to the corresponding description in the aforementioned method embodiment. For the convenience and conciseness of the description, they will not be repeated here.

[0224] An embodiment of the present invention further provides a computer device, which integrates any one of the pedestrian crossing detection methods provided in the embodiments of the present invention, and the computer device includes:

[0225] One or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured so that the processor executes the steps of the crosswalk detection method described in any of the above-mentioned crosswalk detection method embodiments.

[0226] The embodiment of the present invention further provides a computer device, which integrates any of the pedestrian crossing detection devices provided by the embodiment of the present invention. Figure 5 As shown, it shows a schematic diagram of the structure of a computer device involved in an embodiment of the present invention, specifically:

[0227] The computer device may include one or more processing core processors 501, one or more computer-readable storage media memories 502, a power supply 503, an input unit 504 and other components. Those skilled in the art will appreciate that Figure 5 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:

[0228] The processor 501 is the control center of the computer device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 502 and calling data stored in the memory 502, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole. Optionally, the processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 501.

[0229] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.

[0230] The computer device also includes a power supply 503 for supplying power to various components. Preferably, the power supply 503 can be logically connected to the processor 501 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 503 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0231] The computer device may further include an input unit 504, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0232] Although not shown, the computer device may also include a graphics processing unit (GPU), which converts and drives the display information required by the computer system, provides a line scan signal to the display, controls the correct display of the display, and undertakes the task of outputting display graphics, which can increase the speed of data processing. For example, using an image processor to train a face detection model can increase the speed of model training by more than 10 times compared to using a processor.

[0233] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 501 in the computer device will load the executable files corresponding to the processes of one or more application programs into the memory 502 according to the following instructions, and the processor 501 will run the application programs stored in the memory 502, thereby realizing various functions, such as realizing various functions in the pedestrian crossing detection method provided in the embodiment of the present invention.

[0234] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0235] To this end, an embodiment of the present invention provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any one of the pedestrian crossing detection methods provided in the embodiments of the present invention.

[0236] In the above embodiments, the description of each embodiment has its own emphasis. For the part that is not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, which will not be repeated here. In specific implementation, the above units or structures can be implemented as independent entities, or they can be arbitrarily combined and implemented as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments, which will not be repeated here.

[0237] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0238] The above is a detailed introduction to a pedestrian crossing detection method, device, computer equipment and storage medium provided in an embodiment of the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A pedestrian crossing detection method, It is characterized in that include: Acquire target satellite image data; Slicing the target satellite image data to obtain a target image; Performing multi-scale processing on the target image to extract multiple scale feature maps of the target image, wherein the multi-scale processing is performing convolution processing on the target image using different convolution kernels respectively; Performing crosswalk detection on the target image according to the multiple scale feature maps, and marking the detected crosswalks; The detecting of a crosswalk on the target image according to the multiple scale feature maps includes: determining multiple candidate rotation frames in each scale feature map, wherein the multiple candidate rotation frames are obtained by rotating region frames of preset different aspect ratios at different angles; calculating category probability prediction values ​​and position offset prediction values ​​of the multiple candidate rotation frames; determining a target frame from the multiple candidate rotation frames according to the category probability prediction values ​​and the position offset prediction values, and using the crosswalk in the target frame as the detected crosswalk.

2. The pedestrian crossing detection method according to claim 1, It is characterized in that After performing pedestrian crossing detection on the target image according to the multiple scale feature maps and marking the detected pedestrian crossings, the method further includes: De-duplicate the marked crosswalks.

3. The pedestrian crossing detection method according to claim 2, It is characterized in that The deduplication processing of the marked crosswalks includes: Get the location coordinates of the marked crosswalk; Determine the range domain of the GPS coordinates corresponding to the marked crosswalk according to the position coordinates; Determine a road network within a circular area centered on the range domain of the GPS coordinates; Determining a mislabeled crosswalk based on the range domain of the GPS coordinates and the determined road network; Remove said incorrectly marked crosswalk.

4. The pedestrian crossing detection method according to claim 1, It is characterized in that Before performing multi-scale processing on the target image to extract multiple scale feature maps of the target image, the method further includes: Modify the initial multi-scale detection model to obtain a modified multi-scale detection model; The modified multi-scale detection model is trained to obtain a pedestrian crossing detection model; The performing multi-scale processing on the target image to extract multiple scale feature maps of the target image includes: performing multi-scale processing on the target image through a crosswalk detection model to extract multiple scale feature maps of the target image; The performing crosswalk detection on the target image according to the multiple scale feature maps and marking the detected crosswalks includes: performing crosswalk detection on the target image according to the multiple scale feature maps using the crosswalk detection model and marking the detected crosswalks.

5. The pedestrian crossing detection method according to claim 4, It is characterized in that The modifying the initial multi-scale detection model to obtain a modified multi-scale detection model includes: Modify multiple different aspect ratios of the region boxes in each scale feature map in the initial multi-scale detection model; Rotate each region frame with modified aspect ratio at different angles to obtain multiple candidate rotation frames; Modify the representation of candidate rotation boxes; According to the representation mode of the candidate rotation box, setting a position regression loss function based on the candidate rotation box; The position regression loss function and the category confidence loss function based on the candidate rotation box are weighted and summed to obtain the loss function of the modified multi-scale detection model.

6. The pedestrian crossing detection method according to claim 5, It is characterized in that The modified multi-scale detection model is trained to obtain a pedestrian crossing detection model, including: Acquire an image dataset, wherein the image dataset includes a marked crosswalk; Inputting the image data set into the modified multi-scale detection model for multi-scale processing to extract multiple scale feature maps in the image data set; Acquire multiple candidate rotation boxes in each scale feature map, wherein the multiple candidate rotation boxes are obtained by rotating the region boxes of different aspect ratios of the multi-scale detection model at different angles; Calculate the category confidence and position confidence of each candidate rotation frame according to the real frame of the crosswalk marked in the image dataset and the multiple candidate rotation frames; According to the category confidence and position confidence of each candidate rotation box, the parameters in the loss function of the multi-scale detection model are modified so that the loss function converges, and the multi-scale detection model after the loss function converges is used as the crosswalk detection model.

7. A pedestrian crossing detection device, It is characterized in that include: An acquisition unit, used for acquiring target satellite image data; A preprocessing unit, used for segmenting the target satellite image data to obtain a target image; A feature extraction unit, configured to perform multi-scale processing on the target image to extract multiple scale feature maps of the target image, wherein the multi-scale processing is to perform convolution processing on the target image using different convolution kernels respectively; a detection unit, configured to perform crosswalk detection on the target image according to the multiple scale feature maps, and mark the detected crosswalks; The detecting of a crosswalk on the target image according to the multiple scale feature maps includes: determining multiple candidate rotation frames in each scale feature map, wherein the multiple candidate rotation frames are obtained by rotating region frames of preset different aspect ratios at different angles; calculating category probability prediction values ​​and position offset prediction values ​​of the multiple candidate rotation frames; determining a target frame from the multiple candidate rotation frames according to the category probability prediction values ​​and the position offset prediction values, and using the crosswalk in the target frame as the detected crosswalk.

8. A computer device, It is characterized in that, The computer device comprises: One or more processors; a memory; and one or more applications, wherein the processor and the memory are connected, the one or more applications are stored in the memory, and are configured to be executed by the processor to implement the pedestrian crossing detection method described in any one of claims 1 to 6.

9. A computer storage medium, It is characterized in that A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the pedestrian crossing detection method according to any one of claims 1 to 6.