Method, device and equipment for remotely detecting wearing of safety helmet and storage medium

By using PTZ gimbal camera and deep learning technology, long-distance detection of safety helmets is achieved, solving the problem of limited detection range in traditional methods and improving detection accuracy and efficiency.

CN120014537APending Publication Date: 2025-05-16SHANGHAI DIANZE INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411980900.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

The long-distance observation of the safety helmet cannot be achieved in the prior art, resulting in limited detection range and difficult to meet the needs of large outdoor sites.

Method used

The PTZ gimbal camera based on panoramic presets is used to collect video streams, and the long-distance detection of the safety helmet is achieved through humanoid detection and close-range monitoring.

Benefits of technology

It improves the accuracy of safety helmet inspection, reduces the influence of factors such as distance, light and occlusion, and meets the inspection needs of large outdoor sites.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120014537A_ABST
    Figure CN120014537A_ABST
Patent Text Reader

Abstract

The invention provides a method, a device and equipment for remotely detecting wearing of a safety helmet, and a storage medium. The method comprises the following steps: acquiring a video stream of a target site by using a PTZ (Pan / Tilt / Zoom) camera based on a panoramic preset position; frame pictures in the video stream are used for carrying out human shape detection, and when a human shape is detected, close-range monitoring is carried out on the currently detected human shape by adjusting the focal length of a holder; under close-range monitoring, a video stream containing a target human shape is collected based on a PTZ holder camera, and safety helmet detection is carried out based on frame pictures in the video stream containing the target human shape. According to the invention, human shape detection is carried out by using the PTZ camera, and then close-range monitoring and safety helmet detection identification are carried out, so that the safety helmet identification accuracy of large outdoor sites such as construction sites and power plants is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent monitoring technology, and specifically, to a method, device, equipment and storage medium for long-distance detection of helmet wearing, and more specifically, to a method, device, equipment and storage medium for long-distance detection of helmet wearing based on deep learning technology. Background Art

[0002] In recent years, with the increase in the construction and operation of large outdoor sites, the focus on worker safety has increased. In these scenarios, wearing a hard hat is an important safety requirement. However, in the prior art, the commonly used hard hat detection method is based on a combination of image processing and machine learning algorithms. These methods usually detect the human body and the head, and then detect and identify the hard hat. However, due to the complexity of large outdoor sites, traditional detection methods face the following problems: low detection accuracy due to long-distance observation; in large outdoor sites, long-distance observation is often required, and traditional methods cannot achieve long-distance observation of hard hats, resulting in a limited detection range of hard hats, which is difficult to meet the needs of large outdoor sites.

[0003] In summary, in order to address the problem of low accuracy in helmet recognition at large outdoor sites such as construction sites and power plants, a deep learning-based long-distance observation helmet wearing detection method is needed to improve the detection accuracy and address the limitation of long-distance observation. Summary of the invention

[0004] The main purpose of the present invention is to solve the problem that the long-distance observation of the safety helmet cannot be realized in the prior art, resulting in a limited detection range of the safety helmet and difficulty in meeting the needs of large outdoor sites.

[0005] The first aspect of the present invention provides a method for long-distance detection of helmet wearing, comprising: using a PTZ pan-tilt camera based on a panoramic preset position to collect a video stream of a target scene; using frame images in the video stream to detect human figures, and when a human figure is detected, close-range monitoring of the currently detected human figure is achieved by adjusting the pan-tilt focal length; under close-range monitoring, a video stream containing a target human figure is collected based on the PTZ pan-tilt camera, and helmet detection is performed based on the frame images in the video stream containing the target human figure.

[0006] Optionally, in a first implementation manner of the first aspect of the present invention, before using the PTZ pan-tilt camera based on the panoramic preset position to collect the video stream of the target scene, the method also includes: establishing a connection between the PTZ pan-tilt and the server; wherein the server connected to the PTZ pan-tilt is used to remotely control the PTZ pan-tilt, obtain the target scene video stream collected by the PTZ pan-tilt, and perform target detection based on the frame pictures corresponding to the obtained target scene video stream using a deep learning model.

