Safety helmet wearing detection method and system

Through the safety helmet detection model and ranging signal verification, it is possible to automatically detect whether workers are wearing safety helmets, which solves the cost increase problem caused by manual participation in detection and improves detection accuracy.

CN112487963BActive Publication Date: 2024-09-24DONGYING HONGXING LABOR INSURANCE PROD CO LTD
View PDF 15 Cites 0 Cited by

Patent Information

Application Number
CN202011367620.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-27
Publication Date
2024-09-24
Estimated Expiration
2040-11-27

AI Technical Summary

Technical Problem

In the existing technology, detecting whether workers wear safety helmets requires manual participation, which leads to an increase in labor costs for construction.

Method used

Using a hard hat detection model, it obtains photos of the construction site, extracts images of the human head area, uses a pre-trained model to detect whether a hard hat is worn, and verifies the accuracy of the detection results through ranging instructions and real-time distance signals to reduce errors. Judgment.

Benefits of technology

It can detect whether workers are wearing safety helmets without manual participation, which reduces the labor cost of construction and improves the accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112487963B
    Figure CN112487963B
Patent Text Reader

Abstract

The present application discloses a method for detecting the wearing of a safety helmet, comprising: obtaining a photo taken by a camera device; extracting a head area image of a human body in the photo; inputting the head area image into a safety helmet detection model; receiving a detection result output by the safety helmet detection model; if the detection result is that the worker is wearing a safety helmet, no safety helmet wearing prompt instruction is issued; if the detection result is that the worker is not wearing a safety helmet, receiving a real-time distance signal between the safety helmet and a first obstacle on the ground transmitted by the safety helmet within a first preset time; calculating the absolute value of the difference between the real-time distance signal and the height of the worker; judging whether the absolute value within a second preset time has changed, and judging that the absolute value is within a preset threshold range, if the absolute value within the second preset time has changed, and is within the preset threshold range, then verifying that the detection result is wrong, and if the absolute value within a period of time has not changed or is not within the preset threshold range, then verifying that the detection result is correct.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of safety helmets, and in particular to a method and system for detecting the wearing of safety helmets. Background Art

[0002] At some construction sites, workers are often required to wear helmets for their safety, so as to effectively protect their heads when encountering emergencies at the construction site. However, workers may not wear helmets at construction sites due to weak safety awareness, which brings high safety risks to workers.

[0003] In order to reduce the safety hazards caused by workers not wearing safety helmets, cameras are generally installed at construction sites, and then the video captured by the cameras is manually observed to confirm whether the workers are wearing safety helmets, or inspection personnel are deployed at the construction site to check whether the workers are wearing safety helmets.

[0004] However, whether installing cameras at the construction site or staffing inspection personnel at the construction site, detecting whether workers are wearing safety helmets requires manual participation, which increases the labor cost of construction investment. Summary of the invention

[0005] In view of this, the present application provides a method and system for detecting the wearing of a safety helmet to solve the problem that the existing detection of whether a worker is wearing a safety helmet requires manual participation, thereby increasing the labor cost of construction investment.

[0006] The present application provides a method for detecting the wearing of a safety helmet, comprising: obtaining a photo taken by a camera device at a construction site; extracting an image of a head area of ​​a human body in the photo; inputting the image of the head area into a pre-trained safety helmet detection model, the safety helmet detection model being used to detect whether the human head in the photo is wearing a safety helmet; receiving a detection result output by the safety helmet detection model; if the detection result is that the worker is wearing a safety helmet, no instruction to remind the worker to wear a safety helmet is issued; if the detection result is that the worker is not wearing a safety helmet, continuously sending a distance measurement instruction to a safety helmet bound to the worker within a first preset time, and receiving a real-time distance signal between the safety helmet and the first obstacle on the ground transmitted by the safety helmet, the safety helmet detection model being used to detect whether the worker is wearing a safety helmet; and receiving a real-time distance signal between the safety helmet and the first obstacle on the ground transmitted by the safety helmet. The full helmet is provided with a distance measuring device and a signal transceiver; the absolute value of the difference between the real-time distance signal and the pre-collected height of the worker is calculated; whether the absolute value changes within a second preset time, and whether the absolute value is within a preset threshold range, the second preset time is the time when the worker's body posture obtained from the photo changes within the first preset time, if the absolute value changes within the second preset time, and is within the preset threshold range, then it is verified that the detection result is wrong, and no instruction to wear a safety helmet is issued; if the absolute value does not change within the second preset time, then it is verified that the detection result is correct, and an instruction to wear a safety helmet is issued;

[0007] If the change of the absolute value within the second preset time is not within the preset value threshold range, the detection result is verified to be correct, and a reminder instruction to wear a helmet is issued.

[0008] Among them, the extraction of the head area image of the human body in the photo includes: using a head detection algorithm to extract a first image on the photo, the first image has an image of the area where the human head is located; using a skin color feature recognition method to extract a second image on the photo, the second image has an image of the area where the human skin is located; using the first extracted image and the second extracted image for cross-screening to obtain a head area image with a human head.

[0009] Among them, the method of using skin color feature recognition to extract the second image from the photo includes: performing light compensation on the photo; clustering the color features of the worker's skin color in the photo on a three-dimensional color space model; performing a top hat transformation on the photo to mark the image of the skin area in the photo that has human skin features; and setting the photo with the marked image of the skin area as the second image.

