Positioning method and device, equipment and computer storage medium

CN118742920APending Publication Date: 2024-10-01BOE TECHNOLOGY GROUP CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202380008096.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-01-31
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing indoor positioning technology has shortcomings in accuracy and cost. In particular, visual indoor personnel detection and positioning technology is difficult to achieve high-precision real-time geographical coordinate calculation, and the engineering cost is high and operation and maintenance are complex.

Method used

By using low-cost security surveillance cameras combined with deep convolutional neural networks to detect key points of the human body and project them to the geodetic coordinate system, the center of gravity coordinates of the mapping graphics are calculated to determine the geographical coordinates, which improves positioning accuracy and reduces the difficulty of data acquisition. cost.

Benefits of technology

It realizes low-cost, high-precision real-time geographical coordinate calculation of indoor personnel based on monitoring equipment, improves positioning accuracy and reduces engineering costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118742920A_ABST
    Figure CN118742920A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a positioning method and device, equipment and a computer storage medium. The positioning method comprises the steps that a to-be-processed image is acquired, and the to-be-processed image comprises a target object; carrying out key point detection on the target object, and determining first coordinates of a plurality of key points of the target object in a camera coordinate system; projecting each key point in the camera coordinate system to a geodetic coordinate system to obtain a mapping graph taking each key point as a vertex; and calculating barycentric coordinates of the mapping graph, and taking the barycentric coordinates as geographic coordinates of the target object. According to the embodiment of the invention, the to-be-processed image is acquired through the monitoring equipment, and the data acquisition difficulty and cost are reduced based on the high coverage rate of the monitoring equipment; secondly, the precision of geographic coordinates is improved by calculating the center of gravity of the earth plane projection polygon of the key points of the human body;
Need to check novelty before this filing date? Find Prior Art

Description

Positioning method, device, equipment and computer storage medium Technical Field

[0001] The present disclosure relates to the field of display technology, and in particular to a positioning method, apparatus, device, and computer storage medium. Background Art

[0002] With the development of the Internet of Things (IoT) and artificial intelligence (AI), driven by demand for both consumer and enterprise applications in indoor environments, indoor location-based services are becoming increasingly important in information systems. Real-time geo-coordinate calculation technology for indoor occupants, at the core of indoor positioning and navigation services, has broad potential applications in large indoor public spaces such as supermarkets, exhibition halls, and transportation hubs.

[0003] Summary of the Invention

[0004] Embodiments of the present disclosure provide a positioning method, apparatus, device, and computer storage medium.

[0005] In a first aspect, an embodiment of the present disclosure provides a positioning method, wherein the method includes:

[0006] Acquire an image to be processed, wherein the image to be processed includes a target object;

[0007] Performing key point detection on the target object to determine first coordinates of a plurality of key points of the target object in a camera coordinate system;

[0008] Project each key point in the camera coordinate system to the earth coordinate system to obtain a mapping graph with each key point as a vertex;

[0009] The center-of-gravity coordinates of the mapping graph are calculated, and the center-of-gravity coordinates are used as the geographic coordinates of the target object.

[0010] In some embodiments, detecting key points of the target object and determining first coordinates of each key point in a camera coordinate system includes:

[0011] The image to be processed is input into a pre-trained deep convolutional neural network to obtain the first coordinates of multiple key points in the camera coordinate system corresponding to the target object.

[0012] In some embodiments, the deep convolutional neural network includes a preprocessing network and a two-branch network, and the two-branch network includes a detection network and a regression network.

[0013] Inputting the image to be processed into a pre-trained deep convolutional neural network to obtain first coordinates of multiple key points in a camera coordinate system corresponding to the target object includes:

[0014] Inputting the image to be processed into the preprocessing network for feature extraction to obtain a feature atlas, wherein the feature atlas includes a plurality of feature maps, the feature atlas includes the target object, and the feature map includes at least one key point;

[0015] Inputting the feature atlas into the detection network to obtain the confidence prediction results of each key point;

[0016] Inputting the feature atlas and the confidence prediction results of each key point into the regression network to obtain the local affinity field prediction results of the key point;

[0017] Obtaining first coordinates of a plurality of key points according to the confidence prediction results of the key points and the local affinity field prediction results;

[0018] The confidence prediction result is used to represent the predicted position of the key point, and the local affinity field prediction result is used to represent the association relationship between the predicted positions.

[0019] In some embodiments, inputting the feature atlas into the detection network to obtain a confidence prediction result of each key point includes:

[0020] Detecting the feature atlas to determine a plurality of initial coordinates of each key point in each feature atlas and a confidence value corresponding to each initial coordinate;