[0007] Optionally, in a second implementation manner of the first aspect of the present invention, before the PTZ pan-tilt based on the panoramic preset position is used to collect the video stream of the target scene, the method also includes: deploying a PyTorch framework on a server, building different deep learning models through the PyTorch framework, and training the different deep learning models, and deploying the trained different deep learning models on the server; the different deep learning models include: a first human figure detection model, a second human figure detection model, a head detection model and a helmet detection model; the first human figure detection model is based on a deep learning model, and realizes human figure detection by using the target scene video stream obtained by the panoramic preset position; the second human figure detection model is based on a deep learning model, and realizes human figure detection by using the target scene video stream obtained under close-range monitoring; the head detection model is based on a deep learning model, and realizes head detection by using the target scene video stream obtained under close-range monitoring; the helmet detection model is based on a deep learning model, and realizes helmet detection by using the target scene video stream obtained under close-range monitoring.

[0008] Optionally, in a third implementation method of the first aspect of the present invention, the use of frame images in the video stream to perform human shape detection includes: setting a frequency setting for extracting frame images on the server; wherein the server after the frequency setting for extracting frame images is used to periodically extract frame images from the PTZ pan-tilt video stream; and performing human shape detection using a first human shape detection model based on the frame images periodically extracted from the PTZ pan-tilt video stream.

[0009] Optionally, in a fourth implementation method of the first aspect of the present invention, the close-range monitoring of the currently detected human figure is achieved by adjusting the pan-tilt focal length, including: calculating the distance between the detected human figure and the PTZ pan-tilt camera based on the position information of the detected human figure in the picture frame, combined with the installation position and angle of the PTZ pan-tilt camera; and automatically adjusting the focal length of the PTZ pan-tilt camera based on the set focal length adjustment rules according to the calculated distance between the detected human figure and the PTZ pan-tilt camera.

[0010] Optionally, in a fifth implementation of the first aspect of the present invention, under close-range monitoring, a video stream containing a target human figure is collected based on a PTZ camera, and safety helmet detection is performed based on frame images in the video stream containing the target human figure, including: extracting frame images in real time from the video stream containing the target human figure collected by the PTZ camera, and performing human figure detection using a second human figure detection model based on the currently extracted frame images; when a human figure is confirmed, performing head detection using a human head detection model based on the currently extracted frame images; when a human head is confirmed, performing safety helmet detection using a safety helmet detection model based on the currently extracted frame images.

[0011] Optionally, in a sixth implementation of the first aspect of the present invention, when it is detected that a person is not wearing a safety helmet, the server issues an alarm message and displays it on a display screen.

[0012] The second aspect of the present invention provides a device for long-distance detection of the wearing of a safety helmet, comprising: a video stream acquisition module, which is used to use a PTZ pan-tilt camera based on a panoramic preset position to acquire a video stream of a target scene; a human figure detection module, which is used to use frame images in the video stream to perform human figure detection, and when a human figure is detected, close-range monitoring of the currently detected human figure is achieved by adjusting the pan-tilt focal length; a safety helmet detection module, which is used to perform safety helmet detection under close-range monitoring based on frame images in the target scene video stream acquired by the PTZ pan-tilt camera.

[0013] Optionally, in a first implementation method of the second aspect of the present invention, before using a PTZ pan-tilt camera based on a panoramic preset position to collect the video stream of the target scene, it also includes: establishing a connection between the PTZ pan-tilt and a server; wherein the server connected to the PTZ pan-tilt is used to remotely control the PTZ pan-tilt, obtain the target scene video stream collected by the PTZ pan-tilt, and use a deep learning model to perform target detection based on the frame images corresponding to the obtained target scene video stream.

