CN117333542A - Position detection method and device - Google Patents

Position detection method and device Download PDF

Info

Publication number
CN117333542A
CN117333542A CN202210745501.7A CN202210745501A CN117333542A CN 117333542 A CN117333542 A CN 117333542A CN 202210745501 A CN202210745501 A CN 202210745501A CN 117333542 A CN117333542 A CN 117333542A
Authority
CN
China
Prior art keywords
target
detection
detection frame
information
target area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210745501.7A
Other languages
Chinese (zh)
Inventor
赵启东
高语函
李正义
孙菁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Hisense Electronic Technology Services Co ltd
Original Assignee
Qingdao Hisense Electronic Technology Services Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Hisense Electronic Technology Services Co ltd filed Critical Qingdao Hisense Electronic Technology Services Co ltd
Priority to CN202210745501.7A priority Critical patent/CN117333542A/en
Publication of CN117333542A publication Critical patent/CN117333542A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30232Surveillance

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the invention provides a position detection method and device, comprising the following steps: acquiring information of a target area and information of an analysis area, wherein the information of the analysis area comprises a target to be detected; determining at least two first detection frames according to the information of the analysis area; determining a second detection frame according to the position between two adjacent first detection frames; and acquiring the characteristic information of the target in the second detection frame, and determining whether the target enters the target area according to the characteristic information of the target and the information of the target area. The position between two adjacent first detection frames can be used for determining that part of the first detection frames are second detection frames, part of the first detection frames are complete detection frames, the shape of the second detection frames is restored by predicting the shielded part in the second detection frames, whether the shielded target enters the target area can be accurately judged by the position between the restored second detection frames and the target area, and further the accuracy of judging whether the target enters the target area is improved.

Description