[0021] At least one initial coordinate having a confidence value greater than a preset threshold is determined as the predicted coordinate of the key point, and the confidence prediction result of the key point includes at least one predicted coordinate.

[0022] In some embodiments, the feature atlas and the confidence prediction results of each key point are input into the regression network to obtain the local affinity field prediction results of the key point, including:

[0023] According to the pre-acquired human skeleton structure diagram, the parent key point corresponding to each key point is determined, where the parent key point of the root key point is itself;

[0024] For each feature map, perform the following steps:

[0025] Perform pairwise matching on at least one predicted coordinate corresponding to each key point in the feature map and its parent key point, and determine the affinity field between the two matched predicted coordinates.

[0026] Connect the two predicted coordinates with the strongest affinity field to form a limb connection between the keypoint and its corresponding parent keypoint;

[0027] According to all limb connections in the feature graph, a local skeleton graph corresponding to the feature graph is formed.

[0028] In some embodiments, obtaining the first coordinates of the plurality of key points according to the confidence prediction results of the key points and the local affinity field prediction results includes:

[0029] Based on the local skeleton map corresponding to each feature map, the key points at the same position in different local skeleton maps are combined and spliced ​​to determine the complete skeleton map of the target object; wherein, when the predicted coordinates of the key point at the same position in different local skeleton maps are inconsistent, the predicted coordinate with the higher confidence level is selected as the position of the key point;

[0030] According to the complete skeleton graph, first coordinates of the plurality of key points are obtained.

[0031] In some embodiments, before inputting the image to be processed into a pre-trained deep convolutional neural network, the method further includes:

[0032] After the detection network obtains the confidence prediction result, a confidence loss function is calculated to determine whether a preset confidence loss function threshold is met;

[0033] After the regression network obtains the local affinity vector field prediction result, calculating the local affinity field loss function to determine whether a preset local affinity vector field loss function threshold is met;

[0034] Calculating the sum of the confidence loss function and the local affinity field loss function to determine whether a preset target loss function threshold is met;

[0035] When the confidence loss function, the local affinity field loss function, and the sum of the two all meet the preset threshold requirements, the deep convolutional neural network training is completed.

[0036] In some embodiments, the confidence loss function is calculated by the following formula:

[0037] in, is the predicted coordinate of the i-th key point in the feature map l, h i,l The value is 0 or 1. When the i-th key point is not blocked in the feature map l, h i,l The value is 1, otherwise it is 0.

[0038] In some embodiments, the local affinity field loss function is calculated by the following formula:

[0039] Among them, R i and are the real coordinates and predicted coordinates of the i-th key point, respectively, and the real coordinates are pre-acquired sample data.

[0040] In some embodiments, the object includes a human body, and the key points include head, neck, right shoulder, right elbow, right wrist, right hand, left shoulder, left elbow, left wrist, left hand, back, waist, right hip, right knee, right ankle, left hip, left knee, and left ankle.

[0041] In some embodiments, projecting each key point in the camera coordinate system to the earth coordinate system to obtain a mapping graph with each key point as a vertex includes:

[0042] Mapping the first coordinates of each key point corresponding to the target object to the second coordinates in the geodetic coordinate system according to a conversion algorithm between the camera coordinate system and the geodetic coordinate system obtained in advance;

[0043] A mapping graph corresponding to the target object is formed with each second coordinate as a vertex.

[0044] In some embodiments, the mapping graph is an N-gon, where N is an integer greater than 3;

[0045] The calculating the coordinates of the center of gravity of the mapping graphic and using the coordinates of the center of gravity as the geographic coordinates of the target object includes:

[0046] Divide the mapping graph into N-2 triangles, where the N-2 triangles are triangles formed by the preset vertex and N-2 edges that are not adjacent to the preset vertex;

[0047] Calculating the centroid coordinates and area of ​​each triangle according to the second coordinates of each key point corresponding to the target object;

[0048] The barycentric coordinates of the mapping graphic are determined according to the barycentric coordinates and area of ​​each triangle, and the barycentric coordinates are used as the geographic coordinates of the target object.

[0049] In some embodiments, the coordinates of the center of gravity of the mapping graph are calculated using the following formula:

[0050] Among them, x i ,y i Respectively represent the horizontal and vertical coordinates of the coordinates of the center of gravity of the i-th triangle, σ i represents the area of ​​the i-th triangle.

[0051] In some embodiments, the method further comprises:

[0052] Calculating a homography matrix between the geographic coordinates and the image coordinates of a preset reference point in the image to be processed according to the geographic coordinates of the preset reference point in the image to be processed and the image coordinates of the preset reference point in the image to be processed;

