Method and system for detecting unsafe construction behaviors of adjacent railway business lines
By improving the attention mechanism of the YOLOv8 detection model and combining with the SVM classifier, it can identify and warn of unsafe behaviors in construction scenarios, and solve the problem of insufficient detection accuracy, achieve accurate identification and response to potential risks, and reduce safety accidents .
Patent Information
- Application Number
- CN202411280353.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-31
AI Technical Summary
In the field of civil engineering construction, especially in the construction scenarios of adjacent railway business lines, unsafe behavior detection such as regional intrusions is easy to confuse and the background, and detection difficulties, resulting in insufficient detection accuracy and difficulty in effectively applying the existing technology.
The attention mechanism improvement method based on the YOLOv8 detection model is adopted, combined with the BiFormer module and the SVM classifier, the position relationship between construction personnel and machinery is determined and attitude estimated, and the working status of construction machinery is identified and warned about the train is approaching, and it is divided into construction personnel. Two types of unsafe behaviors are invaded with dangerous areas and the machinery has not stopped working.
It effectively solves the problem of confusion between targets and backgrounds and small target identification, achieves accurate identification and timely response to potential risks, and reduces the occurrence of safety accidents.
Smart Images

Figure CN119229368A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent management and monitoring technology in the construction industry, and specifically relates to a computer vision-based method and system for detecting unsafe construction behavior of an adjacent railway operating line. Background Art
[0002] With the development and maturity of computer vision and artificial intelligence technology, more and more research has been conducted on their application in the field of construction in recent years. In terms of construction monitoring, computer vision technology has attracted widespread attention due to its advantages such as low labor cost, high efficiency, high accuracy and strong degree of informatization.
[0003] my country's "Railway Safety Management Regulations" clearly state that railway line safety protection zones should be established on both sides of the railway line. If buildings, structures and other facilities are constructed within the railway line safety protection zones, they must comply with national standards, industry standards and construction safety specifications for ensuring railway safety. Therefore, during construction activities on adjacent railway operating lines, unsafe construction behaviors should be focused on detection to prevent unsafe behaviors from affecting the normal operation of existing railway lines.
[0004] Chinese invention patent application CN117079185A discloses a computer vision-based risk assessment method for workers intruding into construction hazardous areas. By using computer vision technology, the video information of the construction area is deeply analyzed to achieve accurate detection of worker targets. This method finely extracts the coordinates of the key points of the human skeleton and the coordinates of the boundary line of the hazardous area. Based on these data, the distance between the human body and the hazardous area, the walking direction, the step frequency and the stability of the gait cycle are evaluated, thereby constructing a risk assessment index system. This method can take into account the individual differences of workers and provide more refined risk assessment results for construction hazardous areas to meet the needs of modern engineering safety management.
[0005] Chinese invention patent application CN114663479A) discloses an intelligent monitoring and early warning method and system based on computer vision. This method allows managers to manually define specific prohibited intrusion areas in the monitoring video screen, and analyze the pedestrian positions and movement trends obtained by executing pedestrian detection and tracking algorithms to further determine whether there are potential intrusions, crossing boundaries, or gatherings and other security threats. This method can automatically analyze and process monitoring videos, effectively replacing traditional manual monitoring methods, significantly reducing the workload of security monitoring personnel, and improving monitoring efficiency and frequency.
[0006] Chinese invention patent application CN1 17333995A discloses a method and system for intrusion detection and alarm at the perimeter of a high-temperature gas-cooled reactor based on YOLO-v3. Based on the YOLOv3 algorithm, image data of the perimeter of a high-temperature gas-cooled reactor is collected through a high-definition surveillance camera, and the data is pre-processed. The image is used to train the regional intrusion and scene change detection model, and detailed alarm level processing and screening are performed. The system selects scene images with high alarm levels and inputs them into the YOLOv3 model. The YOLOv3 model further performs target detection and attribute judgment in combination with the alarm level. This method establishes an efficient and accurate intrusion detection and alarm mechanism, which can not only identify intrusion targets in a timely manner, but also realize intelligent alarm processing, significantly reducing the need for manual operation and improving the overall efficiency of the security monitoring system.
[0007] Chinese invention patent application CN115424352A discloses a method for identifying the invasion of harmful organisms in the kitchen based on computer vision. The method identifies the invasion of harmful organisms in the kitchen through computer vision technology, which belongs to the field of biometric identification methods. It uses existing camera equipment to capture video data and performs timed frame extraction on the video stream, extracting a frame every few seconds. Subsequently, the extracted frames are downsampled, and then binarization and marginalization processing are performed. By comparing the differences between the processed frames at adjacent time points, the method can extract the picture change characteristics and the contours of the moving objects. The logistic regression classification algorithm is used to analyze these feature values, so as to probabilistically classify the harmful organisms that may appear in the kitchen. This method not only improves the accuracy of identifying harmful organisms, but also realizes efficient and robust harmful organism monitoring without increasing the cost of kitchen renovation, meeting the needs of modern kitchen safety and sanitation management.
[0008] As an important unsafe behavior detection technology, regional intrusion detection has been widely used in many fields. However, in the field of civil engineering construction, the application of related technologies is still relatively lacking, especially in the construction scene near the railway operating line. The application of other unsafe behavior detection such as regional intrusion faces many challenges. The construction scene near the railway operating line has detection difficulties such as large depth and easy confusion between target and background. How to effectively apply regional intrusion detection technology in this special construction scene and improve the accurate monitoring of unsafe behaviors has become one of the current problems to be solved. Summary of the invention
[0009] The present invention is made to solve the above-mentioned problems, and its purpose is to provide a method and system for detecting unsafe construction behaviors near operating railway lines.
[0010] In order to achieve the above object, the present invention adopts the following technical solution:
[0011] <Option 1>
[0012] The present invention provides a method for detecting unsafe construction behavior near an operating railway line, which is characterized by comprising the following steps:
[0013] Step S1, according to railway safety management regulations and construction safety management requirements, unsafe construction behaviors in the construction scenario of adjacent railway operating lines are divided into two categories: construction personnel and construction machinery intruding into dangerous areas and construction machinery not stopping work when a train approaches;
[0014] Step S2, setting up a high-definition camera at a construction site near a railway operating line, collecting images of the construction site at a predetermined time interval, annotating the trains, construction workers, construction machinery, and key points of the construction machinery in each construction site image to obtain an annotated image dataset as a historical image dataset, and dividing the historical image dataset into a training set, a validation set, and a test set;
[0015] Step S3, improving the attention mechanism of the YOLOv8 detection model;
[0016] Step S4, using the historical image dataset obtained in step S2 to train the improved YOLOv8 detection model;
[0017] Step S5, deploying the trained YOLOv8 detection model to the monitoring system of the construction site, and the monitoring system parses the on-site video stream to obtain real-time on-site images;
[0018] Step S6, using the trained YOLOv8 detection model to identify and locate the train, construction personnel, construction machinery, and key points of the construction machinery in the real-time on-site image;
[0019] Step S7, determining the positional relationship between the construction personnel, the construction machinery and the predetermined dangerous area to achieve regional intrusion detection, and performing posture estimation and motion state determination on the construction machinery based on the key points of the construction machinery to achieve working state detection of the construction machinery when it is near a train;
[0020] Step S8: Based on the detection result of step S7, the monitoring system issues an early warning for the detected unsafe construction behavior and archives it.
[0021] The method for detecting unsafe construction behaviors near operating railway lines provided by the present invention may also have the following feature: in step S3, the attention mechanism of the YOLOv8 detection model is improved by integrating the BiFormer module in the image feature pyramid SPPF module of YOLOv8.
[0022] The method for detecting unsafe construction behaviors near an operating railway line provided by the present invention may also have the following feature: in step S7, a SVM classifier is used to estimate the posture and determine the motion state of the construction machinery.
[0023] <Option 2>
[0024] The present invention also provides a detection system for unsafe construction behavior of an operating line adjacent to a railway, which has the following characteristics: an unsafe construction behavior classification module, which is used to classify unsafe construction behaviors in construction scenarios of operating lines adjacent to railways into two categories according to railway safety management regulations and construction safety management requirements: construction personnel and construction machinery invading dangerous areas and construction machinery not stopping work when a train approaches; a historical image data set acquisition module, which is used to set up high-definition cameras at construction sites of operating lines adjacent to railways, collect images of the construction site at predetermined time intervals, annotate the trains, construction personnel, construction machinery and key points of the construction machinery in each construction site image to obtain an annotated image data set as a historical image data set, and divide the historical image data set into a training set, a verification set and a test set; a detection model improvement module, which is used to improve the attention mechanism of the YOLOv8 detection model; a model training module, which is used to use historical image data sets to obtain the annotated image data set. The improved YOLOv8 detection model is trained with the historical image dataset obtained by the image dataset acquisition module; the real-time on-site image acquisition module is used to deploy the trained YOLOv8 detection model to the monitoring system of the construction site, and the monitoring system parses the on-site video stream to obtain the real-time on-site image; the recognition module is used to use the trained YOLOv8 detection model to identify and locate the trains, construction personnel, construction machinery and key points of the construction machinery in the real-time on-site image; the detection module is used to determine the positional relationship between the construction personnel, construction machinery and the predetermined dangerous area to realize regional intrusion detection, and to estimate the posture and motion state of the construction machinery according to the key points of the construction machinery to realize the working state detection of the construction machinery when the train is near; and the early warning and archiving module is used for the monitoring system to warn and archive the detected unsafe construction behaviors according to the detection results of the detection module.
[0025] <Scheme 3>
[0026] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program and has the following characteristics: when the processor executes the computer program, the steps of the method for detecting unsafe construction behavior on an operating line adjacent to a railway of <Solution 1> are implemented.
[0027] <Scheme 4>
[0028] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which has the following characteristics: when the computer program is executed by a processor, the steps of the method for detecting unsafe construction behavior adjacent to an operating railway line of <Solution 1> are implemented.
[0029] Function and Effect of the Invention
[0030] The present invention is based on computer vision and deep learning algorithms to detect unsafe behaviors during the construction process of adjacent railway operating lines. The technical solution of the present invention can effectively solve the problems of confusion between detection targets and backgrounds and recognition of small targets, can accurately identify potential risks and make timely responses, so that on-site managers can intervene in time to reduce or avoid the occurrence of safety accidents. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 is a flow chart of a method for unsafe construction behavior adjacent to an operating railway line in an embodiment of the present invention;
[0032] Figure 2 is a detailed diagram of a Biformer module in an embodiment of the present invention;
[0033] Figure 3 is a schematic structural diagram of an excavator in an embodiment of the present invention;
[0034] Figure 4 is a schematic diagram of the actual detection effect of an embodiment of the present invention; and Figure 5 It is a schematic diagram of the structure of the unsafe construction behavior system adjacent to the operating railway line in an embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the present invention is specifically described in the following embodiments in conjunction with the accompanying drawings.
[0036] <Example>
[0037] refer to Figure 1 , an embodiment of the present invention provides a method for detecting unsafe construction behavior near an operating railway line, comprising the following steps S1-S8.
[0038] Step S1, according to railway safety management regulations and construction safety management requirements, unsafe construction behaviors in construction scenarios near railway operating lines are divided into two categories: construction personnel and construction machinery intruding into dangerous areas and construction machinery not stopping work when a train approaches.
[0039] Specifically, since my country's "Railway Safety Management Regulations" clearly stipulates that railway line safety protection zones should be established on both sides of the railway line, if buildings, structures and other facilities are constructed within the railway line safety protection zones, the national standards, industry standards and construction safety specifications for ensuring railway safety must be observed. Therefore, when construction is carried out along the edges of existing railway lines, dangerous areas where intrusion is prohibited should be established based on actual conditions.
[0040] In this embodiment, in order to ensure that the construction work does not affect the normal operation of the existing railway line, the unsafe construction behaviors in the construction scenario of the adjacent railway operating line are divided into two categories: (1) construction personnel and construction machinery intrusion into the danger zone; (2) construction machinery does not stop working when the train approaches.
[0041] Step S2, set up a high-definition camera at a construction site near a railway operating line, collect construction site images at predetermined time intervals, annotate the trains, construction workers, construction machinery, and key points of the construction machinery in each construction site image to obtain an annotated image dataset as a historical image dataset, and divide the historical image dataset into a training set, a validation set, and a test set.
[0042] Specifically, step S2 includes setting up a high-definition camera, collecting construction site images and annotating image data sets. In this embodiment, the construction machine is an excavator.
[0043] Set up high-definition cameras: Set up high-definition cameras at key locations near the railway operating line construction site to determine the monitoring range, including all key entrances and vulnerable areas; key locations include but are not limited to tower crane arms, lighting columns, etc. In this embodiment, the high-definition camera uses a 1920×1080 high-resolution camera to ensure clear images for subsequent analysis, and ensure that all cameras are connected to a stable power supply.
[0044] Collecting construction site images: Obtaining construction site video through a local network protocol, using Opencv tools to capture video frames once at a predetermined time interval, thereby obtaining construction site images. In this embodiment, the predetermined time interval uses a patrol time interval.
[0045] Labeled image dataset: Use Python language and Labelme software and select rectangular box labeling method to label the train, construction workers and excavators in the collected construction site images, and select point labeling method to label key points such as the intersection of the upper and lower boom rotation axes, the dipper arm rotation axis, and the bucket rotation axis and the symmetric center plane of the working device of the excavator, so as to obtain the labeled image dataset as the historical image dataset; and divide the historical image dataset into a training set, a validation set and a test set. In this embodiment, the historical image dataset is divided into a training set, a validation set and a test set in a ratio of 7:2:1.
[0046] Step S3, improve the attention mechanism of the YOLOv8 detection model.
[0047] Specifically, the YOLO series of algorithms are widely used in the detection of foreign objects in power transmission lines due to their advantages such as high detection speed, strong real-time performance, and simple structure. As the latest YOLO series algorithm, YOLOv8 further optimizes the network structure compared with previous generations and improves the overall performance of detection. The network structure of YOLOv8 mainly consists of four parts: the input layer, the backbone module Backbone layer, the feature enhancement module Neck layer, and the output Head layer. The Input layer is responsible for inputting the image to be detected into the network, and the Backbone layer extracts the features of the image. The Neck layer is responsible for pooling and fusion of the input feature layer, and finally the Head layer outputs it.
[0048] For construction scenes near railway operating lines, there are the following scene characteristics: (1) the detection object and the scene background have similar features; (2) the construction scene has a large depth, up to hundreds of meters, and the same type of detection target has multi-scale features in the image field of view. Therefore, it is necessary to improve the attention mechanism of the YOLOv8 detection model so that the model can achieve accurate target recognition in the case of target and background confusion and multi-scale targets.
[0049] In this embodiment, the attention mechanism of the YOLOv8 detection model is improved by integrating the BiFormer module in the SPPF module of the image feature pyramid of YOLOv8. The BiFormer module adopts a hierarchical attention architecture to pay detailed attention to low-level and high-level features respectively. Specifically: at the low level, the BiFormer module strengthens the ability to capture local features of small targets through a fine attention mechanism; and at the high level, it enhances the model's overall grasp of scene context information through a global attention mechanism. This dual strategy of combining local details with global context strengthens the contextual relationship between small targets and their adjacent environments, and strengthens the model's ability to distinguish other engineering elements or background noise that are similar in shape or texture to the background, effectively improving the recognition rate of small targets in complex backgrounds in the construction scene of adjacent railway operating lines; at the same time, because the Biformer module can process feature maps of different scales and perform feature fusion at different levels, it can improve the detection model's ability to detect multi-scale targets, so it has good adaptability to targets of different scales. The details of the Biformer module are as follows: Figure 2 shown.
[0050] Step S4, using the historical image dataset obtained in step S2 to train the improved YOLOv8 detection model.
[0051] Specifically, a virtual environment for training the YOLOv8 model was configured on a Linux server, using the Python 3.8 interpreter and the Pytorch deep learning framework, and installing the required dependent libraries, such as NumPy, SciPy, Matplotlib, OpenCV, etc. The hardware platform was configured as an RTX-3090 GPU with 8GB of memory, the processor was an Intel Core i7-6500M CPU with a main frequency of 3.20GHz, and the rest of the training hyperparameters were set as shown in Table 1.
[0052] Table 1. Training hyperparameters
[0053]
[0054] The improved YOLOv8 detection model is trained and verified using an image data set containing training set, validation set and test set. During the training process, two performance evaluation indicators, mAP@50 and mAP@50:95, are introduced. These two indicators jointly measure the accuracy of the model and provide a quantitative basis for model optimization.
[0055] Table 2 shows the performance comparison between the improved YOLOv8 model of this embodiment and several existing models. As can be seen from Table 2, the improved YOLOv8 model performs well in terms of mAP@50 and mAP@50:95, reaching 0.881 and 0.430 respectively. This shows that compared with the unimproved YOLOv8 model and other target detection models, the detection model proposed by the improved YOLOv8 model of this embodiment shows better performance in the construction scenario of adjacent railway operating lines, and can accurately identify, classify and locate targets such as trains, construction personnel, and construction machinery, and can also accurately identify the four key points on the excavator mechanical arm (such as Figure 4 As shown), thus ensuring the smooth progress of subsequent downstream tasks.
[0056] Table 2 Performance comparison between the present invention and existing models
[0057]
[0058] Step S5: deploy the trained YOLOv8 detection model to the monitoring system of the construction site, and the monitoring system analyzes the on-site video stream to obtain real-time on-site images.
[0059] In this embodiment, the camera is connected to the recorder, and the server is connected to the local network or the external network. The video captured by the camera can be transmitted to the server in two ways: (1) using the local network, the video stream is read to the server through the URL address through the RTSP protocol; (2) using the external network, the server can rely on the RTMP protocol (f1v) to obtain the video stream of the camera through the streaming platform. The construction site manager adjusts the bit rate, resolution and frame rate of the video stream according to the bandwidth limitations on the construction site.
[0060] The specific operations when used in a typical scenario are:
[0061] Introducing dependent libraries: The code first introduces the operating system interface, JSON, time processing, HMAC encryption, hash library, network request, and command line parameter parsing library.
[0062] Configuration variables: defines some key variables, including device ID and camera index path, API URL, application Key and Secret, HTTP request method, message ID and request time.
[0063] Get live stream URL function: The getLiveStreamUrl function constructs a request header and request body, sends a POST request to the specified URL, and obtains the camera's real-time live stream URL.
[0064] Import third-party libraries: Import the pytorch library for loading and reasoning deep learning models.
[0065] Loading the target detection model: Use PyTorch to load the target detection model file trained in our method to identify people and machinery.
[0066] Video stream processing and image loading: By referencing the NewLoadStreams and LoadImages functions, real-time video streams are processed and image files are loaded. Intrusion detection in dangerous areas and mechanical motion status detection are performed to determine potential risks and issue corresponding warning information.
[0067] Streaming and data transmission: Push the processed video stream or data to the monitoring terminal by referencing the push_stream_thread and send_file functions.
[0068] Step S6, using the trained YOLOv8 detection model to identify and locate the train, construction workers, construction machinery and key points of the construction machinery in the real-time on-site image.
[0069] Step S7, determining the positional relationship between construction personnel, construction machinery and predetermined dangerous areas to achieve area intrusion detection, and performing posture estimation and motion state determination on the construction machinery based on key points of the construction machinery to achieve working state detection of the construction machinery when it is near a train.
[0070] In this embodiment, regional intrusion detection is achieved by determining the positional relationship between the detection frame of the detection object such as the construction personnel and the construction machinery and the predetermined dangerous area.
[0071] In this embodiment, the construction machinery working status detection is specifically as follows:
[0072] (1) Establishing the excavator motion descriptor: The YOLOv8 key point detection model identifies the key points on the excavator mechanical arm. The key points are the intersection of the large boom rotation axis, the small boom rotation axis, the bucket arm rotation axis, and the bucket rotation axis with the symmetric center plane of the working device, which are denoted as O0, O1, O2, and O3 respectively. The bucket tip is point O4. The coordinate systems O0-x0y0z0, O1-x1y1z1, O2-x2y2z2, O3-x3y3z3, and O4-x4y4z4 are established with these points as the origin (where the Z axes are perpendicular to the paper and facing outward). The large boom attitude angle is defined as θ0, the small boom attitude angle is θ1, the bucket arm attitude angle is θ2, and the bucket attitude angle is θ3, as shown in the following figure: Figure 3 As shown. Taking θ0, θ1, θ2, and θ3 as the key features of the excavator when working, and the changes of these angles between different frames Δθ0, Δθ1, Δθ2, and Δθ3 as the key variables of the excavator, the motion state descriptor is established as:
[0073] MSF=[Δθ0, Δθ1, Δθ2, Δθ3]
[0074] (2) Training the SVM classifier: Use the video with the excavator in the picture to train the SVM for judging the working state of the excavator. Take every 15 frames of the training video as a key frame and calculate the MSF between adjacent key frames as the sample value x of the video segment. i Through human judgment, the excavator status of each video clip is marked, that is, when it is in working state, that is, when it is in working state, y i = +1; when in a stationary state, y i = -1. i and i Paired training sample sets (x i ,y i ), and use it to train the SVM binary classification model to obtain the excavator motion state recognition classifier.
[0075] (3) Detecting the working status: The SVM classifier uses every 15 frames as a key frame to calculate the MSF between adjacent key frames. Specifically, when judging the working status of the excavator, the video stream needs to be extracted and the motion status is judged from the 15th frame of the video stream. Assuming that the current frame is the nth frame (n≥15), the SVM judges the motion status of the excavator by calculating the MSF between the nth frame and the n-14th frame.
[0076] Step S8: Based on the detection result of step S7, the monitoring system issues an early warning for the detected unsafe construction behavior and archives it.
[0077] Specifically, an early warning is issued for unsafe construction behaviors detected to warn construction workers and notify management personnel to take timely intervention measures. The entire early warning mechanism includes four identification processes and four functional modules, namely, construction detection module, train detection module, working status determination module, and regional intrusion determination module. The specific early warning identification process is as follows:
[0078] Step 1, extract frames from the video stream, input the current frame into the construction detection module for target detection, and determine whether there is an excavator or worker target in the video frame. If the result is yes, it means there is construction activity and the frame image is passed to the train detection module; if the result is no, end the current frame and input the next frame.
[0079] Step 2, in the train detection module, determine whether the excavator and the train target exist at the same time in the frame image. If the result is yes, the frame image is input into the working state judgment module; if the result is no, the current frame is directly input into the regional intrusion judgment module (skipping Step 3 and directly entering Step 4).
[0080] Step 3, determine the working status of the excavator in the frame image in the working status determination module. If it is working, a warning is directly issued; if it is stationary, the frame image is input into the regional intrusion determination module.
[0081] Step 4: In the area intrusion judgment module, the intrusion behavior of people and machinery into the dangerous area is judged, the position coordinates of the bottom center point of the target detection frame of the person or machinery are judged with the position relationship of the dangerous area, and an early warning is issued according to the judgment result.
[0082] Dangerous behavior archiving: A database is used to record and archive all detected unsafe behaviors and corresponding warning information, including detailed information such as the time and location of the unsafe behavior, the personnel or equipment involved, and the warning response status, to ensure that the records of any specific event can be quickly retrieved afterwards.
[0083] refer to Figure 5The embodiment of the present invention also provides a system 10 for detecting unsafe construction behaviors near railway operating lines. The system 10 for detecting unsafe construction behaviors near railway operating lines includes an unsafe construction behavior classification module 11, a historical image data set acquisition module 12, a detection model improvement module 13, a model training module 14, a real-time on-site image acquisition module 15, a recognition module 16, a detection module 17, and an early warning and archiving module 18.
[0084] The unsafe construction behavior classification module 11 is used to classify unsafe construction behaviors in the construction scenario of the adjacent railway operating line into two categories according to railway safety management regulations and construction safety management requirements: construction personnel and construction machinery intruding into the dangerous area and construction machinery not stopping working when the train approaches.
[0085] The historical image data set acquisition module 12 is used to set up high-definition cameras at construction sites near railway operating lines, collect construction site images at predetermined time intervals, annotate trains, construction workers, construction machinery, and key points of construction machinery in each construction site image to obtain annotated image data sets as historical image data sets, and divide the historical image data sets into training sets, verification sets, and test sets.
[0086] The detection model improvement module 13 is used to improve the attention mechanism of the YOLOv8 detection model.
[0087] The model training module 14 is used to train the improved YOLOv8 detection model using the historical image dataset obtained by the historical image dataset acquisition module.
[0088] The real-time on-site image acquisition module 15 is used to deploy the trained YOLOv8 detection model to the monitoring system of the construction site, and the monitoring system analyzes the on-site video stream to obtain the real-time on-site image.
[0089] The recognition module 16 is used to use the trained YOLOv8 detection model to identify and locate trains, construction workers, construction machinery and key points of construction machinery in real-time on-site images.
[0090] The detection module 17 is used to determine the positional relationship between construction personnel, construction machinery and predetermined dangerous areas to achieve regional intrusion detection, and to estimate the posture and determine the motion state of the construction machinery based on the key points of the construction machinery to achieve working state detection of the construction machinery when it is near a train.
[0091] The early warning and archiving module 18 is used to warn and archive the unsafe construction behaviors detected by the monitoring system according to the detection results of the detection module.
[0092] An embodiment of the present invention also provides a computer device, including: a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions to implement the steps of the above-mentioned method for detecting unsafe construction behavior adjacent to an operating railway line.
[0093] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected via a system bus, wherein the processor of the computer device is used to provide computing and control capabilities.
[0094] The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0095] An embodiment of the present invention further provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for unsafe construction behavior adjacent to a railway line as described above.
[0096] The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0097] Example Function and Effect
[0098] This embodiment is based on computer vision and deep learning algorithms to detect unsafe behaviors during the construction process of adjacent railway operating lines. The technical solution of the present invention can effectively solve the problems of confusion between detection targets and backgrounds and recognition of small targets, can accurately identify potential risks and make timely responses, so that on-site managers can intervene in time to reduce or avoid the occurrence of safety accidents.
[0099] The above-mentioned embodiments are preferred examples of the present invention and are not intended to limit the protection scope of the present invention.
Claims
1. A method for detecting unsafe construction behavior near an operating railway line, characterized in that: The following steps are involved: Step S1, according to railway safety management regulations and construction safety management requirements, unsafe construction behaviors in the construction scenario of adjacent railway operating lines are divided into two categories: construction personnel and construction machinery intruding into dangerous areas and construction machinery not stopping work when a train approaches; Step S2, setting up a high-definition camera at a construction site near a railway operating line, collecting images of the construction site at a predetermined time interval, annotating the trains, construction workers, construction machinery, and key points of the construction machinery in each construction site image to obtain an annotated image dataset as a historical image dataset, and dividing the historical image dataset into a training set, a validation set, and a test set; Step S3, improving the attention mechanism of the YOLOv8 detection model; Step S4, using the historical image dataset obtained in step S2 to train the improved YOLOv8 detection model; Step S5, deploying the trained YOLOv8 detection model to the monitoring system of the construction site, wherein the monitoring system parses the on-site video stream to obtain a real-time on-site image; Step S6, using the trained YOLOv8 detection model to identify and locate the train, construction personnel, construction machinery and key points of the construction machinery in the real-time on-site image; Step S7, determining the positional relationship between the construction personnel, the construction machinery and the predetermined dangerous area to achieve regional intrusion detection, and performing posture estimation and motion state determination on the construction machinery based on the key points of the construction machinery to achieve working state detection of the construction machinery when it is near a train; Step S8: Based on the detection result of step S7, the monitoring system issues an early warning for the detected unsafe construction behavior and archives it.
2. The method for detecting unsafe construction behavior near an operating railway line according to claim 1, characterized in that: in, In step S3, the attention mechanism of the YOLOv8 detection model is improved by integrating the BiFormer module into the image feature pyramid SPPF module of YOLOv8.
3. The method for detecting unsafe construction behavior near an operating railway line according to claim 1, characterized in that: in, In step S7, a SVM classifier is used to estimate the posture and determine the motion state of the construction machine.
4. A system for detecting unsafe construction behavior near an operating railway line, characterized in that: include: The unsafe construction behavior classification module is used to classify unsafe construction behaviors in the construction scenario of adjacent railway operating lines into two categories according to railway safety management regulations and construction safety management requirements: construction personnel and construction machinery intruding into dangerous areas and construction machinery not stopping work when a train approaches; The historical image data set acquisition module is used to set up high-definition cameras at construction sites adjacent to operating railway lines, collect images of the construction site at predetermined time intervals, annotate trains, construction personnel, construction machinery, and key points of construction machinery in each construction site image to obtain annotated image data sets as historical image data sets, and divide the historical image data sets into training sets, verification sets, and test sets; Detection model improvement module, used to improve the attention mechanism of the YOLOv8 detection model; A model training module, used to train an improved YOLOv8 detection model using the historical image dataset obtained by the historical image dataset acquisition module; A real-time on-site image acquisition module is used to deploy the trained YOLOv8 detection model to the monitoring system of the construction site. The monitoring system analyzes the on-site video stream to obtain real-time on-site images; A recognition module, for identifying and locating trains, construction personnel, construction machinery, and key points of construction machinery in the real-time on-site image using a trained YOLOv8 detection model; A detection module is used to determine the positional relationship between construction personnel, construction machinery and predetermined dangerous areas to achieve regional intrusion detection, and to estimate the posture and determine the motion state of the construction machinery based on key points of the construction machinery to achieve working state detection of the construction machinery when it is near a train; and The early warning and archiving module is used for the monitoring system to issue early warnings and archive detected unsafe construction behaviors according to the detection results of the detection module.
5. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for detecting unsafe construction behavior adjacent to an operating railway line as described in any one of claims 1 to 3 are 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 steps of the method for detecting unsafe construction behavior adjacent to an operating railway line as described in any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Intelligent monitoring and early warning method and system based on computer vision
CN114663479A
Method for identifying invasion of kitchen harmful organisms based on computer vision
CN115424352A
Method for evaluating risk of worker invading construction dangerous area based on computer vision
CN117079185A
High-temperature gas cooled reactor perimeter intrusion detection alarm method and system based on yo-v3
CN117333995A
Method and system for detecting danger of construction site workers to approach construction machinery in real time
CN110232320A
Cited By
Lightweight safety behavior identification method and system for railway field personnel
CN120724229A