Target detection method and detection equipment
By setting up target detection equipment in the straight pole area of the parking lot, using image acquisition and feature point recognition technology, we can detect whether pedestrians have crossed or drilled rod behavior, and issue alarm signals, solving the problem of safety hazards in the parking lot, achieving high accuracy and low false alarm safety monitoring effects.
Patent Information
- Application Number
- CN202111439645.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-30
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2041-11-30
AI Technical Summary
There are safety risks in the way the straight bar of the parking lot is set up, and pedestrians may pass or cross it, resulting in safety risks.
A target detection method and device are provided to acquire images of the gate straight rod area through the image acquisition component, identify key feature points and postures of the target object, determine whether the target object moves from one side of the gate straight rod to the other, and issue an alarm signal when spanning or drilling rod behavior is detected.
It effectively reduces safety hazards, improves the accuracy of detection, reduces the probability of false alarms, and promptly reminds the target to stop dangerous behavior.
Smart Images

Figure CN114120368B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a target detection method and detection device. Background Art
[0002] The entrance and exit of the parking lot are generally equipped with a barrier bar to restrict the entry and exit of motor vehicles. However, pedestrians may crawl under the barrier bar or cross over the barrier bar to enter the parking lot, thus causing safety hazards. Summary of the invention
[0003] The present application provides a target detection method and detection device, which can solve the problem of potential safety hazards in the setting method of the gate straight pole in the related art. The technical solution is as follows:
[0004] On the one hand, a target detection method is provided, which is applied to a detection device in a target detection system, wherein the target detection system further includes an image acquisition component, and the image acquisition component is used to acquire an image of an area where a barrier gate straight pole is located; the method includes:
[0005] Acquire multiple frames of target images containing the target object from the images acquired by the image acquisition component;
[0006] Determine a plurality of key feature points of the target object in each frame of the target image, and a position of the target object in each frame of the target image;
[0007] If the posture of the target object is determined to be the target posture based on the multiple key feature points of the target object in the multiple frames of target images, and if it is determined that the target object moves from one side of the barrier pole to the other side based on the position of the target object in the multiple frames of target images, an alarm signal is issued;
[0008] The target posture includes a crossing posture and / or a drill rod posture.
[0009] On the other hand, a target detection device is provided, the target detection device comprising: a communication module and a processor; the processor is used to:
[0010] Acquire multiple frames of target images containing the target object from the images acquired by the image acquisition component;
[0011] Determine a plurality of key feature points of the target object in each frame of the target image, and a position of the target object in each frame of the target image;
[0012] If the posture of the target object is determined to be the target posture based on the multiple key feature points of the target object in the multiple frames of target images, and if it is determined that the target object moves from one side of the barrier pole to the other side based on the position of the target object in the multiple frames of target images, an alarm signal is sent through the alarm module;
[0013] The target posture includes a crossing posture and / or a drill rod posture.
[0014] Optionally, the multiple key feature points are key points of human skeleton; and the processor is used to:
[0015] For each frame of the target image, determining key parameters of the target image based on positions of a plurality of key feature points in the target image;
[0016] If the key parameter satisfies the target condition, determining the posture of the target object as the target posture;
[0017] The key parameters include: the distance between at least two key feature points among the multiple key feature points, and / or the angle between the line connecting at least two key feature points and a reference point in the target image.
[0018] Optionally, the key parameter includes: a first distance between a first target feature point and a second target feature point among the multiple key feature points, and the target condition includes: in the order of acquisition time of the multiple frames of target images from early to late, the first distance in at least two frames of the target images gradually decreases, and the reduction degree of the first distance is greater than a first distance threshold, or the first distance in at least one frame of the target image is less than a second distance threshold;
[0019] The first target feature points are key feature points of the head or neck of the target object, and the second target feature points are key feature points of the legs or feet of the target object.
[0020] Optionally, both the first distance threshold and the second distance threshold are positively correlated with a reference distance of the target object, where the reference distance is a distance between a first reference feature point and a second reference feature point among the multiple key feature points.
[0021] Optionally, the key parameter includes: a second distance between two second target feature points among the multiple key feature points, and the target condition includes: in the order of acquisition time of the multiple frames of target images from early to late, the second distance in at least two frames of the target images gradually increases, and the increase degree of the second distance is greater than a third distance threshold, or the second distance in at least one frame of the target image is greater than a fourth distance threshold;
[0022] The two second target feature points are respectively the key feature points of the left leg and the right leg of the target object, or are respectively the key feature points of the left foot and the right foot of the target object.
[0023] Optionally, the key parameter includes: an angle between a first connecting line and a second connecting line, the first connecting line is a connecting line between a third target feature point among the multiple key feature points and the reference point, the second connecting line is a connecting line between a fourth target feature point among the multiple key feature points and the reference point, and the third target feature point and the fourth target feature point are key feature points located on the same side of the target object;
[0024] The target conditions include: in the order of the acquisition time of the multiple frames of target images from early to late, the angle in at least two frames of the target images gradually decreases, and the degree of reduction of the angle is greater than a first angle threshold, or the angle in at least one frame of the target image is less than a second angle threshold.
[0025] Optionally, the processor is further configured to:
[0026] In a first time period in which the ambient light brightness is greater than a brightness threshold, acquiring multiple frames of images acquired by the image acquisition component based on visible light imaging technology;
[0027] In a second time period when the ambient light brightness is less than or equal to the brightness threshold, a plurality of frames of images acquired by the image acquisition component based on thermal imaging technology are acquired.
[0028] Optionally, the processor is configured to:
[0029] Input each frame of image collected by the image acquisition component into the target detection model to obtain a recognition result of each frame of image output by the target detection model, wherein the recognition result is used to indicate whether a target object exists in the image and, when a target object exists in the image, indicate the position of the target object in the image;
[0030] Determine multiple frames of target images based on the recognition results output by the target detection model;
[0031] For each frame of the target image, the target image is input into a posture detection model to obtain a plurality of key feature points of the target object in the target image output by the posture detection model, and based on the recognition result of the target image, the position of the target object in the target image is determined.
[0032] Optionally, the processor is further configured to:
[0033] Determining a scaling factor k based on a position of a reference point of the target object in the target image;
[0034] According to the scaling ratio k and the pixel height p1 of the target object in the target image, determining the actual height h1 of the target object: h1=k×p1;
[0035] If the actual height of the target object is not greater than the height threshold, determining the position of the target object in each frame of the target image, and if it is determined that the target object moves from one side of the barrier pole to the other side, sending an alarm signal through the alarm module;
[0036] If the actual height of the target object is greater than the height threshold, a plurality of key feature points of the target object in each frame of the target image are determined.
[0037] Optionally, the processor is configured to:
[0038] If it is determined that the posture of the target object is the target posture, and it is determined that the target object moves from one side of the barrier pole to the other side, detecting whether the barrier pole is lifted during the acquisition of the multiple frames of target images;
[0039] If the barrier rod is not lifted, an alarm signal is sent out through the alarm module.
[0040] On the other hand, a detection device is provided, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the target detection method as described in the above aspects when executing the computer program.
[0041] On the other hand, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the target detection method as described in the above aspects.
[0042] On the other hand, a computer program product comprising instructions is provided, and when the computer program product is run on the computer, the computer is enabled to execute the target detection method described in the above aspects.
[0043] On the other hand, a target detection system is provided, which includes: an image acquisition component and the detection device provided by the above aspects, wherein the image acquisition component is used to acquire an image of the area where the barrier gate straight pole is located.
[0044] The beneficial effects of the technical solution provided by this application include at least:
[0045] The present application provides a target detection method and detection device. The detection device can determine multiple key feature points and positions of the target object in each frame of the target image. Moreover, when the detection device determines that the posture of the target object is the target posture based on multiple key feature points, and determines that the target object moves from one side of the straight pole of the gate to the other side based on the position of the target object in each frame of the target image, it can determine that the target object has the behavior of crossing the pole or drilling the pole, and send out an alarm signal. Thus, the target object can be reminded to stop the above behavior in time, reducing safety hazards. Moreover, since the detection device can combine the posture and position of the target object to jointly determine whether the target object has the behavior of crossing the pole or drilling the pole, the accuracy of the detection is effectively improved and the probability of false alarms is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0047] Figure 1 is a schematic diagram of the structure of a target detection system provided in an embodiment of the present application;
[0048] Figure 2 is a flow chart of a target detection method provided in an embodiment of the present application;
[0049] Figure 3 is a flow chart of another target detection method provided in an embodiment of the present application;
[0050] Figure 4 is a schematic diagram of an image marked with a detection frame output by a target detection model provided in an embodiment of the present application;
[0051] Figure 5 It is a structural schematic diagram of multiple key feature points in a target object provided by an embodiment of the present application;
[0052] Figure 6 is a structural schematic diagram of multiple key feature points in another target object provided in an embodiment of the present application;
[0053] Figure 7 is a schematic diagram of the structure of another target detection system provided in an embodiment of the present application;
[0054] Figure 8 is a schematic diagram of an image captured by an image acquisition component provided in an embodiment of the present application;
[0055] Fig. 9It is a structural schematic diagram of a detection device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0057] Figure 1 is a schematic diagram of the structure of a target detection system provided in an embodiment of the present application. Figure 1 The system may include: a detection device 110 and an image acquisition component 120. A wired or wireless communication connection may be established between the image acquisition component 120 and the detection device 110.
[0058] Optionally, the detection device 110 can be a computer or a server. For example, the detection device 110 can be a desktop computer, a laptop computer or a tablet computer; or the detection device 110 can be a server, a server cluster composed of several servers or a cloud computing service center. The image acquisition component 120 can be a camera, a video camera, a still camera or other device with image acquisition function. The image acquisition component is used to acquire images of the area where the barrier pole is located, and the detection device is used to detect whether there is a target object in the area where the barrier pole is located based on the images acquired by the image acquisition component, and detect whether the target object has drilling or pole collapse behavior. The target object can be a person. For example, see Figure 1 The detection device 110 may be a desktop computer, and the image acquisition component 120 may be a thermal imaging camera.
[0059] The present application embodiment provides a target detection method, which can be applied to a detection device, such as Figure 1 The detection device 110 in the target detection system is shown. Figure 2 , the method comprising:
[0060] Step 101: Acquire multiple frames of target images containing a target object from images acquired by an image acquisition component.
[0061] The image acquisition component is installed near the barrier pole and can capture the barrier pole to acquire images of the area where the barrier pole is located. The image acquisition component can periodically acquire images and send the acquired images to the detection device based on the communication connection with the detection device for recognition and analysis by the detection device.
[0062] The detection device can detect whether the received image contains the target object, and determine the image containing the target object as the target image. The detection device can then analyze the behavior of the target object based on the target image.
[0063] Step 102: Determine a plurality of key feature points of the target object in each frame of the target image, and the position of the target object in each frame of the target image.
[0064] After the detection device acquires multiple frames of target images, it can determine the position of the target object in each frame of the target image, and can use a feature point recognition algorithm to determine multiple key feature points of the target object in each frame of the target image. The target object can be a person. The multiple key feature points can be key points of human skeletons.
[0065] Step 103: If the posture of the target object is determined to be the target posture based on multiple key feature points of the target object in the multi-frame target image, and if it is determined that the target object moves from one side of the barrier pole to the other side based on the position of the target object in the multi-frame target image, an alarm signal is issued.
[0066] The target posture may include a crossing posture and / or a drill rod posture, etc. The detection device may determine whether the posture of the target object in each frame of the target image is the target posture based on multiple key feature points of the target object in multiple frames of the target image. If the detection device determines that the posture of the target object in at least one frame of the target image is the target posture, and determines that the motion trajectory of the target object is moving from one side of the straight rod of the gate to the other side based on the position of the target object in each frame of the target image, it can be determined that the target object has the behavior of crossing the rod or the drill rod. Furthermore, the detection device can issue an alarm signal.
[0067] In summary, the embodiment of the present application provides a target detection method, and the detection device can determine multiple key feature points and positions of the target object in each frame of the target image. Moreover, when the detection device determines that the posture of the target object is the target posture based on multiple key feature points, and determines that the target object moves from one side of the straight pole of the gate to the other side based on the position of the target object in each frame of the target image, it can be determined that the target object has the behavior of crossing the pole or drilling the pole, and an alarm signal is issued. As a result, the target object can be reminded in time to stop the above behavior, reducing safety hazards. Moreover, since the detection device can combine the posture and position of the target object to jointly determine whether the target object has the behavior of crossing the pole or drilling the pole, the accuracy of the detection is effectively improved and the probability of false alarms is reduced.
[0068] This application example provides another target detection method, which can be applied to the detection device 110, for example Figure 1 The detection device 110 in the target detection system is shown. Figure 3 , the method comprising:
[0069] Step 201: In a first time period when the ambient light brightness is greater than a brightness threshold, a plurality of frames of images acquired by an image acquisition component based on visible light imaging technology are acquired.
[0070] In the embodiment of the present application, the image acquisition component can acquire images based on visible light imaging technology, and can acquire images based on thermal imaging technology. In the first period when the ambient light brightness is greater than the brightness threshold, since the quality of the image acquired by the image acquisition component based on the visible light imaging technology is good, the detection device can obtain multiple frames of images acquired by the image acquisition component based on the visible light imaging technology.
[0071] As a possible example, the detection device pre-stores the start time and end time of the first time period. If the detection device determines that the current time belongs to the first time period, the image captured by the image acquisition component based on the visible light imaging technology can be obtained. Among them, the start time and end time of the first time period can be configured by the staff, or the detection device can determine the time of sunrise and sunset based on its setting location (such as longitude information and latitude information) and the current time (such as the current season), and then the start time and end time of the first time period can be determined based on the time of sunrise and sunset. Among them, the start time can be equal to or later than the sunrise time, and the end time can be earlier than or equal to the sunset time.
[0072] For example, assume that the start time of the first period configured by the staff pre-stored in the detection device is 8 am and the end time of the first period is 19 pm. If the detection device determines that the current time reaches 8 am, the image captured by the image acquisition component based on the visible light imaging technology can be obtained.
[0073] As another possible example, the detection device can detect the brightness of the ambient light in real time, and when it is detected that the brightness of the ambient light is greater than a brightness threshold, it can determine that the current moment belongs to the first time period, and obtain multiple frames of images collected by the image acquisition component based on the visible light imaging technology. Optionally, the detection device can detect the brightness of the ambient light through a brightness sensor, or can obtain an image collected by the image acquisition component based on the visible light imaging technology, and determine the brightness of the ambient light based on the brightness of the image.
[0074] As another possible example, the detection device can determine the first time period in combination with the methods in the above two examples. For example, the first detection moment and the second detection moment can be pre-stored in the detection device. If the detection device determines that the current time has reached the first detection moment, the ambient light brightness can be detected, and when it is detected that the ambient light brightness is greater than the brightness threshold, the current moment can be determined as the starting moment of the first time period. Afterwards, the detection device can stop detecting the ambient light brightness, and continue to acquire multiple frames of images acquired by the image acquisition component based on visible light imaging technology. If the detection device determines that the current time has reached the second detection moment, the ambient light brightness can be detected again, and when it is detected that the ambient light brightness is not greater than the brightness threshold, the current moment can be determined as the end moment of the first time period. Afterwards, the detection device stops acquiring multiple frames of images acquired by the image acquisition component based on visible light imaging technology.
[0075] Step 202: During a second period when the ambient light brightness is less than or equal to a brightness threshold, a plurality of frames of images acquired by the image acquisition component based on thermal imaging technology are acquired.
[0076] In the second time period when the ambient light brightness is less than or equal to the brightness threshold, since the quality of the image captured by the image acquisition component based on visible light imaging technology is poor, and the image captured based on thermal imaging technology can eliminate the interference of other light, the detection device can obtain multiple frames of images captured by the image acquisition component based on thermal imaging technology.
[0077] As a possible example, the detection device pre-stores the start time and end time of the second time period. If the detection device determines that the current time belongs to the second time period, the image captured by the image acquisition component based on thermal imaging technology can be obtained. The start time and end time of the second time period can be configured by the staff, or the detection device can determine the time of sunset and sunrise based on its setting location (such as longitude information and latitude information) and the current time (such as the current season), and then the start time and end time of the second time period can be determined based on the time of sunset and sunrise. The start time of the second time period can be equal to or later than the time of sunset, and the end time can be earlier than or equal to the time of sunrise.
[0078] It can be understood that the start time of the second time period may be later than or equal to the end time of the first time period, and the end time of the second time period may be earlier than or equal to the start time of the first time period.
[0079] For example, assume that the start time of the second period configured by the staff pre-stored in the detection device is 19:00 pm and the end time of the second period is 8:00 am. If the detection device determines that the current time reaches 19:00 pm, the image captured by the image acquisition component based on thermal imaging technology can be obtained.
[0080] As another possible example, the detection device can detect the brightness of the ambient light in real time, and when it is detected that the brightness of the ambient light is less than or equal to the brightness threshold, it can determine that the current moment belongs to the second time period, and obtain multiple frames of images collected by the image acquisition component based on thermal imaging technology. Optionally, the detection device can detect the brightness of the ambient light through a brightness sensor, or can obtain an image collected by the image acquisition component based on visible light imaging technology, and determine the brightness of the ambient light based on the brightness of the image.
[0081] As another possible example, the detection device can determine the second time period in combination with the methods in the above two examples. For example, the first detection moment and the second detection moment can be pre-stored in the detection device. If the detection device determines that the current time has reached the second detection moment, the ambient light brightness can be detected, and when it is detected that the ambient light brightness is less than or equal to the brightness threshold, the current moment can be determined as the starting moment of the second time period. Afterwards, the detection device can stop detecting the ambient light brightness, and continue to acquire multiple frames of images acquired by the image acquisition component based on thermal imaging technology. If the detection device determines that the current time has reached the first detection moment, the ambient light brightness can be detected again, and when it is detected that the ambient light brightness is greater than the brightness threshold, the current moment can be determined as the end moment of the second time period. Afterwards, the detection device stops acquiring multiple frames of images acquired by the image acquisition component based on thermal imaging technology.
[0082] Optionally, in the embodiment of the present application, the image acquisition component can simultaneously acquire images based on visible light imaging technology and thermal imaging technology. The detection device can acquire images acquired by the image acquisition component based on different imaging technologies at different time periods.
[0083] Alternatively, the image acquisition component may acquire images using different imaging technologies at different time periods under the control of the detection device. For example, the image acquisition component may acquire images based only on visible light imaging technology during a first time period, and acquire images based only on thermal imaging technology during a second time period.
[0084] Step 203: input each frame of image collected by the image acquisition component into the target detection model to obtain the recognition result of each frame of image output by the target detection model.
[0085] In an embodiment of the present application, a target detection model is configured in the detection device. During the process of acquiring multiple frames of images captured by the image acquisition component, the detection device can input each frame of the image into the target detection model to obtain the recognition result of each frame of the image output by the target detection model.
[0086] The recognition result is used to indicate whether the target object exists in the image, and when the target object exists in the image, the position of the target object in the image. For example, for a scene in which the target object exists in the image, the recognition result may include an image marked with a detection frame, and the object in the detection frame is the target object.
[0087] Optionally, the target detection model can identify whether the image contains the target object through a target detection algorithm, and when the target object is identified in the image, confirm the detection frame where the target object is located, and multiple position parameters of the detection frame. The multiple position parameters can indicate the position of the target object in the image. For example, the multiple position parameters may include: the position of the reference point of the detection frame in the image, the width of the detection frame, and the height of the detection frame. The reference point of the detection frame may be any vertex of the detection frame, or may be the center point of the detection frame.
[0088] For example, the target detection algorithm may include: you only look once (YOLO) algorithm, single shot multibox detector (SSD) algorithm and transformer algorithm, etc.
[0089] The target detection model can also track the target object through the target tracking algorithm, that is, the target object's movement trajectory is locked and tracked in real time based on the multi-frame image. Thus, the target tracking algorithm can verify the recognition result output by the target detection algorithm, ensuring the accuracy of the recognition result output by the target detection model. For example, the target tracking algorithm may include: a simple online and realtime tracking, sort algorithm and a deep simple online and realtime tracking, deepsort algorithm.
[0090] For example, Figure 4 A schematic diagram of an image with a detection frame output by a target detection model provided in an embodiment of the present application. Figure 4 As shown, the image includes a detection box a, the coordinates of the upper left corner of the detection box are (x, y), the width of the detection box is w, and the height is h. The position of the detection box including the target object in the image can be expressed as: box(x, y, w, h).
[0091] It is understandable that the detection device can use the same target detection model to process images collected by the image acquisition component based on visible light imaging technology and images collected by the image acquisition component based on thermal imaging technology. Alternatively, two target detection models are configured in the detection device, wherein the first target detection model is used to process images collected by the image acquisition component based on visible light imaging technology, and the second target detection model is used to process images collected by the image acquisition component based on thermal imaging technology.
[0092] Step 204: Determine multiple frames of target images based on the recognition results output by the target detection model.
[0093] The target image is an image in which the target object exists. The detection device can determine that the image contains the target object based on the recognition result output by the target detection model, and determine multiple frames of images including the target object in the image as multiple frames of target images.
[0094] Step 205: For each frame of the target image, the target image is input into a posture detection model to obtain a plurality of key feature points of the target object in the target image output by the posture detection model, and based on the recognition result of the target image, the position of the target object in the target image is determined.
[0095] In an embodiment of the present application, the detection device can determine the position of the target object in the target image based on the position parameters of the detection box containing the target object output by the target detection model.
[0096] The detection device also pre-stores a posture detection model, and the detection device can input each frame of the identified target image into the posture detection model to obtain multiple key feature points of the target object in the target image output by the posture detection model. The multiple key feature points can be key points of human skeleton.
[0097] For example, Figure 5 A schematic diagram of a structure of multiple key feature points in a target object provided in an embodiment of the present application, such as Figure 5 As shown, the multiple key feature points may include the following key points of the skeleton: multiple key feature points of the head and multiple key feature points of the joints. Among them, the multiple key feature points of the head may include: 1 nose key feature point, 15 left eye key feature point, 16 right eye key feature point, 17 left ear key feature point and 18 right ear key feature point. The key feature points of the multiple joints may include: 2 neck key feature point, 3 left shoulder key feature point, 4 right shoulder key feature point, 5 left elbow key feature point, 6 right elbow key feature point, 7 left wrist key feature point, 8 right wrist key feature point, 9 left hip key feature point, 10 right hip key feature point, 11 left knee key feature point, 12 right knee key feature point, 13 left ankle key feature point, 14 right ankle key feature point.
[0098] The posture detection model may be provided with a posture estimation algorithm, and the posture detection model may determine a plurality of human skeleton key points of the target object included in each frame of the target image through the posture estimation algorithm. The posture estimation algorithm may be an open pose algorithm and a high resolution net (HRNet) algorithm, etc.
[0099] Step 206: For each frame of the target image, determine the key parameters of the target image based on the positions of multiple key feature points in the target image.
[0100] As a possible implementation, the key parameter includes at least: a first distance between a first target feature point and a second target feature point among the multiple key feature points. The first target feature point is a key feature point of the head or neck of the target object, and the second target feature point is a key feature point of the leg or foot of the target object. For example, refer to Figure 5 , the first target feature point may be the key feature point 1 of the head and nose, and the second target feature point may be the key feature point 11 of the left knee of the leg. Alternatively, the first target feature point may be the key feature point 2 of the neck, and the second target feature point may be the key feature point 13 of the left ankle of the foot.
[0101] As another possible implementation, the key parameter may include: a second distance between two second target feature points in the plurality of key feature points. The two second target feature points may be key feature points of the left leg and the right leg of the target object, or may be key feature points of the left foot and the right foot of the target object. For example, refer to Figure 5 , the two second target feature points may be the left knee key feature point 11 of the left leg and the right knee key feature point 12 of the right leg of the target object. The second distance may be the distance between the left knee key feature point 11 of the left leg and the right knee key feature point 12 of the right leg. Or the two second target feature points may be the left ankle key feature point 13 of the left foot and the right ankle key feature point 14 of the right foot of the target object. The second distance may be the distance between the left ankle key feature point 13 of the left foot and the right ankle key feature point 14 of the right foot.
[0102] As another possible implementation, the key parameter may include: the angle between the first line and the second line. The first line is a line between a third target feature point and a reference point among the multiple key feature points, and the second line is a line between a fourth target feature point and the reference point among the multiple key feature points. The third target feature point and the fourth target feature point are key feature points located on the same side of the target object. The key feature points on the same side of the target object may be key feature points of the human skeleton of the left half of the target object, or may be key feature points of the human skeleton of the right half of the target object. For example, the third target feature point and the fourth target key feature point may be key feature points of the left leg of the target object.
[0103] Example, reference Figure 6 , the third target feature point may be the left hip key feature point 9 of the left leg of the target object, and the fourth target feature point may be the left knee key feature point 11 of the left leg of the target object. The first connecting line may be the connecting line between the left hip key feature point 9 of the left leg of the target object and the reference point 0, and the second connecting line may be the connecting line between the left knee key feature point 11 of the left leg of the target object and the reference point 0. The angle between the first connecting line and the second connecting line is the angle θ.
[0104] Step 207: If the key parameters meet the target conditions, the posture of the target object is determined to be the target posture.
[0105] The target posture may include a drill rod posture and a stride posture, etc. In an embodiment of the present application, for a scene in which the key parameter includes a first distance between a first target feature point and a second target feature point among multiple key feature points, the target condition may include: in the order of the acquisition time of multiple frames of target images from early to late, the first distance in at least two frames of target images gradually decreases, and the reduction degree of the first distance in at least two frames of target images is greater than the first distance threshold. Alternatively, the first distance in at least one frame of target images is less than the second distance threshold.
[0106] Since the head or neck of the target object gradually approaches the legs or feet when the target object bends or squats, the first distance in at least two frames of target images gradually decreases. When the target object bends or squats to a certain extent, the reduction degree of the first distance in at least two frames of target images will be greater than the first distance threshold. At this time, the detection device can determine that the posture of the target object is the drill rod posture.
[0107] Since when the target object bends or squats to a certain extent, the first distance in at least one frame of the target image is less than the second distance threshold, at this time, the detection device can also determine that the posture of the target object is the drill rod posture.
[0108] Among them, the first distance threshold and the second distance threshold can both be fixed values pre-stored in the detection device. Alternatively, the first distance threshold and the second distance threshold are both positively correlated with a reference distance of the target object, and the reference distance is the distance between a first reference feature point and a second reference feature point among multiple key feature points. The first reference feature point and the second reference feature point can be two key feature points with a fixed distance among multiple key feature points. Alternatively, it can be understood that the first reference feature point and the second reference feature point are key feature points of two adjacent joints of the human body, that is, there are no other joints between the joints indicated by the two reference feature points. It can be understood that the first distance threshold and the second distance threshold can be equal or unequal.
[0109] Example, reference Figure 5 , the first reference feature point may be the neck key feature point 2 of the target object, and the second reference feature point may be the left shoulder key feature point 3 of the target object. Accordingly, the reference distance may be the distance between the neck key feature point 2 and the left shoulder key feature point 3. The first distance threshold may be half of the reference distance, and the second distance threshold may be one quarter of the reference distance.
[0110] For a scene in which the key parameter includes: a second distance between two second target feature points in a plurality of key feature points, the target condition may include: in the order of the acquisition time of the plurality of target images from early to late, the second distance in at least two frames of the target image gradually increases, and the increase degree of the second distance in at least two frames of the target image is greater than the third distance threshold. Alternatively, the second distance in at least one frame of the target image is greater than the fourth distance threshold.
[0111] Because in the process of the target object crossing the straight pole of the barrier, the distance between the left leg and the right leg of the target object will gradually increase, or the distance between the left foot and the right foot of the target object will gradually increase. When the target object crosses to a certain extent, the increase degree of the second distance in at least two frames of target images will be greater than the third distance threshold. At this time, the detection device can determine that the posture of the target object is a crossing posture. Because when the target object crosses to a certain extent, the second distance in at least one frame of target image will be greater than the fourth distance threshold. At this time, the detection device can also determine that the posture of the target object is a crossing posture.
[0112] The third distance threshold and the fourth distance threshold may be fixed values pre-stored in the detection device. Alternatively, the third distance threshold and the fourth distance threshold are both positively correlated with the reference distance of the target object. It is understandable that the third distance threshold and the fourth distance threshold may be equal or different.
[0113] Example, reference Figure 5, the third reference feature point may be the neck key feature point 2 of the target object, and the fourth reference feature point may be the right shoulder key feature point 4 of the target object. Accordingly, the reference distance may be the distance between the neck key feature point 2 and the right shoulder key feature point 4. The third distance threshold may be 5 times the reference distance, and the fourth distance threshold may be 6 times the reference distance.
[0114] For a scene in which the key parameter includes: the angle between the first line and the second line, the target condition may include: in the order of the acquisition time of the multiple frames of target images from early to late, the angle in at least two frames of target images gradually decreases, and the reduction degree of the angle is greater than the first angle threshold. Alternatively, the angle in at least one frame of target images is less than the second angle threshold.
[0115] The first angle threshold and the second angle threshold may be fixed values pre-stored in the detection device. Alternatively, the first angle threshold and the second angle threshold are both positively correlated with a reference angle of the target object, and the reference angle is the angle between the first reference line and the second reference line. The first reference line is a line between a reference point and one end point of the barrier rod, and the second reference line is a line between a reference point and another end point of the barrier rod. It is understandable that the first angle threshold and the second angle threshold may be equal or different. For example, the first angle threshold may be one-fifth of the reference angle, and the second angle threshold may be one-sixth of the reference angle.
[0116] Since the same side of the target object's body tends to fold when the target object bends, squats or straddles, the angle in at least two frames of target images will gradually decrease. When the target object bends or squats to a certain degree, or straddles to a certain degree, the reduction degree of the angle in at least two frames of target images will be greater than the first angle threshold. At this time, the detection device can determine that the posture of the target object is a drill rod posture or a straddle posture.
[0117] When the target object bends or squats to a certain extent, or leaps to a certain extent, the angle in at least one frame of the target image is less than the second angle threshold. At this time, the detection device can also determine that the posture of the target object is a drill rod posture or a leaping posture.
[0118] Step 208: If it is determined that the posture of the target object is the target posture, and it is determined that the target object moves from one side of the barrier pole to the other side, then it is detected whether the barrier pole is lifted during the acquisition of multiple frames of target images.
[0119] In an embodiment of the present application, the detection device pre-stores the position information of the barrier pole. The position information may include: the position of the barrier pole when it is not lifted in the image captured by the image acquisition component, and / or the position of the areas on both sides of the barrier pole in the image captured by the image acquisition component. After determining the position of the target object in each frame of the target image, the detection device can determine whether the target object moves from one side of the barrier pole to the other side based on the pre-stored position information of the barrier pole.
[0120] If the detection device determines that the posture of the target object is the target posture, and determines that the target object moves from one side of the barrier pole to the other side, it can first detect whether the barrier pole is lifted during the acquisition of multiple frames of target images. If the barrier pole is not lifted, the detection device can execute the following step 209 to issue an alarm signal. If the barrier pole is lifted, the detection device can determine that a vehicle passes by the barrier pole or that there is a staff member managing the barrier pole, so there is no need to issue an alarm signal, and the above step 201 or step 202 can continue to be executed.
[0121] In an embodiment of the present application, the controller of the barrier pole can be used to control the barrier pole to be raised or lowered. The detection device can also be connected to the controller and can determine the state of the barrier pole based on the indication signal sent by the controller. For example, the controller can control the barrier pole to be raised when a vehicle is detected approaching the barrier pole; or the controller can control the barrier pole to be raised in response to the trigger operation of the trigger button of the barrier pole by the staff.
[0122] It can be understood that the controller can be integrated into the detection device, or be set independently of the detection device.
[0123] Optionally, the detection device can determine whether the target object in the target image frame is located on one side of the barrier pole or the other side of the barrier pole according to the position parameters of the detection frame in the recognition result of each frame of the target image output by the target detection model. In addition, the detection device can confirm that the target object moves from one side of the barrier pole to the other side when it is detected that the duration of the target object on one side of the barrier pole exceeds a duration threshold, and the target object leaves one side of the barrier pole and enters the other side of the barrier pole. The duration threshold can be a fixed value pre-stored in the detection device.
[0124] For example, the detection device can determine the position of the midpoint of the lower frame of the detection frame according to the multiple position parameters of the detection frame, and determine the position of the midpoint as the position of the target object. After that, the detection device can determine whether the target object is located on one side of the barrier pole or the other side of the barrier pole.
[0125] As an optional implementation, the position information of the barrier pole can be input into the detection device by the staff. For example, the detection device can display an image including the barrier pole, and in response to the staff's selection operation on a certain area in the image, the detection device can determine the area as the area where one side of the barrier pole is located; the detection device can also respond to the staff's selection operation on another area in the image and determine the other area as the area where the other side of the barrier pole is located.
[0126] As another optional implementation, the detection device can also determine the position information of the barrier pole based on the image captured by the image acquisition component. For example, after receiving the image sent by the image acquisition component, the detection device can use a straight line detection algorithm to detect the straight line in the image. Afterwards, the detection device can detect whether the length of the straight line is within a preset length range, and detect whether the width of the straight line is within a preset width range. If the length and width of the straight line are both within the corresponding range, and based on the multiple frames of images captured by the image acquisition component, it is determined that the straight line can rotate around a fixed point, then the straight line can be determined as a barrier pole. Furthermore, the image acquisition component determines the areas on both sides of the straight line as the area on one side of the barrier pole and the area on the other side, respectively.
[0127] It is understandable that the target object can bypass the side of the barrier pole and move from one side of the barrier pole to the other side of the barrier pole, which may also pose a safety hazard. In an embodiment of the present application, the position information of the barrier pole pre-stored in the detection device may also include: the position of the area beside the barrier pole in the image captured by the image acquisition component. If the detection device detects that the position of the target object in the target image passes through the area on one side of the barrier pole, the area on the side of the barrier pole, and the area on the other side of the barrier pole, it can also be determined that the target object has moved from one side of the barrier pole to the other side of the barrier pole, and an alarm signal can be issued.
[0128] Optionally, in an embodiment of the present application, the area of the barrier pole close to the garage side may be the inner area of the barrier pole, and the area away from the garage side may be the outer area of the barrier pole. If the image acquisition component is set on the side of the barrier pole away from the garage, the detection device may determine the area above the barrier pole in the received image as the inner area of the barrier pole, and the area below the barrier pole as the outer area of the barrier pole. If the image acquisition component is set on the side of the barrier pole close to the garage, the detection device may determine the area below the barrier pole in the received image as the inner area of the barrier pole, and the area above the barrier pole as the outer area of the barrier pole.
[0129] Step 209: Send out an alarm signal.
[0130] If the detection device determines that the posture of the target object is the target posture, determines that the target object moves from one side of the barrier pole to the other side, and detects that the barrier pole is not lifted during the acquisition of multiple frames of target images, an alarm signal can be issued.
[0131] On the one hand, the detection device can directly send out the warning signal. For example, the detection device can display the warning prompt information on its display screen, and / or the detection device can play the warning prompt information signal through its speaker to remind the staff to manage in time.
[0132] On the other hand, Figure 7 As shown, the target detection system may further include an alarm device 130 that establishes a communication connection with the detection device 110. The detection device 110 may send an alarm instruction to the alarm device 130. Afterwards, the alarm device 130 may send an alarm signal in response to the alarm instruction. The alarm device 130 may be a device that can send a sound and / or light alarm signal, for example, an audible and visual alarm device.
[0133] Optionally, the alarm device 130 may be disposed near the barrier pole, so as to effectively alarm a target object that is performing a pole collapse operation or a pole drilling operation at the barrier pole.
[0134] Optionally, in an embodiment of the present application, after determining the target image, the detection device may also detect the actual height of the target object based on the target image, and determine whether the actual height of the target object is greater than a height threshold. The height threshold may be a value less than or equal to the height of the barrier pole, and the height of the barrier pole refers to the height from the ground when the barrier pole is not raised. If the actual height of the target object is greater than the height threshold, the detection device may input the target image including the target object into the posture detection model.
[0135] If the actual height of the target object is not greater than the height threshold, the detection device can determine that the target object can move from one side of the barrier pole to the other side without drilling or collapsing the pole. Therefore, the detection device can directly determine the position of the target object in the target image without detecting the posture of the target object. Accordingly, in the above step 208, the detection device can send an alarm signal when determining that the target object moves from one side of the barrier pole to the other side based on the position of the target object.
[0136] The process of detecting the actual height of the target object by the detection device may include:
[0137] Step S1: Determine a scaling ratio k based on the position of a reference point of a target object in the target image.
[0138] In an embodiment of the present application, a mapping relationship table between the position of the reference point of the target object in the target image and the scaling ratio k is pre-stored in the detection device. In the mapping relationship table, a position of the reference point of the target object in the target image corresponds to a scaling ratio k, and different positions correspond to different scaling ratios k. Among them, the reference point can be any vertex of the detection frame of the target object, for example, it can be the vertex in the lower left corner of the detection frame. After determining the position of the reference point of the target object in the target image, the detection device can query the mapping relationship table to obtain the scaling ratio k corresponding to the current position of the reference point.
[0139] Step S2: Determine the actual height of the target object according to the scaling ratio k and the pixel height p1 of the target object in the target image.
[0140] The actual height h1 of the target object satisfies: h1=k×p1. In the embodiment of the present application, the pixel height p1 of the target object in the target image may be the pixel height of the detection frame of the target object. The pixel height may refer to the number of pixels contained in the target object (or detection frame) in the height direction, and the height direction may be a direction perpendicular to the straight pole of the barrier.
[0141] The following describes the process of generating the mapping relationship table by the detection device:
[0142] The detection device pre-stores the position of the target area below the gate rod in the image captured by the image acquisition component. Figure 8 As shown, the target area b1 may be an area formed by the orthographic projection area of the barrier rod b2 on the ground in the image. The length of the target area b1 may be equal to the length of the barrier rod in the image, and the width of the target area b1 may be a preset fixed value. The width direction of the target area b1 may be perpendicular to the barrier rod.
[0143] The detection device may also pre-store the actual height of the barrier rod b2 (which may be input into the detection device by the staff). Figure 8 Taking the lower left corner vertex of the detection frame b0 as an example) located in the target area b1, the detection device can determine the actual height of the target object h0=p0×h2 / p2. Among them, p0 is the pixel height of the target object in the image, p2 is the pixel height of the barrier pole in the image, and h2 is the actual height of the barrier pole b2. Correspondingly, the detection device can set the scaling ratio k corresponding to each position in the target area b1 to k=h0 / p0=h2 / p2. Among them, the pixel height p2 of the barrier pole in the image is the pixel height of the detection frame of the barrier pole in the image.
[0144] Afterwards, the detection device can continue to detect the pixel height p3 of the target object when the reference point A of the target object is located at various positions in the non-target area. For each position, the detection device can determine the scaling ratio corresponding to the position as k=h0 / p3. Thus, the detection device can obtain a mapping relationship table.
[0145] It is understandable that the order of the steps of the target detection method provided in the embodiment of the present application can be appropriately adjusted, and the steps can also be increased or decreased accordingly according to the situation. For example, one of the above steps 201 and 202 can be deleted according to the situation, that is, the detection device can obtain the image collected by the image acquisition component based on an imaging technology. Alternatively, the above step 202 can be performed before step 201. Alternatively, the detection device may not need to perform the operation of determining whether the gate straight bar is lifted in the above step 208, that is, the detection device can directly send an alarm signal after determining that the posture of the target object is the target posture and determining that the target object moves from one side of the gate straight bar to the other side. Any technician familiar with the technical field can easily think of the method of change within the technical scope disclosed in this application, which should be covered within the scope of protection of this application, so it will not be repeated.
[0146] In summary, the embodiment of the present application provides a target detection method, and the detection device can determine multiple key feature points and positions of the target object in each frame of the target image. Moreover, when the detection device determines that the posture of the target object is the target posture based on multiple key feature points, and determines that the target object moves from one side of the straight pole of the gate to the other side based on the position of the target object in each frame of the target image, it can be determined that the target object has the behavior of crossing the pole or drilling the pole, and an alarm signal is issued. As a result, the target object can be reminded in time to stop the above behavior, reducing safety hazards. Moreover, since the detection device can combine the posture and position of the target object to jointly determine whether the target object has the behavior of crossing the pole or drilling the pole, the accuracy of the detection is effectively improved and the probability of false alarms is reduced.
[0147] Fig. 9 is a schematic diagram of the structure of a detection device provided in an embodiment of the present application, and the detection device can execute the target detection method provided in the above method embodiment. Fig. 9 As shown, the detection device 110 includes: a processor 1101 and an alarm module 1102 .
[0148] The processor 1101 is configured to:
[0149] Acquire multiple frames of target images containing the target object from the images acquired by the image acquisition component;
[0150] Determine a plurality of key feature points of the target object in each frame of the target image, and a position of the target object in each frame of the target image;
[0151] If the posture of the target object is determined to be the target posture based on multiple key feature points of the target object in multiple frames of target images, and if the target object is determined to have moved from one side of the barrier pole to the other side based on the position of the target object in the multiple frames of target images, an alarm signal is issued through the alarm module 1102; wherein the target posture includes a crossing posture and / or a drill rod posture.
[0152] Optionally, the alarm module 1102 may be a communication module, which may establish a wired or wireless communication connection with an alarm device and may send an alarm instruction to the alarm device.
[0153] Alternatively, the alarm module 1102 may be an audible and visual alarm module, that is, the detection device may directly send out an alarm signal through the alarm module 1102 .
[0154] Optionally, the multiple key feature points are key points of human skeleton; the processor 1101 is used to:
[0155] For each frame of the target image, based on the positions of a plurality of key feature points in the target image, determine the key parameters of the target image;
[0156] If the key parameter meets the target condition, the posture of the target object is determined to be the target posture;
[0157] The key parameter includes: a distance between at least two key feature points among a plurality of key feature points, and / or an angle between a line connecting at least two key feature points and a reference point in a target image.
[0158] Optionally, the key parameter includes: a first distance between a first target feature point and a second target feature point among the multiple key feature points, and the target condition includes: in the order of acquisition time of the multiple frames of target images from early to late, the first distance in at least two frames of target images gradually decreases, and the reduction degree of the first distance is greater than a first distance threshold, or the first distance in at least one frame of target images is less than a second distance threshold;
[0159] The first target feature point is a key feature point of the head or neck of the target object, and the second target feature point is a key feature point of the leg or foot of the target object.
[0160] Optionally, both the first distance threshold and the second distance threshold are positively correlated with a reference distance of the target object, where the reference distance is a distance between a first reference feature point and a second reference feature point among the multiple key feature points.
[0161] Optionally, the key parameter includes: a second distance between two second target feature points in the plurality of key feature points, and the target condition includes: in the order of acquisition time of the plurality of frames of target images from early to late, the second distance in at least two frames of target images gradually increases, and the increase degree of the second distance is greater than a third distance threshold, or the second distance in at least one frame of target images is greater than a fourth distance threshold;
[0162] The two second target feature points are respectively the key feature points of the left leg and the right leg of the target object, or are respectively the key feature points of the left foot and the right foot of the target object.
[0163] Optionally, the key parameter includes: an angle between a first connecting line and a second connecting line, the first connecting line is a connecting line between a third target feature point among the multiple key feature points and a reference point, the second connecting line is a connecting line between a fourth target feature point among the multiple key feature points and the reference point, and the third target feature point and the fourth target feature point are key feature points located on the same side of the target object;
[0164] The target conditions include: in the order of acquisition time of multiple frames of target images from early to late, the angle in at least two frames of target images gradually decreases, and the degree of reduction of the angle is greater than a first angle threshold, or the angle in at least one frame of target image is less than a second angle threshold.
[0165] Optionally, the processor 1101 is further configured to:
[0166] In a first period in which the ambient light brightness is greater than a brightness threshold, acquiring multiple frames of images acquired by the image acquisition component based on visible light imaging technology;
[0167] In a second time period when the ambient light brightness is less than or equal to the brightness threshold, multiple frames of images acquired by the image acquisition component based on thermal imaging technology are acquired.
[0168] Optionally, the processor 1101 is configured to:
[0169] Input each frame of image collected by the image acquisition component into the target detection model to obtain a recognition result of each frame of image output by the target detection model, wherein the recognition result is used to indicate whether a target object exists in the image and, when a target object exists in the image, indicate the position of the target object in the image;
[0170] Determine multiple frames of target images based on the recognition results output by the target detection model;
[0171] For each frame of the target image, the target image is input into the posture detection model to obtain multiple key feature points of the target object in the target image output by the posture detection model, and based on the recognition result of the target image, the position of the target object in the target image is determined.
[0172] Optionally, the processor 1101 is further configured to:
[0173] Determine a scaling factor k based on a position of a reference point of the target object in the target image;
[0174] According to the scaling ratio k and the pixel height p1 of the target object in the target image, determine the actual height h1 of the target object: h1=k×p1;
[0175] If the actual height of the target object is not greater than the height threshold, the position of the target object in each frame of the target image is determined, and if it is determined that the target object moves from one side of the gate pole to the other side, an alarm signal is issued through the alarm module 1102;
[0176] If the actual height of the target object is greater than the height threshold, a plurality of key feature points of the target object in each frame of the target image are determined.
[0177] Optionally, the processor 1101 is configured to:
[0178] If it is determined that the posture of the target object is the target posture, and it is determined that the target object moves from one side of the barrier pole to the other side, then it is detected whether the barrier pole is lifted during the acquisition of multiple frames of target images;
[0179] If the barrier rod is not lifted, an alarm signal is sent out through the alarm module 1102.
[0180] In summary, an embodiment of the present application provides a detection device. The detection device can determine multiple key feature points and positions of the target object in each frame of the target image. Moreover, when the detection device determines that the posture of the target object is the target posture based on multiple key feature points, and determines that the target object moves from one side of the straight pole of the gate to the other side based on the position of the target object in each frame of the target image, it can determine that the target object has the behavior of crossing the pole or drilling the pole, and send out an alarm signal. As a result, the target object can be reminded in time to stop the above behavior, reducing safety hazards. Moreover, since the detection device can combine the posture and position of the target object to jointly determine whether the target object has the behavior of crossing the pole or drilling the pole, the accuracy of the detection is effectively improved and the probability of false alarms is reduced.
[0181] The present application provides a detection device, which may include a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the target detection method provided in the above embodiment is implemented, for example Figure 2 or Figure 4 The method shown.
[0182] The present application embodiment provides a computer-readable storage medium, in which a computer program is stored. The computer program is loaded by a processor and executes the target detection method provided in the above embodiment, for example Figure 2 or Figure 4 The method shown.
[0183] The present application also provides a computer program product including instructions. When the computer program product is run on a computer, the computer executes the target detection method provided by the above method embodiment, for example: Figure 2 or Figure 4 The method shown.
[0184] The present application also provides a target detection system. Figure 1 As shown, the target detection system includes: an image acquisition component 120, and the detection device 110 provided in the above embodiment. The image acquisition component 120 is used to acquire an image of the area where the gate straight pole is located.
[0185] Optional, such as Figure 7 As shown, the target detection system may further include an alarm device 130 that establishes a communication connection with the detection device 110. The detection device 110 may send an alarm instruction to the alarm device 130, and the alarm device 130 may send an alarm signal in response to the alarm instruction. The alarm device 130 may be a device that can send a sound and / or light alarm signal.
[0186] Optionally, the alarm device 130 may be disposed near the barrier pole, so as to effectively alarm a target object that is performing a pole collapse operation or a pole drilling operation at the barrier pole.
[0187] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0188] It should be understood that the "and / or" mentioned in this article indicates that there may be three relationships. For example, A and / or B may indicate that A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated with each other are in an "or" relationship. In addition, the term "at least one" in this application means one or more, and the term "plurality" in this application means two or more.
[0189] In this application, the terms "first", "second", etc. are used to distinguish identical or similar items with basically the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there any limitation on quantity and execution order.
[0190] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A target detection method, characterized in that: A detection device used in a target detection system, wherein the target detection system further comprises an image acquisition component, wherein the image acquisition component is used to acquire an image of an area where a barrier gate straight pole is located; and the method comprises: Acquire multiple frames of target images containing the target object from the images acquired by the image acquisition component; Determine a plurality of key feature points of the target object in each frame of the target image, and a position of the target object in each frame of the target image, wherein the plurality of key feature points are key points of human skeleton; For each frame of the target image, determining key parameters of the target image based on positions of a plurality of key feature points in the target image; If the key parameter satisfies the target condition, determining the posture of the target object as the target posture; If it is determined that the posture of the target object is the target posture, and based on the position of the target object in the multiple frames of target images and the pre-stored position information of the barrier pole, it is determined that the target object moves from one side of the barrier pole to the other side, an alarm signal is issued; Wherein, the target posture includes a crossing posture and / or a drill rod posture; Wherein, the key parameter includes: a first distance between a first target feature point and a second target feature point among the multiple key feature points; the target condition includes: in the order of the acquisition time of the multiple frames of target images from early to late, the first distance in at least two frames of the target images gradually decreases, and the reduction degree of the first distance is greater than a first distance threshold, or the first distance in at least one frame of the target image is less than a second distance threshold, the first target feature point is a key feature point of the head or neck of the target object, and the second target feature point is a key feature point of the leg or foot of the target object; Alternatively, the key parameter includes: a second distance between two second target feature points among the multiple key feature points, and the target condition includes: in the order of the acquisition time of the multiple frames of target images from early to late, the second distance in at least two frames of the target images gradually increases, and the increase degree of the second distance is greater than a third distance threshold, or, the second distance in at least one frame of the target image is greater than a fourth distance threshold, and the two second target feature points are respectively the key feature points of the left leg and the right leg of the target object, or are respectively the key feature points of the left foot and the right foot of the target object; Alternatively, the key parameters include: the angle between the first line and the second line, the first line is the line between the third target feature point among the multiple key feature points and the reference point in the target image, the second line is the line between the fourth target feature point among the multiple key feature points and the reference point, the third target feature point and the fourth target feature point are key feature points located on the same side of the target object, and the target condition includes: in the order of acquisition time of the multiple frames of target images from early to late, the angle in at least two frames of the target images gradually decreases, and the degree of reduction of the angle is greater than the first angle threshold, or the angle in at least one frame of the target image is less than the second angle threshold.
2. The method according to claim 1, characterized in that The first distance threshold and the second distance threshold are both positively correlated with a reference distance of the target object, where the reference distance is a distance between a first reference feature point and a second reference feature point among the multiple key feature points.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: In a first time period in which the ambient light brightness is greater than a brightness threshold, acquiring multiple frames of images acquired by the image acquisition component based on visible light imaging technology; In a second time period when the ambient light brightness is less than or equal to the brightness threshold, a plurality of frames of images acquired by the image acquisition component based on thermal imaging technology are acquired.
4. The method according to claim 1 or 2, characterized in that: The method further comprises: Determining a scaling factor k based on a position of a reference point of the target object in the target image; According to the scaling ratio k and the pixel height p1 of the target object in the target image, determining the actual height h1 of the target object: h1=k×p1; If the actual height of the target object is not greater than the height threshold, determining the position of the target object in each frame of the target image, and if it is determined that the target object moves from one side of the gate pole to the other side, issuing an alarm signal; The determining of a plurality of key feature points of the target object in each frame of the target image comprises: If the actual height of the target object is greater than the height threshold, a plurality of key feature points of the target object in each frame of the target image are determined.
5. The method according to claim 1 or 2, characterized in that: If it is determined that the posture of the target object is the target posture, and it is determined that the target object moves from one side of the gate straight pole to the other side, an alarm signal is issued, including: If it is determined that the posture of the target object is the target posture, and it is determined that the target object moves from one side of the barrier pole to the other side, detecting whether the barrier pole is lifted during the acquisition of the multiple frames of target images; If the barrier rod is not lifted, an alarm signal is issued.
6. A detection device, characterized in that: The detection device comprises: a processor and an alarm module; the processor is used to: Acquire multiple frames of target images containing the target object from the images acquired by the image acquisition component; Determine a plurality of key feature points of the target object in each frame of the target image, and a position of the target object in each frame of the target image, wherein the plurality of key feature points are key points of human skeleton; For each frame of the target image, determining key parameters of the target image based on positions of a plurality of key feature points in the target image; If the key parameter satisfies the target condition, determining the posture of the target object as the target posture; If it is determined that the posture of the target object is the target posture, and based on the position of the target object in the multiple frames of target images and the pre-stored position information of the barrier pole, it is determined that the target object moves from one side of the barrier pole to the other side, an alarm signal is issued through the alarm module; Wherein, the target posture includes a crossing posture and / or a drill rod posture; Wherein, the key parameter includes: a first distance between a first target feature point and a second target feature point among the multiple key feature points; the target condition includes: in the order of the acquisition time of the multiple frames of target images from early to late, the first distance in at least two frames of the target images gradually decreases, and the reduction degree of the first distance is greater than a first distance threshold, or the first distance in at least one frame of the target image is less than a second distance threshold, the first target feature point is a key feature point of the head or neck of the target object, and the second target feature point is a key feature point of the leg or foot of the target object; Alternatively, the key parameter includes: a second distance between two second target feature points among the multiple key feature points, and the target condition includes: in the order of the acquisition time of the multiple frames of target images from early to late, the second distance in at least two frames of the target images gradually increases, and the increase degree of the second distance is greater than a third distance threshold, or, the second distance in at least one frame of the target image is greater than a fourth distance threshold, and the two second target feature points are respectively the key feature points of the left leg and the right leg of the target object, or are respectively the key feature points of the left foot and the right foot of the target object; Alternatively, the key parameters include: the angle between a first line and a second line, the first line is a line between a third target feature point among the multiple key feature points and a reference point in the target image, the second line is a line between a fourth target feature point among the multiple key feature points and a reference point in the target image, the third target feature point and the fourth target feature point are key feature points located on the same side of the target object, and the target condition includes: in the order of acquisition time of the multiple frames of target images from early to late, the angle in at least two frames of the target images gradually decreases, and the degree of reduction of the angle is greater than the first angle threshold, or the angle in at least one frame of the target image is less than the second angle threshold.
Citation Information
Patent Citations
Behavior detection method, system, device and computer equipment
CN111881754A