Position detection method and device
Technical Field
The present invention relates to the technical field, and in particular, to a position detection method and apparatus.
Background
Along with the continuous development of economy, the range of motion of people is larger and larger, but target areas such as power plants, mines and the like exist, non-staff cannot enter, and in order to ensure the life safety of people, the target areas can be monitored by using a pedestrian detection alarm system, so that when the non-staff enter the target areas, the non-staff can give an alarm in time and inform related staff of timely treatment.
The existing pedestrian detection alarm system is characterized in that a pedestrian is framed by a pedestrian detection frame, and then whether the pedestrian enters a target area is judged according to the relative position of the pedestrian detection frame and the target area. However, in a multi-person scene, a shielding phenomenon exists between pedestrians, so that the whole body of the pedestrian cannot be completely framed by the pedestrian detection frame, and whether the pedestrian enters the target area or not is judged inaccurately according to the relative position of the pedestrian detection frame and the target area.
In summary, how to improve the accuracy of determining whether a pedestrian enters a target area is a technical problem that needs to be solved currently.
Disclosure of Invention
The position detection method and device provided by the embodiment of the invention are used for solving the inaccurate problem of judging whether the pedestrians enter a target area or not due to shielding among the pedestrians in the prior art.
In a first aspect, a position detection method includes: acquiring information of a target area and information of an analysis area, wherein the information of the analysis area comprises a target to be detected, determining at least two first detection frames according to the information of the analysis area, determining a second detection frame according to positions between two adjacent first detection frames, acquiring characteristic information of the target in the second detection frame, and determining whether the target enters the target area according to the characteristic information of the target and the information of the target area.
According to the embodiment of the invention, according to the positions between two adjacent first detection frames, which first detection frames are shielding detection frames, namely second detection frames, which are complete detection frames, the original shape of the second detection frames is restored by predicting the shielded parts in the second detection frames, and according to the position relation between the restored second detection frames and the target area, whether the shielded target enters the target area can be accurately judged, and further the accuracy of judging whether the target enters the target area can be improved.
Optionally, the determining at least two first detection frames according to the information of the target area and the information of the analysis area includes: inputting the information of the analysis area into a target detection tracking algorithm to obtain N third detection frames, N marks of the third detection frames, N coordinate positions of the third detection frames and N first confidence degrees of the third detection frames, wherein N is an integer larger than 1; and determining the first detection frames according to the N third detection frames, the identification of the N third detection frames, the coordinate positions of the N third detection frames, the first confidence degrees of the N third detection frames and the information of the target area.
In the embodiment of the invention, according to the N third detection frames, the identifications of the N third detection frames, the coordinate positions of the N third detection frames and the first confidence degrees of the N third detection frames, some detection frames corresponding to non-targets can be screened out, and a fourth detection frame can be obtained by combining the several third detection frames, so that the workload of judging whether a target to be detected enters a target area later is reduced, and then the fourth detection frame far away from the target area is screened out, thereby improving the efficiency of judging whether the target enters the target area.
Optionally, the determining the first detection frame according to the N third detection frames, the identification of the N third detection frames, the coordinate positions of the N third detection frames, the first confidence degrees of the N third detection frames, and the information of the target area includes: determining a fourth detection frame and a coordinate position of the fourth detection frame according to the identification of the third detection frame, the coordinate position of the third detection frame and the first confidence coefficient of the third detection frame; and if the distance between the coordinate position of the fourth detection frame and the target area is smaller than a first threshold value, determining the fourth detection frame as a first detection frame.
In the embodiment of the invention, in order to accurately and rapidly judge whether the target to be detected enters the target area, the fourth detection frame corresponding to the target to be detected, which is close to the target area, needs to be screened out, so that the workload of subsequent analysis of the fourth detection frame can be reduced, and the efficiency of judging whether the target to be detected enters the target area is improved.
Optionally, the determining the second detection frame according to the position between the two adjacent first detection frames includes: calculating a first intersection ratio between a fifth detection frame and a sixth detection frame, wherein the fifth detection frame and the sixth detection frame are the two adjacent first detection frames; if the first intersection ratio is greater than a second threshold, determining a first position of the fifth detection frame and a second position of the sixth detection frame, wherein the first position is a position of the fifth detection frame farthest from the target area, and the second position is a position of the sixth detection frame farthest from the target area; if the difference value between the first position of the fifth detection frame and the second position of the sixth detection frame is smaller than the third threshold value, determining a first height of the fifth detection frame and a second height of the sixth detection frame; and determining the second detection frame according to the first height of the fifth detection frame and the second height of the sixth detection frame.
In the embodiment of the invention, the size relation between the first intersection ratio of two adjacent first detection frames and the second threshold value is compared, so that which detection frames are shielding detection frames and which detection frames are complete detection frames can be determined, the shielding detection frames are screened out, the missing part of the shielding detection frames can be predicted and perfected conveniently, and the accuracy of judging whether a target enters a target area is improved.
Optionally, the determining whether the target enters the target area according to the feature information of the target includes: inputting the characteristic information of the target into a prediction model to obtain a seventh detection frame of the target and a third position of the seventh detection frame, wherein the third position is the position of the seventh detection frame nearest to the target area; and determining whether the target enters the target area according to the information of the third position of the seventh detection frame and the target area.
In the embodiment of the invention, whether the target enters the target area can be accurately judged according to the distance between the third position of the seventh detection frame and the target area.
Optionally, if it is determined that the target is entering the target area; the method further comprises the steps of: and determining the moment when the target enters the target area.
In the embodiment of the invention, when the target enters the target area, the time when the target enters the target area is recorded, so that the subsequent related personnel can conveniently perform related processing according to the time when the target enters the target area.
Optionally, after determining that the target is entering the target area, the method further includes: inputting the seventh detection frame into a face recognition algorithm to obtain a face image and a second confidence coefficient of the face image; and if the second confidence coefficient of the face image is larger than the fourth threshold value, determining the face image as a target image.
In the embodiment of the invention, after the target is determined to enter the target area, the target image can be determined, so that the target entering the target area can be conveniently and quickly found by related personnel.
Optionally, the feature information of the target includes: the identification of the target, the size of the target, the center position of the target.
According to the embodiment of the invention, whether the target enters the target area can be accurately judged according to the characteristic information of the target, so that the accuracy of judging whether the pedestrian enters the target area is improved.
Optionally, the acquiring the information of the target area and the information of the analysis area includes: acquiring a monitoring video; analyzing the monitoring video into multi-frame monitoring images; and determining the information of the analysis area and the information of the target area according to the multi-frame monitoring image.
In the embodiment of the invention, as targets are not present in all areas in the monitoring image, the areas with targets in the monitoring image are required to be divided first and determined as the analysis areas, and then the subsequent rapid judgment of whether the targets enter the target areas can be realized by only analyzing the analysis areas with targets.
In a second aspect, a position detection apparatus includes: an acquisition unit configured to acquire information of a target area and information of an analysis area, the information of the analysis area including a target to be detected; the processing unit is used for determining at least two first detection frames according to the information of the analysis area; determining a second detection frame according to the position between two adjacent first detection frames; acquiring characteristic information of a target in the second detection frame; and determining whether the target enters the target area according to the characteristic information of the target and the information of the target area.
Optionally, the processing unit is configured to: inputting the information of the analysis area into a target detection tracking algorithm to obtain N third detection frames, N marks of the third detection frames, N coordinate positions of the third detection frames and N first confidence degrees of the third detection frames, wherein N is an integer larger than 1; and determining the first detection frames according to the N third detection frames, the identification of the N third detection frames, the coordinate positions of the N third detection frames, the first confidence degrees of the N third detection frames and the information of the target area.
Optionally, the processing unit is configured to: determining a fourth detection frame and a coordinate position of the fourth detection frame according to the identification of the third detection frame, the coordinate position of the third detection frame and the first confidence coefficient of the third detection frame; and if the distance between the coordinate position of the fourth detection frame and the target area is smaller than a first threshold value, determining the fourth detection frame as a first detection frame.
Optionally, the processing unit is configured to: calculating a first intersection ratio between a fifth detection frame and a sixth detection frame, wherein the fifth detection frame and the sixth detection frame are the two adjacent first detection frames; if the first intersection ratio is greater than a second threshold, determining a first position of the fifth detection frame and a second position of the sixth detection frame, wherein the first position is a position of the fifth detection frame farthest from the target area, and the second position is a position of the sixth detection frame farthest from the target area; if the difference value between the first position of the fifth detection frame and the second position of the sixth detection frame is smaller than the third threshold value, determining a first height of the fifth detection frame and a second height of the sixth detection frame; and determining the second detection frame according to the first height of the fifth detection frame and the second height of the sixth detection frame.
Optionally, the processing unit is configured to: inputting the characteristic information of the target into a prediction model to obtain a seventh detection frame of the target and a third position of the seventh detection frame, wherein the third position is the position of the seventh detection frame nearest to the target area; and determining whether the target enters the target area according to the information of the third position of the seventh detection frame and the target area.
Optionally, the processing unit is configured to: and determining the moment when the target enters the target area.
Optionally, the processing unit is configured to: inputting the seventh detection frame into a face recognition algorithm to obtain a face image and a second confidence coefficient of the face image; and if the second confidence coefficient of the face image is larger than the fourth threshold value, determining the face image as a target image.
Optionally, the processing unit is configured to: the characteristic information of the target comprises: the identification of the target, the size of the target, the center position of the target.
Optionally, the acquiring unit is configured to: acquiring a monitoring video; analyzing the monitoring video into multi-frame monitoring images; and determining the information of the analysis area and the information of the target area according to the multi-frame monitoring image.
In a third aspect, an embodiment of the present invention provides a computing device, including at least one processor and at least one memory, where the memory stores a computer program that, when executed by the processor, causes the processor to perform the position detection method described in any of the first aspects above.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium storing a program, which when executed on a computer, causes the computer to implement the position detection method according to any of the first aspects.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it will be apparent that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a possible application scenario provided in an embodiment of the present invention;
fig. 2 is a schematic diagram of another possible application scenario provided in an embodiment of the present invention;
FIG. 3 is a flowchart of a position detection method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a target area according to an embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating a first detection frame according to an embodiment of the present invention;
FIG. 6 is a flowchart of a method for obtaining information of a target area and information of an analysis area according to an embodiment of the present invention;
FIG. 7a is a schematic diagram of an exemplary embodiment of an analysis area;
FIG. 7b is a schematic illustration of another exemplary embodiment of an analysis area defined by the present invention;
FIG. 8a is a schematic diagram of defining a plurality of analysis areas according to an embodiment of the present invention;
FIG. 8b is a schematic diagram of another embodiment of the present invention defining a plurality of analysis areas;
FIG. 8c is a schematic diagram of a further exemplary embodiment of the present invention defining a plurality of analysis areas;
FIG. 9 is a flowchart of a method for determining a first detection frame according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of a third detection frame according to an embodiment of the present invention;
FIG. 11 is a flowchart of a method for determining a second detection frame according to an embodiment of the present invention;
FIG. 12 is a schematic view of an analysis region according to an embodiment of the present invention;
FIG. 13 is a flowchart of a method for determining whether a target enters a target area according to an embodiment of the present invention;
fig. 14 is a diagram showing a positional relationship between a third position of a seventh detection frame and a target area according to an embodiment of the present invention;
FIG. 15 is a flowchart of a method for determining a target image according to an embodiment of the present invention;
fig. 16 is a schematic structural diagram of a position detecting device according to an embodiment of the present invention;
fig. 17 is a schematic structural diagram of a computing device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1, a schematic diagram of a possible application scenario is provided for an embodiment of the present invention. The application scenario is exemplified by a certain target area and a certain safety area, and the safety area is exemplified by a pedestrian 101, a pedestrian 102, and a pedestrian 103, a pedestrian 104, and a camera 105. Wherein there is a boundary between the safe area and the target area, when the pedestrian crosses the boundary from the safe area, the pedestrian enters the target area, and the pedestrian 101, the pedestrian 102, the pedestrian 103 and the pedestrian 104 are currently located in the safe area, so as to prevent the pedestrian 101, the pedestrian 102, the pedestrian 103 and the pedestrian 104 from crossing the boundary and entering the target area, the camera 105 is used to monitor the walking track of the pedestrian. Wherein the camera 105 is generally positioned high in the center of the target area to facilitate the overall clear capture of the trail of pedestrians.
In one possible case, the real-time video is parsed according to the real-time video monitored by the camera 105, and the pedestrians 101, 102, 103 and 104 are framed by the pedestrian detection frame, wherein the pedestrians 101 correspond to the pedestrian detection frame 106, the pedestrians 102 correspond to the pedestrian detection frame 107, the pedestrians 103 correspond to the pedestrian detection frame 108 and the pedestrians 104 correspond to the pedestrian detection frame 109. Whether a pedestrian enters a target area is generally determined by whether the foot of the pedestrian crosses a boundary in the target area, wherein if the pedestrian is completely framed by the pedestrian detection frame, the foot of the pedestrian corresponds to the position of the lower edge of the pedestrian detection frame. Therefore, whether or not a pedestrian enters the target area can be determined by the relative position of the boundary line of the target area according to the position of the lower edge of the pedestrian detection frame.
Fig. 2 is a schematic diagram of another possible application scenario provided in an embodiment of the present invention. Here, there is no shielding between the pedestrian 201 and the pedestrian 202, and therefore, the pedestrian detection frame 206 of the pedestrian 201 and the pedestrian detection frame 207 of the pedestrian 202 are complete pedestrian detection frames. If there is an occlusion between the pedestrian 203 and the pedestrian 204, then the pedestrian 203 and the pedestrian 204 are determined to be occluded pedestrians. The pedestrian detection frame 208 of the pedestrian 203 does not completely frame the pedestrian 203, but only partially frames the pedestrian 203, and the same, the pedestrian detection frame 209 of the pedestrian 204 does not completely frame the pedestrian 204, but only partially frames the pedestrian 204, wherein the lower edge position of the pedestrian detection frame 208 corresponds to the foot that is not the pedestrian 203, and the lower edge position of the pedestrian detection frame 209 corresponds to the foot that is not the pedestrian 204. This results in the pedestrians 203 and 204 having crossed the boundary into the target area, but since the lower edge position of the pedestrian detection frame 208 corresponding to the pedestrian 203 does not cross the boundary, it is determined that the pedestrian 203 does not enter the target area, and similarly, it is determined that the pedestrian 204 does not enter the target area. Therefore, it is not reasonable to judge whether or not a pedestrian enters the target area based on the relative position between the lower edge position of the pedestrian detection frame corresponding to the blocked pedestrian and the boundary of the target area.
According to the above-mentioned situation, it can be known that a larger error exists in judging whether the pedestrian enters the target area according to the relative position between the lower edge position of the pedestrian detection frame and the boundary of the target area, so that whether the pedestrian enters the target area cannot be accurately judged according to the pedestrian detection frame corresponding to the blocked pedestrian. Therefore, accuracy in judging whether the pedestrian enters the target area according to the relative position between the lower edge position of the pedestrian detection frame and the boundary of the target area is reduced.
In view of this, the method for detecting a position provided by the embodiment of the invention can realize more accurate judgment of whether the blocked pedestrian enters the target area.
As shown in fig. 3, a flowchart of a position detection method according to an embodiment of the present invention is provided, and the method includes the following steps:
step 301, obtaining information of a target area and information of an analysis area.
In the embodiment of the present invention, as shown in fig. 4, a schematic diagram of a target area is provided in the embodiment of the present invention. The demarcation of the target area may be preset, or may be determined according to specific situations, and is not limited herein. After the target area is defined, information of the target area can be acquired, wherein the information of the target area comprises information such as the area of the target area, a boundary line between the target area and the safety area, the coordinate position of the target area and the like. The analysis area is a region captured by a camera, wherein the analysis area can be a safety area, a partial safety area, a target area, a partial target area, a target area and a safety area, and a partial safety area and a partial target area, and the analysis area is taken as an example of the partial safety area for the convenience of description. The information of the analysis area comprises an object to be detected, the area of the analysis area and the coordinate position of the analysis area. The targets to be detected include 401, 402, 403, and 404.
Step 302, determining at least two first detection frames according to the information of the analysis area.
In the embodiment of the invention, the information of the analysis area is input into the target detection tracking algorithm, and at least two first detection frames are output, wherein the first detection frames are used for framing the target to be detected by the first detection frames. Fig. 5 is a schematic diagram illustrating a first detection frame according to an embodiment of the present invention. For example, if there are 4 targets to be detected, one camera is used, the targets to be detected are 501, 502, 503 and 504, and the camera is 505, then the first detection frame corresponding to the target to be detected 501 is 506, the first detection frame corresponding to the target to be detected 502 is 507, the first detection frame corresponding to the target to be detected 503 is 508, and the first detection frame corresponding to the target to be detected 504 is 509.
Step 303, determining a second detection frame according to the position between the two adjacent first detection frames.
In the embodiment of the invention, if the positions between the two adjacent first detection frames are close, the two adjacent first detection frames are determined to have shielding, and it can be understood that the first detection frames do not cover the whole detected target, so that the first detection frames with shielding are determined to be the second detection frames, and whether the target corresponding to the second detection frames enters the target area can be accurately judged according to the second detection frames, thereby improving the accuracy of judging whether the pedestrian enters the target area.
And step 304, obtaining characteristic information of the target in the second detection frame.
In the embodiment of the invention, according to the second detection frame, the characteristic information of the target in the second detection frame can be acquired based on the target detection or segmentation model. Specifically, the second detection frame is input to the object detection or segmentation model, and the feature information of the object in the second detection frame is output. The characteristic information of the target in the second detection frame comprises the identification of the target, the size of the target and the center position of the target. If the object is a pedestrian, the object is identified as a pedestrian, the object size can be divided into a face size and a head size, and the center position of the object can be divided into a head center position and a face center position, which can be seen in table 1. It should be noted that, in order to make the obtained feature information more accurate, the object detection or segmentation model may screen some unclear objects, where the requirements for screening the objects may be preset or determined according to specific situations, which is not limited herein. For example, if the target is a pedestrian a wearing a hat, the requirement for screening the target is that the face is not blocked, and the pedestrian a is screened out because the pedestrian a wears the hat to cover the face.
Table 1 characteristic information table of objects
Pedestrian Face size Face center position Human head size Center position of human head
ID_1 30*38 (410,1100) 30*38 (410,1100)
ID_2 34*35 (812,958) 34*35 (812,958)
ID_3 48*52 (732,800) 48*52 (732,800)
Step 305, judging whether the target enters the target area according to the characteristic information of the target and the information of the target area. If yes, go to step 306, if no, go to step 307.
In the embodiment of the invention, the ratio of the head to the height of the person is 1:7, a certain rule exists between the size and the height of the head. The size of the head or the face in the seventh detection frame has a mapping relation with the overall size of the human body, and the prediction model can predict the overall size of the human body by using the characteristics such as the size of the head or the face. Specifically, the prediction model may be a regression model or other prediction models, and is not limited herein. For convenience of description of the present solution, a prediction model is taken as an example of a regression model. And establishing a regression model according to the data of the historical non-shielding pedestrians, and further predicting a complete detection frame of the pedestrians based on the regression model. The regression model is built in an offline process, and firstly, images of pedestrians in a historical non-occlusion area are collected to build a non-occlusion pedestrian database. And then establishing a regression model according to the characteristic information in the non-occlusion pedestrian database, wherein the regression model comprises but is not limited to linear regression and nonlinear regression methods, such as polynomial regression, principal component analysis regression, neural network regression, partial least squares regression, ridge regression and the like. And then inputting the characteristic information of the target in the second detection frame into the prediction model, and outputting a seventh detection frame and a third position of the seventh detection frame, wherein the second detection frame is a shielding detection frame, the seventh detection frame is a complete detection frame corresponding to the second detection frame for prediction, and the third position of the seventh detection frame is a position of the seventh detection frame nearest to the target area. And determining whether the target enters the target area according to the position relation between the third position of the seventh detection frame and the boundary line in the target area. If the distance between the third position of the seventh detection frame and the position of the boundary line of the target area is smaller than the first distance threshold value, determining that the target corresponding to the seventh detection frame enters the target area, and if the distance between the third position of the seventh detection frame and the position of the boundary line of the target area is not smaller than the first distance threshold value, determining that the target corresponding to the seventh detection frame does not enter the target area.
At step 306, the target enters the target area.
In the embodiment of the invention, according to the fact that the distance between the third position of the seventh detection frame and the position of the boundary line of the target area is smaller than the first distance threshold value, the target corresponding to the seventh detection frame is determined to enter the target area, whether the blocked target enters the target area can be accurately judged, and further the accuracy of judging whether the target enters the target area can be improved.
In step 307, the target does not enter the target area.
According to the steps 301 to 307, it can be seen that according to the positions between two adjacent detection frames, which detection frames are the shielding detection frames and which detection frames are the complete detection frames, the original shape of the shielding detection frames is restored by predicting the shielded part in the shielding detection frames, and according to the position relationship between the restored shielding detection frames and the target area, whether the shielded target enters the target area can be accurately judged, and further the accuracy of judging whether the target enters the target area can be improved.
Fig. 6 is a flowchart of a method for acquiring information of a target area and information of an analysis area according to an embodiment of the present invention. The method comprises the following steps:
Step 601, obtaining a monitoring video.
In the embodiment of the invention, the monitoring video for real-time monitoring is obtained from the camera. A boundary line exists between the target area and the safety area, the camera is positioned at the center high position of the boundary line, and the camera can monitor the action track of the target near the target area in real time.
Step 602, analyzing the monitoring video into multi-frame monitoring images.
In the embodiment of the invention, the multi-frame monitoring image can be obtained by decoding the monitoring video, so that the action track of the target can be clearly determined according to the multi-frame monitoring image, and whether the target enters the target area can be accurately judged.
Step 603, determining information of the analysis area and information of the target area according to the multi-frame monitoring image. In the embodiment of the present invention, the target area may be preset or may be determined according to a specific situation, which is not limited herein. Therefore, the information of the target area in the corresponding monitoring image can be determined according to the multi-frame monitoring image, wherein the information of the target area is already described in detail in step 301, and will not be described herein. Because the monitoring image is divided into the area with the target and the blank area, the area with the target is needed to be analyzed later to judge whether the target enters the target area, and the blank area is the area without the target, so that analysis is not needed, and in order to improve the speed of judging whether the target enters the target area, the analysis area can be defined according to multiple frames of monitoring images. The information of the analysis area can be determined according to the delimited analysis area, wherein the information of the analysis area is already described in detail in step 301, and will not be described here. The monitoring image may be divided into a single analysis region, or a plurality of analysis regions may be divided into the monitoring image, and the analysis region is not limited to this, and is a region in which a target exists. The shape of the analysis area may be a regular pattern or an irregular pattern, and is not limited herein. If the analysis area is a regular pattern, the analysis area may be square, rectangular, or other regular patterns. Fig. 7a is a schematic diagram of defining an analysis area according to an embodiment of the present invention, wherein the analysis area is rectangular and belongs to a regular pattern, and fig. 7b is a schematic diagram of defining an analysis area according to another embodiment of the present invention, and the analysis area is an irregular pattern. As shown in fig. 8a, a schematic diagram is provided for defining a plurality of analysis areas according to an embodiment of the present invention, where the analysis areas are a combination of square and irregular patterns. As shown in fig. 8b, another schematic diagram of defining a plurality of analysis areas according to an embodiment of the present invention is shown, where the analysis areas are a combination of square and rectangle. As shown in fig. 8c, a schematic diagram of defining a plurality of analysis areas according to an embodiment of the present invention is provided, where the analysis areas are a combination of square, rectangle and irregular patterns.
As can be seen from steps 601 to 603, since not all the areas in the monitoring image have targets, the areas with targets in the monitoring image need to be divided first to be determined as analysis areas, and then by analyzing only the analysis areas with targets, it can be realized that whether the targets enter the target areas can be quickly determined later.
Fig. 9 is a flowchart of a method for determining a first detection frame according to an embodiment of the present invention. The method comprises the following steps:
step 901, inputting information of an analysis area into a target detection tracking algorithm, and obtaining N third detection frames, identifications of the N third detection frames, coordinate positions of the N third detection frames, and first confidence coefficients of the N third detection frames.
In the embodiment of the invention, the target detection and tracking algorithm comprises a target detection algorithm and a target tracking algorithm. The information of the analysis area is input into a target detection algorithm, and N third detection frames, the identifications of the N third detection frames, the coordinate positions of the N third detection frames and the first confidence of the N third detection frames are output. The target detection algorithm may be an object recognition and positioning algorithm of a (You Only Look Once, YOLO) deep neural network, a convolutional neural network deep learning algorithm, or other target detection algorithm, which is not limited herein. Wherein the object detection algorithm is configured to frame the object in the analysis area with a third detection frame. The information of the analysis area is input into a target tracking algorithm, and the identification of the N third detection frames and the coordinate positions of the N third detection frames are output, wherein the target tracking algorithm can be a multi-target tracking model or other target tracking algorithms, and is not limited herein. The target tracking algorithm is used for determining the action track of the target corresponding to the third detection frame according to the identification of the third detection frame and the coordinate position of the third detection frame.
Step 902, determining the first detection frame according to the N third detection frames, the identifiers of the N third detection frames, the coordinate positions of the N third detection frames, the first confidence degrees of the N third detection frames, and the information of the target area.
In the embodiment of the invention, the target detected by the target detection tracking algorithm has errors. Fig. 10 is a schematic diagram of a third detection frame according to an embodiment of the present invention. For example, if the object takes a person as an example and a pedestrian a and a pedestrian B exist in the analysis area, since a glass door exists in the analysis area, the pedestrian a walks against the glass door, and the glass door maps the shadow of the pedestrian a. At this time, the analysis area is input into the target detection algorithm, and three third detection frames are output, namely a third detection frame 1001 corresponding to the pedestrian a, a third detection frame 1002 corresponding to the pedestrian B, and a third detection frame 1003 corresponding to the shadow of the pedestrian a mapped by the glass door. Since only the pedestrian a and the pedestrian B are in the analysis area, but the analysis area is input into the target detection tracking algorithm, three third detection frames are output, namely 1001, 1002 and 1003, respectively, but 1003 is only the third detection frame corresponding to the shadow of the pedestrian a, and not the third detection frame corresponding to the pedestrian. Therefore, in order to accurately determine whether the target enters the target area according to the detection frame later, the third detection frame needs to be screened out, and the third detection frame corresponding to the non-target is screened out.
Screening the third detection frame is performed in two ways, wherein the first way is to screen according to the confidence level. If the target is a pedestrian, in order to prevent the person who is not the real pedestrian from being identified as the pedestrian, it is necessary to determine whether the first confidence level of the third detection frame is greater than the confidence level threshold, if the first confidence level of the third detection frame is greater than the confidence level threshold, it is indicated that the target in the third detection frame is the real pedestrian, and if the first confidence level of the third detection frame is not greater than the confidence level threshold, it is indicated that the target in the third detection frame is the non-real pedestrian. The non-real pedestrians may be the presence of a human poster in the analysis area, or the appearance of a glass map in the analysis area, or other non-real pedestrians, which are not limited herein.
To better describe the present solution, a non-maximum suppression (Non Maximum Suppression, NMS) method is described for screening out closely spaced target frames. For example, the picture a is input into a target detection tracking algorithm, 6 detection frames are output, Z, X, N, W, M, K are respectively determined, confidence levels of the 6 detection frames and coordinate positions corresponding to the 6 detection frames are respectively determined, and the order is made according to the confidence levels, wherein the confidence levels from small to large are Z < X < N < W < M < K. Starting from a detection frame K corresponding to the maximum confidence, judging whether the overlapping degree between Z, X, N, W, M and K is larger than a set threshold value or not respectively, if the overlapping degree between X and W and K is larger than the set threshold value, determining that X and W belong to a part of K, screening out X and W, merging X, W and K into a new detection frame U according to the coordinate positions of X, W and K, selecting M with the maximum confidence from the rest Z, N and M, if the overlapping degree between Z and N and M is larger than the set threshold value, determining that Z and N belong to a part of M, screening out Z and N, merging Z, N and M into a new detection frame J, and then judging that the overlapping degree between U and J is larger than the set threshold value, merging U and J into a new detection frame P, and obtaining the final detection frame P through screening and merging.
The second way is to screen according to the NMS method. See the above explanation and will not be repeated here. For example, if the target is only a pedestrian C, the analysis area is input into the target detection tracking algorithm, 3 third detection frames are output, and the centers of the detection frames respectively fall on the head of the pedestrian C, the upper body of the pedestrian C and the lower body of the pedestrian C. In this way, the pedestrian C corresponds to the three third detection frames, which may reduce the speed and accuracy of determining whether the pedestrian enters the target area, thereby reducing the efficiency and accuracy of determining whether the pedestrian enters the target area. Therefore, the third detection frame is required to be screened and combined according to the identifier corresponding to the third detection frame, the coordinate position corresponding to the third detection frame and the confidence coefficient corresponding to the third detection frame, so that the fourth detection frame is obtained, one target can be prevented from being framed by a plurality of detection frames, and the accuracy and the efficiency of judging whether the target enters the target area later are affected.
The fourth detection frames are obtained after screening and merging the third detection frames, so that the targets to be detected in the fourth detection frames in the analysis area can be determined, but because the area of the analysis area is larger, in order to accurately and rapidly judge whether the targets to be detected enter the target area, the fourth detection frames corresponding to the targets to be detected close to the target area need to be screened out, and therefore the workload of subsequent analysis of the fourth detection frames can be reduced, and the efficiency of judging whether the targets to be detected enter the target area is improved. Specifically, if the distance between the fourth detection frame and the target area is smaller than the first threshold value, determining the fourth detection frame as the first detection frame, wherein the target to be detected in the first detection frame is the target to be detected close to the target area. If the distance between the fourth detection frame and the target area is not smaller than the first threshold value, the fourth detection frame is not close to the target area temporarily, so that the fourth detection frame which is far away from the target area is not considered temporarily in order to improve the efficiency of judging whether the target enters the target area.
According to the steps 901 to 902, it can be seen that, according to the N third detection frames, the N coordinate positions of the third detection frames, and the N first confidence degrees of the third detection frames, some detection frames corresponding to non-targets can be screened out, and several third detection frames can be combined to obtain a fourth detection frame, so that the workload of subsequently judging whether the target to be detected enters the target area is reduced, and then the fourth detection frame far from the target area is screened out, so that the efficiency of judging whether the target enters the target area can be improved.
Fig. 11 is a flowchart of a method for determining a second detection frame according to an embodiment of the present invention. The method comprises the following steps:
step 1101, calculating a first intersection ratio between the fifth detection frame and the sixth detection frame.
In the embodiment of the present invention, it should be noted that the fifth detection frame and the sixth detection frame are two adjacent first detection frames. For example, as shown in fig. 12, a schematic diagram of an analysis area according to an embodiment of the present invention is provided. If there are targets 1201 and 1202 in the analysis area, the targets 1201 and 1202 are blocked, and the feet of the targets 1201 are blocked by the targets 1202, where the feet of the targets 1202 are blocked by the targets 1201, the fifth detection frame corresponding to the targets 1201 is 1203, and the sixth detection frame corresponding to the targets 1202 is 1204, as can be seen from the figure, the fifth detection frame 1203 corresponding to the targets 1201 does not completely frame the targets 1201 due to the blocked feet of the targets 1201, and as can be seen from the figure, the sixth detection frame 1204 corresponding to the targets 1202 does not completely frame the targets 1202 in a possible situation, but the feet of the targets 1201 do not frame the feet of the targets 1201, the fifth detection frame corresponding to the targets 1201 does not frame the dividing line of the target area, and as can be seen from the figure, the dividing line of the targets 1202 has been crossed, and the position of the sixth detection frame corresponding to the targets 1202 has not crossed the dividing line of the target area has been judged according to the accuracy of the dividing line of the targets, and the position of the sixth detection frame corresponding to the targets 1202 has not crossed the dividing line of the target area. In order to accurately judge whether the target enters the target area, the missing part of the fifth detection frame corresponding to the blocked target needs to be predicted, then the fifth detection frame is restored to be a complete detection frame, the sixth detection frame is restored to be the complete detection frame, and then the complete detection frame is defined as a second detection frame. Therefore, it is first necessary to determine whether there is a shielding between two adjacent first detection frames according to the first intersection ratio between the fifth detection frame and the sixth detection frame.
Step 1102, determining whether the first intersection ratio is greater than a second threshold, if so, executing step 1103, and if not, executing step 1104.
In the embodiment of the invention, whether shielding exists between two adjacent first detection frames or not can be determined according to the magnitude relation between the first intersection ratio and the second threshold, if so, the missing part of the fifth detection frame corresponding to the shielded target needs to be predicted later, and then the fifth detection frame is restored to be a complete detection frame, so that whether the target enters the target area or not can be accurately judged.
Step 1103, determining whether the difference between the first position of the fifth detection frame and the second position of the sixth detection frame is smaller than the third threshold, if yes, executing step 1105, and if not, executing step 1106.
In the embodiment of the present invention, if the first intersection ratio is greater than the second threshold, it is indicated that one of the fifth detection frame and the sixth detection frame is a shielding detection frame, and it may be understood that the second detection frame is a shielding detection frame, and in order to determine the second detection frame, it is necessary to determine a first position of the fifth detection frame and a second position of the sixth detection frame first, where the first position is a position of the fifth detection frame farthest from the target area, and the second position is a position of the sixth detection frame farthest from the target area. For example, if the fifth detection frame corresponds to the pedestrian a, the sixth detection frame corresponds to the pedestrian B, the first position of the fifth detection frame is the top of the head of the pedestrian a, and the second position of the sixth detection frame is the top of the head of the pedestrian B, and if the difference between the first position of the fifth detection frame and the second position of the sixth detection frame is smaller than the third threshold, it indicates that the height of the pedestrian a is almost equal to that of the pedestrian B, so that the second detection frame can be conveniently screened out according to the heights of the fifth detection frame and the sixth detection frame, and the missing part of the second detection frame can be conveniently and accurately predicted.
Step 1104 ends.
In the embodiment of the invention, if the first intersection ratio is smaller than the second threshold value, the fifth detection frame and the sixth detection frame are complete detection frames, and no shielding exists.
Step 1105, determining a second detection frame according to the first height of the fifth detection frame and the second height of the sixth detection frame.
In the embodiment of the present invention, if the first height of the fifth detection frame is smaller than the second height of the sixth detection frame, it is indicated that the fifth detection frame is smaller than the sixth detection frame, and it is indicated that the fifth detection frame is blocked by the sixth detection frame, so that it can be determined that the fifth detection frame is the second detection frame. If the first height of the fifth detection frame is greater than the second height of the sixth detection frame, it is indicated that the fifth detection frame is smaller than the sixth detection frame, which indicates that the sixth detection frame is blocked by the fifth detection frame, so it can be determined that the sixth detection frame is the second detection frame.
Step 1106, end.
In the embodiment of the present invention, for example, if the fifth detection frame corresponds to the pedestrian a, the sixth detection frame corresponds to the pedestrian B, the first position of the fifth detection frame is the top of the head of the pedestrian a, the second position of the sixth detection frame is the top of the head of the pedestrian B, and if the difference between the first position of the fifth detection frame and the second position of the sixth detection frame is greater than the third threshold, it is indicated that the height difference between the pedestrian a and the pedestrian B is very large, and it is considered that there is no shielding between the pedestrian a and the pedestrian B.
As can be seen from the steps 1101 to 1106, by comparing the magnitude relation between the first intersection ratios of the two adjacent first detection frames and the second threshold, it can be determined which detection frames are shielding detection frames and which detection frames are complete detection frames, and the shielding detection frames are screened out, so that the missing parts of the shielding detection frames can be predicted and perfected later, and the accuracy of judging whether the target enters the target area is improved.
After the second detection frame is determined, see the above step 304 and step 305, which are not described herein.
Fig. 13 is a flowchart of a method for determining whether a target enters a target area according to an embodiment of the present invention. The method comprises the following steps:
step 1301, inputting the feature information of the target into the prediction model, and obtaining a seventh detection frame of the target and a third position of the seventh detection frame.
In the embodiment of the present invention, the specific content may refer to step 305, which is not described herein.
Step 1302, determining whether a distance between the third position of the seventh detection frame and the target area is smaller than a set threshold. If yes, go to step 1303, if not, go to step 1304.
In the embodiment of the present invention, as shown in fig. 14, a positional relationship diagram between a third position of a seventh detection frame and a target area is provided in the embodiment of the present invention. Since the third position of the seventh detection frame is the nearest position to the target area, in order to accurately determine whether the target enters the target area, if the third position of the seventh detection frame passes over the boundary of the target area, it is determined that the target corresponding to the seventh detection frame enters the target area. Therefore, by judging whether the distance between the third position of the seventh detection frame and the target area is smaller than the set threshold value, whether the target enters the target area can be accurately determined.
In step 1303, the target enters the target area.
In the embodiment of the invention, if the target enters the target area, the time when the target enters the target area is recorded, so that the subsequent related personnel can conveniently perform related processing according to the time when the target enters the target area.
In step 1304, the target does not enter the target area.
In the embodiment of the present invention, although the target does not enter the target area, since the target is closer to the target area, in order to facilitate rapid determination of whether the target will enter the target area, the above step 702 needs to be repeated, which is not repeated herein.
As can be seen from the above steps 1301 to 1304, by determining the distance between the third position of the seventh detection frame and the target area, it is possible to more accurately determine whether the target enters the target area.
After the target is determined to enter the target area, the target image can be captured through the camera, so that the target entering the target area can be conveniently and quickly found by related personnel. As shown in fig. 15, a flowchart of a method for determining a target image according to an embodiment of the present invention is provided, and the method includes the following steps:
step 1501, inputting the seventh detection box into a face recognition algorithm, and obtaining a face image and a second confidence of the face image.
In the embodiment of the invention, the seventh detection box is input into a face recognition algorithm to acquire the face image and the second confidence coefficient of the face image. Since the face image is divided into a front face image and a side face image. The related person can quickly find the target according to the front face image, so that the speed of finding the target is increased, and the target corresponding to the face image cannot be determined according to the side face image, so that whether the face image is the front face image or the side face image is determined according to the second confidence coefficient of the face image.
Step 1502, determining whether the second confidence coefficient of the face image is greater than a fourth threshold, if so, executing step 1503, and if not, executing step 1504.
In the embodiment of the invention, if the second confidence coefficient of the face image is larger than the fourth threshold value, the face image is indicated to be the positive face image, and if the second confidence coefficient of the face image is not larger than the fourth threshold value, the face image is indicated to be the side face image.
In step 1503, the face image is determined to be the target image.
In the embodiment of the invention, the front face image is determined as the target image, so that related personnel can conveniently and quickly find a target according to the target image.
Step 1504 ends.
In the embodiment of the invention, because the related personnel cannot find the target according to the side face image, if the side face image is the side face image, the side face image is discarded.
As can be seen from the above steps 1501 to 1504, by determining the front face image as the target image, it is possible to achieve convenience for the relevant person to quickly find the target.
After step 304, by inputting the feature information of the target in the second detection frame into the prediction model, and outputting the seventh detection frame and the third position of the seventh detection frame, statistics of the number of targets corresponding to the seventh detection frame may be achieved. For example, if the analysis area includes a bus stop, the target area is a waiting area of the bus stop, and the target is a pedestrian, where the target includes a pedestrian a, a pedestrian B, a pedestrian C, and a pedestrian D, and since the pedestrian C is blocked by the pedestrian D, a second detection frame corresponding to the pedestrian C is determined, characteristic information of the target in the second detection frame corresponding to the pedestrian C is input into the prediction model, and the complete detection frame of the pedestrian C, that is, the seventh detection frame and the third position of the seventh detection frame are output, so that the number of pedestrians can be determined according to the detection frame corresponding to the pedestrian, the number of pedestrians in the waiting area can be counted more accurately, and the bus system is facilitated and the frequency of buses can be changed according to the number of waiting passengers.
Based on the same technical concept, the embodiment of the invention also provides a position detection device, which can execute the method in the embodiment of the method. The structure for determining the probing area according to the embodiment of the present invention may be seen in fig. 16, and the apparatus 1600 includes: the acquisition unit 1601 is configured to acquire information of a target area and information of an analysis area including a target to be detected. The processing unit 1602 is configured to determine at least two first detection frames according to the information of the analysis area; determining a second detection frame according to the position between two adjacent first detection frames; acquiring characteristic information of a target in the second detection frame; and determining whether the target enters the target area according to the characteristic information of the target and the information of the target area.
Optionally, the processing unit is configured to input 1602 information of the analysis area into a target detection tracking algorithm, to obtain N third detection frames, identifiers of the N third detection frames, coordinate positions of the N third detection frames, and first confidence degrees of the N third detection frames, where N is an integer greater than 1; and determining the first detection frames according to the N third detection frames, the identification of the N third detection frames, the coordinate positions of the N third detection frames, the first confidence degrees of the N third detection frames and the information of the target area.
Optionally, the processing unit 1602 is configured to determine, according to the identifier of the third detection frame, the coordinate position of the third detection frame, and the first confidence level of the third detection frame, the coordinate positions of the fourth detection frame and the fourth detection frame; and if the distance between the coordinate position of the fourth detection frame and the target area is smaller than a first threshold value, determining the fourth detection frame as a first detection frame.
Optionally, the processing unit 1602 is configured to determine, if the first intersection ratio is greater than a second threshold, a first position of the fifth detection frame and a second position of the sixth detection frame, where the first position is a position of the fifth detection frame that is farthest from the target area, and the second position is a position of the sixth detection frame that is farthest from the target area; if the difference value between the first position of the fifth detection frame and the second position of the sixth detection frame is smaller than the third threshold value, determining a first height of the fifth detection frame and a second height of the sixth detection frame; and determining the second detection frame according to the first height of the fifth detection frame and the second height of the sixth detection frame.
Optionally, the processing unit 1602 is configured to input the feature information of the target into a prediction model, and obtain a seventh detection frame of the target and a third position of the seventh detection frame, where the third position is a position where the seventh detection frame is closest to the target area; and determining whether the target enters the target area according to the information of the third position of the seventh detection frame and the target area.
Optionally, the processing unit 1602 is configured to determine a time when the target enters the target area.
Optionally, the processing unit 1602 is configured to input the seventh detection box into a face recognition algorithm, to obtain a face image and a second confidence coefficient of the face image; and if the second confidence coefficient of the face image is larger than the fourth threshold value, determining the face image as a target image.
Optionally, the feature information of the processing unit 1602 for the target includes: the identification of the target, the size of the target, the center position of the target.
Optionally, the acquiring unit 1601 is configured to acquire a surveillance video; analyzing the monitoring video into multi-frame monitoring images; and determining the information of the analysis area and the information of the target area according to the multi-frame monitoring image.
Based on the same technical concept, the embodiment of the present application further provides a computing device, as shown in fig. 17, including at least one processor 1701, and a memory 1702 connected to the at least one processor, where a specific connection medium between the processor 1701 and the memory 1702 is not limited in the embodiment of the present application, and in fig. 17, the processor 1701 and the memory 1702 are connected by a bus, for example. The buses may be divided into address buses, data buses, control buses, etc.
In the embodiment of the present application, the memory 1702 stores instructions executable by the at least one processor 1701, and the at least one processor 1701 may perform the steps included in the foregoing position detection method by executing the instructions stored in the memory 1702.
Where the processor 1701 is a control center of a computing device, various interfaces and lines may be used to connect various portions of the computing device, implement data processing by executing or executing instructions stored in the memory 1702 and invoking data stored in the memory 1702. Optionally, the processor 1701 may include one or more processing units, and the processor 1701 may integrate an application processor and a modem processor, wherein the application processor primarily processes operating systems, user interfaces, application programs, etc., and the modem processor primarily processes issuing instructions. It will be appreciated that the modem processor described above may not be integrated into the processor 1701. In some embodiments, the processor 1701 and the memory 1702 may be implemented on the same chip, or they may be implemented separately on separate chips in some embodiments.
The processor 1701 may be a general-purpose processor such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, and may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in connection with the position detection method embodiment may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in the processor for execution.
The memory 1702 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 1702 may include at least one type of storage medium, and may include, for example, flash Memory, hard disk, multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), charged erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic Memory, magnetic disk, optical disk, and the like. Memory 1702 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1702 in the present embodiment may also be circuitry or any other device capable of implementing a memory function for storing program instructions and/or data.
Based on the same technical idea, the embodiments of the present application also provide a computer-readable storage medium storing a computer program executable by a computing device, which when run on the computing device, causes the computing device to perform the steps of the above-described position detection method.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (12)