[0053] The image coordinates of the target object in the image to be processed are determined according to the homography matrix.

[0054] In some embodiments, the calculation of the homography matrix between the geographic coordinates of the reference point and the image coordinates is calculated using the following formula:

[0055] Where H represents the homography matrix, u and v represent the horizontal and vertical coordinates of the image coordinates, and X and Y represent the horizontal and vertical coordinates of the geographic coordinates.

[0056] In a second aspect, an embodiment of the present disclosure provides a positioning device, wherein the device includes:

[0057] An acquisition module is configured to acquire an image to be processed, wherein the image to be processed includes a target object;

[0058] a detection module, configured to perform key point detection on the target object and determine first coordinates of a plurality of key points of the target object in a camera coordinate system;

[0059] A processing module is configured to project each key point in the camera coordinate system into the earth coordinate system to obtain a mapping graph with each key point as a vertex;

[0060] The calculation module is configured to calculate the center of gravity coordinates of the mapping graphic and use the center of gravity coordinates as the geographic coordinates of the target object.

[0061] In a third aspect, an embodiment of the present disclosure provides a positioning device, which includes: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the positioning method described in the first aspect are performed.

[0062] In a fourth aspect, an embodiment of the present disclosure provides a computer non-volatile readable storage medium, wherein a computer program is stored on the computer non-volatile readable storage medium, and when the computer program is executed by a processor, the steps of the positioning method described in the first aspect are executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following detailed description, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:

[0064] FIG1a is a schematic flow chart of a positioning method provided by an embodiment of the present disclosure;

[0065] FIG1b is a schematic diagram of the positioning process using the method shown in FIG1a;

[0066] FIG2 is a diagram of a skeleton structure of key points of a human body provided by an embodiment of the present disclosure;

[0067] FIG3 is a schematic flow chart of another positioning method provided by an embodiment of the present disclosure;

[0068] FIG4 is a schematic diagram of a specific process of step S20;

[0069] FIG5 is a schematic flow chart of a deep convolutional neural network training method provided by an embodiment of the present disclosure;

[0070] FIG6 is a schematic structural diagram of a positioning device provided by an embodiment of the present disclosure;

[0071] FIG7 is a schematic structural diagram of a positioning device provided in an embodiment of the present disclosure;

[0072] FIG8 is a schematic diagram of the structure of a computer non-transitory readable storage medium provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0073] The following describes the specific embodiments of the present disclosure in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present disclosure and are not intended to limit the present disclosure.

[0074] To make the purpose, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0075] Unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should have the usual meanings understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "include" or "comprise" mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Words such as "connect" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the object being described changes, the relative positional relationship may also change accordingly.

[0076] With the development of the Internet of Things (IoT) and artificial intelligence (AI), driven by demand for both consumer and enterprise applications in indoor environments, indoor location-based services are becoming increasingly important in information systems. Real-time geo-coordinate calculation technology for indoor occupants, at the core of indoor positioning and navigation services, has broad potential applications in large indoor public spaces such as supermarkets, exhibition halls, and transportation hubs.

[0077] Existing indoor positioning technologies include both non-visual and visual ones. Non-visual indoor positioning technologies, including UWB ultra-wideband positioning, Bluetooth beacon positioning based on RSSI signal strength indicators, and RFID positioning, all require multiple specialized sensors, resulting in high engineering costs and complex operations and maintenance. Security cameras, on the other hand, are universal sensors with the widest coverage, achieving high or even full coverage in most situations. They are readily available and low-cost. Therefore, combining security cameras with computer vision technology to detect and analyze human subjects is expected to become a core foundational technology for indoor real-time geographic positioning.

[0078] Visual indoor personnel detection and positioning technology includes using facial recognition technology to determine which camera's monitoring area a person is in, but it can only be accurate to a certain area and cannot calculate the person's real-time geographic coordinates. Visual indoor personnel detection and positioning technology also includes using personnel detection technology to solve the position of human targets, but because the target detection box occupies a large area of ​​the image, it is difficult to achieve high accuracy.

[0079] In order to solve at least one of the above technical problems, an embodiment of the present disclosure provides a positioning method that calculates the precise geographic coordinates of indoor people in real time based on low-cost security monitoring cameras.

[0080] FIG1a is a schematic flow chart of a positioning method provided by an embodiment of the present disclosure, and FIG1b is a schematic diagram of a positioning process using the method shown in FIG1a . As shown in FIG1a and FIG1b , the positioning method includes:

[0081] Step S1: Acquire an image to be processed, where the image to be processed includes a target object.