[0010] Among them, using the first extracted image and the second extracted image for cross-screening to obtain a head area image with a human head includes: crossing the first image and the second image; detecting whether the image of the skin area on the second image overlaps with the image of the head area on the first image; if overlapping, setting the overlapping part as the head area of ​​the worker in the photo; if there is no overlapping part, setting the photo to have no head area of ​​the worker.

[0011] The training method of the safety helmet detection model is as follows: constructing a regional recommendation network to extract a fixed number of recommendation network frames on an image, the image comes from a pre-prepared image data set, and the images in the image data set have annotation labels indicating whether the workers wear safety helmets; constructing a convolution layer and a pooling layer to extract basic information of the image and generate a feature map; constructing an ROI pooling layer to map the feature map to a feature vector of the same size as the recommendation network frame; constructing a fully connected layer to perform Softmax classification and bounding box region frame regression processing on the feature vector in the fully connected layer using a singular value decomposition method to determine the image category in the recommendation network frame relative to the feature vector, the image category is an image of the category of whether the safety helmet is worn corresponding to the annotation label, and the construction of the safety helmet detection model is completed; using the image set as training data to complete the training of the safety helmet detection model.

[0012] The method further includes: after issuing the reminder instruction to wear a safety helmet, using a face recognition algorithm to match the worker who is not wearing a safety helmet in the photo with the faces in a face database, wherein the faces in the face database have name tags, and after the matching is completed, the name tag of the matched face is displayed in the photo, and the photo is sent to the terminal of the backstage staff.

[0013] The above-mentioned safety helmet wearing detection method of the present application can detect whether the workers in the photo are wearing safety helmets by using a safety helmet detection model, thereby eliminating the need for detection personnel to manually participate in the detection of whether the workers are wearing safety helmets, thereby reducing the labor cost of construction investment.

[0014] In addition, when the worker is wearing a safety helmet, the real-time distance between the safety helmet and the first obstacle on the ground should be the distance between the top of the worker's head and the ground, that is, the worker's height. When the worker is walking, the height of the body will change slightly, so that the difference between the real-time distance and the worker's height will fluctuate over a period of time. Therefore, the absolute value of the difference between the real-time distance and the worker's height should be within the preset threshold range, which means that the worker is wearing a safety helmet and there is no need to issue a reminder to wear a safety helmet. If the absolute value does not change over a period of time, it means that the worker has placed the safety helmet at the same height as his or her height. If the absolute value is not within the preset threshold range, it means that the worker may have placed the safety helmet on some construction equipment. Therefore, it can be shown that the worker is not wearing a safety helmet. Therefore, the detection results of the safety helmet detection model can be verified, thereby further improving the accuracy of detecting whether the worker is wearing a safety helmet.

[0015] The second aspect of the present application provides a safety helmet wearing detection system, comprising: a photo acquisition module, used to acquire photos taken by a camera device at a construction site; an extraction module, used to extract a head area image of a human body in the photo; an input module, used to input the head area image into a pre-trained safety helmet detection model; a receiving module, used to receive the detection result output by the safety helmet detection model; a first judgment module, used to judge whether the detection result is that the worker is not wearing a safety helmet, if so, continuously send a distance measurement instruction to the safety helmet bound to the worker within a preset time to measure the real-time distance between the safety helmet bound to the worker and the first obstacle between the ground within a predetermined time, if not, do not issue a safety helmet wearing prompt instruction; a difference calculation module, used to calculate the absolute value of the difference between the real-time distance and the pre-collected worker height; a second judgment module, used to judge whether the absolute value is within a preset threshold range, if so, verify that the detection result is wrong, and do not issue a safety helmet wearing prompt instruction, if not, verify that the detection result is correct, and issue a safety helmet wearing prompt instruction.

[0016] The safety helmet wearing detection system mentioned in the present application can detect whether the workers in the photo are wearing safety helmets by using a safety helmet detection model, thereby eliminating the need for detection personnel to manually participate in the detection of whether the workers are wearing safety helmets, thereby reducing the labor cost of construction investment.

[0017] In addition, the absolute value of the difference between the real-time distance and the worker's height and whether the absolute value changes over a period of time can be used to verify the detection results of the helmet detection model, thereby further improving the accuracy of detecting whether the worker is wearing a helmet.

[0018] A third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the helmet wearing detection method described in any one of the above is implemented.

[0019] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for detecting the wearing of a safety helmet described in any one of the above is implemented.

[0020] The fifth aspect of the present application provides a safety helmet, comprising: a safety helmet body, a central processing unit, a signal transceiver and an ultrasonic rangefinder; the ultrasonic rangefinder is arranged on the surface of the safety helmet body, and is used to measure the real-time distance between the safety helmet and the first obstacle between the ground; the signal transceiver is arranged on the surface of the safety helmet body, and is used to receive a distance measurement instruction and send an implementation distance signal; the central processing unit is arranged on the surface of the safety helmet body, and is used to obtain a photo taken by a camera device at the construction site, extract a head area image of a human body in the photo, input the head area image into a pre-trained safety helmet detection model, the safety helmet detection model is used to detect whether the human head in the photo is wearing a safety helmet, and receive the detection result output by the safety helmet detection model; if the detection result is that the worker is wearing a safety helmet, no safety helmet wearing prompt instruction is issued, and a distance measurement instruction is continuously sent to the ultrasonic rangefinder on the safety helmet body bound to the worker within a first preset time, and the signal transceiver is controlled to receive the distance measurement instruction, and the signal transceiver The distance measurement instruction is received to control the ultrasonic rangefinder to measure the real-time distance, and the real-time distance is converted into a real-time distance signal. The central processing unit is also used to receive the real-time distance signal, and calculate the absolute value of the difference between the real-time distance and the worker's height according to the real-time distance signal and the pre-collected worker's height, judge whether the absolute value has changed within a second preset time, and judge whether the absolute value is within a preset threshold range. The second preset time is the time when the worker's body posture obtained according to the photo changes within the first preset time. If the absolute value changes within the second preset time and is within the preset threshold range, it is verified that the detection result is wrong and no safety helmet wearing prompt instruction is issued. If the absolute value does not change within the second preset time, it is verified that the detection result is correct and a safety helmet wearing prompt instruction is issued. If the change of the absolute value within the second preset time is not within the preset value threshold range, it is verified that the detection result is correct and a safety helmet wearing prompt instruction is issued.

