| Detection and maintenance of power equipment are critical in smart grids.However,challenging geographical conditions and harsh inspection environments have led to the adoption of unmanned aerial vehicles(UAVs)and robots as conventional inspection methods.Deep learning algorithms are effective for identifying faults and defects in power inspection,but their computational demands and complex network structures make direct deployment on low-performance embedded devices impractical.This paper aims to explore a model compression algorithm that combines pruning and quantization.By deploying the compressed model on embedded systems,we can effectively apply deep learning algorithms to power equipment inspection,including inspection UAVs.The pruning operation increases the number of finite outliers in the parameters,and the quantization operation results in a more uniform distribution of the parameters.To minimize the loss of pruning and quantization accuracy,an adaptive pruning and quantization hybrid model compression method,namely AdaPQ(Adaptive Pruning and Quantification),is proposed.The method uses feedforward and Hessian block recursion ideas to simplify the objective function of the pruning criteria and quantization rounding mixture,and transforms it into a continuous optimization problem.The BN folding and chunking methods are also incorporated into the proposed algorithm to further reduce the number of parameters and accuracy loss.The proposed method incorporates pruning operations into the quantization calibration step to achieve model compression with 8,4,3,2bit and arbitrary pruning rates with only a small amount of data and without retraining.In order to effectively deploy the pruned and quantized models on embedded devices,a metric that integrates the impact of model accuracy,number of parameters,parameter bit width and pruning rate on the deployment is proposed.Meanwhile,a computational resource balancing method based on the LEACH protocol,E-LEACH protocol,is proposed to solve the computational resource constraint problem.The method takes the remaining computing resources as the clustering criteria and realizes the balanced utilization of computing resources of inspection equipment.Through experimental verification and embedded deployment,the MobileNetV2 network compressed by the AdaPQ algorithm exhibits a 40%and 24%improvement in inference time on the VOC2007 and power inspection datasets,respectively,compared to before compression.The accuracy losses are 0.164 and 0.08,and the FPS(frames per second)for real-time inference increased by 4 and 7 frames,respectively.Furthermore,the network using the E-LEACH protocol achieves a reduction of approximately 65%in mean square error compared to a fixed clustering network. |