1. A position detection method, comprising:
acquiring information of a target area and information of an analysis area, wherein the information of the analysis area comprises a target to be detected;
determining at least two first detection frames according to the information of the analysis area;
determining a second detection frame according to the position between two adjacent first detection frames;
acquiring characteristic information of a target in the second detection frame;
and determining whether the target enters the target area according to the characteristic information of the target and the information of the target area.
2. The method of claim 1, wherein the determining at least two first detection frames based on the information of the target region and the information of the analysis region comprises:
inputting the information of the analysis area into a target detection tracking algorithm to obtain N third detection frames, N marks of the third detection frames, N coordinate positions of the third detection frames and N first confidence degrees of the third detection frames, wherein N is an integer larger than 1;
And determining the first detection frames according to the N third detection frames, the identification of the N third detection frames, the coordinate positions of the N third detection frames, the first confidence degrees of the N third detection frames and the information of the target area.
3. The method of claim 2, wherein the determining the first detection frame based on the N third detection frames, the identity of the N third detection frames, the coordinate locations of the N third detection frames, the first confidence levels of the N third detection frames, and the information of the target area comprises:
determining a fourth detection frame and a coordinate position of the fourth detection frame according to the identification of the third detection frame, the coordinate position of the third detection frame and the first confidence coefficient of the third detection frame;
and if the distance between the coordinate position of the fourth detection frame and the target area is smaller than a first threshold value, determining the fourth detection frame as a first detection frame.
4. The method of claim 1, wherein determining the second detection frame based on the position between two adjacent first detection frames comprises:
calculating a first intersection ratio between a fifth detection frame and a sixth detection frame, wherein the fifth detection frame and the sixth detection frame are the two adjacent first detection frames;
If the first intersection ratio is greater than a second threshold, determining a first position of the fifth detection frame and a second position of the sixth detection frame, wherein the first position is a position of the fifth detection frame farthest from the target area, and the second position is a position of the sixth detection frame farthest from the target area;
if the difference value between the first position of the fifth detection frame and the second position of the sixth detection frame is smaller than the third threshold value, determining a first height of the fifth detection frame and a second height of the sixth detection frame;
and determining the second detection frame according to the first height of the fifth detection frame and the second height of the sixth detection frame.
5. The method of claim 1, wherein the determining whether the target enters the target area based on the characteristic information of the target comprises:
inputting the characteristic information of the target into a prediction model to obtain a seventh detection frame of the target and a third position of the seventh detection frame, wherein the third position is the position of the seventh detection frame nearest to the target area;
and determining whether the target enters the target area according to the information of the third position of the seventh detection frame and the target area.
6. The method of claim 5, wherein if the target is determined to be entering the target area; the method further comprises the steps of:
and determining the moment when the target enters the target area.
7. The method of claim 1, further comprising, after determining that the target is entering the target area:
inputting the seventh detection frame into a face recognition algorithm to obtain a face image and a second confidence coefficient of the face image;
and if the second confidence coefficient of the face image is larger than the fourth threshold value, determining the face image as a target image.
8. The method of claim 1, wherein the characteristic information of the target comprises:
the identification of the target, the size of the target, the center position of the target.
9. The method of claim 1, wherein the acquiring information of the target area and information of the analysis area comprises:
acquiring a monitoring video;
analyzing the monitoring video into multi-frame monitoring images;
and determining the information of the analysis area and the information of the target area according to the multi-frame monitoring image.
10. A position detection apparatus, comprising:
An acquisition unit configured to acquire information of a target area and information of an analysis area, the information of the analysis area including a target to be detected;
the processing unit is used for determining at least two first detection frames according to the information of the analysis area; determining a second detection frame according to the position between two adjacent first detection frames; acquiring characteristic information of a target in the second detection frame; and determining whether the target enters the target area according to the characteristic information of the target and the information of the target area.
11. A computing device comprising at least one processor and at least one memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the method of any of claims 1 to 9.
12. A computer readable storage medium, characterized in that the storage medium stores a program which, when run on a computer, causes the computer to implement the method of any one of claims 1 to 9.
CN202210745501.7A 2022-06-27 2022-06-27 Position detection method and device Pending CN117333542A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210745501.7A CN117333542A (en) 2022-06-27 2022-06-27 Position detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210745501.7A CN117333542A (en) 2022-06-27 2022-06-27 Position detection method and device