[0014] Optionally, in a second implementation of the second aspect of the present invention, before using a PTZ pan-tilt based on a panoramic preset position to collect a video stream of the target scene, it also includes: deploying a PyTorch framework on a server, building different deep learning models through the PyTorch framework, and training different deep learning models, and deploying the trained different deep learning models on the server; the different deep learning models include: a first human figure detection model, a second human figure detection model, a head detection model and a helmet detection model; the first human figure detection model is based on a deep learning model, and uses the target scene video stream obtained by the panoramic preset position to realize human figure detection; the second human figure detection model is based on a deep learning model, and uses the target scene video stream obtained under close-range monitoring to realize human figure detection; the head detection model is based on a deep learning model, and uses the target scene video stream obtained under close-range monitoring to realize head detection; the helmet detection model is based on a deep learning model, and uses the target scene video stream obtained under close-range monitoring to realize head detection.

[0015] Optionally, in a third implementation method of the second aspect of the present invention, the human shape detection module includes: setting a frequency for extracting frame images on the server; wherein the server after the frequency for extracting frame images is set is used to extract frame images from the PTZ pan-tilt video stream at a regular interval; and performing human shape detection using a first human shape detection model based on the frame images extracted from the PTZ pan-tilt video stream at a regular interval.

[0016] Optionally, in a fourth implementation method of the second aspect of the present invention, the close-range monitoring of the currently detected human figure is achieved by adjusting the pan-tilt focal length, including: calculating the distance between the detected human figure and the PTZ pan-tilt camera based on the position information of the detected human figure in the picture frame, combined with the installation position and angle of the PTZ pan-tilt camera; and automatically adjusting the focal length of the PTZ pan-tilt camera based on the set focal length adjustment rules according to the calculated distance between the detected human figure and the PTZ pan-tilt camera.

[0017] Optionally, in a fifth implementation of the second aspect of the present invention, the helmet detection module includes: a human figure detection confirmation unit: extracting frame images in real time based on the video stream containing the target human figure collected by the PTZ pan-tilt camera, and performing human figure detection based on the currently extracted frame images using a second human figure detection model; a head detection unit: when confirmed to be a human figure, performing head detection based on the currently extracted frame images using a head detection model; a helmet detection unit: when confirmed to be a human head, performing helmet detection based on the currently extracted frame images using a helmet detection model.

[0018] Optionally, in a sixth implementation of the second aspect of the present invention, it also includes: an alarm module: when it is detected that a person is not wearing a safety helmet, the server sends an alarm message and displays it on a display screen.

[0019] A third aspect of the present invention provides an electronic device, comprising a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the electronic device executes the various steps of the method for remotely detecting the wearing of a safety helmet as described above.

[0020] A fourth aspect of the present invention provides a computer-readable storage medium having instructions stored thereon, and when the instructions are executed by a processor, the various steps of the method for remotely detecting the wearing of a safety helmet as described above are implemented.

[0021] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention uses the camera of the PTZ pan / tilt platform to perform long-distance observation and close-range identification, effectively solving the accuracy of helmet identification, and is not easily affected by factors such as distance, lighting, and occlusion; 2. After detecting a person, the present invention automatically adjusts the magnification of the pan / tilt according to the distance to achieve close-range recognition; compared with the traditional fixed magnification observation method, it can more accurately observe the details of the person and improve the accuracy of helmet detection; 3. The present invention can quickly determine whether a helmet is worn through two steps: human body detection and head detection. When a head is confirmed, the helmet can be detected and identified; compared with the traditional frame-by-frame traversal detection method, a lot of computing time is saved and the detection speed is improved.

[0022] 4. The present invention uses a PTZ camera to first detect human figures, then conduct close-range monitoring and helmet detection and identification, thereby improving the accuracy of helmet identification in large outdoor sites such as construction sites and power plants; BRIEF DESCRIPTION OF THE DRAWINGS Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings: Figure 1 A first flow chart of a method for remotely detecting helmet wearing provided in an embodiment of the present invention.

[0023] Figure 2 A second flow chart of the method for remotely detecting helmet wearing provided in an embodiment of the present invention.

[0024] Figure 3 A schematic structural diagram of a device for remotely detecting the wearing of a safety helmet provided in an embodiment of the present invention.

