Front-end defect identification method and system based on lightweight model

Through deep learning technology and lightweight models, the problems of low efficiency and low accuracy of the front-end defect detection of drones are solved, and automatic identification and positioning of various defect types are realized, resource consumption and communication costs are reduced, and the cost of resources is improved. System reliability and real-time.

CN119130936AInactive Publication Date: 2024-12-13STATE GRID SHANDONG ELECTRIC POWER CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411149906.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-12-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing drone front-end defect detection methods rely on manual experience, have low recognition efficiency, low accuracy, and are highly dependent on network connections, which have problems of latency and high communication costs.

Method used

Using a lightweight model based on deep learning, through data acquisition, preprocessing, model construction and training, automatic identification and positioning of the front-end defects of the UAV are achieved, combined with convolutional neural network (CNN) and activation functions to reduce the computational complexity and resource consumption, suitable for environments where drone front-end resources are limited.

Benefits of technology

It improves the accuracy and efficiency of the front-end defect identification of drone defects, realizes automatic identification of various defect types such as sensor failures and communication interruptions, reduces human resource requirements and communication costs, and enhances the reliability and real-time nature of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119130936A_ABST
    Figure CN119130936A_ABST
Patent Text Reader

Abstract

The invention discloses a front-end defect identification method and system based on a lightweight model, and relates to the technical field of computer vision, machine identification and image processing. The method comprises the following specific steps: data acquisition: acquiring original data; preprocessing the obtained original data to obtain preprocessed data for model training; adopting a deep learning technology to construct a lightweight model to adapt to unmanned aerial vehicle front-end defect identification; training the constructed lightweight model by using the obtained preprocessed data so as to optimize model parameters and improve the recognition accuracy and generalization ability; and applying the trained lightweight model to the front end of the unmanned aerial vehicle to realize automatic identification and positioning of the defects of the front end of the unmanned aerial vehicle. According to the method, the deep learning technology is adopted, data features can be fully mined, defect identification is carried out according to the collected data, the accuracy of front-end defect identification is improved, defect identification can be carried out on the unmanned aerial vehicle front-end system, and the efficiency and accuracy of unmanned aerial vehicle front-end defect identification are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of computer vision, machine recognition and image processing, and in particular to a front-end defect recognition method and system based on a lightweight model. Background Art

[0002] In various industrial fields, including but not limited to construction, manufacturing, wind energy, electric energy, transportation and automation engineering, detecting and identifying defects on the target surface is an important prerequisite for ensuring the safe and reliable operation of equipment, buildings and infrastructure. Traditionally, defect detection usually requires manual visual inspection, which requires companies to invest a lot of manpower and requires specialized personnel to be trained, which is a costly and laborious process for large equipment and buildings. Especially in the power industry, drones, as an important aircraft, have a wide range of application value in line inspection, military, civil and other fields.

[0003] Drone technology can be used to quickly and efficiently inspect defects on target surfaces. By carrying high-resolution cameras or other sensors, it is possible to provide image data captured from difficult-to-reach angles and locations and process them. However, existing drone defect detection methods generally transmit image data to a remote server for analysis and processing, which may result in delays, high communication costs, or high dependence on network connections. In addition, due to the complex electronic equipment and flight environment at the front end of the drone, various defects may occur during use, such as sensor failure, communication interruption, etc. Traditional drone front-end defect recognition methods often rely on manual experience or simple rules, and have problems with low recognition efficiency and low accuracy.

[0004] Therefore, there is an urgent need for a front-end defect recognition method with high recognition efficiency and accuracy to automatically identify various defects in the front-end system of drones. Summary of the invention

[0005] To solve the above problems, the purpose of the present invention is to provide a front-end defect identification method and system based on a lightweight model.

[0006] In order to achieve the above object, the present invention is implemented through the following technical solutions:

[0007] The front-end defect recognition method based on the lightweight model includes the following steps:

[0008] Step 1: Data collection: The front end of the drone collects data and obtains raw data;

[0009] Step 2: data preprocessing, preprocessing the raw data obtained in step 1 to obtain preprocessed data for model training;

[0010] Step 3: Model construction: Use deep learning technology to build a lightweight model to adapt to the front-end defect recognition of drones;

[0011] Step 4: model training, using the preprocessed data obtained in step 2 to train the lightweight model constructed in step 3 to optimize model parameters and improve recognition accuracy and generalization ability;

[0012] Step 5, defect identification, applies the lightweight model trained in step 4 to the front end of the drone to achieve automatic identification and positioning of defects on the front end of the drone.

[0013] Preferably, step 3 specifically includes the following steps:

[0014] Step 31: Use the lightweight CNN algorithm to perform convolution operation. The specific formula is:

[0015]

[0016] Among them, Y(i, j) is the pixel value of the output feature map, I(i+m, j+n) is the pixel value of the input image, W(m, n) is the weight of the convolution kernel, b is the bias term, and k is the size of the convolution kernel;

[0017] Step 32: Maximum pooling operation. The specific formula is:

[0018]

[0019] Among them, Y(i, j) is the feature pixel value after pooling, I(i+m, j+n) is the pixel value of the input feature map, and m and n are the positions of the pooling window;

[0020] Step 33, introduce activation function ReLU;

[0021] Step 34: Flatten the output of the convolutional layer or pooling layer into a one-dimensional vector and connect it to the fully connected layer. The specific formula is:

[0022] y=f(W x + b);

[0023] Here, x is the input vector, W is the weight matrix, b is the bias term, and f(·) is the activation function.

[0024] Preferably, the specific steps of step 2 are:

[0025] Step 21: Data cleaning: by filling missing values, deleting outliers and interpolating, missing values, outliers and erroneous values ​​in the data packet are processed to ensure the integrity and accuracy of the data.

[0026] Step 22: Standardize the data features of different dimensions to make the data conform to the assumptions and requirements of the model;

[0027] Step 23: Data reduction: dimensionality reduction is performed on the data to reduce the complexity and redundancy of the data.

[0028] Preferably, step 4 specifically includes the following steps:

[0029] Step 41, initializing the weights and biases of the model;

[0030] Step 42: input the preprocessed data obtained in step 2 into the lightweight model constructed in step 3, and obtain the prediction result by forward propagation calculation of the output of the model;

[0031] Step 43: Use the loss function to calculate the difference between the model output and the true label;

[0032] Step 44: Calculate the gradient of the loss function with respect to the model parameters through the back propagation algorithm.

[0033] Preferably, step 5 specifically includes the following steps:

[0034] Step 51: deploy the trained lightweight model to the front end of the drone for real-time defect recognition and positioning;

[0035] Step 52: The drone collects data in real time during flight and inputs the data into the lightweight model to identify defects.

[0036] Further preferably, the data cleaning involves filling missing values, deleting outliers and performing interpolation operations, which are steps aimed at repairing or removing possible defects in the data acquired by the drone to ensure the integrity and quality of the data; the filling of missing values ​​can adopt the mean, median or interpolation methods based on other relevant features to minimize the impact on the distribution characteristics of the data; the detection and deletion of outliers are performed through statistical analysis or methods based on domain knowledge to avoid the adverse effects of these extreme values ​​on the model training results.

[0037] Further preferably, the standardization is based on the characteristics of different dimensions or different distributions of the original data of the drone. Through standardization, the data features are converted into a standard normal distribution with a mean of 0 and a variance of 1, or mapped to a specific range of [0, 1] to ensure that each feature has a similar influence on the weight distribution in the model training process, thereby improving the training efficiency and stability of the model and making the data meet the assumptions and requirements of the model.

[0038] Further preferably, the dimensionality reduction techniques include principal component analysis PCA and linear discriminant analysis LDA, which can improve the computational efficiency and generalization ability of the model by retaining the most important feature information in the data set while reducing the dimension of the data; dimensionality reduction can also help solve the multicollinearity or overfitting problems that may exist in the data set, thereby better adapting to the data analysis and prediction needs in actual application scenarios; wherein, the dimensionality reduction techniques specifically include:

[0039] Principal Component Analysis PCA:

[0040] Calculate the mean vector of the sample, the formula is:

[0041]

[0042] Among them, m is the number of samples, x i For samples;

[0043] The data set rows are centrally processed, and the formula is:

[0044]

[0045] Among them, X is the eigenvalue;

[0046] Calculate the covariance matrix of the data set, the formula is:

[0047]

[0048] Perform eigenvalue decomposition on the covariance matrix and obtain eigenvalues ​​λ1, λ2, …, λ n and the corresponding eigenvectors v1, v2, …, v n ;

[0049] Select the eigenvectors corresponding to the first k eigenvalues ​​as the principal components to form a projection W;

[0050] Project the data set into the subspace consisting of the first k eigenvectors. The formula is:

[0051] X reduced =X centered W;

[0052] Among them, X reduced is the dataset after dimensionality reduction;

[0053] Linear Discriminant Analysis LDA:

[0054] Calculate the intra-class scatter matrix S w And the inter-class scatter matrix, the formula is:

[0055]

[0056] S b=(μ0-μ1)(μ0-μ1) T ;

[0057] Among them, X i , μ i denote the set and mean vector of examples of the i∈{0,1} class respectively;

[0058] Solving for the generalized eigenvalues,

[0059] Where λ is the eigenvalue;

[0060] The eigenvector corresponding to the maximum eigenvalue is selected as the projection direction to achieve data dimensionality reduction.

[0061] Further preferably, step 51, deploying the trained lightweight model to the front end of the drone for real-time defect recognition and positioning, specifically includes the following steps:

[0062] Step 511: Optimize and lightweight the trained deep learning model, including model compression, quantization, pruning to remove unnecessary connections or layers, quantization to reduce the model's memory and computing requirements, network structure optimization, and other technologies to adapt to the resource constraints on the drone;

[0063] Step 512: embed the optimized model into the embedded system of the UAV to ensure that the model can run on the flight control system unit of the UAV;

[0064] Step 513: Ensure that the deployed model has sufficient real-time reasoning capabilities to process sensor data and respond quickly while the drone is flying. This requires the model to have fast reasoning speed, low resource consumption, and be able to operate under low latency conditions;

[0065] Step 514: Integrate the optimized model into the software system of the UAV and conduct comprehensive testing and verification to ensure the stability, reliability and performance of the model on the actual hardware;

[0066] Step 515: Design data transmission and communication protocols between the model and other system sensors and communication modules of the drone to ensure real-time data collection and delivery of model prediction results.

[0067] The present invention also includes a front-end defect recognition system based on a lightweight model, which is composed of the following modules:

[0068] Data collection module: The front end of the drone collects data to obtain collected data in real time;

[0069] The feature extraction module extracts useful features from the data collected by the data acquisition module for defect identification;

[0070] Lightweight models to identify front-end defects;

[0071] Model training and optimization module, which trains lightweight models to learn to identify front-end defects and tunes model parameters;

[0072] Model deployment and integration module, which deploys the trained lightweight model to the drone front end and integrates it into the drone system;

[0073] The real-time identification and positioning module uses the deployed lightweight model in real time during the flight of the drone to identify and locate defects.

[0074] Compared with the prior art, the present invention has the following advantages:

[0075] The front-end defect recognition method of the present invention is based on a lightweight model and adopts deep learning technology. It can fully mine data features, identify defects according to collected data, and improve the accuracy of front-end defect recognition. It constructs a lightweight model structure to reduce computational complexity and resource consumption, and is suitable for scenarios where the front-end resources of the UAV are limited. It combines deep learning technology and lightweight model design to collect data information in real time, identify defects in the front-end system of the UAV, and realizes automatic recognition of various defect types such as sensor failure and communication interruption, thereby improving the efficiency and accuracy of UAV front-end defect recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 It is an overall flow chart of the front-end defect identification method based on the lightweight model of the present invention.