[0082] The image to be processed is captured by monitoring equipment.

[0083] Step S2: perform key point detection on the target object to determine first coordinates of multiple key points of the target object in the camera coordinate system.

[0084] Step S3: Project each key point in the camera coordinate system to the earth coordinate system to obtain a mapping graph with each key point as a vertex.

[0085] Step S4, calculating the center of gravity coordinates of the mapping figure, and using the center of gravity coordinates as the geographic coordinates of the target object.

[0086] The positioning method provided by the disclosed embodiments uses key point detection technology to first determine the coordinates of the target object in the camera coordinate system, then project the coordinates of the target object into the geodetic coordinate system. Based on the coordinate conversion between the camera coordinate system and the geodetic coordinate system, the geographic coordinates of the target object are ultimately determined. Compared to related technical solutions, the method firstly uses monitoring equipment to obtain the image to be processed, which reduces the difficulty and cost of data acquisition due to the high coverage of monitoring equipment. Secondly, the accuracy of geographic coordinates is improved by calculating the center of gravity of the polygon projected onto the geodetic plane of key points on the human body.

[0087] It should be understood that C(x, y) in FIG. 1 b represents the geographic coordinates of the target object.

[0088] Figure 2 is a skeletal structure diagram of key points of the human body provided by an embodiment of the present disclosure. In some embodiments, as shown in Figure 2, the above-mentioned object includes a human body, and the key points include head, neck, right shoulder, right elbow, right wrist, right hand, left shoulder, left elbow, left wrist, left hand, back, waist, right hip, right knee, right ankle, left hip, left knee, and left ankle.

[0089] The method for determining the first coordinates of each key point in the camera coordinate system, that is, the above-mentioned step S2, is described in detail below with reference to a specific embodiment.

[0090] FIG3 is a schematic flow chart of another positioning method provided by an embodiment of the present disclosure. In some embodiments, as shown in FIG3 , step S2 includes:

[0091] In step S20, the image to be processed is input into a pre-generated deep convolutional neural network to obtain first coordinates of multiple key points in a camera coordinate system corresponding to the target object.

[0092] The above-mentioned deep convolutional neural network includes a preprocessing network and a two-branch network, and the two-branch network includes a detection network and a regression network. Specifically, the entire deep convolutional neural network includes 9 trainable layers, including 3 convolutional layers for the preprocessing network, 3 fully connected layers for the detection network, and 3 fully connected layers for the regression network. The input of the detection network and the regression network are both the output results of the preprocessing network, that is, the detection network and the regression network share the above 3 convolutional layers.

[0093] The training process of the deep convolutional neural network is described in the following embodiments and will not be repeated here.

[0094] FIG4 is a schematic diagram of a specific process of step S20. In some embodiments, as shown in FIG4 , step S20 includes steps S21 to S24:

[0095] In step S21, the image to be processed is input into a preprocessing network for feature extraction to obtain a feature atlas, which includes multiple feature maps. The feature atlas includes a target object, and the feature map includes at least one key point corresponding to the target object.

[0096] In one example, the multiple feature maps in the feature map set can be feature maps formed by different parts of the human body, such as a head feature map, an upper limb feature map, a waist feature map, and a leg feature map, each of which includes multiple key points, and there are repeated key points in different feature maps. For example, the left hip and right hip key points can be in both the waist feature map and the leg feature map.

[0097] In step S22, the feature atlas is input into the detection network to obtain the confidence prediction results of each key point.

[0098] The confidence prediction results are used to represent the predicted positions of key points. In this embodiment, the detection network simultaneously predicts the feature maps of all key points, i.e., multiple tasks coexist. This allows the entire body skeleton map to be predicted simultaneously in actual network applications, improving prediction speed. At the same time, due to the use of multi-task training and prediction, occlusion of a key point will not affect the prediction results. For example, when a person's body is occluded, it will not affect the key point recognition of that person's face and hands. When identifying the skeleton maps of multiple people, the algorithm complexity can be significantly reduced, the calculation speed can be improved, and the calculation time can be reduced.

[0099] Specifically, step S22 includes: detecting the feature map set, determining multiple initial coordinates of each key point in each feature map, and the confidence value corresponding to each initial coordinate; determining at least one initial coordinate with a confidence value greater than a preset threshold as the predicted coordinate of the key point.

[0100] For one key point, it can exist in different feature maps, and any key point in each feature map can be predicted to obtain at least one predicted coordinate. Therefore, each key point can have multiple predicted coordinates, and multiple predicted coordinates are obtained based on different feature maps.

[0101] In step S23, the feature atlas and the confidence prediction results of each key point are input into the regression network to obtain the local affinity field prediction results of the key point.