[0025] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The embodiment of the present invention provides a method, device, equipment and storage medium for long-distance detection of helmet wearing, using a PTZ pan-tilt camera based on a panoramic preset position to collect a video stream of the target scene; using frame images in the video stream to detect human figures, and when a human figure is detected, close-range monitoring of the currently detected human figure is achieved by adjusting the pan-tilt focal length; under close-range monitoring, a video stream containing the target human figure is collected based on the PTZ pan-tilt camera, and helmet detection is performed based on the frame images in the video stream containing the target human figure. The present invention solves the problem of low detection accuracy due to long-distance observation in large outdoor sites such as construction sites and power plants.

[0027] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 The first embodiment of the method for remotely detecting the wearing of a helmet in the embodiment of the present invention includes: 101. Use a PTZ camera based on panoramic preset positions to collect the video stream of the target scene; The PTZ camera has horizontal rotation, vertical rotation and zoom functions. In this embodiment, the PTZ camera is remotely controlled by a server connected to the PTZ camera to adjust the angle and focal length of the camera, thereby achieving a more flexible monitoring function. In this embodiment, a PTZ camera is deployed at the target site, and the PTZ panoramic preset position is set to the initial position; Use the PTZ pan / tilt set to the initial position to monitor the target scene in real time and obtain video stream data.

[0029] 102. Detect human figures using frame images in the video stream. When a human figure is detected, the pan-tilt focus is adjusted to achieve close-range monitoring of the currently detected human figure. In this embodiment, a server connected to the PTZ pan-tilt head receives video stream data transmitted from the PTZ pan-tilt head through a network, and decodes the received video stream data to obtain image frames corresponding to the video stream data; the server extracts the corresponding frame images based on the image frames corresponding to the video stream data at a fixed time, and performs human figure detection based on the acquired frame images using the deep learning technology deployed on the server; when a human figure is detected, the server connected to the PTZ pan-tilt head controls the PTZ pan-tilt head camera to automatically change the appropriate focal length according to the scene, and stops zooming after reaching an appropriate position; 103. Under close-range monitoring, the video stream containing the target human figure is collected based on the PTZ camera, and the helmet detection is performed based on the frame images in the video stream containing the target human figure; In this embodiment, the PTZ camera collects a video stream containing a target human figure at the current focal length to achieve close-range monitoring; the PTZ camera transmits the collected video stream containing the target human figure to the server, and the server decodes the currently received video stream containing the target human figure to obtain an image frame corresponding to the video stream; based on the image frame corresponding to the current video stream, the deep learning technology deployed on the server is used to confirm whether a human figure is contained; When it is confirmed that a human figure is contained, head detection is performed based on the image frame corresponding to the current video stream using the deep learning technology deployed on the server; When a human head is confirmed, the helmet is detected based on the extracted frame image corresponding to the current video stream using the deep learning technology deployed on the server.

[0030] After the current target human helmet detection is completed, the PTZ camera returns to the initial position and performs helmet detection again.

[0031] This embodiment uses the PTZ pan / tilt to adjust the camera angle and focal length through remote control. The PTZ camera can observe from a long distance and identify from a close distance, which effectively solves the problem of low detection accuracy due to long-distance observation.

[0032] At the same time, compared with the prior art method of traversing frame by frame to detect whether a helmet is worn, the present invention can quickly determine whether a helmet is worn through two steps of human shape detection and head detection, saving a lot of calculation time and improving the detection speed.

[0033] Therefore, the method for remotely detecting the wearing of safety helmets provided by the present invention effectively solves the problem of low safety helmet recognition accuracy in large outdoor sites such as construction sites and power plants, and improves the efficiency and accuracy of safety management. Through the automated safety helmet detection system, workers who are not wearing safety helmets can be monitored and reminded in real time, thereby reducing the probability of accidents and ensuring the personal safety of workers. At the same time, the present invention can also reduce the burden on supervisors and improve work efficiency.

[0034] See also Figure 2 The first embodiment of the method for remotely detecting the wearing of a helmet in the embodiment of the present invention includes: 201. Establish a connection between the PTZ pan / tilt and the server; In this embodiment, the PTZ pan / tilt is connected to the server via a network; Among them, the PTZ camera has horizontal rotation, vertical rotation and zoom functions; the server connected to the PTZ is used to remotely control the PTZ, including controlling and adjusting the angle and focal length of the PTZ camera, thereby achieving more flexible monitoring functions; The target scene video stream is collected through the PTZ pan-tilt head and transmitted to the server through the network. The server receives the video stream data transmitted from the PTZ pan-tilt head and decodes the received video stream data to obtain the image frames corresponding to the video stream data. The server performs timed extraction based on the image frames corresponding to the video stream data to obtain the corresponding frame pictures. The server uses a deep learning model to perform target detection based on the obtained frame pictures.

[0035] 202. Deploy the PyTorch framework on the server, build different deep learning models through the PyTorch framework, train different deep learning models, and deploy the trained different deep learning models on the server; In this embodiment, different deep learning models are trained, including: preparing a data set for training the deep learning model, ensuring that the data set format meets the requirements of PyTorch; using the prepared data set to train the deep learning model; after the training is completed, the trained deep learning model is evaluated, and a validation set or a test set can be used for evaluation; finally, the trained different deep learning models are deployed on the server. In this embodiment, the model can be saved as a .pth file or deployed using other deployment methods; after the deployment is completed, prediction, reasoning and other operations are performed by calling different deep learning models on the server.

[0036] Different deep learning models include: first human shape detection model, second human shape detection model, head detection model, and helmet detection model; The first human shape detection model is based on a deep learning model, which realizes human shape detection by using picture frames extracted from the target scene video stream obtained based on the panoramic preset position; The second human detection model is based on a deep learning model, which uses image frames extracted from the target scene video stream obtained under close-range monitoring to achieve human detection; The head detection model is based on a deep learning model, which uses image frames extracted from the target scene video stream obtained under close-range monitoring to achieve head detection; The hard hat detection model is based on a deep learning model and uses image frames extracted from the target scene video stream acquired under close-range monitoring to achieve hard hat detection.

[0037] 203. Collect the video stream of the target scene using a PTZ camera based on a panoramic preset position; 204. Detecting a human figure using a frame image in a video stream. When a human figure is detected, close-range monitoring of the currently detected human figure is achieved by adjusting the pan / tilt focus. In this embodiment, the server is set to extract frame pictures at an interval frequency; wherein the server after the frame picture extraction interval frequency is set is used to extract frame pictures from the image frames decoded from the video stream data transmitted by the server based on the PTZ pan-tilt head at a fixed time; Based on timing, frame images are extracted from image frames decoded from video stream data transmitted by the server based on the PTZ pan-tilt system, and human shape detection is performed using the first human shape detection model.

[0038] According to the position information of the detected human figure in the picture frame, combined with the installation position and angle of the PTZ camera, the distance between the detected human figure and the PTZ camera is calculated; according to the calculated distance between the detected human figure and the PTZ camera, the focal length of the PTZ camera is automatically adjusted based on the set focal length adjustment rule.

[0039] 205. Under close-range monitoring, a video stream containing a target human figure is collected based on a PTZ camera, and a helmet is detected based on a frame image in the video stream containing the target human figure; In this embodiment, the PTZ camera collects a video stream containing a target human figure at the current focal length to achieve close-range monitoring; the PTZ camera transmits the collected video stream containing the target human figure to the server, and the server decodes the currently received video stream containing the target human figure to obtain an image frame corresponding to the video stream; based on the image frame corresponding to the current video stream, the second human figure detection model is used to perform human figure detection to reconfirm the human figure; When a human figure is confirmed, head detection is performed using a head detection model based on the frame image corresponding to the current video stream; When a human head is confirmed, the helmet detection model is used to detect the helmet based on the frame image corresponding to the current video stream.

[0040] 206. When it is detected that a person is not wearing a safety helmet, an alarm message is sent out by using the server, so that the terminal displays the alarm message through a display screen.