Publications (1)

Publication Number Publication Date
CN117333542A true CN117333542A (en) 2024-01-02

Family

ID=89281746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210745501.7A Pending CN117333542A (en) 2022-06-27 2022-06-27 Position detection method and device

Country Status (1)

Country Link
CN (1) CN117333542A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117636402A (en) * 2024-01-23 2024-03-01 广州市德赛西威智慧交通技术有限公司 Pedestrian re-identification-based passenger analysis method and device and computer storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117636402A (en) * 2024-01-23 2024-03-01 广州市德赛西威智慧交通技术有限公司 Pedestrian re-identification-based passenger analysis method and device and computer storage medium

Similar Documents

Publication Publication Date Title
CN110751022B (en) Urban pet activity track monitoring method based on image recognition and related equipment
CN105405154B (en) Target object tracking based on color-structure feature
JP6549797B2 (en) Method and system for identifying head of passerby
US20130243343A1 (en) Method and device for people group detection
CN111310645A (en) Overflow bin early warning method, device, equipment and storage medium for cargo accumulation amount
CN104966304A (en) Kalman filtering and nonparametric background model-based multi-target detection tracking method
CN105893946A (en) Front face image detection method
CN102496001A (en) Method of video monitor object automatic detection and system thereof
CN112241969A (en) Target detection tracking method and device based on traffic monitoring video and storage medium
CN104346802A (en) Method and device for monitoring off-job behaviors of personnel
CN112434566B (en) Passenger flow statistics method and device, electronic equipment and storage medium
CN113792586A (en) Vehicle accident detection method and device and electronic equipment
CN111932545A (en) Image processing method, target counting method and related device thereof
CN115423735A (en) Passenger flow volume statistical method and system
CN114463390A (en) Multi-twin-countermeasure network cross-camera vehicle tracking method with coupled motorcade following strengthening
CN117333542A (en) Position detection method and device
CN113177439A (en) Method for detecting pedestrian crossing road guardrail
CN117058912A (en) Method and device for detecting abnormal parking of inspection vehicle, storage medium and electronic equipment
CN112001336A (en) Pedestrian boundary crossing alarm method, device, equipment and system
CN116012949A (en) People flow statistics and identification method and system under complex scene
Song et al. An accurate vehicle counting approach based on block background modeling and updating
CN112991397B (en) Traffic sign tracking method, apparatus, device and storage medium
CN114219073A (en) Method and device for determining attribute information, storage medium and electronic device
KR102283053B1 (en) Real-Time Multi-Class Multi-Object Tracking Method Using Image Based Object Detection Information
Wibowo et al. Implementation of Background Subtraction for Counting Vehicle Using Mixture of Gaussians with ROI Optimization

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication