A method and device for detecting the wearing of a safety rope for aerial work
By combining camera focusing magnification and multiple image detection with structured similarity comparison, the problem of accuracy in safety rope identification during high-altitude operations has been solved, achieving efficient and reliable supervision of safety rope wearing.
Patent Information
- Application Number
- CN202211195865.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-28
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-09-28
AI Technical Summary
Existing technologies struggle to accurately identify the wearing status of safety ropes during high-altitude operations, especially whether the safety ropes are properly secured, leading to low regulatory efficiency and a high rate of misjudgment.
By controlling the camera to focus and magnify the target area, repeatedly detecting and comparing the structural similarity of the images, and combining feature enhancement and background information filtering, it is determined whether the safety rope is worn correctly.
It improves the accuracy of safety rope identification, reduces the false alarm rate, and ensures accurate determination of whether the safety rope is properly secured.
Smart Images

Figure CN115620192B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of computer vision, and particularly relates to a method and device for detecting wearing of a safety rope for aerial work. BACKGROUND
[0002] With the development of social production, production safety is increasingly valued in the entire construction industry, and the government agencies and construction enterprises are increasingly improving the standards for production safety. For construction sites with high safety accidents, how to reasonably reduce the incidence of safety accidents and improve the personal safety of employees is the most important part of the construction site.
[0003] For workers in high-altitude operations, such as hole operations, climbing operations, edge operations, suspended operations, and cross operations, due to the high risk coefficient of the operating environment, they must wear safety ropes during the operation to ensure their safety. When in use, the operating personnel need to fix one end of the safety rope to the safety cable and the other end to the body, and keep it firm.
[0004] Due to the lack of safety awareness of some high-altitude operating personnel, they do not wear safety ropes during the operation, or do not wear safety ropes correctly (one end of the safety rope is not fixed to the safety cable), which causes safety hazards to the operating staff and enterprises at the construction site.
[0005] At present, many construction sites use video monitoring to monitor the safety dressing of high-altitude operating personnel, including whether the safety is correctly worn, through video supervision to reduce the safety risks at the construction site. The conventional video monitoring mainly adopts the manual naked-eye viewing method, and the safety inspector checks the monitoring pictures in the monitoring room to determine whether there is a safety violation, but this method has low coverage, poor efficiency, and many missed detections, and it is difficult to achieve effective supervision effect.
[0006] The video intelligent monitoring method can effectively solve the above problems, through intelligent monitoring equipment, real-time intelligent analysis of the collected video stream, real-time monitoring, and immediate alarm effect, and improvement of the supervision efficiency. The conventional solution is to use a deep learning method, first find the construction personnel target in the image picture through target searching, then send the cropped target image part to the trained ResNet classification model to determine whether the personnel wear safety ropes.
[0007] Another solution is to find the safety rope target in the local image of the construction personnel target after finding the construction personnel target through target viewing, and determine whether the personnel wear safety ropes through the search result; and find the hook in the accessory area of the target construction personnel to determine whether one end of the safety rope is fixed to the safety cable.
[0008] However, the camera for shooting the high-altitude worker is generally far away from the target, most of which are high-altitude cameras, and the target person is generally small, and the characteristics of the safety rope are relatively not obvious, so it is difficult to achieve high accuracy. Even if the safety rope is searched on the target image of the construction worker, the same problem will be faced, and the safety rope feature is not obvious, resulting in more false shooting (such as the reflective stripes of the reflective vest) and missing shooting.
[0009] In addition, whether the safety rope is fixed on the safety cable, the target of the safety rope hook may be shown as a few pixels on the image, and the color, specification, etc. of the safety rope and the hook have too many types, so it is almost impossible to find by target searching. Therefore, the prior art has obvious deficiencies in searching and identifying the safety rope, and it is difficult to accurately and reliably identify the safety rope, and it is more difficult to accurately determine whether the safety rope is safely fixed. SUMMARY
[0010] The purpose of the present application is to provide a kind of high-altitude operation safety rope wearing detection method, to solve the technical problems that safety rope and its fixed structure in the image are not obvious in the prior art, and it is difficult to accurately identify the safety rope, and it is difficult to accurately determine whether the safety rope is safely fixed.
[0011] The safety rope wearing detection method for high-altitude operation, comprising:
[0012] Step one, detect whether there is a construction worker from the image, when the construction worker is detected, control the zoom camera to realize the positioning focusing collection of each construction worker, collect the image focused and enlarged around the construction worker, enhance the target feature, and detect whether the target wears the safety rope;
[0013] Step two, by detecting the single target multiple times, judge whether the target wears the safety rope, record the judgment result;
[0014] Step three, compare the structural similarity of the images collected twice in the same area for the same target, obtain the difference result image of comparison, find the safety rope target information in the difference result image, check the return result, complete the judgment of target validity and output the result, and if the target is valid, it means that the construction worker correctly wears the safety rope.
[0015] Preferably, the step one comprises the following steps:
[0016] S1, video stream image target detection, the target detection result is whether a construction worker is detected from the image, if the construction worker is detected, the image is saved;
[0017] S2, target focusing, the construction worker is taken as the target to control the camera to move, and the focused and enlarged image centered on each target is collected one by one;
[0018] S3, feature image positioning and cropping, obtaining a regional detail image corresponding to the construction worker;
[0019] S4, target classification judgment, judging whether the target construction worker wears a safety rope, and recording the judgment result.
[0020] Preferably, the step two comprises the following steps:
[0021] S5, safety fixing state detection original region setting, when the judgment result is that the safety rope is worn, taking the region corresponding to the construction worker as the center, obtaining the enlarged region position information and saving;
[0022] S6, repeated positioning and target classification judgment, after waiting for a certain time, obtaining a new image frame from the video stream, repeating step S3, and sending the new video frame image into the target detection model again to find the target, if the target is still in the picture, repeating step S4 to judge whether the target wears a safety rope, and recording the judgment result.
[0023] Preferably, the step three comprises the following steps:
[0024] S7, safety fixing state detection region comparison image acquisition, if the result of step S6 is that the safety rope is worn, comparing the target position information obtained in step S6 with the position information saved in step S3, judging whether the position of the construction worker changes; if the position of the construction worker changes, according to the region position information saved in step S5, taking a screenshot of the current video frame image to obtain the corresponding region position image and save it;
[0025] S8, safety rope safety fixing state judgment, comparing the state detection region original image saved in step S5 with the region comparison image saved in step S7, obtaining the difference result image of the comparison, which is the corresponding image structure change generated after the position of the construction worker moves; finding the safety rope target information in the image, verifying the returned result, judging the validity of the target and outputting the result, and if the target is valid, it means that the construction worker correctly wears the safety rope.
[0026] Preferably, in step S8, the verification rule for verifying the returned result is as follows:
[0027] 1) The target region of the safety rope needs to have an intersection with the target region of the corresponding frame construction worker, which is calculated by intersection and union ratio;
[0028] 2) The target region of the safety rope needs to be higher than 2 / 3 of the position of the target image region of the construction worker, which meets the requirement that the fixing position of the safety rope is above the chest of the construction worker;
[0029] When the above standard is reached, it is identified that the safety rope is worn;
[0030] When it is identified that the construction personnel wears the safety rope, it is also needed to identify whether the end of the safety rope outside the human body moves. If there is no end of the safety rope outside the human body or the end of the safety rope outside the human body moves abnormally, the safety rope feature target is not effective. When there is an effective safety rope feature target in the difference result image, it is considered that the safety rope worn by the construction personnel is fixed at one end, that is, the construction personnel correctly wears the safety rope.
[0031] Preferably, the step S7 is executed multiple times to obtain and save multiple corresponding area position images. Each area position image is obtained by taking a screenshot of the current video frame image according to the area position information saved for the first time in the step S5, so that the relative positions of the two images in the video image area for the structured similarity comparison are completely consistent.
[0032] Preferably, in the detection process, the safety rope wearing state of each construction personnel needs to be determined through multiple rounds of frame extraction and comprehensive analysis. The number of identification and determination is specified, and the same target state is identified and determined multiple times. The interval between each determination is fixed, and whether to return a positive result is determined according to a set positive determination number threshold. When the multiple identification and determination do not meet the positive determination number threshold, a negative result is returned. The positive result is that the construction personnel correctly wears the safety rope, and the negative result is that the construction personnel does not correctly wear the safety rope.
[0033] Preferably, the output result in the step S1 is one or more bounding boxes containing the target detected by the network and attribute information of the bounding box. In the step S2, the bounding boxes are sorted and the angle that the camera needs to move is calculated according to the relative position information of the center of the corresponding bounding box in the entire video frame image. The bounding box is the target position, and the specific calculation process is as follows:
[0034] 1) Let the x-axis deviation pixels of the center point of the target position from the center point of the frame image be a, the y-axis deviation pixels be b, the length of the frame image be c, the width be d, the visual angle of the camera be e, and the display ratio be f.
[0035] Get: the horizontal offset angle of the camera: a*e / c, and the vertical offset angle: b*e*f / d.
[0036] Control the camera holder to rotate by a specified angle to move the target position to a relatively central position in the camera view angle.
[0037] 2) When the target is in the central position of the camera image, adjust the focal length of the camera to enlarge the target position by a magnification ratio of f.
[0038] Suppose that the target position area horizontal width is a, the vertical height is b, the frame image length pixel is c, the width pixel is d, and the camera original zoom coefficient is e;
[0039] Obtain: magnification ratio: e * (c / a and d / b result compared to the smaller value) / 3.
[0040] Preferably, the high-altitude operation safety rope wearing detection method further comprises a step four, camera resetting, resetting the position and focal length of the camera based on the onvif protocol, and returning to the state of step S1 after the resetting is completed, and starting the step S2 again, sequentially increasing the number of the construction personnel selected for focus detection by 1, and repeating all detection processes.
[0041] The application also provides a high-altitude operation safety rope wearing detection device, which comprises a zoom camera and a computer device, the zoom camera is signal connected with the computer device and controlled by the computer device, the computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the high-altitude operation safety rope wearing detection method according to the method provided in embodiment 1 when executing the computer program.
[0042] The application has the following advantages: the scheme firstly controls the camera to focus on the target area, magnifies the small target, makes the detection target contain more feature information in the image, greatly improves the accuracy of algorithm judgment, and simultaneously, the scheme detects the single target multiple times, cooperates with the logical judgment mode, greatly reduces the false alarm problem caused by the fact that the safety rope feature is not obvious at a specific angle of the target relative to the camera.
[0043] On the other hand, for the problem of whether the safety rope at one end is fixed correctly during the safety rope correct wearing detection process, that is, whether the safety rope is correctly worn, the safety rope state change during the target movement is captured, background information is filtered and features are enhanced, so that the safety rope correct wearing recognition in a complex environment becomes possible, and the technical problem that the safety rope is difficult to determine whether it is correctly fixed in the prior art is solved. BRIEF DESCRIPTION OF DRAWINGS
[0044] Figure 1 The flowchart of the high-altitude operation safety rope wearing detection method of the application.
[0045] Figure 2 The image of the video frame image original image after focusing by the camera in the embodiment of the application.
[0046] Figure 3 The image of the video frame image original image after focusing by the camera in the embodiment of the application. Figure 2Perform target location search and obtain an image of the adjusted target location information.
[0047] Figure 4 In this embodiment of the invention, step S3 involves obtaining detailed images of the area corresponding to the construction workers.
[0048] Figure 5 This refers to the cropped area image obtained after step S5 of this embodiment of the invention, where the magnified area is captured.
[0049] Figure 6 In this embodiment of the invention, step S7 involves taking a screenshot of the current video frame to obtain the corresponding region location image.
[0050] Figure 7 The image shown is an example of a comparison in step S8 of this embodiment of the invention.
[0051] Figure 8 For the purposes of this embodiment of the invention Figure 7 The image shown is the difference result image obtained after performing difference comparison image calculation on the image shown.
[0052] Figure 9 The image shown is an example of a comparison in step S8 of this embodiment of the invention.
[0053] Figure 10 For the purposes of this embodiment of the invention Figure 9 The image shown is the difference result image obtained after performing difference comparison image calculation on the image shown.
[0054] Figure 11 In the embodiment of the present invention, step S8 will... Figure 8 , Figure 10 The result of inputting the two difference result images into the safety rope feature target search model for target search is shown in the image.
[0055] Figure 12 The images collected show workers with safety ropes hanging around their waists and not secured at one end. Detailed Implementation
[0056] The following detailed description of the embodiments, with reference to the accompanying drawings, will further illustrate the specific implementation of the present invention, in order to help those skilled in the art to have a more complete, accurate, and thorough understanding of the inventive concept and technical solutions of the present invention.
[0057] Example 1
[0058] like Figures 1-11 As shown, the present invention provides a method for detecting the wearing of safety ropes for high-altitude operations, comprising the following steps.
[0059] S1, Video stream image target detection.
[0060] In the implementation process of the embodiment, the input image is a frame image obtained after frame extraction and decoding from the video stream of a general monitoring camera (non-snapshot camera supporting RTMP and RTSP protocols), and the output is a target (construction personnel) detected from the image. According to the target detection result (specified threshold), it is judged whether there is a construction personnel in the picture, and if there is, the frame image is stored.
[0061] The detailed steps of target detection include: after frame extraction and decoding of the video stream, obtaining the video image frame, after pre-processing of the image (such as resizing to a specific size, color channel transformation), inputting into the trained target detection algorithm model (based on Yolov3, Yolov4, Yolov5, SSD, Faster-RCNN, CenterNet, etc. Training, such as using Yolov5 target detection network), the input size of the image is 640x640 (since the target feature is not particularly obvious, it is not suitable to use a smaller input image), the confidence threshold is set to 0.5 (used to judge the credibility of the detected target belonging to a certain category, if lower than the threshold, it is discarded), the non-maximum suppression is set to 0.3 (used to process overlapping bounding boxes, if greater than the value, it is judged as the same target, and the redundant bounding box is discarded), the output result is one or more bounding boxes containing the target detected by the network, and the attribute information of the bounding box, such as coordinates, length and width, confidence, etc.
[0062] S2, target focusing.
[0063] After obtaining the construction personnel target position set through the above step S1, the target positions are sorted according to the order from top to bottom and from left to right, and then the state analysis and judgment of the single detection target is performed in sequence.
[0064] According to the relative position information of the selected target in the whole video frame image, the camera is controlled to move, the specified target position is moved to the relatively central position of the camera image area, and then the camera is controlled to adjust the focal length to enlarge the target position area, and the detail image is obtained. The image of the video frame image original drawing after focusing by the camera is as follows Figure 2 .
[0065] This step specifically includes: according to the construction personnel target detection result set returned by step S1, the data in the set is sorted in order from top to bottom and from left to right (each data in the set contains position coordinates, length and width of the frame, counted by the center point of the target frame), the corresponding construction personnel target data position information is obtained in sequence, and the angle that the camera needs to move is calculated according to the relative position information of the position in the whole video frame image. The specific calculation process is as follows.
[0066] 1) Set: the center point of the target position deviates from the center point of the frame image by a pixels on the x-axis and b pixels on the y-axis, the length of the frame image is c pixels, the width is d pixels, the viewing angle of the camera is e, and the display ratio is f (for example, the camera display mode is 16:9, which is recorded as 9 / 16).
[0067] Result: the horizontal offset angle of the camera is a*e / c, and the vertical offset angle is b*e*f / d.
[0068] Based on the onvif protocol, the PTZ control camera cloud platform rotates a specified angle, which can move the target position to the relatively central position of the camera view angle.
[0069] 2) When the target is in the central position of the camera image, adjust the focal length (Zoom) of the camera to enlarge the target position, and the magnification ratio is
[0070] Set: the horizontal width of the target position area is a, the vertical height is b, the length of the frame image is c pixels, the width is d pixels, and the original zoom factor of the camera is e.
[0071] Result: the magnification ratio is e * (c / a and d / b, whichever is smaller) / 3.
[0072] After the camera focuses, the picture area is 3 times the size of the specified construction personnel target area (if the picture area and the target area width ratio is greater than the height ratio, then the height ratio meets 3 times the size, otherwise the width ratio meets 3 times the size).
[0073] S3, feature image positioning and cutting.
[0074] After the target is focused, the new video frame image is sent into the target detection model again to find the target, and the adjusted target position information is obtained. As shown in Figure 3 .
[0075] According to the new target position information, the detection target area image is cut, and the position information is saved, and the corresponding construction personnel area detail image is obtained. As shown in Figure 4 .
[0076] S4, target classification judgment.
[0077] After the camera target position is focused and the specified construction personnel area detail image is obtained, the collected construction personnel image is sent into the classification model for analysis, and the classification judgment result of the image is obtained. According to the detection result, it is judged whether the target construction personnel wears a safety rope, and the judgment result is recorded.
[0078] After the camera is focused, the new image frame is pre-processed and input into the target detection algorithm model before the target detection algorithm model, and the corresponding construction personnel target is detected again to ensure the accuracy of the target position and verify the accuracy of the target result.
[0079] If the focused picture does not return a target detection result again, it means that the previous detected target may be a false positive, and the current step is ended and the next cycle is performed; if a target result is returned, image cropping is performed. After completing the image cropping, the construction personnel target feature image is obtained, which is pre-processed and input into the trained residual network classifier model (based on the ResNet50 network model training), and the classification result is obtained to determine whether the result has a safety rope.
[0080] S5, original area setting for safety fixing state detection.
[0081] If it is determined in step S4 that the safety rope is worn, the center point of the area is taken as the reference, the length and width of the area image are each increased by 2 times, the enlarged area is obtained, and the coordinate area information (top left coordinate position, length, width) of the area relative to the video frame image is saved, and the area image (safety rope wearing state detection original image) is also intercepted and saved. As shown in Figure 5 .
[0082] S6, repeated positioning and target classification determination.
[0083] After waiting for a certain time (1 second), a new image frame is obtained from the video stream, and step S3 is repeated to send the new video frame image into the target detection model for target searching. If the target is still in the picture, step S4 is repeated to determine whether the target wears a safety rope, and the determination result is recorded.
[0084] S7, safety fixing state detection area comparison image acquisition.
[0085] If the result of step S6 is that the safety rope is worn, the target position information in the video frame image obtained in step S6 is compared with the position information saved in step S3 to determine whether the construction personnel has changed position (a movement distance threshold is set, and whether the position center point displacement distance is greater than the threshold is determined). If the position of the construction personnel has changed, the current video frame image is captured according to the area position information stored in step S5 to obtain the corresponding area position image and save it. As shown in Figure 6 .
[0086] S 8, safety rope safety fixing state determination.
[0087] The original image of the state detection area saved in step S5 is compared with the area comparison image saved in step S7 for structural similarity to obtain the difference value of the comparison.
[0088] Because the relative positions of the two compared images in the video image area are consistent, most of the background image information can be filtered out, and the comparison result is the corresponding image structure change caused by the position movement of the construction personnel.
[0089] It should be noted that the difference comparison image calculation requires that the positions of the compared images be completely consistent with the video frame picture positions, so that the background image information can be better filtered out when calculating the difference. Therefore, when selecting the position information (coordinates, range) of the region for the first time, it needs to be saved as the reference position information for subsequent screenshot, instead of being redefined according to the result of each target detection (because the position box information of the target detection will change).
[0090] The difference between the positions of the construction personnel and the accessory area (the center point of the focused construction personnel target area is enlarged by 2 times in length and width) in the images of the previous and subsequent frames is compared to capture the feature change information in the picture. The specific method steps are as follows:
[0091] 1) Use the compare_ssim method of OpenCV (example, you can choose the appropriate method according to actual needs), and input two comparison images (same as the construction personnel position screenshots in different periods) to obtain the difference information of the images.
[0092] 2) Use the threshold method of OpenCV to process the gray value of the difference result image according to the set threshold to filter the background information.
[0093] After obtaining the difference result image after filtering the background information, the safety rope target information is searched in the image, and the returned result is verified according to the following verification rules:
[0094] 1) The target area of the safety rope needs to have an intersection with the construction personnel target area of the corresponding frame, which is calculated by the intersection ratio.
[0095] 2) The target area of the safety rope needs to be higher than the 2 / 3 position of the construction personnel target image area, which meets the requirement that the safety rope fixed position is above the chest of the construction personnel.
[0096] The comparison image of Example 1 is shown in Figure 7 . The difference result image obtained after the above difference comparison image calculation is shown in Figure 8 .
[0097] The comparison image of Example 2 is shown in Figure 9 . The difference result image obtained after the above difference comparison image calculation is shown in Figure 10 .
[0098] The difference result image is fed into the safety rope feature target search model for target search. The corresponding safety rope feature target can be easily found. The search results of Example 1 and Example 2 are as follows: Figure 11 As shown, Example 1 corresponds to Figure 11 (a), Example 2 corresponds to 11 (b).
[0099] Next, the effectiveness of the safety rope is assessed. The safety rope must intersect with the target body area, and the target area of the rope must extend beyond the body area, with its height exceeding two-thirds of the body's height (chest level). Meeting these standards indicates that a safety rope is being worn. This assessment primarily identifies whether a safety rope is being worn; however, there are also cases where the safety rope is simply suspended around the waist without one end secured. Figure 12 As shown, it is also necessary to identify whether the end of the safety rope outside the person has moved. Based on these conditions, it is determined whether the discovered safety rope feature target is valid. If there is no safety rope end outside the person or there is abnormal movement at the end of the safety rope outside the person, the safety rope feature target is not valid, indicating that the end of the safety rope is not properly fixed. When there is a valid safety rope feature target in the difference result image, it is considered that the safety rope worn by the construction worker has been fixed at one end.
[0100] S9, camera reset.
[0101] After completing the above process, based on the ONVIF protocol, the camera's position and focal length are reset. After the reset, the system returns to the state of step S1 and restarts step S2, incrementing the order of the construction personnel selected for focus detection by one, and repeating the entire detection process. The overall flowchart of the above detection method is shown below. Figure 1 .
[0102] This method can be summarized into the following steps:
[0103] Step 1: Detect the presence of construction workers in the image. Once workers are detected, control the zoom camera to focus on each worker individually, capturing magnified images centered on the worker to enhance target features and detect whether the target is wearing a safety rope. This step corresponds to steps S1 to S4.
[0104] Step 2: By performing multiple checks on a single target, determine whether the target is wearing a safety rope, and record the results. This step corresponds to steps S5 to S6.
[0105] Step 3: Perform structured similarity comparison on two images of the same target in the same area, obtain the difference result image, search for the safety rope target information in the difference result image, verify the returned result, complete the judgment of the target's validity, and output the result. If the target is judged to be valid, it means that the construction personnel are wearing the safety rope correctly. This step corresponds to steps S7 to S8.
[0106] Step 4: Reset the camera, corresponding to step S9.
[0107] During the inspection process, determining the safety rope wearing status for each construction worker requires multiple rounds of assessment. This is because, due to the inherent characteristics of the safety rope's placement, when a worker is facing the camera from the side, the rope wearing status cannot be determined from the current frame. Multiple rounds of frame-by-frame analysis are necessary. Several assessment methods can be used, such as the two below.
[0108] Specify the number of identification and judgments. Multiple identification and judgments are made for the same target state, with a fixed time interval between each judgment (e.g., 1 second). When there is a positive identification (the safety rope is worn correctly), a positive result is returned. If multiple identifications are negative (the safety rope is not worn correctly), a negative result is returned.
[0109] Specify the number of recognition and judgments. Multiple recognition and judgments are made on the same target state, with a fixed time interval between each judgment (e.g., 1 second). A comprehensive threshold judgment is made on all detection results. For example, if a total of 5 detections are made, a positive result is returned only if there are at least 2 positive recognitions; otherwise, a negative result is returned.
[0110] Example 2
[0111] The present invention also provides a device for detecting the wearing of safety ropes for high-altitude operations, including a zoom camera and a computer device. The zoom camera is signal-connected to the computer device and controlled by the computer device. The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the following steps according to the method provided in Embodiment 1.
[0112] Step 1: Detect whether there are construction workers in the image. Once construction workers are detected, control the zoom camera to focus on each construction worker individually and collect magnified images centered on the construction worker to enhance target features and detect whether the target is wearing a safety rope.
[0113] Step 2: By performing multiple checks on a single target, determine whether the target is wearing a safety rope and record the results.
[0114] Step 3: Perform structured similarity comparison on two images of the same target in the same area, obtain the difference result image, find the safety rope target information in the difference result image, verify the returned result, complete the judgment of the target's validity and output the result. If the target is judged to be valid, it means that the construction personnel are wearing the safety rope correctly.
[0115] Step 4: Reset the camera.
[0116] The method described above is used to identify whether construction workers are wearing safety ropes and to determine whether one end of the safety rope is secured. Specific limitations regarding the steps implemented after the program running on the processor are described above can be found in Example 1, and will not be elaborated upon here.
[0117] It should be noted that each block in the block diagrams and / or flowcharts in the accompanying drawings of this invention, as well as combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified function or action, or by a combination of dedicated hardware and machine instructions.
[0118] The present invention has been described above by way of example with reference to the accompanying drawings. Obviously, the specific implementation of the present invention is not limited to the above-described manner. Any non-substantial improvements made using the inventive concept and technical solution of the present invention, or the direct application of the inventive concept and technical solution of the present invention to other occasions without modification, are all within the protection scope of the present invention.
Claims
1. A method for detecting the wearing of safety ropes for high-altitude operations, characterized in that: include: Step 1: Detect whether there are construction workers in the image. Once construction workers are detected, control the zoom camera to focus on each construction worker and collect magnified images centered on the construction worker to enhance target features and detect whether the target is wearing a safety rope. Step 2: By performing multiple checks on a single target, determine whether the target is wearing a safety rope, and record the results. Step 3: Perform structured similarity comparison on two images of the same target in the same area, obtain the difference result image, find the safety rope target information in the difference result image, verify the returned result, complete the judgment of the target validity and output the result. If the target is judged to be valid, it means that the construction personnel are wearing the safety rope correctly. Step one includes the following steps: S1. Video stream image target detection. The target detection result is whether construction workers are detected in the image. If construction workers are detected, the image is saved. S2, Target Focusing: The camera moves around the construction workers as targets, capturing magnified images centered on each target. S3. Feature image localization and cropping to obtain detailed images of the corresponding construction personnel's area; S4. Target classification and judgment: Determine whether the target construction personnel are wearing safety ropes and record the judgment results; Step two includes the following steps: S5. Set the original area for safety fixation status detection. When the judgment result is that a safety rope is being worn, take the area of the corresponding construction worker as the center, obtain the magnified area location information and save it. S6. Repeated localization and target classification judgment: After waiting for a certain period of time, new image frames are obtained from the video stream. Repeat step S3 and send the new video frame image back into the target detection model to find the target. If the target is still in the picture, repeat step S4 to determine whether the target is wearing a safety rope and record the judgment result. Step three includes the following steps: S7. Acquisition of comparison image of safety fixed state detection area: If the result of step S6 is that a safety rope is worn, compare the target position information in the video frame image obtained in step S6 with the position information saved in step S3 to determine whether the construction worker's position has changed; If the construction worker's position has changed, take a screenshot of the current video frame image according to the area position information saved in step S5, obtain the corresponding area position image and save it. S8. Safety rope secure fixation status judgment: Compare the original image of the state detection area saved in step S5 with the area comparison image saved in step S7 using structured similarity, and obtain the comparison difference result image. This difference result image is the corresponding image structure change generated after the construction personnel move. Search for the safety rope target information in the image, verify the returned result, complete the judgment of the target validity and output the result. If the target is judged to be valid, it means that the construction personnel are wearing the safety rope correctly.
2. The method for detecting the wearing of safety ropes for high-altitude operations according to claim 1, characterized in that: In step S8, the verification rules for validating the returned result are as follows: 1) The target area of the safety rope needs to intersect with the target area of the construction personnel in the corresponding frame, calculated by the intersection-union ratio; 2) The height of the target area of the safety rope needs to be higher than 2 / 3 of the target image area of the construction personnel, so as to meet the requirement that the safety rope is fixed above the chest of the construction personnel; If the above verification rules are met, it will be identified as wearing a safety rope; After identifying that the construction worker is wearing a safety rope, it is also necessary to identify whether the end of the safety rope outside the person has moved. If there is no safety rope end outside the person or there is abnormal movement at the end of the safety rope outside the person, the safety rope feature target is not valid. However, if there is a valid safety rope feature target in the difference result image, it is considered that the safety rope worn by the construction worker has been fixed at one end, which means that the construction worker is wearing the safety rope correctly.
3. The method for detecting the wearing of safety ropes for high-altitude operations according to claim 1, characterized in that: Step S7 is executed multiple times to acquire and save multiple corresponding regional location images. Each regional location image is a screenshot of the current video frame image based on the regional location information saved in the first step S5, ensuring that the relative positions of the two images for structured similarity comparison in the video image region are completely consistent.
4. The method for detecting the wearing of safety ropes for high-altitude operations according to claim 1, characterized in that: During the detection process, the determination of the safety rope wearing status of each construction worker requires multiple rounds of frame sampling and comprehensive analysis. A specified number of identification and judgments are made, and the same target status is identified and judged multiple times. The interval between each judgment is fixed. A positive result is determined based on the set threshold of the number of positive judgments. If the number of identification and judgments does not meet the threshold of the number of positive judgments, a negative result is returned. A positive result means that the construction worker is wearing the safety rope correctly, and a negative result means that the construction worker is not wearing the safety rope correctly.
5. The method for detecting the wearing of safety ropes for high-altitude operations according to claim 1, characterized in that: In step S1, the output is one or more bounding boxes containing the target detected by the network, along with the attribute information of the bounding boxes. In step S2, the bounding boxes are sorted, and the angle that the camera needs to move is calculated according to the relative position information of the center of the corresponding bounding box in the entire video frame image. The bounding box is the target position. The specific calculation process is as follows: 1) Let: the x-axis deviation of the center point of the target location from the center point of the frame image be a, the y-axis deviation be b, the frame image length be c, the width be d, the camera viewing angle be e, and the display ratio be f; Therefore: Horizontal offset angle of the camera: a*e / c, Vertical offset angle: b*e*f / d; Control the camera pan-tilt unit to rotate by a specified angle, moving the target position to a position relatively centered in the camera's field of view; 2) When the target is centered in the camera image, adjust the camera's focus to magnify the target's position by a magnification ratio of ; Let: the horizontal width of the target location area be a, the vertical height be b, the frame image length in pixels be c, the width in pixels be d, and the original scaling factor of the camera be e; Calculation: Magnification ratio: e * (the smaller value between c / a and d / b) / 3.
6. The method for detecting the wearing of safety ropes for high-altitude operations according to claim 1, characterized in that: It also includes step four, camera reset, which resets the camera's position and focal length based on the ONVIF protocol. After the reset is completed, it returns to the state of step S1 and restarts step S2, incrementing the order of construction personnel selected for focus detection by 1, and repeating all detection processes.
7. A device for detecting the wearing of safety ropes for high-altitude operations, comprising a zoom camera and a computer device, wherein the zoom camera is signal-connected to and controlled by the computer device, and the computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it implements the steps of the method for detecting the wearing of a safety rope for high-altitude operations as described in any one of claims 1-6.
Citation Information
Patent Citations
Safety belt correct application intelligent video identification method
CN104123541A
Safety rope wearing state monitoring method and system
CN114005088A
Climbing safety belt unfastening identification system based on portable deploy and control ball
CN114359761A