[0041] In this embodiment, the server sends alarm information to the terminal through email, SMS, push notification, etc. After the terminal receives the alarm information sent by the server, the terminal displays the alarm information on a display screen.

[0042] After detecting a person, this embodiment automatically adjusts the magnification of the pan / tilt according to the distance to achieve close-range recognition. Compared with the traditional fixed magnification observation method, it can more accurately observe the details of the person and improve the accuracy of helmet detection. In specific application scenarios, the present invention can effectively solve the problem of low accuracy of helmet recognition in large outdoor sites such as construction sites and power plants, and improve the safety management level of the workplace.

[0043] The above describes the method for long-distance detection of helmet wearing in the embodiment of the present invention. The following describes the device for long-distance detection of helmet wearing in the embodiment of the present invention. Figure 3 In one embodiment of the present invention, a device for remotely detecting the wearing of a helmet comprises: The server setting module 301 is used to connect the PTZ pan / tilt head with the server, deploy the PyTorch framework on the server, and build different deep learning models through the PyTorch framework; In this embodiment, the server setting module 301 includes: A connection unit 3011 is used to connect the PTZ head to the server via a network; Among them, the PTZ camera has horizontal rotation, vertical rotation and zoom functions; the server connected to the PTZ is used to remotely control the PTZ, including controlling and adjusting the angle and focal length of the PTZ camera, thereby achieving more flexible monitoring functions; The target scene video stream is collected through the PTZ pan-tilt and transmitted to the server through the network. The server receives the video stream data transmitted from the PTZ pan-tilt and decodes the received video stream data to obtain the image frame corresponding to the video stream data; the server performs timed extraction based on the image frame corresponding to the video stream data to obtain the corresponding frame image; A deep learning model deployment unit 3012 deploys a PyTorch framework on a server, builds different deep learning models through the PyTorch framework, trains different deep learning models, and deploys the trained different deep learning models on the server; In this embodiment, different deep learning models are trained, including: preparing a data set for training the deep learning model, ensuring that the data set format meets the requirements of PyTorch; using the prepared data set to train the deep learning model; after the training is completed, the trained deep learning model is evaluated, and a validation set or a test set can be used for evaluation; finally, the trained different deep learning models are deployed on the server. In this embodiment, the model can be deployed by saving it as a .pth file or using other deployment methods.

[0044] Different deep learning models include: first human shape detection model, second human shape detection model, head detection model, and helmet detection model; The first human shape detection model is based on a deep learning model, which realizes human shape detection by using picture frames extracted from the target scene video stream obtained based on the panoramic preset position; The second human detection model is based on a deep learning model, which uses image frames extracted from the target scene video stream obtained under close-range monitoring to achieve human detection; The head detection model is based on a deep learning model, which uses image frames extracted from the target scene video stream obtained under close-range monitoring to achieve head detection; The hard hat detection model is based on a deep learning model and uses image frames extracted from the target scene video stream acquired under close-range monitoring to achieve hard hat detection.

[0045] The video stream acquisition module 302 is used to acquire the video stream of the target scene using a PTZ camera based on a panoramic preset position; In this embodiment, a PTZ camera is deployed at the target site, and the PTZ panoramic preset position is set to the initial position; Use the PTZ pan / tilt set to the initial position to monitor the target scene in real time and obtain video stream data.

[0046] A human shape detection module 303 is used to perform human shape detection using frame images in a video stream; In this embodiment, the server is set to extract frame pictures at an interval frequency; wherein the server after the frame picture extraction interval frequency is set is used to extract frame pictures from the image frames decoded from the video stream data transmitted by the server based on the PTZ pan-tilt head at a fixed time; Based on timing, frame images are extracted from image frames decoded from video stream data transmitted by the server based on the PTZ pan-tilt system, and human shape detection is performed using the first human shape detection model.