[0102] The local affinity field prediction results are used to represent the association between predicted locations. Specifically, the confidence prediction results obtained by the detection network can be considered as a set, which includes subsets corresponding to each feature map. Each subset contains keypoints that overlap with one or more other subsets, thereby facilitating the subsequent generation of a complete human skeleton map. For example, at least one keypoint in the head keypoint subset overlaps with at least one keypoint in the upper limb keypoint subset; and at least one keypoint in the waist keypoint subset overlaps with at least one keypoint in the leg keypoint subset.

[0103] In one embodiment, the above-mentioned step S23 includes: determining the parent key point corresponding to each key point based on a pre-acquired human skeletal structure diagram, wherein the parent key point of the root key point is itself; for each feature map: performing pairwise matching on at least one predicted coordinate corresponding to each key point and its parent key point, determining the affinity field between the two matched predicted coordinates, connecting the two predicted coordinates with the strongest affinity field, and obtaining the limb connection between each key point and its corresponding parent key point.

[0104] It should be noted that the affinity field prediction in the regression network is performed on a per-feature map basis, that is, the subset corresponding to each feature map includes the prediction results of multiple key points in the feature map, and the prediction result of each key point includes at least one predicted coordinate.

[0105] Step S24: obtaining first coordinates of multiple key points based on the confidence prediction results of the key points and the local affinity field prediction results.

[0106] Specifically, the local skeleton map corresponding to each feature map is obtained through the local affinity field prediction results. Then, according to the overlapping key point coordinates (that is, key points sharing the same position), all local skeleton maps are combined together to obtain the whole body skeleton map, that is, the first coordinates of multiple key points.

[0107] It should be noted that when the predicted coordinates of a key point at the same position in different local skeleton images are inconsistent, the predicted coordinate with a higher confidence level is selected as the position of the key point.

[0108] The following describes in detail the training process of a deep convolutional neural network with reference to specific embodiments.

[0109] FIG5 is a schematic flow chart of a training method for a deep convolutional neural network provided by an embodiment of the present disclosure. As shown in FIG5 , the training method includes steps S01 to S04:

[0110] Step S01: After the detection network obtains the confidence prediction result, the confidence loss function is calculated to determine whether the preset confidence loss function threshold is met.

[0111] Among them, the confidence loss function E d Can be positioned as h i,l and The cross entropy can be expressed by formula 5:

[0112] in, is the predicted coordinate of the i-th key point in the feature map l, h i,l The value is 0 or 1. Specifically, when the detection network can detect the i-th key point in the feature map l, that is, the i-th key point is unobstructed, h i,l The value is 1, otherwise it is 0.

[0113] It should be noted that in this embodiment, the detection network predicts all feature maps and all key points simultaneously, that is, multiple tasks coexist. Therefore, even if a key point is occluded, prediction can be made based on other key points.

[0114] Step S02: After the regression network obtains the local affinity vector field prediction result, the local affinity vector field loss function is calculated to determine whether it meets a preset local affinity vector field loss function threshold.

[0115] Among them, the local affinity vector field loss function E r It can be expressed by formula 6:

[0116] Among them, R i and are the true coordinates and predicted coordinates of the i-th key point respectively.

[0117] Step S03: Calculate the sum of the confidence loss function and the local affinity vector field loss function to determine whether it meets a preset target loss function threshold.

[0118] Step S04: When the confidence loss function, the local affinity vector field loss function, and the sum of the two all meet the preset threshold requirements, the deep convolutional neural network training is completed.

[0119] It should be noted that the above-mentioned preset credibility loss function threshold, preset local affinity vector field loss function threshold, and target loss function threshold can all be adjusted by those skilled in the art according to training requirements, and the embodiments of the present disclosure are not limited to this.

[0120] The method for determining the first coordinates of each key point in the camera coordinate system, that is, the above-mentioned step S3, is described in detail below with reference to specific embodiments.

[0121] In some embodiments, the above step S3 includes:

[0122] Step S31 : Mapping the first coordinates of each key point corresponding to the target object into the second coordinates in the geodetic coordinate system according to a pre-acquired conversion algorithm between the camera coordinate system and the geodetic coordinate system.

[0123] Step S32 : forming a mapping graph corresponding to the target object using each second coordinate as a vertex.

[0124] Specifically, the mapping graph is an N-gon, where N is an integer greater than 3. In one embodiment, step S32 includes:

[0125] Divide the mapping graph into N-2 triangles, where N-2 triangles are triangles composed of N-2 edges that are not adjacent to the preset vertex and the preset vertex. For example, one of the vertices A of the N-sided polygon i To preset vertices, i Non-adjacent vertices and A i Connect to form N-2 triangles.

[0126] According to the second coordinates of each key point corresponding to the target object, calculate the centroid coordinates G of each triangle i (x i ,y i ) and area σ i , where the center of gravity coordinate G i It can be calculated by formula 1, the area σ i It can be calculated by formula 2.

[0127] Among them, x1, x2, and x3 are the horizontal coordinates of the three vertices of the triangle, and y1, y2, and y3 are the vertical coordinates of the three vertices of the triangle.

[0128] According to the centroid coordinates G of each triangle i (x i ,y i ) and area σ i , determine the center of gravity coordinates G of the mapping figure g (x g ,y g ), and use the center of gravity coordinates as the geographic coordinates of the target object, which can be calculated by Formula 3.

[0129] In some embodiments, as shown in FIG3 , the method further includes steps S5 and S6:

[0130] Step S5 , calculating a homography matrix between the geographic coordinates of the preset reference point and the image coordinates in the image to be processed according to the geographic coordinates of the preset reference point in the image to be processed and the image coordinates of the preset reference point in the image to be processed.

[0131] In an example, the image coordinates of the preset reference point in the image to be processed can be expressed as (u, v), and its actual geographic coordinates can be expressed as (X, Y), and the homography matrix H can be calculated using Formula 4.

[0132] It should be noted that the homography matrix H is a 3*3 vector, which is used to map reference points in different coordinate systems and perform three-dimensional homogeneous vector linear transformations on them. Therefore, during the calculation process, the coordinates of the reference points in the geodetic coordinate system and the image coordinate system need to be converted into three-dimensional coordinates, that is, the coordinates (u, v) in the image coordinate system and the coordinates (X, Y) in the geodetic coordinate system are assigned to 1.

[0133] Step S6: determining the image coordinates of the target object in the image to be processed according to the homography matrix.

[0134] The establishment of the homography matrix can realize the conversion between the image coordinate system and the geodetic coordinate system, so as to directly obtain the geographic location of the target object from the image, thereby improving the positioning efficiency.

[0135] Based on the same inventive concept as above, an embodiment of the present disclosure provides a positioning device.

[0136] FIG6 is a schematic structural diagram of a positioning device provided by an embodiment of the present disclosure. As shown in FIG6 , the positioning device includes:

[0137] An acquisition module 61 is configured to acquire an image to be processed, where the image to be processed includes a target object;

[0138] a detection module 62 configured to perform key point detection on the target object and determine first coordinates of a plurality of key points of the target object in a camera coordinate system;

[0139] The processing module 63 is configured to project each key point in the camera coordinate system into the earth coordinate system to obtain a mapping graph with each key point as a vertex;

[0140] The calculation module 64 is configured to calculate the coordinates of the center of gravity of the mapping graphic and use the coordinates of the center of gravity as the geographic coordinates of the target object.

[0141] The principle of the problem solved by the positioning device in the embodiment of the present disclosure is similar to the principle of the problem solved by the above-mentioned positioning method in the embodiment of the present disclosure, and will not be repeated here.

[0142] Figure 7 is a schematic diagram of the structure of a positioning device provided in an embodiment of the present disclosure. As shown in Figure 7, positioning device 100 includes: memory 101, processor 102, and bus 103. Memory 101 stores a computer program, wherein the computer program, when executed by processor 102, implements the aforementioned positioning method, for example, steps S1 to S4 in Figure 1a. Processor 102 communicates with memory 101 via bus 103, enabling processor 102 to execute the instructions mentioned in the aforementioned method embodiment.

[0143] Furthermore, the positioning device can be integrated into a mobile client. When used on the client, it can adaptively switch coordinates between the camera image resolution and the client image resolution based on the client's requirements for the directly viewed image resolution. Before converting the target object's image coordinates to geographic coordinates, the camera image resolution is converted to the client image resolution; after converting the target object's geographic coordinates to image coordinates, the client image resolution is converted to the camera image resolution.

[0144] Positioning device 100 can be a computing device such as a desktop computer, laptop, PDA, or cloud server. Positioning device 100 may include, but is not limited to, a processor 102 and a memory 101. Those skilled in the art will appreciate that FIG7 is merely an example of positioning device 100 and does not limit the scope of positioning device 100. Positioning device 100 may include more or fewer components than shown, or may combine certain components or have different components. For example, positioning device 100 may also include input / output devices and network access devices.

[0145] The processor 102 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor 102 may be a microprocessor or any conventional processor.