[0021] The above-mentioned safety helmet of the present application, firstly, does not change the structure of the safety helmet, but only adds a central processing unit, a signal transceiver and an ultrasonic rangefinder to the safety helmet body, thereby not affecting the safety protection performance of the safety helmet body. Secondly, by using the ultrasonic rangefinder, the real-time distance between the safety helmet and the first obstacle on the ground can be measured. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] 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 those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 It is a flowchart of a method for detecting the wearing of a helmet according to an embodiment of the present application;

[0024] Figure 2 is a schematic block diagram of a helmet detection model of a helmet wearing detection method according to an embodiment of the present application;

[0025] Figure 3 A structural schematic block diagram of a helmet wearing detection system according to an embodiment of the present application;

[0026] Figure 4 A schematic block diagram of the structure of a safety helmet according to an embodiment of the present application;

[0027] Figure 5 It is a schematic block diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0028] The technical solutions in the embodiments of the present application are clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application. In the absence of conflict, the following embodiments and their technical features can be combined with each other.

[0029] See also Figure 1The embodiment of the present application provides a method for detecting the wearing of a safety helmet, comprising: S1, obtaining a photo taken by a camera device at a construction site; S2, extracting a head area image of a human body in the photo; S3, inputting the head area image into a pre-trained safety helmet detection model, the safety helmet detection model being used to detect whether the human head in the photo is wearing a safety helmet; S4, receiving a detection result output by the safety helmet detection model; S5, if the detection result is that the worker is wearing a safety helmet, no safety helmet wearing prompt instruction is issued; S6, if the detection result is that the worker is not wearing a safety helmet, continuously sending a distance measurement instruction to the safety helmet bound to the worker within a first preset time, and receiving a real-time distance measurement between the safety helmet and the first obstacle on the ground transmitted by the safety helmet. The safety helmet is provided with a distance measuring device and a signal transceiver; S7, calculates the absolute value of the difference between the real-time distance signal and the pre-collected worker height; S8, determines whether the absolute value changes within the second preset time, and determines whether the absolute value is within the preset threshold range; S9, if the absolute value changes within the second preset time, and is within the preset threshold range, it is verified that the detection result is wrong, and no safety helmet wearing reminder instruction is issued; S10, if the absolute value does not change within a period of time, it is verified that the detection result is correct, and a safety helmet wearing reminder instruction is issued; S11, if the absolute value change within a period of time is not within the preset threshold range, it is verified that the detection result is correct, and a safety helmet wearing reminder instruction is issued.

[0030] In the above embodiment, the second preset time is the time when the body posture of the worker obtained from the photo changes within the first preset time.

[0031] When detecting whether a worker is wearing a safety helmet, the camera at the construction site will take photos or videos. In this embodiment, photos are used to extract images of the head area of ​​the human body in the photo. In other embodiments, it is also possible to capture a scene with a human body in the video as a photo to extract the image of the head area in the photo.

[0032] The hard hat detection model can detect whether the head area image in the photo has a hard hat, eliminating the need for inspection personnel to manually detect whether the worker is wearing a hard hat, thereby reducing the labor cost of construction investment.

[0033] However, there may be misjudgments if the helmet detection model is used alone to detect whether a worker is wearing a helmet. Therefore, in order to reduce misjudgments, if the detection result is that the worker is not wearing a helmet, the detection result of the helmet detection model is further verified. Generally, if the worker is wearing a helmet and the worker is standing still, the real-time distance between the helmet and the first obstacle on the ground is generally the distance between the top of the worker's head and the ground, that is, the height of the worker. However, because workers are generally in a state of motion when working, the height of their bodies relative to the ground will change with changes in their movement postures, such as bending over, during the movement process, which will cause the real-time distance between the top of the worker's head and the ground to change, that is, the distance between the worker's helmet on the head and the ground is changing. Therefore, the absolute value of the difference between the real-time distance and the worker's height fluctuates over a period of time, and the absolute value of the difference between the real-time distance and the worker's height is within the preset threshold range, which indicates that the worker is wearing a helmet, indicating that the model detection result is wrong and there is no need to issue a reminder to wear a helmet; while in the case where the worker is in motion, if the absolute value does not change over a period of time, it indicates that the worker may have simply placed the helmet at a place at the same height as his or her height or the worker may have placed the helmet in a fixed position, or if the change in the absolute value is not within the preset threshold range, it indicates that the worker may have placed the helmet on some construction equipment, such as hanging the helmet on the boom of a crane. The boom of the crane will have a large height change due to work reasons, and when the crane is not working, the height of the crane will change greatly. When the arm is hanging down, the worker can hang the safety helmet on the crane arm. However, due to the worker's negligence and other reasons, after the crane works, the worker cannot get the safety helmet and cannot wear the safety helmet. Therefore, after the crane works, the real-time distance between the safety helmet hanging on the crane arm and the first obstacle on the ground will be detected as the height of the current safety helmet relative to the ground. This height may be much higher than the height of the worker, so the calculated absolute value will exceed the preset threshold. Therefore, when the absolute value exceeds the preset threshold, it can be inferred that the worker is not wearing a safety helmet. The construction equipment mentioned above may also be equipment whose parts of equipment such as cranes and construction frames can adjust the height. When the parts of the construction equipment that can adjust the height are located at a low place, the worker may hang the safety helmet on the construction equipment due to temporary rest, etc., and forget to take off the safety helmet when starting work and operate the construction equipment, so as not to wear the safety helmet. Therefore, the above situations can all indicate that the worker is not wearing a safety helmet, so the output of the safety helmet detection model "not wearing a safety helmet" detection result can be verified, thereby further improving the accuracy of detecting whether the worker is wearing a safety helmet.

[0034] In the above embodiment, the height of the preset threshold is two-thirds of the height of the worker bound to the safety helmet. In other embodiments, it can also be one-third, half, etc. of the worker's height. The height of the preset threshold can be adjusted manually in real time. When the worker squats, bends, walks, and performs normal construction actions, the absolute value will be within the preset threshold.

[0035] In other embodiments, the height of the preset threshold can be automatically adjusted as follows: use a human posture recognition algorithm to calculate the posture of the worker in the photo, and adjust the preset threshold according to the worker's posture. For example, if the worker in the photo is calculated to be standing or walking, the height of the preset threshold is set to the height of the worker's head; for example, if the worker in the photo is calculated to be bending or squatting, the height of the preset threshold is set to half the worker's height, etc.

[0036] Based on the result of further verifying the detection result of the hard hat detection model, in other embodiments, the result of further verifying the detection result of the hard hat detection model is used to further train the hard hat detection model, so that the hard hat detection model can output more accurate results.

[0037] In this embodiment, the receiving end of the helmet-wearing reminder instruction is a loudspeaker installed at the construction site. After receiving the instruction, the loudspeaker will make a sound to remind the workers to wear helmets.

[0038] In one embodiment, extracting an image of a head area of ​​a human body in a photo includes: extracting a first image from the photo using a head detection algorithm, the first image having an image of an area where the human head is located; extracting a second image from the photo using a skin color feature recognition method, the second image having an image of an area where the human skin is located; and cross-screening the first extracted image and the second extracted image to obtain an image of a head area having a human head.

[0039] Using the head detection algorithm, the image of the head area of ​​the human body in the photo can be preliminarily identified. In order to reduce the error rate of the head detection algorithm, the skin color feature recognition method is used interactively with the head detection algorithm. The skin color feature recognition method can identify the human skin area in the photo, and the preliminarily identified human head area image and the human skin area are cross-screened. That is, the preliminarily identified human head area image in the photo can be screened to obtain the real head area image.

[0040] In one embodiment, extracting a second image from a photo using a skin color feature recognition method includes: performing light compensation on the photo; clustering color features of the skin color of the worker in the photo on a three-dimensional color space model; performing a top hat transformation on the photo to mark an image of a skin area in the photo having human skin features; and setting the photo with the marked skin area image as the second image.

[0041] In this embodiment, the three-dimensional color space is the YCbCr color space.

[0042] When workers are working, the only exposed skin areas are the face, neck, and hands. Therefore, we first compensate the light of the image, and then cluster the skin color of the workers in the YCbCr color space. The YCbCr color space is more convenient for chromaticity analysis than RGB. Then, we use the YCbCr color space range screening method to identify the skin color. In this example, we select 100 images to perform k-means clustering on the RGB features of the skin color, and then convert them to obtain the Y, Cr, and Cb ranges of 85 <Y<220,140<Cr<175,100<Cb<120。

[0043] The conversion formula from RGB to YCbCr color space is shown in formula (1):

[0044]

[0045] Secondly, the top hat transformation is used to correct the influence of uneven illumination. The binary image after skin color detection contains a lot of noise, so this embodiment performs a top hat transformation on the binary image after skin color detection to reduce the range of non-face areas. The top hat transformation formula is shown in formula (2), where f is a grayscale image and fb is the opening operation of the structure element b on the image f.

[0046] That (f) = f - (fοb) (2)

[0047] Finally, after image-related morphological processing, the larger part of the connected area is located and determined to be the face area, which is convenient for subsequent cross-screening with the head detection algorithm.

[0048] When comparing and screening the skin color area and the head area, the skin color area is not all the face area, and there are arms, hands, necks, etc. In the data set samples of this embodiment, the workers have complex postures, and the skin color areas such as the neck can also assist in determining the head area, so this embodiment retains the skin color areas such as the arms, hands, and neck, and evaluates all areas. When the skin color area overlaps with the head area, the area is evaluated as the head area, and the evaluation value is 10; when there is only a head area, the area is evaluated as the head area, and the evaluation value is 8; when there is only a skin color area, the area is evaluated as a suspected head area, and the evaluation value is 5. Let the skin color area be F, the head area be H, and the evaluation value be x, then the head area cross-screening formula is shown in formula (3),