[0047] A focus adjustment module 304, used to achieve close-range monitoring of the currently detected human figure by adjusting the focus of the pan / tilt when a human figure is detected; In this embodiment, only long-distance observation is currently implemented, which may lead to low detection accuracy. Therefore, the focal length of the PTZ pan / tilt is adjusted through server control to achieve close-range recognition. Specifically, it is first necessary to calculate the distance between the detected human figure and the PTZ camera based on the position information of the detected human figure in the picture frame, combined with the installation position and angle of the PTZ camera; based on the calculated distance between the detected human figure and the PTZ camera, the focal length of the PTZ camera is automatically adjusted based on the set focal length adjustment rules.

[0048] The helmet detection module 305 is used to detect the helmet under close-range monitoring based on the frame images in the target scene video stream collected by the PTZ camera.

[0049] In this embodiment, the helmet detection module 305 includes: The human figure detection unit 3051 is used for the PTZ camera to collect a video stream containing a target human figure at the current focal length to achieve close-range monitoring; the PTZ camera transmits the collected video stream containing the target human figure to the server, and the server decodes the currently received video stream containing the target human figure to obtain an image frame corresponding to the video stream; based on the image frame corresponding to the current video stream, the second human figure detection model is used to perform human figure detection and re-confirm the human figure; A head detection unit 3052 is used to perform head detection using a head detection model based on a frame image corresponding to the current video stream when a human figure is confirmed; The helmet detection unit 3053 is used to perform helmet detection based on the frame image corresponding to the current video stream using the helmet detection model when a human head is confirmed.

[0050] The module 306 for sending out warning information is used for the server to send out warning information when it is detected that a person is not wearing a safety helmet, so that the terminal can display the warning information through the display screen.

[0051] In this embodiment, the server sends alarm information to the terminal through email, SMS, push notification, etc. After the terminal receives the alarm information sent by the server, the terminal displays the alarm information on a display screen.

[0052] In this embodiment, a device for long-distance detection of helmet wearing is provided, which is a long-distance observation helmet wearing detection method using deep learning, which can detect human body through the camera of PTZ pan-tilt head, and zoom in and observe after detecting the person, and then perform human body detection and head detection again to determine whether the helmet is worn; the present invention can monitor and remind the staff who are not wearing the helmet in real time through the automated helmet detection system; the present invention solves the supervision problem of helmet wearing caused by the inaccuracy and inefficiency of manual recognition in large outdoor field application fields including construction sites and power plants, thereby reducing the probability of accidents and ensuring the personal safety of staff; from the perspective of market demand, with the continuous development of the construction industry and the power industry, the requirements for safety management are getting higher and higher. Especially in large outdoor sites such as construction sites and power plants, the requirements for staff to wear helmets are particularly strict. Therefore, the long-distance observation helmet wearing detection device using deep learning has broad application prospects in the market and meets the market demand for safety management.

[0053] above Figure 3 The device for remotely detecting the wearing of a helmet in an embodiment of the present invention is described in detail from the perspective of modular functional entities. The electronic device in an embodiment of the present invention is described in detail from the perspective of hardware processing.

[0054] Figure 46 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device 600 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 610 (for example, one or more processors) and a memory 620, and one or more storage media 630 (for example, one or more mass storage devices) storing application programs 633 or data 632. Among them, the memory 620 and the storage medium 630 can be short-term storage or permanent storage. The program stored in the storage medium 630 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the electronic device 600. Furthermore, the processor 610 may be configured to communicate with the storage medium 630 to execute a series of instruction operations in the storage medium 630 on the electronic device 600.

[0055] The electronic device 600 may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input and output interfaces 650, and / or one or more operating systems 631, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 4 The structure of the electronic device shown does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine some components, or arrange the components differently.

[0056] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the method for remotely detecting the wearing of a safety helmet.

[0057] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.

[0058] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0059] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for remotely detecting the wearing of a helmet, characterized in that: include: Use the PTZ camera based on panoramic preset positions to collect the video stream of the target scene; Use the frame images in the video stream to detect human figures. When a human figure is detected, the focus of the gimbal is adjusted to achieve close-range monitoring of the currently detected human figure. Under close-range monitoring, the video stream containing the target human figure is collected based on the PTZ camera, and the helmet is detected based on the frame images in the video stream containing the target human figure.

