A method for applying a lightweight YOLOv5 model to power construction violation monitoring
By combining a lightweight YOLOv5 model with multi-source data and edge computing, the system achieves automated, real-time, and precise identification and intervention of violations at power construction sites. This solves the problems of regulatory blind spots and resource limitations in existing technologies and improves the efficiency of construction safety management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GOLMUD HAIDIAN IND CO LTD
- Filing Date
- 2025-12-15
- Publication Date
- 2026-06-05
Smart Images

Figure CN122157073A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of power construction safety monitoring and computer vision technology, specifically to a system and method based on an improved lightweight YOLOv5 deep learning model for real-time identification, early warning and management of personnel violations at power construction sites. Background Technology
[0002] Power construction and operation and maintenance sites are characterized by complex environments and numerous high-risk operations, with personnel violations being a major cause of safety accidents. Traditional safety supervision relies primarily on on-site inspections by safety officers and manual review of fixed monitoring videos, which suffers from problems such as large blind spots, poor real-time performance, high labor costs, and susceptibility to missed inspections and misjudgments.
[0003] With the development of artificial intelligence technology, computer vision-based target detection algorithms are being explored for application in security monitoring. Algorithms such as YOLOv5 have become potential choices due to their advantages such as fast detection speed and high accuracy. However, directly deploying the standard YOLOv5 model on power construction sites faces severe challenges: First, the standard model has a large number of parameters and high computational complexity, making it difficult to run in real time on edge devices or portable terminals with limited computing power; second, power construction sites have complex backgrounds, variable target scales, and unstable lighting conditions, requiring high robustness and generalization ability from the model; third, existing solutions mostly focus on equipment defect identification or specific environmental monitoring, lacking a complete solution for efficient, accurate, and real-time integrated monitoring of diverse personnel violations in dynamic and open construction scenarios.
[0004] Therefore, there is an urgent need for an intelligent violation monitoring method that can balance high precision, low latency, low resource consumption, and is applicable to complex power construction scenarios, so as to achieve a fundamental shift from passive supervision to proactive early warning. Summary of the Invention
[0005] This invention aims to overcome the shortcomings of existing technologies and provide a method for using a lightweight YOLOv5 model in power construction violation monitoring. This method combines multi-source data collaborative acquisition, violation feature enhancement preprocessing, deep lightweight model modification, real-time edge-side inference, and multimodal instant alarms to achieve automated, real-time, and accurate identification and intervention of typical violations at power construction sites, effectively improving construction safety management.
[0006] To achieve the above objectives, this invention employs a method for monitoring violations in power construction using a lightweight YOLOv5 model, the method comprising: Acquire multi-source visual data samples from power construction sites, the data samples being collected collaboratively by active inspection intelligent agents and passive monitoring intelligent agents; The multi-source visual data samples are preprocessed to enhance the target contour features using a skeleton extraction operator; A lightweight improved YOLOv5 violation recognition model was constructed, and the model was trained and pruned for optimization to generate edge deployment weights. The optimized model is deployed to edge computing devices to perform inference analysis on real-time video streams and output violation behavior recognition results; Based on the identification results, a multi-terminal interactive alarm is triggered, and the violation event is simultaneously uploaded to the remote management platform.
[0007] Optionally, the image preprocessing step specifically includes: Receive the acquired infrared or visible light images and perform noise reduction and size normalization processing; Define structural elements and use skeleton extraction operators to perform iterative erosion and dilation operations on the image; According to the formula
[0008] Extract the skeleton structure information of the image, where For the original image, As a structural element, This indicates an expansion operation. Indicates corrosion operation. Represents logical AND operations.
[0009] Optionally, the step of constructing a lightweight improved YOLOv5 traffic violation recognition model specifically includes: The backbone network of YOLOv5 is reconstructed, and the Ghost module is introduced to replace the standard convolutional layer. A small number of convolutions are used to generate intrinsic feature maps, and enhanced feature maps are generated and spliced through linear transformation. The neck network is divided into convolutional branches and fusion branches. Grouped convolutions are used to reduce the number of parameters, and the implicit relationships between feature maps are mined through linear layers. A lightweight convolution module is constructed, and a batch normalization layer and a SiLU activation function layer are configured after the convolution operation to generate a lightweight network structure suitable for edge computing.
[0010] Optionally, the pruning optimization step specifically includes: inputting a large number of images into the model to be pruned, calculating the expected value of the sum of the absolute values of the output feature maps of each convolutional kernel in each convolutional layer; and applying the formula...
[0011] Calculate the expected value, where For batch size, The total number of images. The feature map is used; the expected values of convolutional kernels in the same layer are sorted, a pruning threshold is set, and redundant convolutional kernels and their connection weights with expected values lower than the threshold are removed.
[0012] Optionally, the step of triggering a multi-terminal interactive alarm specifically includes: A lightweight model is run on augmented reality glasses to identify the distance between workers and hazardous equipment in real time. The distance is compared with a preset safe distance threshold. When the distance is less than the threshold, a virtual safety boundary prompt box is superimposed in the AR field of view. Based on the level of violation, the system will activate the on-site audible and visual alarm devices to provide voice prompts and push violation snapshots to the remote monitoring center.
[0013] Optionally, the system includes: The multi-source data acquisition module is used to control a swarm of drones as an active intelligent agent to conduct inspections of key areas, and to control fixed monitoring equipment as a passive intelligent agent to achieve full-area coverage. The feature enhancement module is equipped with a skeleton extraction unit, which is used to extract the skeleton structure of the image target using morphological operators to enhance the contour features of the violation. The model optimization module is used to build an improved YOLOv5 network that includes the Ghost module and execute an expectation-based channel pruning algorithm to generate a lightweight inference engine. The edge inference module is used to load lightweight weight files, perform real-time forward inference on the video stream at the edge device, and output target category and location information. The interactive alarm module is used to drive the AR terminal to display warning information and realize closed-loop management of on-site voice reminders and remote expert collaboration.
[0014] Optionally, the multi-source data acquisition module is specifically configured as follows: Supports dynamic switching between active inspection mode and passive monitoring mode; In active mode, respond to gestures or control commands to direct the drone to perform close-up photography; In passive mode, abnormal areas are automatically identified and scanning paths are generated based on a moving target detection algorithm.
[0015] Optionally, the edge reasoning module further includes: The environmental sensing unit is used to combine data from multi-parameter detection terminals to simultaneously monitor the oxygen, toxic gases, temperature, and humidity conditions at the construction site. The abnormal logic judgment unit is used to combine visual recognition results with environmental parameters to determine complex violations such as not wearing protective equipment, illegal climbing, or abnormal environment.
[0016] In one aspect, the present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 5.
[0017] On the other hand, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 5.
[0018] Through the above technical solution, this invention provides a method and system for applying a lightweight YOLOv5 model to power construction violation monitoring. It acquires multi-source visual data samples collaboratively collected by active inspection agents and passive monitoring agents, and uses a skeleton extraction operator to perform morphological processing on the images to enhance the contour and structural features of violations. Subsequently, a lightweight YOLOv5 model based on Ghost module reconstruction and expectation value channel pruning is constructed, generating deployment weights adapted for edge devices. Finally, real-time inference is performed through edge devices, and AR terminals are linked to provide safety distance warnings and violation alerts. This method effectively overcomes the problems of large parameter counts and high computational complexity of traditional deep learning models, making them difficult to deploy on resource-constrained edge devices, as well as the visual blind spots inherent in single monitoring methods. It significantly improves the real-time performance, robustness, and monitoring coverage of violation identification, providing a highly efficient solution for power construction sites: real-time edge perception, AR visualization warning, and remote closed-loop management, thereby comprehensively improving the safety supervision efficiency and risk prevention capabilities of power grid construction.
[0019] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0020] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings: Figure 1 This is a main flowchart of a method for monitoring violations in power construction using a lightweight YOLOv5 model according to an embodiment of the present invention. Figure 2 This is an image preprocessing step for the application of a lightweight YOLOv5 model in power construction violation monitoring according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating the standardized construction of a lightweight model for the application of a lightweight YOLOv5 model in power construction violation monitoring, according to an embodiment of the present invention. Figure 4This is a flowchart illustrating the triggering of multi-terminal interactive alarms using a lightweight YOLOv5 model in the application of power construction violation monitoring, according to an embodiment of the present invention. Detailed Implementation The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.
[0021] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application all comply with relevant laws and regulations. In the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solution of this application, and do not imply that the applicant has already used or necessarily used such solutions.
[0022] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.
[0023] Figure 1 This is a main flowchart of a method for monitoring violations in power construction using a lightweight YOLOv5 model according to an embodiment of the present invention. In this invention, the monitoring method may include the following steps: In step S1, multi-source visual data samples from the power construction site are acquired.
[0024] In step S2, the multi-source visual data samples are preprocessed.
[0025] In step S3, a YOLOv5 violation recognition model based on lightweight improvements is constructed.
[0026] In step S4, the optimized model is deployed to an edge computing device.
[0027] In step S5, a multi-terminal interactive alarm is triggered based on the identification result.
[0028] In this invention, addressing the challenges of complex environments and the high degree of concealment of violations at power construction sites, a multi-dimensional perception visual network is first established. Active inspection agents (such as swarms of drones equipped with visual sensors) and passive monitoring agents (such as fixed monitoring equipment) are deployed at the power grid construction site to collaboratively collect multi-source visual data, including infrared and visible light. To improve the model's ability to recognize personnel outlines and safety equipment in complex backgrounds, the collected image data is preprocessed, and the skeleton structure of the image is extracted using the skeleton operator to enhance detailed information. Next, to adapt to the limited computing resources of edge devices, a lightweight model is built based on the YOLOv5 architecture. The backbone network is reconstructed using the GhostNet structure, and redundant parameters are removed through pruning techniques, significantly reducing the model size. After training, the optimized model weights are deployed to edge computing devices or drone-borne units at the construction site to achieve localized real-time inference. Finally, when a violation is detected, the system triggers a real-time alarm through augmented reality glasses or other smart terminals and synchronizes the data to the management platform, achieving closed-loop control throughout the entire process.
[0029] In one embodiment of the present invention, such as Figure 2 As shown, the image preprocessing workflow may include: In step S1, the acquired infrared or visible light image is received.
[0030] In step S2, the structural element is defined.
[0031] In step S3, the skeleton structure information of the image is extracted according to the formula.
[0032] In this invention, image preprocessing is a crucial step in improving detection accuracy. The system first receives high-resolution infrared or visible light images acquired by a drone or monitoring equipment. Then, a suitable structuring element is defined for subsequent morphological operations. The core step involves processing the image using the skeleton operator. This operator, through iterative erosion and dilation operations, effectively removes non-critical regions from the image, extracting the target's skeleton morphology. The specific calculation formula is as follows:
[0033] Among them, For the original image, As a structural element, This indicates an expansion operation. Indicates corrosion operation. This represents the logical AND operation. The above formula yields a stable skeleton structure for the image, which helps highlight the physical characteristics of construction workers and the outlines of safety equipment (such as safety belts and insulated poles), thereby improving the subsequent neural network's ability to extract subtle violation features.
[0034] In one embodiment of the present invention, such as Figure 3 As shown, the process of building a lightweight model may include: In step S1, the backbone network of YOLOv5 is reconstructed.
[0035] In step S2, the neck network is divided into convolutional branches and fusion branches.
[0036] In step S3, a lightweight convolution module is constructed.
[0037] In this invention, to achieve efficient inference at the edge, the YOLOv5 model needs to be deeply lightweighted. First, the design concept of GhostNet is introduced into the backbone network (G-backbone), replacing the original standard convolutional layers with Ghost modules. This generates feature maps with minimal computation, significantly reducing the number of parameters. Second, the neck network of the model is structurally optimized by dividing it into convolutional and fusion branches. The convolutional branches are responsible for extracting the original feature maps of the data, while the fusion branches fuse features through operations such as grouped convolutions. By optimizing the arrangement of each module, the model's feature representation capability is further improved while reducing computational complexity. Furthermore, a lightweight convolutional module is constructed, adding grouped convolutions after basic convolutional operations, effectively reducing the model's floating-point computation, making it more suitable for running on resource-constrained devices such as drones or AR glasses.
[0038] In one embodiment of the present invention, the pruning optimization of the model includes the following specific steps: After model training, to further reduce the model size, a channel pruning technique based on expectation value is employed. Specifically, a large number of sample images are input into the model to be pruned, and the expectation value of the sum of the absolute values of the output feature maps of each convolutional kernel in each convolutional layer is calculated. The formula for calculating the expectation value is:
[0039] in, For batch size, The total number of images. The feature map is generated; the expected values of convolutional kernels in the same layer are sorted, a pruning threshold is set, and redundant convolutional kernels and their connection weights with expected values lower than the threshold are removed, as well as those with small expected values and low contribution to feature extraction. After pruning, the model needs to be fine-tuned to restore model accuracy, and finally a lightweight weight file suitable for edge deployment is generated.
[0040] In one embodiment of the present invention, such as Figure 4 As shown, the process for triggering multi-terminal interactive alarms may include: In step S1, a lightweight model is run on the augmented reality glasses to identify the distance between the workers and hazardous equipment in real time.
[0041] In step S2, the distance is compared with a preset safe distance threshold.
[0042] In step S3, the on-site audible and visual alarm device is activated to provide a voice prompt based on the level of violation.
[0043] In this invention, the alarm process emphasizes real-time performance and interactivity. The augmented reality glasses worn by construction workers incorporate the aforementioned lightweight model, enabling real-time analysis of the first-person perspective video stream. Using sensors (such as Time-of-Flight) combined with visual algorithms, the system calculates the straight-line distance between workers and hazardous sources such as high-voltage equipment and live electrical equipment in real time. The system sets tiered safety distance thresholds based on equipment type (e.g., different thresholds for high-voltage equipment and ordinary equipment). When the measured distance is less than the preset safety distance threshold, the AR glasses overlay a virtual safety boundary warning box (such as a flashing red box) in the wearer's field of vision and trigger vibration feedback. Simultaneously, based on the severity of the violation, the system activates on-site audio-visual alarm devices to play corresponding voice prompts and simultaneously pushes a snapshot of the violation to a remote monitoring center via the network, achieving dual protection of on-site self-inspection and remote supervision.
[0044] On the other hand, the present invention also provides a lightweight YOLOv5 model for monitoring violations in power construction, the system including: a multi-source data acquisition module, a feature enhancement module, a model optimization module, an edge inference module, and an interactive alarm module.
[0045] The multi-source data acquisition module is used to control a swarm of drones as an active intelligent agent for key area inspections, and to control fixed monitoring equipment as a passive intelligent agent for full-area coverage. This module supports dynamic switching between active and passive inspection modes based on on-site requirements, and establishes a real-time communication network via a 4G / 5G private network to ensure real-time data transmission.
[0046] The feature enhancement module is equipped with a skeleton extraction unit, which uses morphological operators to extract the skeleton structure of targets in the image, enhancing the contour features of violations. This module enhances the detailed information of construction workers' postures and safety equipment in the image by executing the skeleton operator formula, providing high-quality features for subsequent recognition.
[0047] The model optimization module is used to build an improved YOLOv5 network that includes the Ghost module and executes an expectation-based channel pruning algorithm to generate a lightweight inference engine. This module is responsible for reconstructing the network structure and fine-tuning the pruning after training, ensuring that the output model weight file meets the performance requirements of edge devices.
[0048] The edge inference module loads lightweight weight files and performs real-time forward inference on the video stream at the edge device, outputting target category and location information. Deployed on the terminal devices of drones or construction workers, this module can independently detect violations.
[0049] The interactive alarm module drives the AR terminal to display warning information and enables closed-loop management of on-site voice reminders and remote expert collaboration. This module can overlay 3D models or safety warning boxes onto the AR interface based on the recognition results, and when an anomaly is detected, it synchronizes relevant images to the remote expert for processing guidance.
[0050] Through the above technical solution, this invention provides a method and system for monitoring violations in power construction using a lightweight YOLOv5 model. By fusing multi-source data from drones and fixed monitoring, enhancing image features using skeleton extraction operators, and constructing a lightweight YOLOv5 model based on GhostNet and pruning techniques, efficient deployment on edge devices is achieved. Simultaneously, by combining real-time ranging and interactive alarm functions with AR glasses, a complete closed loop from violation identification to on-site early warning is constructed, effectively solving problems such as numerous blind spots in power construction site supervision, difficult model deployment, and delayed alarms, significantly improving the safety management level of construction sites.
[0051] The data acquisition and synchronization module is used to acquire multimodal data samples, parse the timestamps of transmission packets for each modality, and perform timeline alignment of text, image, video, and audio data based on a reference clock source. This module can process asynchronous data streams from different data sources and ensure their synchronization in the time dimension, providing accurate time-aligned data for subsequent processing.
[0052] The preprocessing module performs denoising, missing value imputation, and normalization on the aligned data to generate a standardized dataset. This module employs specific preprocessing strategies for different data modalities, such as word segmentation and vectorization of text data, size normalization and color space conversion of image data, and denoising and spectral analysis of audio data, to eliminate noise and outliers in the original data and improve data quality.
[0053] The feature extraction module is equipped with deep neural network sub-models corresponding to different modalities, used to extract high-dimensional raw feature vectors for each modality in parallel. For text data, this module uses a pre-trained language model (such as BERT) to extract semantic features; for image and video data, it uses a convolutional neural network (such as ResNet) to extract visual and temporal features; for audio data, it uses an acoustic model to extract timbre, pitch, and frequency features. These sub-models can be trained and updated independently, maintaining the professionalism of feature extraction for each modality.
[0054] The feature normalization module contains a pre-trained encoder-decoder network used to map raw feature vectors of different dimensions to a unified feature space of the same dimension and perform a non-linear normalization operation. This module employs a modality-specific encoder and a shared decoder structure, optimizing the encoder's feature representation capability through a contrastive learning strategy. This improves the discriminative power of features in the unified space, making features from different modalities comparable and complementary.
[0055] The feature fusion module is used to calculate the complementary weights of each modality feature using a cross-modal attention mechanism and generate the final standardized joint feature vector. This module analyzes the semantic relationships between features of different modalities, dynamically adjusts the contribution of each modality in the fusion process, and ensures that the fused feature vector can fully represent the comprehensive information of the original multimodal data, while maintaining uniform dimensionality and distribution characteristics, which facilitates subsequent model training and inference applications.
[0056] Through the above technical solution, the feature standardization method and system for multimodal data provided by this invention acquires multimodal data samples, preprocesses and extracts features from them, maps the features of different modalities to a unified feature space, and finally performs feature fusion to generate standardized multimodal feature vectors. This method can effectively solve the problem of feature heterogeneity in multimodal data and improve the performance and robustness of multimodal fusion models.
[0057] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0058] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0059] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0060] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0061] In a typical configuration, a computing device includes one or more processors, input / output interfaces, a network interface, and memory. Memory can take the form of non-persistent memory in computer-readable media, random access memory, and non-volatile memory, such as read-only memory or flash memory. Memory is an example of computer-readable media.
[0062] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0063] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by a statement does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0064] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for using a lightweight YOLOv5 model in monitoring violations during power construction, characterized in that, The method includes: Acquire multi-source visual data samples from power construction sites, the data samples being collected collaboratively by active inspection intelligent agents and passive monitoring intelligent agents; The multi-source visual data samples are preprocessed to enhance the target contour features using a skeleton extraction operator; A lightweight improved YOLOv5 violation recognition model was constructed, and the model was trained and pruned for optimization to generate edge deployment weights. The optimized model is deployed to edge computing devices to perform inference analysis on real-time video streams and output violation behavior recognition results; Based on the identification results, a multi-terminal interactive alarm is triggered, and the violation event is simultaneously uploaded to the remote management platform.
2. The method for applying a lightweight YOLOv5 model to power construction violation monitoring according to claim 1, characterized in that, The image preprocessing steps specifically include: Receive the acquired infrared or visible light images and perform noise reduction and size normalization processing; Define structural elements and use skeleton extraction operators to perform iterative erosion and dilation operations on the image; According to the formula Extract the skeleton structure information of the image, where For the original image, As a structural element, This indicates an expansion operation. Indicates corrosion operation. Represents logical AND operations.
3. The method for applying a lightweight YOLOv5 model to power construction violation monitoring according to claim 1, characterized in that, The specific steps for constructing the YOLOv5 violation recognition model based on lightweight improvements include: The backbone network of YOLOv5 is reconstructed, and the Ghost module is introduced to replace the standard convolutional layer. A small number of convolutions are used to generate intrinsic feature maps, and enhanced feature maps are generated and spliced through linear transformation. The neck network is divided into convolutional branches and fusion branches. Grouped convolutions are used to reduce the number of parameters, and the implicit relationships between feature maps are mined through linear layers. A lightweight convolution module is constructed, and a batch normalization layer and a SiLU activation function layer are configured after the convolution operation to generate a lightweight network structure suitable for edge computing.
4. The method for applying a lightweight YOLOv5 model to power construction violation monitoring according to claim 1, characterized in that, The pruning optimization step specifically includes: inputting a large number of images into the model to be pruned, calculating the expected value of the sum of the absolute values of the feature maps output by each convolutional kernel in each convolutional layer; and applying the formula... Calculate the expected value, where For batch size, The total number of images. The feature map is used; the expected values of convolutional kernels in the same layer are sorted, a pruning threshold is set, and redundant convolutional kernels and their connection weights with expected values lower than the threshold are removed.
5. The method for applying a lightweight YOLOv5 model to power construction violation monitoring according to claim 1, characterized in that, The steps for triggering multi-terminal interactive alarms specifically include: A lightweight model is run on augmented reality glasses to identify the distance between workers and hazardous equipment in real time. The distance is compared with a preset safe distance threshold. When the distance is less than the threshold, a virtual safety boundary prompt box is superimposed in the AR field of view. Based on the level of violation, the system will activate the on-site audible and visual alarm devices to provide voice prompts and push violation snapshots to the remote monitoring center.
6. A lightweight YOLOv5 model for monitoring violations during power construction, characterized in that, The system includes: The multi-source data acquisition module is used to control a swarm of drones as an active intelligent agent to conduct inspections of key areas, and to control fixed monitoring equipment as a passive intelligent agent to achieve full-area coverage. The feature enhancement module is equipped with a skeleton extraction unit, which is used to extract the skeleton structure of the image target using morphological operators to enhance the contour features of the violation. The model optimization module is used to build an improved YOLOv5 network that includes the Ghost module and execute an expectation-based channel pruning algorithm to generate a lightweight inference engine. The edge inference module is used to load lightweight weight files, perform real-time forward inference on the video stream at the edge device, and output target category and location information. The interactive alarm module is used to drive the AR terminal to display warning information and realize closed-loop management of on-site voice reminders and remote expert collaboration.
7. The lightweight YOLOv5 model according to claim 6 in the power construction violation monitoring system, characterized in that, The multi-source data acquisition module is specifically configured as follows: Supports dynamic switching between active inspection mode and passive monitoring mode; In active mode, respond to gestures or control commands to direct the drone to perform close-up photography; In passive mode, abnormal areas are automatically identified and scanning paths are generated based on a moving target detection algorithm.
8. The lightweight YOLOv5 model according to claim 6 in the power construction violation monitoring system, characterized in that, The edge reasoning module also includes: The environmental sensing unit is used to combine data from multi-parameter detection terminals to simultaneously monitor the oxygen, toxic gases, temperature, and humidity conditions at the construction site. The abnormal logic judgment unit is used to combine visual recognition results with environmental parameters to determine complex violations such as not wearing protective equipment, illegal climbing, or abnormal environment.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.