[0146] The memory 101 can be an internal storage unit of the positioning device 100, such as a hard disk or memory of the positioning device 100. The memory 101 can also be an external storage device of the positioning device 100, such as a plug-in hard disk equipped on the positioning device 100, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Furthermore, the memory 101 can also include both the internal storage unit of the positioning device 100 and an external storage device. The memory 101 is used to store the computer program and other programs and data required by the terminal device. The memory 101 can also be used to temporarily store data that has been output or is about to be output.

[0147] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0148] FIG8 is a schematic diagram of the structure of a non-transitory computer-readable storage medium provided in an embodiment of the present disclosure. As shown in FIG8 , a computer-readable storage medium 200 stores a computer program 201, wherein the computer program 201 implements the above-mentioned positioning method when executed by a processor, for example, implementing steps S1 to S4 in FIG1a. The computer-readable storage medium 200 includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage device, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media generally contain computer-readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.

[0149] It is understood that the above embodiments are merely exemplary embodiments for illustrating the principles of the present disclosure, and the present disclosure is not limited thereto. Various modifications and improvements can be made to the common technical objects in the art without departing from the spirit and essence of the present disclosure, and such modifications and improvements are also considered to be within the scope of protection of the present disclosure.

Claims

1. A positioning method, wherein: The method comprises: Acquire an image to be processed, wherein the image to be processed includes a target object; Performing key point detection on the target object to determine first coordinates of a plurality of key points of the target object in a camera coordinate system; Project each key point in the camera coordinate system to the earth coordinate system to obtain a mapping figure with each key point as a vertex; The center of gravity coordinates of the mapping graph are calculated, and the center of gravity coordinates are used as the geographic coordinates of the target object.

2. The positioning method according to claim 1, wherein: The step of detecting key points of the target object and determining first coordinates of each key point in a camera coordinate system includes: The image to be processed is input into a pre-trained deep convolutional neural network to obtain first coordinates of multiple key points in a camera coordinate system corresponding to the target object.

3. The positioning method according to claim 2, wherein: The deep convolutional neural network includes a preprocessing network and a dual-branch network, and the dual-branch network includes a detection network and a regression network. The step of inputting the image to be processed into a pre-trained deep convolutional neural network to obtain first coordinates of a plurality of key points in a camera coordinate system corresponding to the target object includes: Inputting the image to be processed into the preprocessing network to extract features, and obtaining a feature atlas, wherein the feature atlas includes a plurality of feature maps, the feature atlas includes the target object, and the feature map includes at least one key point; Inputting the feature atlas into the detection network to obtain the confidence prediction result of each key point; The feature atlas and the confidence prediction results of each key point are input into the regression Network, get the local affinity field prediction results of key points; Obtaining first coordinates of the plurality of key points according to the confidence prediction results of the key points and the local affinity field prediction results; The confidence prediction result is used to represent the predicted position of the key point, and the local affinity field prediction result is used to represent the association relationship between the predicted positions.

4. The positioning method according to claim 3, wherein: The step of inputting the feature atlas into the detection network to obtain the confidence prediction result of each key point includes: Detecting the feature atlas to determine a plurality of initial coordinates of each key point in each feature atlas and a confidence value corresponding to each initial coordinate; At least one initial coordinate having a confidence value greater than a preset threshold is determined as the predicted coordinate of the key point, and the confidence prediction result of the key point includes at least one predicted coordinate.

5. The positioning method according to claim 4, wherein: Inputting the feature atlas and the confidence prediction results of each key point into the regression network to obtain the local affinity field prediction results of the key point, including: According to the human skeleton structure diagram obtained in advance, the parent key point corresponding to each key point is determined, wherein the parent key point of the root key point is itself; For each feature map, perform the following steps: Matching each key point in the feature graph with at least one predicted coordinate corresponding to its parent key point in pairs, and determining an affinity field between the two matched predicted coordinates; Connect the two predicted coordinates with the strongest affinity field to form a limb connection between the keypoint and its corresponding parent keypoint; According to all limb connections in the feature map, a local skeleton map corresponding to the feature map is formed.

6. The positioning method according to claim 5, wherein: According to the confidence prediction result of the key point and the local affinity field prediction result, the first coordinates of the plurality of key points are obtained, including: Based on the local skeleton map corresponding to each feature map, the key points at the same position in different local skeleton maps are combined and spliced ​​to determine the complete skeleton map of the target object; wherein, when the predicted coordinates of the key points at the same position in different local skeleton maps are inconsistent, the predicted coordinates with high confidence are selected as the position of the key point; According to the complete skeleton graph, first coordinates of the plurality of key points are obtained.