2. The method for remotely detecting helmet wearing according to claim 1, characterized in that: Before collecting the video stream of the target scene by using the PTZ camera based on the panoramic preset position, the method further includes: Establish a connection between the PTZ pan-tilt and the server; wherein the server connected to the PTZ pan-tilt is used to remotely control the PTZ pan-tilt, obtain the target scene video stream collected by the PTZ pan-tilt, and use the deep learning model to perform target detection based on the frame pictures corresponding to the obtained target scene video stream.

3. The method for remotely detecting helmet wearing according to claim 2, characterized in that: Before collecting the video stream of the target scene by using the PTZ camera based on the panoramic preset position, the method further includes: Deploy the PyTorch framework on the server, build different deep learning models through the PyTorch framework, train different deep learning models, and deploy the trained different deep learning models on the server; The different deep learning models include: a first human shape detection model, a second human shape detection model, a head detection model, and a helmet detection model; The first human shape detection model is based on a deep learning model and uses a target scene video stream obtained from a panoramic preset position to realize human shape detection; The second human shape detection model is based on a deep learning model and uses a target scene video stream acquired under close-range monitoring to achieve human shape detection; The head detection model is based on a deep learning model and uses the target scene video stream acquired under close-range monitoring to achieve head detection; The helmet detection model is based on a deep learning model and uses a target scene video stream acquired under close-range monitoring to achieve helmet detection.

4. The method for remotely detecting helmet wearing according to claim 3, characterized in that: The method of detecting a human figure by using a frame image in a video stream includes: The server is set to extract frame images at an interval frequency; wherein the server after the frame image extraction interval frequency is set is used to extract frame images from the PTZ pan-tilt video stream at a regular interval; Based on the frame images extracted from the PTZ video stream at regular intervals, human shape detection is performed using the first human shape detection model.

5. The method for remotely detecting helmet wearing according to claim 1, characterized in that: The method of implementing close-range monitoring of the currently detected human figure by adjusting the pan-tilt focal length includes: According to the position information of the detected human figure in the picture frame, combined with the installation position and angle of the PTZ camera, the distance between the detected human figure and the PTZ camera is calculated; according to the calculated distance between the detected human figure and the PTZ camera, the focal length of the PTZ camera is automatically adjusted based on the set focal length adjustment rule.

6. The method for remotely detecting helmet wearing according to claim 3, characterized in that: Under close-range monitoring, the PTZ camera collects the video stream containing the target human figure, and performs helmet detection based on the frame images in the video stream containing the target human figure, including: Extract frame images in real time from the video stream containing the target human figure collected by the PTZ camera, and perform human figure detection using the second human figure detection model based on the currently extracted frame images; When it is confirmed to be a human figure, head detection is performed using the head detection model based on the currently extracted frame image; When it is confirmed to be a human head, the helmet detection model is used to detect the helmet based on the currently extracted frame image.

7. The method for remotely detecting helmet wearing according to claim 1, characterized in that: When it is detected that a person is not wearing a safety helmet, an alarm message is sent out by the server so that the terminal can display the alarm message through the display screen.

8. A device for remotely detecting the wearing of a helmet, characterized in that: include: The video stream acquisition module is used to acquire the video stream of the target scene using a PTZ camera based on a panoramic preset position; The human figure detection module is used to detect human figures using frame images in the video stream. When a human figure is detected, the pan-tilt focus is adjusted to achieve close-range monitoring of the currently detected human figure. The helmet detection module is used to detect helmets under close-range monitoring based on frame images in the target scene video stream collected by the PTZ camera.

9. An electronic device, comprising a memory and at least one processor, characterized in that: Instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the electronic device to execute the various steps of the method for remotely detecting the wearing of a helmet as described in any one of claims 1 to 7.

10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the steps of the method for remotely detecting the wearing of a helmet as claimed in any one of claims 1 to 7 are implemented.