[0049]

[0050] By setting the evaluation value and further determining the head area in the first image, the accuracy of helmet wearing detection can be improved.

[0051] In one embodiment, cross-screening using the first extracted image and the second extracted image to obtain a head area image having a human head includes: crossing the first image and the second image; detecting whether the skin area image on the second image overlaps with the head area image on the first image; if so, setting the overlapping portion as the head area of ​​the worker in the photo; if there is no overlapping portion, setting the photo to have no worker's head area.

[0052] In one embodiment, the training method of the helmet detection model is as follows: constructing a regional recommendation network to extract a fixed number of recommendation network frames on an image, the image comes from a pre-prepared image data set, and the image in the image data set has an annotation label of whether the worker wears a helmet; constructing a convolution layer and a pooling layer to extract basic information of the image and generate a feature map; constructing a region of interest (ROI) pooling layer to map the feature map to a feature vector of the same size as the recommendation network frame; constructing a fully connected layer to use a singular value decomposition method in the fully connected layer to perform Softmax classification and bounding box region frame regression processing on the feature vector, determine the image category in the recommendation network frame relative to the feature vector, the image category is an image of whether the helmet is worn corresponding to the annotation label, and complete the construction of the helmet detection model; use the image set as training data to complete the training of the helmet detection model.

[0053] See also Figure 2During the training process, the basic information of the entire image is first extracted through multi-layer convolution and pooling operations to form a feature map, and then a fixed number of recommended regions are extracted through the region recommendation network. In the ROI pooling layer, the features are mapped to feature vectors of the same size and input into the fully connected layer. The window score is used to perform non-maximum suppression on each type of object to remove overlapping suggestion boxes, and finally the window with the highest score after regression correction in each category is obtained as an image with a worker wearing a helmet or an image with a worker not wearing a helmet.

[0054] The training data used in the training process are images annotated with labels of workers wearing safety helmets (Safe) and workers not wearing safety helmets (Unsafe).

[0055] In one embodiment, the safety helmet wearing detection method also includes: after issuing a safety helmet wearing reminder instruction, using a face recognition algorithm to match the worker who is not wearing a safety helmet in the photo with the faces in the face database, the faces in the face database have name tags, and after the matching is completed, the name tag of the matched face is displayed in the photo, and the photo is sent to the terminal at the backend staff.

[0056] By using a facial recognition algorithm to match photos of workers not wearing helmets with faces in a facial database, it is possible to find workers in the facial database who are not wearing helmets. Since the facial database contains the worker's name tag, the name tag can be displayed in the photo of the worker not wearing a helmet, making it easier for backstage staff to understand the worker's identity.

[0057] See also Figure 3 The embodiment of the present application also provides a safety helmet wearing detection system, including: a photo acquisition module 1, an image extraction module 2, an input module 3, a receiving module 4, a first judgment module 5, a difference calculation module 6 and a second judgment module 7; the photo acquisition module is used to obtain photos taken by a camera device at the construction site; the image extraction module is used to extract the head area image of the human body in the photo; the input module is used to input the head area image into a pre-trained safety helmet detection model; the receiving module is used to receive the detection result output by the safety helmet detection model; the first judgment module is used to determine whether the detection result is that the worker is not wearing a safety helmet. If so, a distance measurement instruction is continuously sent to the safety helmet bound to the worker within a preset time to measure the real-time distance between the safety helmet bound to the worker and the first obstacle between the ground within a predetermined time. If not, no safety helmet wearing prompt instruction is issued; the difference calculation module is used to calculate the absolute value of the difference between the real-time distance and the pre-collected worker height; the second judgment module is used to determine whether the absolute value is within a preset threshold range. If so, it is verified that the detection result is wrong and no safety helmet wearing prompt instruction is issued. If not, it is verified that the detection result is correct and a safety helmet wearing prompt instruction is issued.

[0058] The safety helmet wearing detection system provided in this embodiment can detect whether the workers in the photo are wearing safety helmets by using a safety helmet detection model, thereby eliminating the need for detection personnel to manually participate in the detection of whether the workers are wearing safety helmets, thereby reducing the labor cost of construction investment.

[0059] In addition, the absolute value of the difference between the real-time distance and the worker's height and whether the absolute value changes over a period of time can be used to verify the detection results of the helmet detection model, thereby further improving the accuracy of detecting whether the worker is wearing a helmet.

[0060] In one embodiment, the image extraction module includes: a first image extraction unit, a second image extraction unit and a cross-screening unit; the first image extraction unit is used to extract a first image from a photo using a head detection algorithm, and the first image has an image of an area where a human head is located; the second image extraction unit is used to extract a second image from a photo using a skin color feature recognition method, and the second image has an image of an area where a human skin is located; the cross-screening unit is used to perform cross-screening using the first extracted image and the second extracted image to obtain an image of a head area having a human head.

[0061] In one embodiment, the second image extraction unit includes: a light compensation subunit, a clustering subunit, a top-hat transformation subunit and a second image setting subunit; the light compensation subunit is used to perform light compensation on the photo; the clustering subunit is used to cluster the color characteristics of the workers' skin color in the photo on a three-dimensional color space model; the top-hat transformation subunit is used to perform a top-hat transformation on the photo to mark the image of the skin area in the photo that has human skin characteristics; the second image setting subunit is used to set the photo with the marked image of the skin area as the second image.

[0062] In one embodiment, the cross-screening unit includes: an image cross-screening subunit, an overlap detection subunit, and a setting subunit; the image cross-screening subunit is used to cross the first image and the second image; the overlap detection subunit is used to detect whether the image of the skin area on the second image overlaps with the image of the head area on the first image; the setting subunit is used to set the overlapping part to the head area of ​​the worker in the photo if the overlap is detected in the overlap detection subunit, and set the photo to have no worker's head area if the overlap detection subunit detects no overlapping part.

[0063] In one embodiment, the helmet detection model includes: a region recommendation network construction unit, a convolution layer and pooling layer construction unit, a ROI pooling layer construction unit, a fully connected layer construction unit and a training unit;

[0064] The region recommendation network construction unit is used to construct a region recommendation network to extract a fixed number of recommendation network frames on an image, where the image comes from a pre-prepared image data set, and the images in the image data set have annotation labels indicating whether the workers are wearing safety helmets. The convolution layer and pooling layer construction unit is used to construct convolution layers and pooling layers to extract basic information of the image and generate feature maps. The ROI pooling layer construction unit is used to construct an ROI pooling layer to map the feature map into a feature vector of the same size as the recommendation network frame. The fully connected layer construction unit constructs a fully connected layer to perform Softmax classification and bounding box region frame regression processing on the feature vector in the fully connected layer using a singular value decomposition method to determine the image category in the recommendation network frame relative to the feature vector, where the image category is an image of the category of whether the worker is wearing a safety helmet corresponding to the annotation label, thereby completing the construction of the safety helmet detection model. The training unit is used to complete the training of the safety helmet detection model using the image set as training data.

[0065] The safety helmet wearing detection system also includes: a name matching module, which is used to use a face recognition algorithm to match the worker who is not wearing a safety helmet in the photo with the faces in the face database after issuing a reminder to wear a safety helmet. The faces in the face database have name tags, and after the matching is completed, the name tag of the matched face is displayed in the photo, and the photo is sent to the terminal at the backend staff.

[0066] See also Figure 4, the embodiment of the present application also provides a safety helmet, including: a safety helmet body, a central processing unit, a signal transceiver and an ultrasonic rangefinder; the ultrasonic rangefinder is arranged on the surface of the safety helmet body, and is used to measure the real-time distance between the safety helmet and the first obstacle between the ground; the signal transceiver is arranged on the surface of the safety helmet body, and is used to receive the distance measurement instruction and send the implementation distance signal; the central processing unit is arranged on the surface of the safety helmet body, and is used to obtain the photos taken by the camera device of the construction site, extract the head area image of the human body in the photo, input the head area image into a pre-trained safety helmet detection model, the safety helmet detection model is used to detect whether the human head in the photo is wearing a safety helmet, and receive the detection result output by the safety helmet detection model; if the detection result is that the worker is wearing a safety helmet, no safety helmet wearing prompt instruction is issued, and a distance measurement instruction is continuously sent to the ultrasonic rangefinder on the safety helmet body bound to the worker within a first preset time, and the signal transceiver is controlled to receive the distance measurement instruction, and the signal transceiver is controlled to receive the distance measurement instruction. The device receives the distance measurement instruction to control the ultrasonic rangefinder to measure the real-time distance, and converts the real-time distance into a real-time distance signal. The central processing unit is also used to receive the real-time distance signal, and calculate the absolute value of the difference between the real-time distance and the worker's height according to the real-time distance signal and the pre-collected worker's height, judge whether the absolute value has changed within a second preset time, and judge whether the absolute value is within a preset threshold range. The second preset time is the time when the worker's body posture obtained according to the photo changes within the first preset time. If the absolute value changes within the second preset time and is within the preset threshold range, it is verified that the detection result is wrong and no safety helmet wearing prompt instruction is issued. If the absolute value does not change within the second preset time, it is verified that the detection result is correct and a safety helmet wearing prompt instruction is issued. If the change of the absolute value within the second preset time is not within the preset value threshold range, it is verified that the detection result is correct and a safety helmet wearing prompt instruction is issued.

[0067] The safety helmet provided in this embodiment does not change the structure of the safety helmet, but only adds a central processing unit, a signal transceiver and an ultrasonic rangefinder on the surface of the safety helmet body, which will not affect the safety protection performance of the safety helmet body. Secondly, by using the ultrasonic rangefinder, the real-time distance between the safety helmet and the first obstacle on the ground can be measured, thereby providing data for verifying the safety helmet detection model, so that when the worker is not wearing the safety helmet, the safety helmet automatically issues a reminder. In this embodiment, the safety helmet sends a reminder instruction to wear a safety helmet to the loudspeaker at the construction site through the signal transceiver. After receiving the reminder instruction to wear a safety helmet, the loudspeaker makes a sound to remind the worker to wear a safety helmet.

[0068] In other embodiments, a safety helmet system may be provided, including a background processing device and a safety helmet. The background processing device has 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 safety helmet wearing detection method described above is implemented.

[0069] The safety helmet comprises: a safety helmet body, a central processing unit, a signal transceiver and an ultrasonic rangefinder; the ultrasonic rangefinder is arranged on the surface of the safety helmet body and is used to measure the real-time distance between the safety helmet and the first obstacle on the ground; the signal transceiver is arranged on the surface of the safety helmet body and is used to receive a distance measurement instruction and send an implementation distance signal; the central processing unit is arranged on the surface of the safety helmet body and is used to control the ultrasonic rangefinder to measure the real-time distance after the signal transceiver receives the distance measurement instruction, and convert the real-time distance into a real-time distance signal, and control the ultrasonic rangefinder to send the real-time distance signal.

[0070] The safety helmet system provided in this embodiment does not change the structure of the safety helmet, but only adds a central processing unit, a signal transceiver and an ultrasonic rangefinder on the surface of the safety helmet body, which will not affect the safety protection performance of the safety helmet body. Secondly, by using the ultrasonic rangefinder, the real-time distance between the safety helmet and the first obstacle on the ground can be measured, thereby providing data for verifying the safety helmet detection model. The safety helmet cooperates with the background processing device to realize automatic detection of whether the worker is wearing a safety helmet, thereby reducing the labor cost of construction investment.

[0071] See also Figure 5 The embodiment of the present application also provides an electronic device, which includes: a memory 601, a processor 602, and a computer program stored in the memory 601 and executable on the processor 602. When the processor 602 executes the computer program, the helmet wearing detection method described above is implemented.

[0072] Furthermore, the electronic device also includes: at least one input device 603 and at least one output device 604 .

[0073] The memory 601 , processor 602 , input device 603 and output device 604 are connected via a bus 605 .

[0074] The input device 603 may be a camera, a touch panel, a physical button or a mouse, etc. The output device 604 may be a display screen.

[0075] The memory 601 may be a high-speed random access memory (RAM) memory or a non-volatile memory, such as a disk memory. The memory 601 is used to store a set of executable program codes, and the processor 602 is coupled to the memory 601 .

[0076] Furthermore, the embodiment of the present application also provides a computer-readable storage medium, which may be disposed in the electronic device in each of the above embodiments, and the computer-readable storage medium may be the aforementioned memory 601. The computer-readable storage medium stores a computer program, which, when executed by the processor 602, implements the helmet wearing detection method described in the aforementioned embodiment.

[0077] Furthermore, the computer storable medium may also be a U disk, a mobile hard disk, a read-only memory 601 (ROM), a RAM, a magnetic disk or an optical disk, and other media that can store program codes.

[0078] Although the present application has been shown and described with respect to one or more implementations, equivalent variations and modifications will occur to those skilled in the art based on reading and understanding of this specification and the accompanying drawings. The present application includes all such modifications and variations and is limited only by the scope of the appended claims. In particular, with respect to the various functions performed by the above-mentioned components, the terms used to describe such components are intended to correspond to any component (unless otherwise indicated) that performs the specified function of the component (e.g., it is functionally equivalent), even if it is not structurally equivalent to the disclosed structure that performs the functions in the exemplary implementation of this specification shown herein.

[0079] That is, the above description is only an embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the specification and drawings of the present application, such as the mutual combination of technical features between the embodiments, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.

[0080] In addition, in the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, which are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, for structural elements with the same or similar characteristics, the present application may use the same or different reference numerals for identification. In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

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

Claims

1. A method for detecting the wearing of a helmet, characterized in that: include: Obtaining photos taken by a camera device at the construction site; Extracting a first image from the photo using a head detection algorithm, wherein the first image has an image of the area where the head of the human body is located; Performing light compensation on the photograph; Clustering the color features of the skin color of the workers in the photo on a three-dimensional color space model; Performing a top hat transformation on the photo to mark an image of a skin region having human skin characteristics on the photo; The photograph on which the image of the skin region is marked is set as a second image, wherein the second image has an image of the skin region of a human body; Crossing the first image and the second image; Detecting whether the image of the skin area on the second image overlaps with the image of the head area on the first image; If there is overlap, the overlapping part is set to the worker's head area in the photo; If there is no overlapping area, the photo is set without the worker's head area; Inputting the head region image into a pre-trained helmet detection model, the helmet detection model is used to detect whether the human head in the photo is wearing a helmet; Receive the detection result output by the helmet detection model; If the test result shows that the worker is wearing a safety helmet, no instruction to wear a safety helmet will be issued; If the detection result shows that the worker is not wearing a safety helmet, a distance measurement instruction is continuously sent to the safety helmet bound to the worker within a first preset time, and a real-time distance signal between the safety helmet and the first obstacle on the ground transmitted by the safety helmet is received, wherein the safety helmet is provided with a distance measurement device and a signal transceiver; Calculate the absolute value of the difference between the real-time distance signal and the pre-collected height of the worker; Determine whether the absolute value changes within a second preset time, and determine whether the absolute value is within a preset threshold range, wherein the second preset time is the time during which the worker's body posture obtained from the photo changes within the first preset time, and if the absolute value changes within the second preset time and is within the preset threshold range, verify that the detection result is wrong, and do not issue a helmet wearing reminder instruction; If the absolute value does not change within the second preset time, the detection result is verified to be correct, and a reminder instruction to wear a helmet is issued; If the change of the absolute value within the second preset time is not within the preset value threshold range, the detection result is verified to be correct, and a reminder instruction to wear a helmet is issued.

2. The helmet wearing detection method according to claim 1, characterized in that: The training method of the helmet detection model is as follows: Constructing a region recommendation network to extract a fixed number of recommendation network boxes on an image, wherein the image is from a pre-prepared image dataset, and the images in the image dataset have annotation labels indicating whether the worker wears a safety helmet; Construct convolutional layers and pooling layers to extract basic information of the image and generate feature maps; Constructing a ROI pooling layer to map the feature map into a feature vector of the same size as the recommended network box; Construct a fully connected layer, and use a singular value decomposition method in the fully connected layer to perform Softmax classification and bounding box region frame regression processing on the feature vector, determine the image category in the recommended network box relative to the feature vector, and the image category is an image of whether a helmet is worn corresponding to the annotation label, thereby completing the construction of a helmet detection model; Training the hard hat detection model is done using the image set as training data.