7. The positioning method according to claim 3, wherein: Before inputting the image to be processed into a pre-trained deep convolutional neural network, the method further includes: After the detection network obtains the confidence prediction result, a confidence loss function is calculated to determine whether a preset confidence loss function threshold is met; After the regression network obtains the prediction result of the local affinity vector field, a local affinity field loss function is calculated to determine whether a preset local affinity vector field loss function threshold is met; Calculating the sum of the confidence loss function and the local affinity field loss function to determine whether a preset target loss function threshold is met; When the confidence loss function, the local affinity field loss function and the sum of the two all meet the preset threshold requirements, the deep convolutional neural network training is completed.

8. The positioning method according to claim 7, wherein: The confidence loss function is calculated by the following formula: in, is the predicted coordinate of the i-th key point in the feature map l, h i,l The value is 0 or 1. When the i-th key point is not blocked in the feature map l, h i,l The value is 1, otherwise it is 0.

9. The positioning method according to claim 7, wherein: The local affinity field loss function is calculated by the following formula: Among them, R i and are respectively the real coordinates and predicted coordinates of the i-th key point, and the real coordinates are pre-acquired sample data.

10. The positioning method according to claim 1, wherein: The object includes a human body, and the key points include a head, a neck, a right shoulder, a right elbow, a right wrist, a right hand, a left shoulder, a left elbow, a left wrist, a left hand, a back, a waist, a right hip, a right knee, a right ankle, a left hip, a left knee, and a left ankle.

11. The positioning method according to claim 1, wherein: The projecting of each key point in the camera coordinate system to the earth coordinate system to obtain a mapping graph with each key point as a vertex includes: According to a conversion algorithm between a camera coordinate system and a geodetic coordinate system acquired in advance, the first coordinates of each key point corresponding to the target object are mapped into second coordinates in the geodetic coordinate system; A mapping graph corresponding to the target object is formed with each second coordinate as a vertex.

12. The positioning method according to claim 11, wherein: The mapping figure is an N-gon, where N is an integer greater than 3; The step of calculating the barycentric coordinates of the mapping graph and using the barycentric coordinates as the geographic coordinates of the target object includes: Divide the mapping graph into N-2 triangles, where the N-2 triangles are triangles formed by N-2 edges that are not adjacent to the preset vertex and the preset vertex; Calculating the centroid coordinates and area of ​​each triangle according to the second coordinates of each key point corresponding to the target object; According to the barycentric coordinates and area of ​​each triangle, the barycentric coordinates of the mapping figure are determined, And the center of gravity coordinates are used as the geographic coordinates of the target object.

13. The positioning method according to claim 12, wherein: The center of gravity coordinates of the mapping graph are calculated by the following formula: Among them, x i ,y i Respectively represent the abscissa and ordinate of the centroid coordinates of the i-th triangle, σ i represents the area of ​​the i-th triangle.

14. The positioning method according to claim 1, wherein: The method further comprises: Calculating a homography matrix between the geographic coordinates and the image coordinates of a reference point according to the geographic coordinates of a preset reference point in the image to be processed and the image coordinates of the preset reference point in the image to be processed; The image coordinates of the target object in the image to be processed are determined according to the homography matrix.

15. The positioning method according to claim 14, wherein: The homography matrix between the geographic coordinates of the reference point and the image coordinates is calculated by the following formula: Among them, H represents the homography matrix, u, v represent the horizontal and vertical coordinates of the image coordinates, and X, Y represent the horizontal and vertical coordinates of the geographic coordinates, respectively.

16. A positioning device, wherein: The device comprises: An acquisition module is configured to acquire an image to be processed, wherein the image to be processed includes a target object; A detection module is configured to detect key points of the target object and determine the target The first coordinates of multiple key points of the object in the camera coordinate system; A processing module is configured to project each key point in the camera coordinate system to the earth coordinate system to obtain a mapping graph with each key point as a vertex; The calculation module is configured to calculate the center of gravity coordinates of the mapping figure and use the center of gravity coordinates as the geographic coordinates of the target object.

17. A positioning device, wherein: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the positioning method according to any one of claims 1 to 15 are performed.

18. A computer non-transitory readable storage medium, wherein: The computer non-volatile readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the positioning method according to any one of claims 1 to 15 are executed.

Citation Information

Patent Citations

  • Network training method and system, monitoring method and system, storage medium and computer equipment

    CN110929584A

  • Spatial non-cooperative target relative pose estimation method based on deep learning

    CN111862201A

  • Pedestrian abnormal behavior detection method and system, terminal and storage medium

    CN112163537A

  • Human body posture recognition method and system based on key point detection technology

    CN114067358A