Method, system and equipment for identifying construction progress of power distribution area and medium
By applying the improved YOLOX network and CIOU loss function target detection model at the construction site of the distribution station area, real-time identification of construction progress, solving the problems of low manual supervision efficiency and easy omission in the existing technology, achieving more efficient and accurate construction progress identification.
Patent Information
- Application Number
- CN202310979986.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-04
- Publication Date
- 2025-02-14
AI Technical Summary
During the construction process of the distribution station area, the existing technology relies on manual supervision and acceptance, and there are problems of low efficiency and easy omissions, especially in the case of large project volume, complex construction links and diverse environments.
A method of construction progress identification in the distribution station area is adopted. By obtaining the target image of the construction site, using the improved YOLOX network and CIOU loss function, a target detection model is built, and every link in the construction site is detected in real time to ensure the accurate identification of construction progress. .
It improves the accuracy and efficiency of construction progress identification, reduces errors and omissions in manual supervision, and ensures the smooth completion of the construction process and the improvement of project quality.
Smart Images

Figure CN119445454A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of power distribution substations, and specifically relates to a method, system, equipment and medium for identifying the construction progress of a power distribution substation. Background Art
[0002] In the context of building a new power system, more stringent requirements are put forward for distribution network projects. Distribution network projects are large in scale and wide in scope, especially the distribution substation, which is the "last mile" of the power grid. The high-quality, high-efficiency and low-cost construction of distribution substations is of great significance to the maintenance of distribution network projects and safe and stable power supply. In the process of distribution substation construction, it is necessary to formulate and follow standard construction plans, strictly complete each unit and link in the construction process, ensure the normal progress of the construction period and control the construction cost. The previous method was to supervise the construction and accept the construction projects by manual supervision, but the distribution substation project is large in scale, the construction links are complex, the construction environment is diverse, and a variety of important equipment and auxiliary devices need to be installed. Relying solely on experience and manual inspection often leads to omissions and low efficiency.
[0003] Therefore, corresponding technologies are needed to assist manual supervision and acceptance of construction units, and to conduct real-time detection of each link in the construction process of the distribution station area to ensure the smooth completion of the construction links and improve the quality of the project. Summary of the invention
[0004] In order to overcome the above-mentioned deficiencies of the prior art, the present invention proposes a method for identifying the construction progress of a distribution station area, comprising:
[0005] Acquire target construction site images of the construction site of the distribution substation area;
[0006] Based on the target construction site image, a recognition result of the target construction site image is obtained by using a pre-built target detection model;
[0007] Among them, the target detection model is constructed based on the image dataset of the distribution station construction process by training the improved YOLOX network; the improved YOLOX network obtains the center position distance between each predicted box and the corresponding real box through the improved CIOU loss function, and then determines the most appropriate predicted box.
[0008] Preferably, the construction of the target detection model includes:
[0009] The image dataset of the construction process of the distribution station area is preprocessed and labeled, and after generating sample labeled images, it is used as the training dataset of the improved YOLOX network; wherein the improved YOLOX network includes a backbone network, a feature graph pyramid network and a classifier;
[0010] Based on the training data set, extracting image features of sample label images in the training data set through the backbone network, and based on the image features, obtaining multiple enhanced feature layers through a feature graph pyramid network;
[0011] In the classifier, a plurality of corresponding prediction boxes are determined according to the plurality of enhanced feature layers, and the most appropriate prediction box is determined from the plurality of prediction boxes through the CIOU loss function;
[0012] Calculate the network loss value and network weight of the most appropriate predicted box and the pre-labeled real box, and train the classifier by iterating the network weight until the network loss value meets the convergence requirement, save the corresponding network weight, and complete the construction of the target detection model;
[0013] The labels include at least one or more of the following: target position labels, target size labels, and target category labels.
[0014] Preferably, in the classifier, a plurality of corresponding prediction boxes are determined according to the plurality of enhanced feature layers, and the most appropriate prediction box is determined from the plurality of prediction boxes through the CIOU loss function, including:
[0015] In the classifier, based on multiple enhanced feature layers of the sample label image, multiple prediction boxes are constructed through the decoupling head, and the effective prediction box is selected through the focal_loss classification loss function;
[0016] Based on the relevant parameters of the valid prediction box and the real box, the center position distance between each valid prediction box and the corresponding real box is calculated through the CIOU loss function, and the center position distance is stored in the corresponding prediction result;
[0017] The prediction results of each of the valid prediction boxes are sorted by the SimOTA label matching strategy, and the prediction box with the highest score is taken as the most suitable prediction box;
[0018] The prediction result includes one or more of the following: a regression index, an object detection index and a category index; the regression index includes at least: a distance between the center position of a valid prediction box and a corresponding real box.
[0019] Preferably, the CIOU loss function is as follows:
[0020]
[0021] Among them, L ciouis the loss value of the distance between the predicted box and the corresponding real box, IOU is the prediction index intersection-union ratio, c is the diagonal straight line distance between the predicted box and the real box, b is the center point of the predicted box, and b gt is the center point of the real box, ρ is the straight-line distance between the center point of the predicted box and the center point of the real box, a is the first side length penalty term, and v is the second side length penalty term.
[0022] Preferably, the focal_loss classification loss function is as follows:
[0023]
[0024] Among them, L FOCAL_LOSS (p) is the classification loss function, p is the probability that the prediction box is a valid prediction box, d is the balance factor, γ is a pre-set parameter, and y is the sample label.
[0025] Preferably, the image dataset based on the construction process of the distribution station area is preprocessed and labeled to generate sample labeled images as a training dataset for the improved YOLOX network, including:
[0026] Obtain image and video information of the construction process of the distribution station area as an image dataset;
[0027] Image information is obtained from video information by extracting video frames, and images are screened by eliminating pictures without construction process of distribution substation areas;
[0028] After processing the image information and the filtered image information in a unified image format, sample labels are produced, and after generating sample label images, they are used as training data sets for the improved YOLOX network;
[0029] The image format processing includes at least one or more of the following: image translation, image enhancement, image cropping and image blurring, and the sample label includes at least one or more of the following: detection target position, detection target size and detection target category.
[0030] Preferably, the extracting of image features of sample label images in the training data set through the backbone network, and obtaining multiple enhanced feature layers through the FPN network based on the image features, includes:
[0031] Extracting image features of sample label images in the training data set through the backbone network;
[0032] Based on the image features, a feature pyramid structure is constructed through a feature graph pyramid network, and multiple feature layers in the feature pyramid structure are extracted for feature fusion to generate multiple enhanced feature layers;
[0033] The feature pyramid structure includes multiple feature layers, and the shapes and sizes of the feature layers decrease from bottom to top.
[0034] Preferably, until the network loss value meets the convergence requirement, the corresponding network weights are saved to complete the construction of the target detection model, including:
[0035] When the network loss value meets the convergence requirements, the corresponding network weights are saved to complete the construction of the target detection model;
[0036] When the network loss value does not meet the convergence requirements, the training data set of the YOLOX network is reconstructed, and the YOLOX network is trained again until the network loss value meets the convergence requirements. The corresponding network weights are saved to complete the construction of the target detection model.
[0037] Preferably, after obtaining the recognition result of the target construction site image through a pre-built target detection model based on the target construction site image, the method further includes:
[0038] Based on the target construction site image, the target detection model is optimized by using the annealing cosine algorithm.
[0039] Based on the same inventive concept, the present invention also provides a distribution substation construction progress recognition system, including: a target image acquisition module and a target image recognition module;
[0040] The target image acquisition module is used to acquire a target construction site image of a construction site in a distribution station area;
[0041] The target image recognition module is used to obtain a recognition result of the target construction site image based on the target construction site image through a pre-built target detection model;
[0042] Among them, the target detection model is constructed based on the image dataset of the distribution station construction process by training the improved YOLOX network; the improved YOLOX network obtains the center position distance between each predicted box and the corresponding real box through the improved CIOU loss function, and then determines the most appropriate predicted box.
[0043] Preferably, the construction of the target detection model of the target image recognition module includes:
[0044] The image dataset of the construction process of the distribution station area is preprocessed and labeled, and after generating sample labeled images, it is used as the training dataset of the improved YOLOX network; wherein the improved YOLOX network includes a backbone network, a feature graph pyramid network and a classifier;
[0045] Based on the training data set, extracting image features of sample label images in the training data set through the backbone network, and based on the image features, obtaining multiple enhanced feature layers through a feature graph pyramid network;
[0046] In the classifier, a plurality of corresponding prediction boxes are determined according to the plurality of enhanced feature layers, and the most appropriate prediction box is determined from the plurality of prediction boxes through the CIOU loss function;
[0047] Calculate the network loss value and network weight of the most appropriate predicted box and the pre-labeled real box, and train the classifier by iterating the network weight until the network loss value meets the convergence requirement, save the corresponding network weight, and complete the construction of the target detection model;
[0048] The labels include at least one or more of the following: target position labels, target size labels, and target category labels.
[0049] Preferably, the target image recognition module in the classifier determines a plurality of corresponding prediction boxes according to the plurality of enhanced feature layers, and further determines the most appropriate prediction box from the plurality of prediction boxes through the CIOU loss function, including:
[0050] In the classifier, based on multiple enhanced feature layers of the sample label image, multiple prediction boxes are constructed through the decoupling head, and the effective prediction box is selected through the focal_loss classification loss function;
[0051] Based on the relevant parameters of the valid prediction box and the real box, the center position distance between each valid prediction box and the corresponding real box is calculated through the CIOU loss function, and the center position distance is stored in the corresponding prediction result;
[0052] The prediction results of each of the valid prediction boxes are sorted by the SimOTA label matching strategy, and the prediction box with the highest score is taken as the most suitable prediction box;
[0053] The prediction result includes one or more of the following: a regression index, an object detection index and a category index; the regression index includes at least: a distance between the center position of a valid prediction box and a corresponding real box.
[0054] Preferably, the CIOU loss function of the target image recognition module is as follows:
[0055]
[0056] Among them, L ciouis the loss value of the distance between the predicted box and the corresponding real box, IOU is the prediction index intersection-union ratio, c is the diagonal straight line distance between the predicted box and the real box, b is the center point of the predicted box, and b gt is the center point of the real box, ρ is the straight-line distance between the center point of the predicted box and the center point of the real box, a is the first side length penalty term, and v is the second side length penalty term.
[0057] Preferably, the focal_loss classification loss function of the target image recognition module is as follows:
[0058]
[0059] Among them, L FOCAL_LOSS (p) is the classification loss function, p is the probability that the prediction box is a valid prediction box, d is the balance factor, γ is a pre-set parameter, and y is the sample label.
[0060] Preferably, the target image recognition module preprocesses and labels the image dataset based on the image dataset of the construction process of the distribution station area, generates sample label images, and uses them as the training dataset of the improved YOLOX network, including:
[0061] Obtain image and video information of the construction process of the distribution station area as an image dataset;
[0062] Image information is obtained from video information by extracting video frames, and images are screened by eliminating pictures without construction process of distribution substation areas;
[0063] After processing the image information and the filtered image information in a unified image format, sample labels are produced, and after generating sample label images, they are used as training data sets for the improved YOLOX network;
[0064] The image format processing includes at least one or more of the following: image translation, image enhancement, image cropping and image blurring, and the sample label includes at least one or more of the following: detection target position, detection target size and detection target category.
[0065] Preferably, the target image recognition module extracts image features of sample label images in the training data set through the backbone network based on the training data set, and obtains multiple enhanced feature layers through a feature graph pyramid network based on the image features, including:
[0066] Extracting image features of sample label images in the training data set through the backbone network;
[0067] Based on the image features, a feature pyramid structure is constructed through a feature graph pyramid network, and multiple feature layers in the feature pyramid structure are extracted for feature fusion to generate multiple enhanced feature layers;
[0068] The feature pyramid structure includes multiple feature layers, and the shapes and sizes of the feature layers decrease from bottom to top.
[0069] Preferably, the target image recognition module saves the corresponding network weights until the network loss value meets the convergence requirement, and completes the construction of the target detection model, including:
[0070] When the network loss value meets the convergence requirements, the corresponding network weights are saved to complete the construction of the target detection model;
[0071] When the network loss value does not meet the convergence requirements, the training data set of the YOLOX network is reconstructed, and the YOLOX network is trained again until the network loss value meets the convergence requirements. The corresponding network weights are saved to complete the construction of the target detection model.
[0072] Preferably, after the target image recognition module, it also includes:
[0073] Based on the target construction site image, the target detection model is optimized by using the annealing cosine algorithm.
[0074] Based on the same inventive concept, the present invention also provides a computer device, including: one or more processors;
[0075] A memory for storing one or more programs;
[0076] When the one or more programs are executed by the one or more processors, a method for identifying the construction progress of a distribution station area as described above is implemented.
[0077] Based on the same inventive concept, the present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed, a method for identifying the construction progress of a distribution station area as described above is implemented.
[0078] Compared with the closest prior art, the present invention has the following beneficial effects:
[0079] The present invention provides a method, system, device and medium for identifying the construction progress of a distribution substation area, comprising: obtaining a target construction site image of a distribution substation area construction site; based on the target construction site image, obtaining a recognition result of the target construction site image through a pre-constructed target detection model; wherein the target detection model is constructed by training an improved YOLOX network based on an image data set of a distribution substation area construction process; the improved YOLOX network obtains the center position distance between each prediction box and a real box through an improved CIOU loss function, and then determines the most suitable prediction box; the improved CIOU loss function of the target detection model of the present invention takes into account the center point distance and diagonal distance between the real box and the prediction box, and at the same time, no matter whether the prediction box and the real box are in a non-overlapping situation or in a contained situation, the CIOU function can clearly reflect the distance between the boxes, and through the improved CIOU loss function, the center position distance between each prediction box and the real box can be clearly reflected, thereby improving the accuracy and regression prediction ability of the target detection model. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 A schematic diagram of a method for identifying construction progress of a distribution station area provided by the present invention;
[0081] Figure 2 A schematic diagram of the process of constructing a field picture database provided by the present invention;
[0082] Figure 3 A schematic diagram of the unified process of image processing and format provided by the present invention;
[0083] Figure 4 A schematic diagram of the data enhancement process provided by the present invention;
[0084] Figure 5 A schematic diagram of a characteristic pyramid structure provided by the present invention;
[0085] Figure 6 A cosine annealing curve diagram provided by the present invention;
[0086] Figure 7 A graph for finding the global optimal solution for the cosine annealing learning rate reduction provided by the present invention;
[0087] Figure 8 A schematic diagram of the technical process flow for identifying the construction progress of a distribution station area provided by the present invention;
[0088] Fig. 9 A schematic diagram of the construction process image detection training and prediction process provided by the present invention;
[0089] Fig.10 A schematic diagram of a construction progress identification system for a distribution station area provided by the present invention. DETAILED DESCRIPTION
[0090] The specific implementation modes of the present invention are further described in detail below with reference to the accompanying drawings.
[0091] Embodiment 1:
[0092] The present invention provides a method for identifying the construction progress of a distribution station area. Figure 1 As shown, including:
[0093] Step 1: Acquire the target construction site image of the construction site of the distribution station area;
[0094] Step 2: Based on the target construction site image, a recognition result of the target construction site image is obtained through a pre-built target detection model;
[0095] Among them, the target detection model is constructed based on the image dataset of the distribution station construction process by training the improved YOLOX network; the improved YOLOX network obtains the center position distance between each predicted box and the corresponding real box through the improved CIOU loss function, and then determines the most appropriate predicted box.
[0096] Specifically, step 1 includes:
[0097] The target construction site image of the distribution station area construction site is collected by drones, cameras, pan / tilts and other equipment. The target construction site image includes video information and static pictures. The present invention obtains the target construction site image of the distribution station area construction site through multiple image acquisition devices, which provides an image basis for the subsequent identification of the distribution station area construction progress. The images of the construction objects in different postures are captured by multiple image devices, which provides multiple types of images for the identification of the construction progress, and reduces the problem of subsequent construction progress identification errors caused by insufficient target construction site images acquired by a single image device.
[0098] Before step 2, first divide the construction units and construction links according to the standard construction process. The construction link is the component of the construction unit. Completing the division of construction units and construction links prepares for the subsequent construction process classification and data label processing. The construction unit includes at least one or more of the following: transformer foundation and equipment installation; the construction link includes at least one or more of the following: electric pole foundation pit positioning and foundation pit excavation in the transformer foundation; the main construction units and construction links are as follows:
[0099] The transformer substation foundation includes at least one or more of the following: positioning of the electric pole foundation pit, excavation of the foundation pit and assembly of the electric pole;
[0100] The bolt and cross arm installation includes at least one or more of the following: transformer support installation, arrester cross arm installation, fuse cross arm installation, lead cross arm installation and stand bolt installation;
[0101] Equipment installation includes at least one or more of the following: installation of transformers and installation of low-voltage integrated distribution boxes;
[0102] Lead installation includes at least one or more of the following: installation of down conductors on the rack, installation of fuse leads, installation of grounding rings, installation of arrester leads, and installation of leads on the high and low voltage sides of transformers;
[0103] The low voltage outgoing line shall include at least one or more of the following: low voltage integrated distribution box wiring;
[0104] Build a target detection model, including:
[0105] Like the target construction site images of the distribution substation construction site, the image information and video information of the distribution substation construction process are also collected by drones, cameras, pan / tilts and other equipment. At the same time, it is ensured that the images of the construction objects in different postures are captured, and the image information and video information of the distribution substation construction process are obtained as the image data set.
[0106] like Figure 2 As shown in FIG. 1 , the video information of the construction process of the distribution station area is framed, and the image information is obtained by sampling at a certain frame interval, and the image information obtained before is stored in the on-site image database, such as Figure 3 As shown, the image information in the on-site image database is screened, invalid images are removed, and the image information of the construction process of the distribution station area is retained;
[0107] like Figure 4 As shown in the figure, the image information is expanded by image translation, image enhancement, image cropping, and image blurring, and the image format is unified. The construction units and construction links are divided according to the standard construction process to formulate the detection target category label for each image, and the detection target position and the detection target position size labels are made on the image at the same time. After the sample label image is generated, it is used as the training data set of the improved YOLOX network;
[0108] The improved YOLOX network includes a backbone network, a feature map pyramid network, and a classifier;
[0109] Based on the image information in the training data set, the construction process images are feature extracted through the GSPDarkNet backbone network. The GSPDarkNet backbone network processes the input image features through one sampling and multiple residual networks, and performs continuous 1*1 convolution and 3*3 convolution as well as residual edge superposition to deepen the network, making the network easier to optimize, while increasing the depth and improving the accuracy.
[0110] The GSPDarkNet backbone network includes: residual network, CSPnet network, Focus network, SiLU activation function, SPP structure. The Focus network obtains 4 image feature layers and expands the input channels to 4 times the original ones. Therefore, the spliced feature layers are changed from the original 3 channels to 12 channels. The SiLU activation function is:
[0111] f(x) = x·sigmoid(x)
[0112] Among them, f(x) is the activation function of x, x is the variable of the input activation function, corresponding to the output result of the convolutional layer, and sigmoid(x) is the S-type function;
[0113] The expression of sigmoid(x) is as follows:
[0114]
[0115] After completing the image feature extraction, the SPP structure and PANet structure of the FPN feature pyramid network are used to perform three convolutions and pooling on the last feature layer of the GSPDarkNet backbone network; the PANet structure forms a feature pyramid structure by repeatedly extracting image features, such as Figure 5 As shown in the figure, the feature pyramid structure includes multiple feature layers, and the shapes and sizes of the feature layers decrease from bottom to top. The SSP structure extracts the feature layer by continuously changing the pooling kernel size of the pooling layer to increase the receptive field of the network.
[0116] Extract multiple feature layers from the feature pyramid structure, perform feature layer feature fusion on the obtained multiple feature layers through upsampling and downsampling to better extract features, obtain multiple enhanced feature layers, and pass the obtained multiple enhanced feature layers into the classifier;
[0117] The classifier includes YOLOHead (decoupling head). YOLOHead (decoupling head) uses a no-priori box (Anchor Free) method to obtain a prediction box based on multiple enhanced feature layers. Each prediction box has a prediction result, which includes: Reg (regression index), Obj (object detection index) and Cls (category index). Reg (regression index) determines the regression parameter of each feature point to obtain the prediction box; Obj (object detection index) determines whether each feature point contains an object, that is, the probability of the existence of an object; Cls (category index) determines the type of object contained in each feature point, that is, the probability of belonging to each category;
[0118] The anchor frame is reflected in the prediction frame by adopting the method without prior frame. The feature layer is divided into prediction frames through the information introduced by the downsampling process in the previous step. If the input image is 640*640 in size, 8400 prediction frames will be obtained. These prediction frames correspond to anchor frames of different sizes. There are 6400 prediction frames corresponding to 8*8 anchor frames, 1600 prediction frames corresponding to 16*16 anchor frames, and 400 prediction frames corresponding to 32*32 anchor frames. The anchor frame does not really appear but serves as a bridge to connect the information between the prediction frame and the real frame.
[0119] Among the multiple prediction boxes above, the number of valid prediction boxes, i.e., positive samples, is very small, and the unmatched prediction boxes, i.e., negative samples, account for the vast majority. At this time, the positive and negative samples are unbalanced. So many negative samples not only have no effect on the training network, but will drown out a small number of positive samples that are helpful for training. Therefore, how to balance positive and negative samples is a difficult problem. The focal_loss classification loss function is introduced in the present invention. The focal_loss is based on the binary cross entropy. It is a dynamically scaled cross entropy loss. Through a dynamic scaling factor, the weight of the easily distinguishable samples in the training process can be dynamically reduced, thereby quickly focusing on those difficult-to-distinguish samples. The focal_loss classification loss function is as follows:
[0120]
[0121] Among them, L FOCAL_LOSS (p) is the classification loss function, p is the probability that the prediction box is a valid prediction box, b is the balance factor, which adjusts the weight of simple samples, γ is the setting parameter, which is generally set to 2 to reduce the loss caused by easy-to-classify samples, y is the sample label, when y = 1, it means that the sample label is a positive sample, when y = 0, it means that the sample label is a negative sample. Experiments show that the function works best when b = 0.25 and γ = 2;
[0122] The focal_loss classification loss function is used to select effective prediction boxes, and the positions of effective prediction boxes are continuously adjusted to be close to the real box positions of the construction process marked in advance. The prediction index IOU is introduced as the sensitivity of target detection. The IOU loss function is as follows:
[0123]
[0124] Among them, IOU is the prediction index intersection-union ratio, intersection is the range intersection of the predicted box and the true box, and union is the range union of the predicted box and the true box;
[0125] The prediction box whose IOU ratio between the real box and the prediction box is less than 0.5 is ignored. The IOU loss function has certain shortcomings: when the prediction box and the real box do not overlap, the IOU loss function cannot judge the distance between the two boxes. At this time, the IOU is always 0, resulting in an unsatisfactory regression process; when the prediction box and the real box contain each other, the IOU value is fixed and the position of the prediction box in the real box cannot be judged, nor can the center distance between the two boxes be perceived;
[0126] Therefore, the CIOU loss function is introduced. The CIOU loss function considers the center point distance and diagonal distance between the real box and the predicted box on the basis of the IOU loss function, and introduces the side length penalty term. At this time, whether the predicted box and the real box are in a non-overlapping or contained situation, the CIOU loss function can clearly reflect the distance between the boxes, solving the shortcomings of the IOU loss function. The CIOU loss function is as follows:
[0127]
[0128] Among them, L ciou is the loss value of the distance between the predicted box and the corresponding real box, IOU is the prediction index intersection-union ratio, c is the diagonal straight line distance between the predicted box and the real box, b is the center point of the predicted box, and b gt is the center point of the real box, ρ is the straight-line distance between the center point of the predicted box and the center point of the real box, a is the first side length penalty term, and v is the second side length penalty term;
[0129] The calculation formula of a is as follows:
[0130]
[0131] Among them, a is the first edge length penalty term, v is the second edge length penalty term, and IOU is the prediction index intersection-over-union ratio;
[0132] The calculation formula of v is as follows:
[0133]
[0134] Among them, v is the second edge length penalty term, w gt is the width of the real box, h gt is the height of the real box, w is the width of the predicted box, and h is the height of the predicted box;
[0135] The CIOU loss function is used to calculate the center distance between each valid prediction box and the corresponding true box, and the center distance is stored in the Reg (regression index) of the prediction result;
[0136] The SimOTA label matching strategy sorts the prediction results of each valid prediction box, that is, the dynamic scores of Reg, Obj, and Cls, and performs non-maximum suppression screening to prevent prediction box stacking, selects high-score information and matches it with the real box, and finally obtains the most suitable prediction box;
[0137] Based on the prediction results of the most suitable prediction box, i.e., Reg, Obj, Cls, and the real information of the corresponding real box, i.e., label category, quantity, and position, the network loss value loss is calculated. The network loss value loss finally contains the following information: the loss value of the distance between the prediction box and the center position of the corresponding real box, the cross entropy loss of the prediction results of the positive and negative sample feature points of the confidence, and the focal_loss loss calculated by the real box type of the object category;
[0138] The network loss value is used to calculate the network training weight for each time; the classifier is trained by iterating the network weights, and the weight file is saved after each preset number of trainings. The weight file with a small and stable loss value is selected and put into the prediction network to predict and classify pictures, videos, etc. In the process of continuous training of the classifier, the network loss value loss will change. When the network loss value loss continues to decrease and tends to be stable, it is considered that the network loss value at this time meets the convergence requirements, and the corresponding network weights are saved to complete the construction of the target detection model. When the network loss value does not meet the convergence requirements, the training data set of the YOLOX network is rebuilt, and the YOLOX network is trained again until the network loss value meets the convergence requirements. The corresponding network weights are stored to complete the construction of the target detection model; the present invention takes into account the center point distance and diagonal distance between the real box and the predicted box by constructing an improved CIOU loss function in the training target detection model, and introduces a side length penalty term. At this time, whether the predicted box and the real box are in a non-overlapping situation or in a contained situation, the CIOU function can clearly reflect the distance between the boxes, and through the improved CIOU loss function, the center position distance between each predicted box and the real box can be clearly reflected, thereby improving the accuracy and regression prediction ability of the target detection model, and the focal_loss classification loss function in the target detection model is used to solve the problem of sample imbalance, thereby improving the YOLOX network training speed and accuracy, and obtaining better target detection effects.
[0139] Specifically, step 2 includes:
[0140] The target construction site image and the last network weight obtained when training the target detection model are input into the constructed target detection model for feature screening and prediction. The target detection model classifier will return the prediction result, which includes the spatial information and classification information of the target construction site image and the confidence level. The area in the target construction site image that satisfies the confidence level greater than the set value will be marked with the name of the construction process and the confidence level, thereby determining the corresponding construction process.
[0141] After the construction progress of the distribution station area is identified through the target detection model, the learning rate is changed through the annealing cosine algorithm based on the target construction site image, such as Figure 6 The cosine annealing curve is shown, which makes the change of learning rate show cosine decrease, which can solve the problem of being trapped in the local optimal solution when the gradient descends, such as Figure 7 As shown, by means of cosine annealing, the local minimum can be jumped out to find the global optimal solution, and the label smoothing technology is adopted to adjust the label smoothness to make the target detection model training process more stable, thereby retraining and optimizing the target detection model. Figure 8 The process can be used to identify the construction progress of the distribution area, realize the construction process tracking, serve as a reference for the construction plan progress, and provide a basis for the supervision of the construction process of the distribution area. Fig. 9 As shown in the schematic diagram, the construction progress of the distribution station area is identified through the target detection model, and the spatial information, classification information and confidence in the target construction site image are determined, which effectively improves the efficiency of supervision and project acceptance, helps the supervision and acceptance personnel to quickly sort out the construction links of the distribution station area, and is used for safety management and control of the construction process, which greatly improves the intelligence level of the construction of the distribution station area of the distribution network and improves the construction quality of the distribution station area; the present invention optimizes and retrains the target detection model through the annealing cosine algorithm and label smoothing technology, ensures the stability of the YOLOX network, accelerates the convergence speed of the YOLOX network, and improves the prediction level.
[0142] Embodiment 2:
[0143] In a specific embodiment, the video information of the construction process of the distribution station area cannot be used directly. The frame extraction technology is used to extract frames from the video information at intervals. In the frame extraction process, the frame extraction interval needs to be fully considered to ensure that the construction link will not be lost. In addition, the video information contains multiple directions and angles. While ensuring that the number is met, it is also necessary to remove redundant pictures with high similarity and non-construction process as much as possible. Sample expansion methods are adopted: cropping, translation, blurring, enhancement, etc.
[0144] Using Python to extract video frames is as follows:
[0145]
[0146]
[0147] Three feature layers are extracted from the feature pyramid structure, namely the middle layer, the lower middle layer and the bottom layer. The shape sizes of these three feature layers are (80, 80, 256), (40, 40, 512) and (20, 20, 1024) respectively. The three feature layers are fused by upsampling and downsampling to better extract features, and three enhanced feature layers are obtained. The three enhanced feature layers are passed into YOLOHead (decoupling head);
[0148] When training the classifier, a weight file is saved every 10 training passes; the present invention divides specific construction units and construction links according to the construction process, and the division basis of each link is the standard construction process flow, which can ensure the accuracy of the division of construction links and serve as a basis for subsequent target detection and classification work; the present invention uses Python to extract video frames, which can quickly obtain useful image information from video information, and extracts feature layers from the middle layer, lower middle layer and bottom layer of the feature pyramid structure respectively, which is conducive to extracting feature layers from various aspects of the feature pyramid structure and obtaining representative feature layers.
[0149] Embodiment 3:
[0150] Based on the same inventive concept, the present invention also provides a distribution substation construction progress identification system such as Fig.10 As shown, including:
[0151] Target image acquisition module and target image recognition module;
[0152] The target image acquisition module is used to acquire a target construction site image of a construction site in a distribution station area;
[0153] The target image recognition module is used to obtain a recognition result of the target construction site image based on the target construction site image through a pre-built target detection model;
[0154] Among them, the target detection model is constructed based on the image dataset of the distribution station construction process by training the improved YOLOX network; the improved YOLOX network obtains the center position distance between each predicted box and the corresponding real box through the improved CIOU loss function, and then determines the most appropriate predicted box.
[0155] Preferably, the construction of the target detection model of the target image recognition module includes:
[0156] The image dataset of the construction process of the distribution station area is preprocessed and labeled, and after generating sample labeled images, it is used as the training dataset of the improved YOLOX network; wherein the improved YOLOX network includes a backbone network, a feature graph pyramid network and a classifier;
[0157] Based on the training data set, extracting image features of sample label images in the training data set through the backbone network, and based on the image features, obtaining multiple enhanced feature layers through a feature graph pyramid network;
[0158] In the classifier, a plurality of corresponding prediction boxes are determined according to the plurality of enhanced feature layers, and the most appropriate prediction box is determined from the plurality of prediction boxes through the CIOU loss function;
[0159] Calculate the network loss value and network weight of the most appropriate predicted box and the pre-labeled real box, and train the classifier by iterating the network weight until the network loss value meets the convergence requirement, save the corresponding network weight, and complete the construction of the target detection model;
[0160] The labels include at least one or more of the following: target position labels, target size labels, and target category labels.
[0161] Preferably, the target image recognition module in the classifier determines a plurality of corresponding prediction boxes according to the plurality of enhanced feature layers, and further determines the most appropriate prediction box from the plurality of prediction boxes through the CIOU loss function, including:
[0162] In the classifier, based on multiple enhanced feature layers of the sample label image, multiple prediction boxes are constructed through the decoupling head, and the effective prediction box is selected through the focal_loss classification loss function;
[0163] Based on the relevant parameters of the valid prediction box and the real box, the center position distance between each valid prediction box and the corresponding real box is calculated through the CIOU loss function, and the center position distance is stored in the corresponding prediction result;
[0164] The prediction results of each of the valid prediction boxes are sorted by the SimOTA label matching strategy, and the prediction box with the highest score is taken as the most suitable prediction box;
[0165] The prediction result includes one or more of the following: a regression index, an object detection index and a category index; the regression index includes at least: a distance between the center position of a valid prediction box and a corresponding real box.
[0166] Preferably, the CIOU loss function of the target image recognition module is as follows:
[0167]
[0168] Among them, L ciou is the loss value of the distance between the predicted box and the corresponding real box, IOU is the prediction index intersection-union ratio, c is the diagonal straight line distance between the predicted box and the real box, b is the center point of the predicted box, and b gt is the center point of the real box, ρ is the straight-line distance between the center point of the predicted box and the center point of the real box, a is the first side length penalty term, and v is the second side length penalty term.
[0169] Preferably, the focal_loss classification loss function of the target image recognition module is as follows:
[0170]
[0171] Among them, L FOCAL_LOSS (p) is the classification loss function, p is the probability that the prediction box is a valid prediction box, d is the balance factor, γ is a pre-set parameter, and y is the sample label.
[0172] Preferably, the target image recognition module preprocesses and labels the image dataset based on the image dataset of the construction process of the distribution station area, generates sample label images, and uses them as the training dataset of the improved YOLOX network, including:
[0173] Obtain image and video information of the construction process of the distribution station area as an image dataset;
[0174] Image information is obtained from video information by extracting video frames, and images are screened by eliminating pictures without construction process of distribution substation areas;
[0175] After processing the image information and the filtered image information in a unified image format, sample labels are produced, and after generating sample label images, they are used as training data sets for the improved YOLOX network;
[0176] The image format processing includes at least one or more of the following: image translation, image enhancement, image cropping and image blurring, and the sample label includes at least one or more of the following: detection target position, detection target size and detection target category.
[0177] Preferably, the target image recognition module extracts image features of sample label images in the training data set through the backbone network based on the training data set, and obtains multiple enhanced feature layers through a feature graph pyramid network based on the image features, including:
[0178] Extracting image features of sample label images in the training data set through the backbone network;
[0179] Based on the image features, a feature pyramid structure is constructed through a feature graph pyramid network, and multiple feature layers in the feature pyramid structure are extracted for feature fusion to generate multiple enhanced feature layers;
[0180] The feature pyramid structure includes multiple feature layers, and the shapes and sizes of the feature layers decrease from bottom to top.
[0181] Preferably, the target image recognition module saves the corresponding network weights until the network loss value meets the convergence requirement, and completes the construction of the target detection model, including:
[0182] When the network loss value meets the convergence requirements, the corresponding network weights are saved to complete the construction of the target detection model;
[0183] When the network loss value does not meet the convergence requirements, the training data set of the YOLOX network is reconstructed, and the YOLOX network is trained again until the network loss value meets the convergence requirements. The corresponding network weights are saved to complete the construction of the target detection model.
[0184] Preferably, after the target image recognition module, it also includes:
[0185] Based on the target construction site image, the target detection model is optimized by using the annealing cosine algorithm.
[0186] Embodiment 4:
[0187] Based on the same inventive concept, the present invention also provides a computer device, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions in the computer storage medium to implement the corresponding method flow or corresponding function, so as to implement the steps of a method for identifying the construction progress of a distribution station area in the above embodiment.
[0188] Embodiment 5:
[0189] Based on the same inventive concept, the present invention also provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It can be understood that the computer-readable storage medium here can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the steps of a method for identifying the construction progress of a distribution station area in the above embodiment.
[0190] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented 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.
[0191] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0192] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0193] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0194] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit its protection scope. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that after reading the present invention, those skilled in the art can still make various changes, modifications or equivalent substitutions to the specific implementation methods of the application, but these changes, modifications or equivalent substitutions are all within the protection scope of the claims to be approved.
Claims
1. A method for identifying the construction progress of a distribution station area, characterized in that: include: Acquire target construction site images of the construction site of the distribution substation area; Based on the target construction site image, a recognition result of the target construction site image is obtained by using a pre-built target detection model; Among them, the target detection model is constructed based on the image dataset of the distribution station construction process by training the improved YOLOX network; the improved YOLOX network obtains the center position distance between each predicted box and the corresponding real box through the improved CIOU loss function, and then determines the most appropriate predicted box.
2. The method according to claim 1, characterized in that The construction of the target detection model includes: The image dataset of the construction process of the distribution station area is preprocessed and labeled, and after generating sample labeled images, it is used as the training dataset of the improved YOLOX network; wherein the improved YOLOX network includes a backbone network, a feature graph pyramid network and a classifier; Based on the training data set, extracting image features of sample label images in the training data set through the backbone network, and based on the image features, obtaining multiple enhanced feature layers through a feature graph pyramid network; In the classifier, a plurality of corresponding prediction boxes are determined according to the plurality of enhanced feature layers, and the most appropriate prediction box is determined from the plurality of prediction boxes through the CIOU loss function; Calculate the network loss value and network weight of the most appropriate predicted box and the pre-labeled real box, and train the classifier by iterating the network weight until the network loss value meets the convergence requirement, save the corresponding network weight, and complete the construction of the target detection model; The labels include at least one or more of the following: target position labels, target size labels, and target category labels.
3. The method according to claim 2, characterized in that In the classifier, according to the multiple enhanced feature layers, a corresponding multiple prediction boxes are determined, and the most suitable prediction box is determined from the multiple prediction boxes through the CIOU loss function, including: In the classifier, based on multiple enhanced feature layers of the sample label image, multiple prediction boxes are constructed through the decoupling head, and the effective prediction box is selected through the focal_loss classification loss function; Based on the relevant parameters of the valid prediction box and the real box, the center position distance between each valid prediction box and the corresponding real box is calculated through the CIOU loss function, and the center position distance is stored in the corresponding prediction result; The prediction results of each of the valid prediction boxes are sorted by the SimOTA label matching strategy, and the prediction box with the highest score is taken as the most suitable prediction box; The prediction result includes one or more of the following: a regression index, an object detection index and a category index; the regression index includes at least: a distance between the center position of a valid prediction box and a corresponding real box.
4. The method according to claim 3, characterized in that The CIOU loss function is as follows: Among them, L ciou is the loss value of the distance between the predicted box and the corresponding real box, IOU is the prediction index intersection-union ratio, c is the diagonal straight line distance between the predicted box and the real box, b is the center point of the predicted box, and b gt is the center point of the real box, ρ is the straight-line distance between the center point of the predicted box and the center point of the real box, a is the first side length penalty term, and v is the second side length penalty term.
5. The method according to claim 3, characterized in that The focal_loss classification loss function is as follows: Among them, L FOCAL_LOSS (p) is the classification loss function, p is the probability that the prediction box is a valid prediction box, d is the balance factor, γ is a pre-set parameter, and y is the sample label.
6. The method according to claim 2, characterized in that The image dataset based on the construction process of the distribution station area is preprocessed and labeled to generate sample label images as a training dataset for the improved YOLOX network, including: Obtain image and video information of the construction process of the distribution station area as an image dataset; Image information is obtained from video information by extracting video frames, and images are screened by eliminating pictures without construction process of distribution substation areas; After processing the image information and the filtered image information in a unified image format, sample labels are produced, and after generating sample label images, they are used as training data sets for the improved YOLOX network; The image format processing includes at least one or more of the following: image translation, image enhancement, image cropping and image blurring, and the sample label includes at least one or more of the following: detection target position, detection target size and detection target category.
7. The method according to claim 2, characterized in that The extracting image features of sample label images in the training data set through the backbone network based on the training data set, and obtaining multiple enhanced feature layers through a feature graph pyramid network based on the image features, including: Extracting image features of sample label images in the training data set through the backbone network; Based on the image features, a feature pyramid structure is constructed through a feature graph pyramid network, and multiple feature layers in the feature pyramid structure are extracted for feature fusion to generate multiple enhanced feature layers; The feature pyramid structure includes multiple feature layers, and the shapes and sizes of the feature layers decrease from bottom to top.
8. The method according to claim 2, characterized in that Until the network loss value meets the convergence requirement, the corresponding network weight is saved to complete the construction of the target detection model, including: When the network loss value meets the convergence requirements, the corresponding network weights are saved to complete the construction of the target detection model; When the network loss value does not meet the convergence requirements, the training data set of the YOLOX network is reconstructed, and the YOLOX network is trained again until the network loss value meets the convergence requirements. The corresponding network weights are saved to complete the construction of the target detection model.
9. The method according to claim 2, characterized in that After obtaining the recognition result of the target construction site image through the pre-built target detection model based on the target construction site image, the method further includes: Based on the target construction site image, the target detection model is optimized by using the annealing cosine algorithm.
10. A distribution station area construction progress identification system, characterized in that: include: Target image acquisition module and target image recognition module; The target image acquisition module is used to acquire a target construction site image of a construction site in a distribution station area; The target image recognition module is used to obtain a recognition result of the target construction site image based on the target construction site image through a pre-built target detection model; Among them, the target detection model is constructed based on the image dataset of the distribution station construction process by training the improved YOLOX network; the improved YOLOX network obtains the center position distance between each predicted box and the corresponding real box through the improved CIOU loss function, and then determines the most appropriate predicted box.
11. The system according to claim 10, characterized in that The construction of the target detection model of the target image recognition module includes: The image dataset of the construction process of the distribution station area is preprocessed and labeled, and after generating sample labeled images, it is used as the training dataset of the improved YOLOX network; wherein the improved YOLOX network includes a backbone network, a feature graph pyramid network and a classifier; Based on the training data set, extracting image features of sample label images in the training data set through the backbone network, and based on the image features, obtaining multiple enhanced feature layers through a feature graph pyramid network; In the classifier, a plurality of corresponding prediction boxes are determined according to the plurality of enhanced feature layers, and the most appropriate prediction box is determined from the plurality of prediction boxes through the CIOU loss function; Calculate the network loss value and network weight of the most appropriate predicted box and the pre-labeled real box, and train the classifier by iterating the network weight until the network loss value meets the convergence requirement, save the corresponding network weight, and complete the construction of the target detection model; The labels include at least one or more of the following: target position labels, target size labels, and target category labels.
12. A computer device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, a method for identifying the construction progress of a distribution station area as described in any one of claims 1 to 9 is implemented.
13. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed, a method for identifying the construction progress of a distribution station area as described in any one of claims 1 to 9 is implemented.