3. The helmet wearing detection method according to claim 1, characterized in that: The method further comprises: After the instruction to wear a hard hat is issued, a face recognition algorithm is used to match the worker who is not wearing a hard hat in the photo with the faces in a face database, where the faces in the face database have name tags. After the matching is completed, the name tag of the matched face is displayed in the photo, and the photo is sent to the terminal at the backstage staff.

4. A helmet wearing detection system, characterized in that: include: A photo acquisition module is used to acquire photos taken by a camera device at the construction site; An image extraction module is used to extract a first image from the photo using a head detection algorithm, wherein the first image has an image of the area where the head of a human body is located; perform light compensation on the photo; and cluster color features of the skin color of the worker in the photo on a three-dimensional color space model; Performing a top hat transformation on the photo to mark an image of a skin region having human skin characteristics on the photo; The photo on which the image of the skin area is marked is set as a second image, wherein the second image has an image of the skin area of ​​a human body; the first image and the second image are intersected; and it is detected whether the image of the skin area on the second image overlaps with the image of the head area on the first image; if so, the overlapping part is set as the head area of ​​the worker in the photo; If there is no overlapping area, the photo is set without the worker's head area; An input module, used for inputting the head area image into a pre-trained helmet detection model; A receiving module, used for receiving the detection result output by the helmet detection model; A first judgment module is used to judge whether the detection result is that the worker is not wearing a safety helmet. If so, a distance measurement instruction is continuously sent to the safety helmet bound to the worker within a preset time to measure the real-time distance between the safety helmet bound to the worker and the first obstacle on the ground within a predetermined time. If not, no instruction to remind the worker to wear a safety helmet is issued; A difference calculation module is used to calculate the absolute value of the difference between the real-time distance and the pre-collected height of the worker according to the real-time distance; The second judgment module is used to judge whether the absolute value is within a preset threshold range. If so, it verifies that the detection result is wrong and does not issue a reminder instruction to wear a safety helmet. If not, it verifies that the detection result is correct and issues a reminder instruction to wear a safety helmet.

5. An electronic device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method described in any one of claims 1 to 3 is implemented.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method described in any one of claims 1 to 3 is implemented.

7. A safety helmet, characterized in that: include: Helmet body, central processing unit, signal transceiver and ultrasonic rangefinder; The ultrasonic rangefinder is arranged on the surface of the helmet body and is used to measure the real-time distance between the helmet and the first obstacle on the ground; The signal transceiver is arranged on the surface of the helmet body, and is used to receive the distance measurement instruction and send the implementation distance signal; The central processor is arranged on the surface of the helmet body, and is used to obtain a photo taken by a camera device at the construction site, extract a first image from the photo using a head detection algorithm, and the first image has an image of the area where the human head is located; perform light compensation on the photo; cluster the color features of the skin color of the worker in the photo on a three-dimensional color space model; perform a top hat transformation on the photo to mark the image of the skin area with human skin features in the photo; set the photo with the marked image of the skin area as a second image, and the second image has an image of the skin area of ​​the human body; cross the first image and the second image; detect whether the image of the skin area on the second image overlaps with the image of the head area on the first image; if overlapped, set the overlapping part as the head area of ​​the worker in the photo; if there is no overlapping part, set the photo without the head area of ​​the worker; input the head area image into a pre-trained helmet detection model, the helmet detection model is used to detect whether the human head in the photo is wearing a helmet, and receive the detection result output by the helmet detection model; if the detection result is that the worker is wearing a helmet, no helmet wearing prompt is issued The method comprises the steps of: continuously sending a distance measurement instruction to an ultrasonic distance meter on a helmet body bound to a worker within a first preset time, controlling a signal transceiver to receive the distance measurement instruction, and controlling the ultrasonic distance meter to measure the real-time distance after receiving the distance measurement instruction, and converting the real-time distance into a real-time distance signal. The central processing unit is also used to receive the real-time distance signal, and calculate an absolute value of a difference between the real-time distance and the height of the worker according to the real-time distance signal and a pre-collected height of the worker, and judge whether the absolute value has changed within a second preset time, and judge whether the absolute value is within a preset threshold range. The second preset time is the time when the body posture of the worker obtained from the photo changes within the first preset time. If the absolute value changes within the second preset time and is within the preset threshold range, it is verified that the detection result is wrong, and no instruction to wear a helmet is issued. If the absolute value does not change within the second preset time, it is verified that the detection result is correct, and an instruction to wear a helmet is issued. If the change of the absolute value within the second preset time is not within the preset value threshold range, it is verified that the detection result is correct, and an instruction to wear a helmet is issued.

Citation Information

Patent Citations

  • Method for quickly and accurately detecting and tracking human face based on video sequence

    CN102214291A

  • Face detection and recognition method based on skin color segmentation and template matching

    CN103632132A

  • Terminal detection road condition method and terminal thereof

    CN106875676A

  • Safety helmet and multifunctional safety helmet

    CN106923421A

  • Information prompt method and mobile terminal

    CN106973143A