[0077] Figure 2 It is a flow chart of step 2 of the present invention.

[0078] Figure 3 It is a flow chart of step 4 of the present invention. DETAILED DESCRIPTION

[0079] The purpose of the present invention is to provide a front-end defect recognition method and system based on a lightweight model. The present invention is further described below in conjunction with specific embodiments.

[0080] Example 1

[0081] The front-end defect recognition method based on lightweight model uses deep learning technology to fully explore data features, identify defects according to collected data, and improve the accuracy of front-end defect recognition; build a lightweight model structure, reduce computational complexity and resource consumption, and carry out UAV front-end defect recognition, including the following steps:

[0082] Step 1: Data collection: The front end of the drone collects data and obtains raw data;

[0083] DJI M300 drone is used for data collection. The front end of the drone works together through visual cameras, inertial measurement units, global positioning systems and other environmental sensors to achieve comprehensive perception and data collection of the target area. During the data collection process, according to the preset mission path, the drone is guided to fly along the predetermined trajectory through the ground station or pre-programmed path. The drone records various sensor data in real time during the flight, and transmits the data to the ground control station or cloud storage system through a wireless communication link to ensure the security and timeliness of the data. In order to cope with complex application requirements and environmental changes, edge computing technology is applied to the drone end to perform partial data processing and analysis, reduce the demand for data transmission bandwidth, and improve data real-time performance;

[0084] Step 2: data preprocessing, preprocessing the raw data obtained in step 1 to obtain preprocessed data for model training;

[0085] Step 3: Model construction: Use deep learning technology to build a lightweight model to adapt to the front-end defect recognition of drones;

[0086] Step 31: Use the lightweight CNN algorithm to perform convolution operation. The specific formula is:

[0087]

[0088] Among them, Y(i, j) is the pixel value of the output feature map, I(i+m, j+n) is the pixel value of the input image, W(m, n) is the weight of the convolution kernel, b is the bias term, and k is the size of the convolution kernel;

[0089] Step 32: Maximum pooling operation. The specific formula is:

[0090]

[0091] Among them, Y(i, j) is the feature pixel value after pooling, I(i+m, j+n) is the pixel value of the input feature map, and m and n are the positions of the pooling window;

[0092] Step 33, introduce activation function ReLU;

[0093] Step 34: Flatten the output of the convolutional layer or pooling layer into a one-dimensional vector and connect it to the fully connected layer. The specific formula is:

[0094] y=f(W x + b);

[0095] Where x is the input vector, W is the weight matrix, b is the bias term, and f(·) is the activation function;

[0096] Step 4: model training, using the preprocessed data obtained in step 2 to train the lightweight model constructed in step 3 to optimize model parameters and improve recognition accuracy and generalization ability;

[0097] Step 5, defect identification, applies the lightweight model trained in step 4 to the front end of the drone to achieve automatic identification and positioning of defects on the front end of the drone.

[0098] In this embodiment, deep learning technology is used to fully explore the features in the collected data, identify various defects, and improve the accuracy of recognition. In addition, by constructing a lightweight model structure, the computational complexity and resource consumption can be significantly reduced, making it suitable for scenarios where the front-end resources of the drone are limited. Through multi-layer convolution and pooling operations, CNN can automatically extract multi-level features from the data and effectively identify various types of defects including sensor failures and communication interruptions. By cutting off unimportant connections or neurons in the network, the number of parameters and computational complexity of the model are reduced. Combining deep learning technology with lightweight model design can not only improve the accuracy of defect recognition in the front end of the drone, but also achieve efficient and real-time data processing in a resource-constrained environment. This combination of technologies has shown great potential and practical value in drone ground-flight imitation, providing a solid technical guarantee for the intelligence and reliability of drone systems.

[0099] Example 2

[0100] Based on Example 1, the content of step 2 is optimized to make the original data more suitable for model training and analysis, such as Figure 2 As shown, the specific steps include:

[0101] Step 21, data cleaning. The data cleaning stage involves filling missing values, deleting outliers, and performing interpolation operations. These steps are aimed at repairing or removing possible defects in the data obtained by the drone to ensure the integrity and quality of the data. Missing values ​​can be filled using the mean, median, or interpolation methods based on other relevant features to minimize the impact on the distribution characteristics of the data. Outliers are detected and deleted through statistical analysis or methods based on domain knowledge to avoid the adverse effects of these extreme values ​​on the model training results. By filling missing values, deleting outliers, and interpolating, missing values, outliers, and erroneous values ​​in the data packet are processed to ensure the integrity and accuracy of the data.

[0102] Step 22: Standardize the data features of different dimensions. Standardization is another important step in data preprocessing. According to the characteristics of different dimensions or different distributions of the original data of the drone, the data features are converted into a standard normal distribution with a mean of 0 and a variance of 1 through standardization, or mapped to a specific range of [0, 1] to ensure that each feature has a similar influence on the weight distribution in the model training process, thereby improving the training efficiency and stability of the model and making the data meet the assumptions and requirements of the model;

[0103] Step 23, data reduction, by reducing the complexity and redundancy of the data set through dimensionality reduction operations, further optimizing the training effect of the model. The dimensionality reduction techniques used in this embodiment include principal component analysis PCA and linear discriminant analysis LDA, which can reduce the dimensions of the data while retaining the most important feature information in the data set, thereby improving the computational efficiency and generalization ability of the model; dimensionality reduction can also help solve the multicollinearity or overfitting problems that may exist in the data set, thereby better adapting to the data analysis and prediction needs in actual application scenarios; wherein, the dimensionality reduction techniques specifically include:

[0104] Principal Component Analysis PCA:

[0105] Calculate the mean vector of the sample, the formula is:

[0106]

[0107] Among them, m is the number of samples, x i For samples;

[0108] The data set rows are centrally processed, and the formula is:

[0109]

[0110] Among them, X is the eigenvalue;

[0111] Calculate the covariance matrix of the data set, the formula is:

[0112]

[0113] Perform eigenvalue decomposition on the covariance matrix and obtain eigenvalues ​​λ1, λ2, …, λ n and the corresponding eigenvectors v1, v2, …, v n ;

[0114] Select the eigenvectors corresponding to the first k eigenvalues ​​as the principal components to form a projection W;

[0115] Project the data set into the subspace consisting of the first k eigenvectors. The formula is:

[0116] X reduced =Xcentered W;

[0117] Among them, X reduced is the dataset after dimensionality reduction;

[0118] Linear Discriminant Analysis LDA:

[0119] Calculate the intra-class scatter matrix S w And the inter-class scatter matrix, the formula is:

[0120]

[0121] S b =(μ0-μ1)(μ0-μ1) T ;

[0122] Among them, X i , μ i denote the set and mean vector of examples of the i∈{0,1} class respectively;

[0123] Solving for the generalized eigenvalues,

[0124] Where λ is the eigenvalue;

[0125] The eigenvector corresponding to the maximum eigenvalue is selected as the projection direction to achieve data dimensionality reduction.

[0126] In this embodiment, through preprocessing, the interference of noise and outliers in the data caused by various factors such as the environment and equipment that may affect the drone during flight can be removed, thereby improving the accuracy and reliability of the data, ensuring the precision and consistency of the data, and facilitating the accuracy of subsequent analysis and application; the data from different sensors or devices of the drone are integrated and uniformly formatted, and effective features are extracted from the raw data to reduce the complexity of the data, while retaining the key information of the data to improve the training efficiency and prediction performance of the machine learning model; the data obtained by the drone is preprocessed to improve data quality, enhance data availability, and optimize the data analysis process, thereby supporting more accurate decision-making and applications.

[0127] Example 3

[0128] Based on Example 1, model training is performed on step 4, which specifically includes the following steps:

[0129] Step 41: Initialize the weights and biases of the model by using random initialization, using uniform distribution or normal distribution to randomly initialize the weights and biases, ensuring the diversity of parameters, which helps to prevent the model from falling into a local minimum.

[0130] Step 42: input the preprocessed data obtained in step 2 into the lightweight model constructed in step 3, and through forward propagation, from the input layer to the output layer, through the weights and biases of the model, the neurons in each layer calculate and pass their outputs to the next layer, and finally obtain the prediction results of the model;

[0131] Step 43: Use the loss function to measure the difference or error between the model prediction output and the true label, and calculate the difference between the model output and the true label;

[0132] Step 44: Calculate the gradient of the loss function with respect to the model parameters through the back-propagation algorithm, calculate the contribution of each parameter to the loss function through the chain rule, and transfer the gradient back from the output layer to the input layer. This process utilizes the structure of the computational graph to efficiently calculate the gradient and update the model parameters through optimization methods such as gradient descent to minimize the loss function or maximize the task performance.

[0133] The defect identification in step 5 is optimized as follows:

[0134] Step 51: deploy the trained lightweight model to the front end of the drone for real-time defect recognition and positioning, specifically:

[0135] Step 511: Optimize and lightweight the trained deep learning model, including model compression, quantization, pruning to remove unnecessary connections or layers, quantization to reduce the model's memory and computing requirements, network structure optimization, and other technologies to adapt to the resource constraints on the drone;

[0136] Step 512: embed the optimized model into the embedded system of the UAV to ensure that the model can run on the flight control system unit of the UAV;

[0137] Step 513: Ensure that the deployed model has sufficient real-time reasoning capabilities to process sensor data and respond quickly while the drone is flying. This requires the model to have fast reasoning speed, low resource consumption, and be able to operate under low latency conditions;

[0138] Step 514: Integrate the optimized model into the software system of the UAV and conduct comprehensive testing and verification to ensure the stability, reliability and performance of the model on the actual hardware;

[0139] Step 515: Design data transmission and communication protocols between the model and other system sensors and communication modules of the drone to ensure real-time data collection and delivery of model prediction results;

[0140] Step 52: The drone collects data in real time during flight and inputs it into the lightweight model to identify defects, specifically:

[0141] Based on the input data, the model will output information such as the location, type and severity of the defect, as well as the coordinates of the defect or the mark of the defect area, which can be directly used in the drone's control system or the decision support system of the ground operator. The drone can adjust the flight path based on the detected defects, collect more detailed data, or promptly notify the operator for further processing.

[0142] In this embodiment, deep learning technology is used to fully explore data features, identify defects based on collected data, and improve the accuracy of front-end defect identification; a lightweight model structure is constructed to reduce computational complexity and resource consumption, which is suitable for scenarios where UAV front-end resources are limited; deep learning technology and lightweight model design are combined to collect data information in real time, identify defects in the UAV front-end system, and realize automatic identification of various defect types such as sensor failures and communication interruptions, thereby improving the efficiency and accuracy of UAV front-end defect identification.

[0143] Example 4

[0144] Front-end defect recognition system based on lightweight model, including:

[0145] Data collection module: The front end of the drone collects data to obtain collected data in real time;

[0146] The feature extraction module extracts useful features from the data collected by the data acquisition module for defect identification;

[0147] Lightweight models to identify front-end defects;

[0148] Model training and optimization module, which trains lightweight models to learn to identify front-end defects and tunes model parameters;

[0149] Model deployment and integration module, which deploys the trained lightweight model to the drone front end and integrates it into the drone system;

[0150] The real-time identification and positioning module uses the deployed lightweight model in real time during the flight of the drone to identify and locate defects.

[0151] In this embodiment, the front-end defect recognition system based on the lightweight model can identify defects at the front end of the drone flight, which can significantly reduce the demand for human resources and reduce the cost of inspection and monitoring. The drone can cover a large area and complete the task in a short time, which improves efficiency. The front-end defect recognition system using the lightweight model can adapt to the operation of the drone in different weather conditions, provide continuous and reliable monitoring services, and continuously improve the performance and reliability of the system. The front-end defect recognition system of the drone based on the lightweight model not only improves the efficiency and accuracy of facility management, but also improves safety and cost-effectiveness, bringing innovation and progress to the monitoring and maintenance of the drone flight field.

Claims

1. A front-end defect recognition method based on a lightweight model, characterized by: The following steps are involved: Step 1: Data collection: The front end of the drone collects data and obtains raw data; Step 2: data preprocessing: preprocessing the raw data obtained in step 1 to obtain preprocessed data for model training; Step 3: Model construction: Use deep learning technology to build a lightweight model to adapt to the front-end defect recognition of drones; Step 4: model training, using the preprocessed data obtained in step 2 to train the lightweight model constructed in step 3 to optimize model parameters and improve recognition accuracy and generalization ability; Step 5, defect identification, applies the lightweight model trained in step 4 to the front end of the drone to achieve automatic identification and positioning of defects on the front end of the drone.

2. The front-end defect identification method based on a lightweight model according to claim 1, characterized in that: Step 3 specifically includes the following steps: Step 31: Use the lightweight CNN algorithm to perform convolution operation. The specific formula is: Among them, Y(i, j) is the pixel value of the output feature map, I(i+m, j+n) is the pixel value of the input image, W(m, n) is the weight of the convolution kernel, b is the bias term, and k is the size of the convolution kernel; Step 32: Maximum pooling operation. The specific formula is: Among them, Y(i, j) is the feature pixel value after pooling, I(i+m, j+n) is the pixel value of the input feature map, and m and n are the positions of the pooling window; Step 33, introduce activation function ReLU; Step 34: Flatten the output of the convolutional layer or pooling layer into a one-dimensional vector and connect it to the fully connected layer. The specific formula is: y=f(W x +b); Here, x is the input vector, W is the weight matrix, b is the bias term, and f(·) is the activation function.

3. The front-end defect identification method based on a lightweight model according to claim 1, characterized in that: The specific steps of step 2 are: Step 21: Data cleaning: by filling missing values, deleting outliers and interpolating, missing values, outliers and erroneous values ​​in the data packet are processed to ensure the integrity and accuracy of the data. Step 22: Standardize the data features of different dimensions to make the data conform to the assumptions and requirements of the model; Step 23: Data reduction: dimensionality reduction is performed on the data to reduce the complexity and redundancy of the data.

4. The front-end defect identification method based on a lightweight model according to claim 1, characterized in that: Step 4 specifically includes the following steps: Step 41, initializing the weights and biases of the model; Step 42: input the preprocessed data obtained in step 2 into the lightweight model constructed in step 3, and obtain the prediction result by forward propagation calculation of the output of the model; Step 43: Use the loss function to calculate the difference between the model output and the true label; Step 44: Calculate the gradient of the loss function with respect to the model parameters through the back propagation algorithm.

5. The front-end defect identification method based on a lightweight model according to claim 1, characterized in that: Step 5 specifically includes the following steps: Step 51: deploy the trained lightweight model to the front end of the drone for real-time defect recognition and positioning; Step 52: The drone collects data in real time during flight and inputs the data into the lightweight model to identify defects.

6. The front-end defect identification method based on a lightweight model according to claim 3 is characterized in that: The data cleaning involves filling missing values, deleting outliers and performing interpolation operations. These steps are aimed at repairing or removing possible defects in the data acquired by the drone to ensure the integrity and quality of the data; missing values ​​can be filled using the mean, median or interpolation methods based on other relevant features to minimize the impact on the distribution characteristics of the data; outliers are detected and deleted through statistical analysis or methods based on domain knowledge to avoid the adverse effects of these extreme values ​​on the model training results.

7. The front-end defect identification method based on a lightweight model according to claim 3 is characterized in that: The standardization is based on the characteristics of different dimensions or different distributions of the original data of the drone. Through standardization, the data features are converted into a standard normal distribution with a mean of 0 and a variance of 1, or mapped to a specific range of [0, 1] to ensure that each feature has a similar influence on the weight distribution in the model training process, thereby improving the training efficiency and stability of the model and making the data meet the assumptions and requirements of the model.

8. The front-end defect identification method based on a lightweight model according to claim 3 is characterized in that: Dimensionality reduction techniques include principal component analysis (PCA) and linear discriminant analysis (LDA). They can improve the computational efficiency and generalization ability of the model by retaining the most important feature information in the data set while reducing the dimension of the data. Dimensionality reduction can also help solve the multicollinearity or overfitting problems that may exist in the data set, thereby better adapting to the data analysis and prediction needs in actual application scenarios. Dimensionality reduction techniques specifically include: Principal Component Analysis PCA: Calculate the mean vector of the sample, the formula is: Among them, m is the number of samples, x i For samples; The data set rows are centrally processed, and the formula is: Where X is the eigenvalue; Calculate the covariance matrix of the data set, the formula is: Perform eigenvalue decomposition on the covariance matrix and obtain eigenvalues ​​λ1, λ2, …, λ n and the corresponding eigenvectors v1, v2, …, v n ; Select the eigenvectors corresponding to the first k eigenvalues ​​as the principal components to form a projection W; Project the data set into the subspace consisting of the first k eigenvectors. The formula is: X reduced =X centered W; Among them, X reduced is the dataset after dimensionality reduction; Linear Discriminant Analysis LDA: Calculate the intra-class scatter matrix S w And the inter-class scatter matrix, the formula is: S b =(μ0-μ1)(μ0-μ1) T ; Among them, X i , μ i denote the set and mean vector of examples of the i∈{0,1} class respectively; Solving for the generalized eigenvalues, Where λ is the eigenvalue; The eigenvector corresponding to the maximum eigenvalue is selected as the projection direction to achieve data dimensionality reduction.

9. The front-end defect identification method based on a lightweight model according to claim 5, characterized in that: Step 51: deploy the trained lightweight model to the front end of the drone for real-time defect recognition and positioning, which specifically includes the following steps: Step 511: Optimize and lightweight the trained deep learning model, including model compression, quantization, pruning to remove unnecessary connections or layers, quantization to reduce the model's memory and computing requirements, network structure optimization, and other technologies to adapt to the resource constraints on the drone; Step 512: embed the optimized model into the embedded system of the UAV to ensure that the model can run on the flight control system unit of the UAV; Step 513: Ensure that the deployed model has sufficient real-time reasoning capabilities to process sensor data and respond quickly while the drone is flying. This requires the model to have fast reasoning speed, low resource consumption, and be able to operate under low latency conditions; Step 514: Integrate the optimized model into the software system of the UAV and conduct comprehensive testing and verification to ensure the stability, reliability and performance of the model on the actual hardware; Step 515: Design data transmission and communication protocols between the model and other system sensors and communication modules of the drone to ensure real-time data collection and delivery of model prediction results.

10. A front-end defect recognition system based on a lightweight model, characterized in that: It consists of the following modules: Data collection module: The front end of the drone collects data to obtain collected data in real time; The feature extraction module extracts useful features from the data collected by the data acquisition module for defect identification; Lightweight models to identify front-end defects; Model training and optimization module, which trains lightweight models to learn to identify front-end defects and tunes model parameters; Model deployment and integration module, which deploys the trained lightweight model to the drone front end and integrates it into the drone system; The real-time identification and positioning module uses the deployed lightweight model in real time during the flight of the drone to identify and locate defects.