Model dynamic evaluation method, system and equipment based on three-dimensional object detection
Through the three-dimensional object detection method based on deep learning, the three-dimensional model of the power system is automatically detected and evaluated, which solves the problems of low manual operation efficiency and insufficient accuracy in the existing technology, achieves efficient and accurate three-dimensional model calibration and evaluation, and improves the power system System planning and operational support.
Patent Information
- Application Number
- CN202410655351.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2024-09-10
AI Technical Summary
In the existing technology, the accuracy detection and calibration of the three-dimensional model of the power system mainly relies on manual operation, which is inefficient and susceptible to human factors. It cannot meet the demand for fast and efficient three-dimensional model calibration, especially in the monitoring and maintenance of power equipment. There may be deviations between the position and the model position, leading to misleading analysis results.
The model dynamic evaluation method based on three-dimensional object detection is adopted to obtain the three-dimensional model of the target scene, collect training data, build a power equipment target detection model, use the deep learning model to detect the power equipment, calculate the distance deviation between the equipment, and then evaluate and adjust the 3D model to reduce manual intervention and improve automation and detection accuracy.
It realizes the automatic detection and evaluation of the three-dimensional model of the power system, improves the accuracy and reliability of the model, reduces the data collection workload, reduces the computational complexity, enhances the detection ability of overlapping information and targets of different scales, and improves the Assessment accuracy and efficiency.
Smart Images

Figure CN118628874A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to a model dynamic evaluation method, system and device based on three-dimensional object detection. Background Art
[0002] With the advancement of science and technology and the development of computer vision technology, 3D models are increasingly used in many fields, especially in power system planning and operation. As the core infrastructure of modern society, the safety, stability and efficiency of the power system are crucial to maintaining the normal operation of the social economy. Therefore, equipment layout, line planning and fault detection in the power system all rely on accurate 3D models for simulation and analysis.
[0003] In practical applications, especially in the monitoring and maintenance of power equipment, due to the diversity of data sources, the complexity of data processing, and environmental changes, the actual location of the equipment may deviate from the location in the three-dimensional model. Therefore, it is necessary to dynamically obtain and confirm the actual location information of the equipment through real-time image data and deep learning models, confirm whether the information of the generated three-dimensional model is correct, and then evaluate and adjust the generated three-dimensional model to avoid the lack of accuracy of the three-dimensional model, which may lead to misleading results in subsequent power system analysis. In existing technologies, the accuracy detection and calibration of three-dimensional models mainly rely on manual operation, which is not only inefficient, but also easily affected by human factors, resulting in reduced reliability of the results. Although traditional measurement equipment can provide more accurate measurement results, it often requires cumbersome operations and a lot of time investment, and cannot meet the needs of fast and efficient three-dimensional model calibration.
[0004] In addition, target recognition technology, as an important branch of the field of computer vision, has been widely used in many fields. However, in the process of generating and calibrating the three-dimensional model of the power system, how to effectively use target recognition technology to improve the accuracy and calibration efficiency of the three-dimensional model is still a problem to be solved. Therefore, in view of the problems existing in the prior art, the present invention proposes a model dynamic evaluation method, system and device based on three-dimensional object detection for the generated three-dimensional model. The method realizes the automatic detection and evaluation of objects in the three-dimensional model of the power system, improves the accuracy and reliability of the three-dimensional model, and provides reliable support for the planning, operation and maintenance of the power system. Summary of the invention
[0005] The purpose of the present invention is to overcome the problem in the prior art that it is difficult to accurately detect and calibrate the three-dimensional model of the power system, and to provide a model dynamic evaluation method, system and equipment based on three-dimensional object detection that can automatically detect and evaluate the three-dimensional model of the power system and improve the accuracy and reliability of the three-dimensional model of the power system.
[0006] In a first aspect, an embodiment of the present invention provides a model dynamic evaluation method based on three-dimensional object detection, the calibration method comprising:
[0007] S1, obtain a three-dimensional model of the target scene;
[0008] The target scene includes multiple power equipment;
[0009] S2. Collecting training data through the three-dimensional model to obtain a training data set;
[0010] S3, constructing an electric power equipment target detection model, and using the training data set to train the electric power equipment target detection model to obtain a trained electric power equipment target detection model;
[0011] S4, detecting the target scene by using the trained electric power equipment target detection model, calculating the distance between each electric power equipment in the target scene according to the detection result, and obtaining the calculated value of the distance between each electric power equipment in the target scene;
[0012] S5. Evaluate the three-dimensional model of the target scene according to the deviation between the calculated value and the actual value of the distance between each power device in the target scene.
[0013] In the step S2, collecting training data through the three-dimensional model includes:
[0014] S201, obtaining three-dimensional grid data of a three-dimensional model of a target scene at different observation points through a plurality of preset observation points;
[0015] S202, obtaining a front view image, a side view image, and a top view image corresponding to each three-dimensional grid data through a projection algorithm;
[0016] S202, annotating target frame position information and target frame classification information of the power equipment in each image by using an annotation tool;
[0017] S203: Associating and matching the annotated image with the corresponding three-dimensional grid data.
[0018] In step S4, detecting the target scene by using the trained power equipment target detection model, and calculating the distance between each power equipment in the target scene according to the detection result includes:
[0019] S401, inputting the three-dimensional grid data of the target scene, as well as the front view image, side view image, and top view image of the target scene into the trained power equipment target detection model to obtain the target frame position information and target frame classification information of each power equipment in the target scene;
[0020] The three-dimensional grid data of the target scene is acquired by a depth camera or a laser radar, and the front view image, side view image, and top view image of the target scene are acquired by a camera;
[0021] S402: Calculate the distance between each power device in the target scene according to the target frame position information and target frame classification information of each power device in the target scene.
[0022] In step S3, the electric power equipment target detection model includes:
[0023] An input layer, for receiving three-dimensional grid data and corresponding images, wherein the images include: a front view image, a side view image, and a top view image;
[0024] A feature extraction layer, used to extract position information from the received three-dimensional grid data and to extract multi-scale image feature information of different viewing angles from the image;
[0025] Feature fusion layer: used to perform deep feature fusion of location information and multi-scale image feature information from different perspectives to obtain fused feature information;
[0026] Post-extraction unit: used to extract fusion feature information;
[0027] Detection head: used to obtain the detection result according to the information extracted by the post-extraction unit;
[0028] Output layer: used to output the detection results obtained by the detection head.
[0029] The step of extracting multi-scale image feature information from different perspectives from the image comprises:
[0030] S301, performing FPN sampling processing on the front view image, the side view image, and the top view image respectively to obtain multi-scale features of the front view angle, multi-scale features of the side view angle, and multi-scale features of the top view angle;
[0031] S302, densely transform and fuse the multi-scale features of the front view, the multi-scale features of the side view, and the multi-scale features of the top view to obtain a front view feature map, a side view feature map, and a top view feature map.
[0032] The extracting of position information from the three-dimensional grid data specifically includes:
[0033] Use the position encoding formula to convert the position information of each vertex in the three-dimensional mesh data into a coding vector composed of sine and cosine functions;
[0034] The converted vertex position information is downsampled using the MLP network structure.
[0035] In step S3, the loss function of the electric power equipment target detection model includes a classification loss function and a positioning loss function;
[0036] The classification loss function L cls for:
[0037]
[0038] In formula (1), y is the real classification information of the target box, Prediction classification information for the target box;
[0039] The positioning loss function L loc for:
[0040] L loc =L box +L ori-res +L ori-bin (2);
[0041]
[0042]
[0043]
[0044] In formulas (2)-(5), L box is the target box loss function, L ori-res is the prediction loss function, L ori-bin is the output function, res is the predicted position of the target box, Δres is the deviation between the predicted position and the true position of the target box, x, y, z, w, l, h is the set of three-dimensional coordinate sizes of each target box, SmoothL1(·) is the L1 smoothing function, is the deviation between the predicted position and the actual position of the target box in the i-th training sample, θ is the viewing angle of the i-th training sample, n is the total number of training samples in the training data set, and bin id is the input of the target detection model, For input bin id prediction results.
[0045] In a second aspect, an embodiment of the present invention provides a model dynamic evaluation system based on three-dimensional object detection, including an acquisition module for acquiring a three-dimensional model of a target scene, wherein the target scene includes a plurality of power devices;
[0046] An acquisition module, used for acquiring training data through the three-dimensional model to obtain a training data set;
[0047] A model building and training module, used to build a power equipment target detection model, and use the training data set to train the power equipment target detection model to obtain a trained power equipment target detection model;
[0048] A detection module detects the target scene using the trained electric power equipment target detection model, calculates the distance between each electric power equipment in the target scene according to the detection result, and obtains the calculated value of the distance between each electric power equipment in the target scene;
[0049] An evaluation module is used to evaluate the three-dimensional model of the target scene according to the deviation between the calculated value and the actual value of the distance between each power device in the target scene.
[0050] In a third aspect, an embodiment of the present invention provides a model dynamic evaluation device based on three-dimensional object detection. The electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the model dynamic evaluation method based on three-dimensional object detection described in any one of the above items are implemented.
[0051] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any one of the above-mentioned methods for dynamic model evaluation based on three-dimensional object detection are implemented.
[0052] Compared with the prior art, the present invention has the following beneficial effects:
[0053] 1. In the model dynamic evaluation method based on three-dimensional object detection of the present invention, data is collected through the three-dimensional model of the target scene, and training data is obtained. The power equipment target detection model is trained using the training data set to obtain a trained power equipment target detection model. The actual scene is detected by the trained power equipment target detection model, and the three-dimensional model of the target scene is evaluated according to the difference between the detection result and the actual scene. Since the training of the target detection model requires a large amount of training data, by collecting training data from the three-dimensional model of the target scene to be detected, the workload can be reduced compared to collecting training data from the actual scene. Therefore, the present invention collects training data from the three-dimensional model of the target scene to be detected, which can reduce the workload of collecting training data.
[0054] 2. In the model dynamic evaluation method based on three-dimensional object detection of the present invention, data is collected through the three-dimensional model of the target scene to obtain training data, and the training data is used to train the detection model based on deep learning to obtain a trained detection model, and then the trained detection model is used to detect the power equipment in the actual scene, and the target three-dimensional model is evaluated according to the deviation between the detection value and the actual value, and then the target three-dimensional model can be adjusted according to the evaluation value. The entire process of identifying and evaluating the target three-dimensional model does not require human intervention, is not affected by human factors, and has a high degree of automation. Therefore, the present invention uses a detection model based on deep learning to automatically evaluate the target three-dimensional model, has a high degree of automation, is not affected by human factors, and has accurate evaluation results.
[0055] 3. In the model dynamic evaluation method based on three-dimensional object detection of the present invention, the feature extraction layer of the detection model extracts the features of the input point set under different viewing angles, and deeply fuses the image features and position features. The present invention uses the multi-viewing angles of the input point set as the entry point for detection, does not require complete model data, and can greatly reduce the computational complexity of predicting the entire model; at the same time, the present invention introduces position information on the basis of plane detection, and improves the detection capability of overlapping information and three-dimensional models through position coding and multi-viewing information introduction. Therefore, the detection model of the present invention uses the multi-viewing angles of the input point set as the entry point for detection, reducing the computational complexity; at the same time, the present invention combines position information and multi-viewing information, and has a stronger detection capability for overlapping information.
[0056] 4. In the model dynamic evaluation method based on three-dimensional object detection of the present invention, a multi-scale pyramid operation is introduced into the detection model based on deep learning, and is fused with depth information to improve the model's detection ability for targets of different scales, small targets, and targets with occlusions, and the detection accuracy is higher, thereby improving the accuracy of the evaluation. Therefore, the present invention has higher detection accuracy through the fusion of multi-scale pyramids and depth information, thereby improving the accuracy of the dynamic evaluation of the target model.
[0057] 5. The model dynamic evaluation system based on three-dimensional object detection of the present invention includes: an acquisition module, which is used to acquire a three-dimensional model of a target scene, wherein the target scene includes multiple power equipment; an acquisition module, which is used to acquire training data through the three-dimensional model to obtain a training data set; a model construction and training module, which is used to construct a power equipment target detection model, and use the training data set to train the power equipment target detection model to obtain a trained power equipment target detection model; a detection module, which is used to detect the target scene through the trained power equipment target detection model, calculate the distance between each power equipment in the target scene according to the detection result, and obtain the calculated value of the distance between the power equipment; an evaluation module, which is used to evaluate the three-dimensional model of the target scene according to the deviation between the calculated value and the actual value of the distance between each power equipment in the target scene. The system is used to implement the steps of the model dynamic evaluation method based on three-dimensional object detection as provided in the above technical solution, and therefore, the system also includes all the beneficial effects of the model dynamic evaluation method based on three-dimensional object detection as provided in the above technical solution, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 It is a flow chart of a model dynamic evaluation method based on three-dimensional object detection provided by an embodiment of the present invention.
[0059] Figure 2 It is a schematic diagram of a flow chart of collecting training data provided by an embodiment of the present invention.
[0060] Figure 3 It is a schematic diagram of a process for extracting multi-scale image feature information from different viewing angles provided by an embodiment of the present invention.
[0061] Figure 4 It is a structural schematic diagram of a detection model provided by an embodiment of the present invention.
[0062] Figure 5 It is a detection flow diagram of the detection model provided by an embodiment of the present invention.
[0063] Figure 6 It is a schematic diagram of the RPN model provided by an embodiment of the present invention.
[0064] Figure 7 It is a schematic diagram of projection under multiple viewing angles provided by an embodiment of the present invention.
[0065] Figure 8 It is a structural schematic diagram of a model dynamic evaluation system based on three-dimensional object detection provided by an embodiment of the present invention.
[0066] Fig. 9It is a structural schematic diagram of a model dynamic evaluation device based on three-dimensional object detection provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0067] The present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0068] In the fields of industrial production, construction, transportation, etc., factors such as equipment electrical distance directly affect production safety and efficiency. Traditional equipment positioning methods mainly use sensors such as lidar and cameras for measurement, but their accuracy is greatly affected by environmental factors, and they require manual calibration, which is inefficient. In addition, the use of three-dimensional models to monitor and locate electrical equipment has become mainstream in recent years, greatly facilitating equipment maintenance and troubleshooting. The location information of the equipment is identified through three-dimensional object detection, and calibration is performed in combination with the three-dimensional model, which has high accuracy and efficiency. However, traditional equipment positioning methods based on three-dimensional object detection are usually static calibration methods, which need to be calibrated after the equipment stops running. This method cannot reflect changes in the position of the equipment in real time, resulting in low calibration accuracy.
[0069] In order to solve the technical problems existing in the related art, the embodiment of the present invention provides a model dynamic evaluation method based on three-dimensional object detection, such as Figure 1 As shown, Figure 1 1 is a flow chart of a model dynamic evaluation method based on three-dimensional object detection provided by an embodiment of the present invention, the method comprising steps S1 to S5;
[0070] S1. Acquire a three-dimensional model of a target scene, wherein the target scene includes a plurality of power equipment;
[0071] The three-dimensional model of the target scene is generated based on the actual needs of power equipment monitoring and maintenance using tool software such as Unity3D. It is a three-dimensional model used to reflect the actual system operation status. These generated three-dimensional models of the target scene can reflect the real shape, size, position and other information of the power equipment in the scene.
[0072] In practical applications, especially in the monitoring and maintenance of power equipment, the actual equipment may deviate from the shape, size and position of the three-dimensional model in the original physical space due to various factors (such as the diversity of model data sources, the complexity of data processing, installation errors, environmental changes, etc.). Therefore, it is necessary to dynamically obtain the information of power equipment through real-time image data and deep learning models, and confirm whether the information of the generated three-dimensional model of the target scene can accurately reflect the situation of the power equipment in the scene.
[0073] S2. Collecting training data through the three-dimensional model to obtain a training data set;
[0074] The training data includes multi-angle images of the three-dimensional model of the target scene and the three-dimensional grid data corresponding to these images. The images of the three-dimensional model of the target scene carry label information, and the label information includes category information, location information, shape and size information of the power equipment in the three-dimensional model of the target scene.
[0075] In this embodiment, the target scene is a real scene, which may be a substation, a switch station, a power plant, etc. The target scene may include multiple identical or different types of power equipment, which may be different types of equipment, including but not limited to pole models, transformer models, tower models, cable models, and transmission line models.
[0076] In order to verify and evaluate the generated 3D model of the target scene, you can create a data map based on the 3D model of the target scene, construct a training data set, and train the detection model using the training data set. For details, see Figure 2 , Figure 2 is a flow chart of collecting training data provided by an embodiment of the present invention, such as Figure 2 As shown, the collection of training data provided in this embodiment includes steps 201 to 204;
[0077] S201. Obtain three-dimensional grid data of a three-dimensional model of a target scene at different observation points through a plurality of preset observation points.
[0078] In this embodiment, the power equipment target detection model is a target detection model based on deep learning. The detection model input is three-dimensional grid data and corresponding multi-angle images. The multi-angle images contain the shape, size, color and other information of the three-dimensional model of the target scene, while the three-dimensional grid data contains the shape, size, position and other information of the three-dimensional model of the target scene.
[0079] Specifically, 3D mesh data refers to a set of point data extracted from depth information. These points describe the shape and structure of an object in 3D space. 3D mesh data includes the coordinates (X, Y, Z) of each point and other physical properties of the point (such as strength, etc.), as well as a sequence (surface) formed by multiple 3D space point sets, including 3D point clouds and extended information of 3D point clouds. In the power equipment target detection model, 3D mesh data helps the detection model learn and predict the accurate 3D position and size of the equipment.
[0080] In this embodiment, based on the three-dimensional mesh data, a position encoding method is used to convert the position information of the three-dimensional model of the target scene into a representation that can be used for a deep learning model. The formula for position encoding converts the position information into a vector composed of sine and cosine functions. In position encoding, using sine and cosine functions to transform point set information is a common method that allows us to encode the spatial position information of the point into a representation that can be understood by the deep learning model. Specifically, by applying the sine and cosine functions, we can generate a unique encoding vector for each point, which contains the position information of the point.
[0081] By using sine and cosine functions, the spatial position information of the object is added to the features, and a unique code is assigned to each location, allowing the model to better understand the positional relationship of the object in space.
[0082] S202, obtaining a front view image, a side view image, and a top view image corresponding to each three-dimensional grid data through a projection algorithm.
[0083] In this embodiment, three-dimensional grid data at multiple different angles can be obtained through multiple preset different measuring points. Figure 7 is a schematic diagram of projection under multiple viewing angles provided by an embodiment of the present invention, such as Figure 7 As shown, for these three-dimensional grid data at different angles, their corresponding front view images, side view images, and top view images are obtained through projection algorithms and rendering techniques.
[0084] Specifically, taking the top view as an example, the input point set is projected into a single-channel top view image through the projection algorithm. Specifically, the horizontal spatial position information of the input point set is projected into the coordinate information of the top view, and the height information of the input point set is projected into the pixels of the top view, so that the position and spatial contour information of the target are effectively represented in two dimensions. Similarly, the feature views of the side view and the front view can be obtained through the projection algorithm.
[0085] S203: annotate target frame position information and target frame classification information of the electric power equipment in each image using an annotation tool.
[0086] In this embodiment, an annotation tool is used to annotate the image to mark the shape, size, position and other information of the objects in the image. These label information are the target variables or outputs that the model attempts to predict. In supervised learning, each training sample is associated with at least one label.
[0087] S204: Associatively match the annotated image with the corresponding three-dimensional grid data.
[0088] After annotating the image, the annotated image data is associated with the input point set, and the image index and index data are mapped to facilitate retrieval of the corresponding point set information and image annotation box position during the training process.
[0089] Optionally, this embodiment may preprocess the collected training data before using the collected training data to train the detection model, and the preprocessing includes image data cleaning and image data enhancement.
[0090] Image data cleaning includes: removing noise and abnormal data in the image. Data cleaning is the first step in training data preprocessing. The purpose of data cleaning is to remove noise and abnormal data in training data, where noise refers to data in training data that does not meet expectations, such as noise points in the image, labeling errors, etc.; abnormal data refers to data in training data that does not meet actual conditions, such as non-existent objects appearing in the image.
[0091] Image data enhancement includes: performing horizontal flipping and / or vertical flipping and / or cropping and / or adding noise to the image to obtain a new image, and adding the new image data to the training data. The purpose of data enhancement is to improve the generalization ability of the model by increasing the amount and diversity of training data.
[0092] S3, constructing an electric power equipment target detection model, and using the training data set to train the electric power equipment target detection model to obtain a trained electric power equipment target detection model;
[0093] In this embodiment, the detection model uses FPN and position image information fusion to complete three-dimensional object detection. Figure 4 is a schematic diagram of the structure of the detection model provided in this embodiment, such as Figure 4 As shown, the detection model includes an input layer, a feature extraction layer, a feature fusion layer, a post-extraction unit, a detection head and an output layer, where:
[0094] Input layer: used to receive three-dimensional grid data and corresponding images, the images include: front view image, side view image, top view image.
[0095] The input layer receives image data containing information such as object shape, size, color, etc., as well as three-dimensional grid data containing information such as shape, size, position, etc., wherein the three-dimensional grid data is input into the power equipment target detection model in the form of an input point set containing corresponding position and depth information.
[0096] A feature extraction layer, used to extract position information from the received three-dimensional grid data and to extract multi-scale image feature information of different viewing angles from the image;
[0097] In this embodiment, the feature extraction layer is implemented by methods such as convolutional neural network (CNN). The convolutional neural network can learn information such as the shape, size, texture, etc. of the object from the input data. The feature extraction layer may include multiple convolutional layers, activation layers, and pooling layers.
[0098] Specifically, extracting multi-scale image feature information from different perspectives from the image includes:
[0099] S301, performing FPN sampling processing on the front view image, the side view image, and the top view image respectively to obtain multi-scale features of the front view angle, multi-scale features of the side view angle, and multi-scale features of the top view angle;
[0100] S302, densely transform and fuse the multi-scale features of the front view, the multi-scale features of the side view, and the multi-scale features of the top view to obtain a front view feature map, a side view feature map, and a top view feature map.
[0101] Through the projection algorithm and rendering, the top view feature map, side view feature map, and front view feature map of the corresponding three-dimensional grid data in the camera coordinate system are extracted, and FPN (Feature Pyramid Networks) is used to perform multi-scale feature extraction on the top view feature map, side view feature map, and front view feature map to obtain multi-scale feature maps of the image at the top view, side view, and front view, respectively. These multi-scale feature maps are sent to the image dense transformation layer for further processing. The dense transformation layer converts the multi-scale features into local top view features. Specifically, the dense transformation layer performs a series of transformation operations (such as rotation, scaling, translation, etc.) on the feature map to make it more in line with the observation conditions of the top view, and the transformed feature maps are fused or spliced to obtain a feature map containing multi-scale local top view features, a feature map containing multi-scale side view features, and a feature map containing multi-scale front view features.
[0102] It should be noted that the extraction of multi-perspective information from three-dimensional mesh data provided in this embodiment is not limited to the three perspectives of top view, side view and front view mentioned in the above embodiments, but can also be other perspective information selected according to actual needs, which is not specifically limited here.
[0103] Take the bird’s-eye view as an example. Figure 5As shown, when extracting the top-down perspective information, the feature extraction layer uses a multi-layer convolutional neural network to extract information, uses the image features (B×C×H×W) output by the two-dimensional detector, and is represented as a four-dimensional tensor, where the B dimension represents the batch size, the C dimension represents the image channel, the H dimension represents the vertical direction of the image, and the W dimension represents the horizontal direction of the image. For ease of processing, the image features can be flattened in the horizontal direction to obtain one-dimensional features, and then the one-dimensional features are convolved to obtain three-dimensional features of size C×Z×W. (Wherein, the Z dimension represents the depth dimension. Due to the principle of camera perspective, the three-dimensional feature is the corresponding perspective feature in the camera coordinate system).
[0104] Subsequently, the feature map is sampled using FPN (Feature Pyramid Networks). Taking the top-down perspective as an example, for local top-down perspective feature maps of different resolutions, the proportion converted to the top-down view is also different, and the proportion is proportional to the resolution size and inversely proportional to the FPN downsampling factor. After the image is sampled using FPN, the image dense transformation layer is used to convert the multi-scale features into local top-down perspective features.
[0105] Specifically, if the width of the input image is w, the height is h, and the downsampling factor of FPN is f, then for the local top-view feature map with a resolution of w / f×h / f, the proportion of its conversion to the top view is fw×fh. The local top-view feature and the output feature of the 3D detection network only differ in the number of channels. Therefore, the local top-view features are concatenated in the horizontal dimension according to their size to obtain the global image top-view feature:
[0106] S k =2 k+3 ;
[0107]
[0108] Among them, S k is the FPN downsampling factor, k = 0, 1, 2, 3, 4, Z k is the distance of the top view corresponding to the kth output layer (unit: m), x max is the maximum value of the x dimension of the point cloud space.
[0109] Next, deconvolution is used to expand the receptive field of the feature map again to facilitate feature fusion operations in subsequent processes.
[0110] The extracting of position information from the three-dimensional grid data specifically includes:
[0111] The position encoding formula is used to convert the position information of each vertex in the three-dimensional mesh data into an encoding vector composed of sine and cosine functions; then the MLP network structure is used to downsample the converted vertex position information.
[0112] Specifically, MLP, or multilayer perceptron, is a feedforward neural network consisting of multiple fully connected layers. When processing three-dimensional data, MLP can be used for downsampling or feature extraction. In position encoding, sine and cosine functions are used to transform the point set information in the three-dimensional grid data, and the MLP network structure is used to downsample a large number of point sets, converting the point set information into voxel information, and then performing deep feature fusion of the voxel information with the image information. After fusion, convolution feature extraction is performed again to extract the fusion feature.
[0113] Specifically, the position information in the point set information of the three-dimensional grid data is converted. The position encoding formula converts the position information into a vector composed of sine and cosine. The sine and cosine functions can be expressed as periodic functions. Therefore, the position encoding can express the position information as a periodic function, and add the spatial position information of the object to the feature, thereby improving the representativeness of the feature:
[0114]
[0115] In the formula, pos is the position information and d is the specific point set.
[0116] Feature fusion layer: used to perform deep feature fusion of location information and multi-scale image feature information from different perspectives to obtain fused feature information.
[0117] In this embodiment, the feature fusion layer fuses feature map information from different perspectives, and fuses depth information and image features. In deep fusion, data from different modalities are fused during feature extraction.
[0118] Specifically, Figure 6 As shown, deep feature fusion of position information and multi-scale image feature information from different perspectives includes using convolutional networks to process feature maps and three-dimensional grid data containing position information. These convolutional networks can be pre-trained, such as pre-trained VGG networks or ResNet networks. Convolutional networks are used to extract high-level features, that is, data information is converted into high-dimensional vectors, and position information and multi-scale image feature information from different sources are converted into data of the same dimension, and then vectors of the same dimension are spliced. In this embodiment, features of different views can be integrated through a series of fusion layers (including fully connected layers and attention mechanisms).
[0119] Deep fusion, that is, the fusion of intermediate features, is currently the most commonly used fusion method, and fusion operations can be selected according to different network requirements. Deep fusion combines feature information from different sources or different levels to capture and fuse key information in the original features, providing a richer and more comprehensive feature representation than single-modal data. At the same time, deep fusion can combine features of different modalities or different levels, and the model can make full use of the complementary information in these features, thereby improving its performance in tasks such as classification, detection, and recognition.
[0120] Post-extraction unit: used to extract fused feature information.
[0121] The post-extraction unit further processes and extracts the fused features. The post-extraction unit may include additional convolutional layers, fully connected layers, etc.
[0122] Detection head: used to obtain detection results based on the information extracted by the post-extraction unit.
[0123] The detection head is used to analyze the extracted fusion feature information to obtain the detection results, including information such as the category, location and size of the object.
[0124] In this embodiment, the detection head includes a candidate box generation layer, a regression layer, a detection layer and a classification layer. The candidate box generation layer generates a candidate box, which is a prediction of the detection result. The candidate box generation layer can be implemented using a region proposal network, which can generate a large number of candidate boxes and then screen them; the regression layer regresses the candidate box to improve the accuracy of the candidate box; the regression layer can be implemented using a regression neural network, which can adjust the position and size of the candidate box according to the characteristics of the candidate box; the detection layer decodes the candidate box to determine the object category and position information contained in the candidate box; the classification layer is implemented using a classification neural network, which determines the object category contained in the candidate box according to the characteristics of the candidate box.
[0125] Output layer: used to output the detection results obtained by the detection head.
[0126] In this embodiment, after the detection model is constructed, the loss function of the detection model is set. The loss function of the detection model mainly consists of two parts: classification loss and position regression loss. The classification loss is used to measure the gap between the predicted category and the true category, and the position regression loss is used to measure the gap between the predicted box category and the true box. Compared with general image object detection, three-dimensional object detection adds height and position parameters.
[0127] Specifically, in this embodiment, in the target classification task of target detection, the classification loss is calculated using the cross entropy loss function, where y is the true label of the target box, represented by One-Hot encoding, is the predicted label of the target box, so the classification loss function L cls It can be expressed as:
[0128]
[0129] In formula (1), y is the true label of the target box, is the predicted label of the target box.
[0130] Since the L2 loss is sensitive to outliers, the SmoothL1 loss function is generally used in target detection tasks to calculate the position residual between the target box and the predicted box. Therefore, the calculation process of the bounding box regression loss can be expressed as:
[0131]
[0132] In the angle classification task, 2π is divided into n discrete equal parts, and the interval of each interval is This gives the orientation angle θ g Assign an interval label, in the angle regression task res θ is the relative residual of the direction angle in the corresponding area. Therefore, the specific process of encoding the angle can be expressed as:
[0133]
[0134]
[0135] Positioning loss function L loc Actually by L box , L ori-res , L ori-bin The weighted sum of the three losses is:
[0136] L loc =L box +L ori-res +L ori-bin (2);
[0137] In formulas (2)-(5), L box is the target box loss function, L ori-res is the prediction loss function, L ori-bin is the output function, res is the predicted position of the target box, Δres is the deviation between the predicted position and the true position of the target box, x, y, z, w, l, h is the set of three-dimensional coordinate sizes of each target box, SmoothL1(·) is the L1 smoothing function, is the deviation between the predicted position and the actual position of the target box in the i-th training sample, θ is the viewing angle of the i-th training sample, n is the total number of training samples in the training data set, and bin idis the input of the target detection model, For input bin id The prediction results obtained later.
[0138] After completing the setting of the loss function, define parameters such as the learning rate in the specific model framework. Then, use the training data set, take the multi-angle images of the three-dimensional model of the target scene in the training data set and the depth information corresponding to each angle image as the input of the target detection model, and take the corresponding label information as the output of the target detection model. The model is trained and verified to obtain a trained detection model.
[0139] S4. Detect the target scene using the trained electric power equipment target detection model, calculate the distance between each electric power equipment in the target scene according to the detection result, and obtain the calculated value of the distance between each electric power equipment in the target scene.
[0140] S401, inputting the three-dimensional grid data of the target scene, as well as the front view image, side view image, and top view image of the target scene into the trained power equipment target detection model to obtain the target frame position information and target frame classification information of each power equipment in the target scene;
[0141] The three-dimensional grid data of the target scene is acquired by a depth camera or a laser radar, and the front view image, side view image, and top view image of the target scene are acquired by a camera;
[0142] Specifically, the depth information of the target scene is obtained and converted into an input point set of the detection model (i.e., the three-dimensional grid data of the target scene). The input point set and the front view image, side view image, and top view image of the target scene are input into a trained power equipment target detection model. The trained power equipment target detection model detects all objects in the target scene and determines which objects are power equipment. The category information, location information, and size information of each power equipment in the target scene can be obtained through the trained power equipment target detection model.
[0143] S402. Calculate the distances between the power devices in the target scene according to the target frame position information and the target frame classification information of the power devices in the target scene, and obtain the calculated values of the distances between the power devices in the target scene.
[0144] After obtaining the target frame position information and target frame classification information of each power device in the target scene, the distance between the power devices can be calculated by the image pixel method. For example, the pixel distance can be converted into the actual distance based on the pixel distance between the center points of the target frames of each power device detected, as well as the camera intrinsic parameters (such as focal length, pixel size, etc.) and the relative position relationship between the camera and the object.
[0145] S5. Evaluate the three-dimensional model of the target scene according to the deviation between the calculated value and the actual value of the distance between different power devices in the target scene.
[0146] In this embodiment, the calculated value of the distance between each power device obtained in step S4 is compared with the actual distance to obtain the deviation between the detected distance between each power device in the actual scene and the actual distance between each power device in the actual scene.
[0147] According to the deviation between the calculated value and the actual value of the distance between each power device in the target scene, evaluating the three-dimensional model of the target scene includes:
[0148] Calculate the score of the 3D model of the target scene, and evaluate the 3D model of the target scene according to the score. Specifically, the score of the 3D model of the target scene can be calculated according to the evaluation requirements of the user. For example, if the evaluation method provided by the user is absolute error, the evaluation score of the 3D model of the target scene is calculated according to the following formula:
[0149] score=1 / (abs(actual_distance-calculated_distance)+1e-8) (6);
[0150] Among them, score is the score of the three-dimensional model of the target scene, actual_distance is the actual value of the distance between the power equipment, and calculated_distance is the calculated value of the distance between the power equipment. Through the above evaluation calculation, the scoring operation of the three-dimensional model of the target scene can be completed, and the quality evaluation data of the three-dimensional model of the target scene can be obtained.
[0151] In this embodiment, the true value parameters of the distances between the power equipment in the actual scene are usually obtained directly through measurement during scene setting or maintenance. Specifically, during the design and construction phase of the power facilities, the corresponding actual data can be obtained using GPS or a high-precision laser scanner based on the specifications and parameters on the design drawings.
[0152] When there are three or more power devices in the actual scene, a score value will be generated between each pair of devices. Therefore, multiple score values of the three-dimensional model of the target scene are obtained by calculation. Each score value provides specific information about the model performance. Each score value can individually evaluate the accuracy of the model's distance estimation between different types of power device pairs. By analyzing all the score values, the overall performance of the three-dimensional model of the target scene can be comprehensively evaluated, and the trend of the model's poor performance under specific types of power equipment or under specific conditions can be identified. Multiple score values can help identify specific parameters or model parts that need to be optimized, thereby systematically improving the overall accuracy of the three-dimensional model.
[0153] By comparing the predicted distance and the actual distance, it is possible to find out which aspects of the three-dimensional model need to be improved, such as positioning accuracy, distance estimation, etc. If the score shows that the predicted distance deviates greatly from the actual distance, this indicates that the technical parameters for generating the three-dimensional model of the target scene or the way the input data is processed need to be adjusted. Depending on the score value, it can be determined whether the three-dimensional model of the target scene needs to be recalibrated, or whether the method for collecting data related to power equipment needs to be reset to reconstruct the three-dimensional model of the target scene. Specifically, a score threshold can be set. If the scoring data of the three-dimensional model of the target scene does not meet the score threshold requirements, the three-dimensional model of the target scene needs to be reconstructed or adjusted.
[0154] In summary, the present invention provides a model dynamic evaluation method based on three-dimensional object detection, which is suitable for automatically performing electrical verification on the generated three-dimensional model of power equipment according to the manually set evaluation index, and providing a quality evaluation score. If the evaluation score does not meet the set threshold, it needs to be adjusted in the process of generating the three-dimensional model. The present invention realizes the automated quality evaluation of the three-dimensional model.
[0155] Embodiment 2:
[0156] According to the method described in the above-mentioned embodiment 1, this embodiment will be further described from the perspective of a model dynamic evaluation system based on three-dimensional object detection. The model dynamic evaluation system based on three-dimensional object detection can be implemented as an independent entity or integrated in an electronic device, such as a terminal. The terminal may include a mobile phone, a tablet computer, etc.
[0157] like Figure 8 As shown, the model dynamic evaluation system based on three-dimensional object detection provided by the embodiment of the present invention includes: an acquisition module, a collection module, a model building and training module, and a detection module.
[0158] The acquisition module is used to acquire a three-dimensional model of a target scene, wherein the target scene includes a plurality of power equipment.
[0159] An acquisition module, used for acquiring training data through the three-dimensional model to obtain a training data set;
[0160] Wherein, collecting training data through the three-dimensional model includes:
[0161] S201, obtaining three-dimensional grid data of a three-dimensional model of a target scene at different observation points through a plurality of preset observation points;
[0162] S202, obtaining a front view image, a side view image, and a top view image corresponding to each three-dimensional grid data through a projection algorithm;
[0163] S203, annotating target frame position information and target frame classification information of the power equipment in each image by using an annotation tool;
[0164] S204: Associatively match the annotated image with the corresponding three-dimensional grid data.
[0165] A model building and training module, used to build a power equipment target detection model, and use the training data set to train the power equipment target detection model to obtain a trained power equipment target detection model;
[0166] Among them, the power equipment target detection model includes an input layer, a feature extraction layer, a feature fusion layer, a post-extraction unit, a detection head, and an output layer.
[0167] The input layer is used to receive three-dimensional grid data and corresponding images, wherein the images include: a front view image, a side view image, and a top view image.
[0168] The feature extraction layer is used to extract position information from the received three-dimensional grid data and to extract multi-scale image feature information of different viewing angles from the image.
[0169] The step of extracting multi-scale image feature information from different perspectives from the image includes:
[0170] S301, performing FPN sampling processing on the front view image, the side view image, and the top view image respectively to obtain multi-scale features of the front view angle, multi-scale features of the side view angle, and multi-scale features of the top view angle;
[0171] S302, densely transform and fuse the multi-scale features of the front view, the multi-scale features of the side view, and the multi-scale features of the top view to obtain a front view feature map, a side view feature map, and a top view feature map.
[0172] The extracting of position information from the three-dimensional grid data specifically includes:
[0173] Use the position encoding formula to convert the position information of each vertex in the three-dimensional mesh data into a coding vector composed of sine and cosine functions;
[0174] The converted vertex position information is downsampled using the MLP network structure.
[0175] Feature fusion layer: used to perform deep feature fusion of location information and multi-scale image feature information from different perspectives to obtain fused feature information.
[0176] Post-extraction unit: used to extract fused feature information.
[0177] Detection head: used to obtain detection results based on the information extracted by the post-extraction unit.
[0178] Output layer: used to output the detection results obtained by the detection head.
[0179] A detection module, used to detect the target scene by using the trained electric power equipment target detection model, calculate the distance between each electric power equipment in the target scene according to the detection result, and obtain the calculated value of the distance between each electric power equipment in the target scene;
[0180] The target scene is detected by the trained electric power equipment target detection model, and the calculated value of the distance between each electric power equipment in the target scene is calculated according to the detection result, including:
[0181] S401, inputting the three-dimensional grid data of the target scene, as well as the front view image, side view image, and top view image of the target scene into the trained power equipment target detection model to obtain the target frame position information and target frame classification information of each power equipment in the target scene;
[0182] The three-dimensional grid data of the target scene is acquired by a depth camera or a laser radar, and the front view image, side view image, and top view image of the target scene are acquired by a camera;
[0183] S402: Calculate the distance between each power device in the target scene according to the target frame position information and target frame classification information of each power device in the target scene.
[0184] An evaluation module is used to evaluate the three-dimensional model of the target scene according to the deviation between the calculated value and the actual value of the distance between each power device in the target scene.
[0185] The loss function of the electric power equipment target detection model includes a classification loss function and a positioning loss function;
[0186] The classification loss function L cls for:
[0187]
[0188] In formula (1), y is the real classification information of the target box, Prediction classification information for the target box;
[0189] The positioning loss function L loc for:
[0190] L loc =L box +L ori-res +L ori-bin (2);
[0191]
[0192]
[0193]
[0194] In formulas (2)-(5), L box is the target box loss function, L ori-res is the prediction loss function, L ori-bin is the output function, res is the predicted position of the target box, Δres is the deviation between the predicted position and the true position of the target box, x, y, z, w, l, h is the set of three-dimensional coordinate sizes of each target box, SmoothL1(·) is the L1 smoothing function, is the deviation between the predicted position and the actual position of the target box in the i-th training sample, θ is the viewing angle of the i-th training sample, n is the total number of training samples in the training data set, and bin id is the input of the target detection model, For input bin id prediction results.
[0195] Embodiment 3:
[0196] The embodiment of the present invention provides a model dynamic evaluation device based on three-dimensional object detection, such as Fig. 9 As shown, the model dynamic evaluation device based on three-dimensional object detection provided by an embodiment of the present invention includes a memory and a processor, the memory is used to store computer program code and transmit the computer program code to the processor; the processor is used to execute the above-mentioned model dynamic evaluation method based on three-dimensional object detection according to the instructions in the computer program code.
[0197] Embodiment 4:
[0198] An embodiment of the present invention provides a storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the above-mentioned model dynamic evaluation method based on three-dimensional object detection is implemented.
[0199] Generally speaking, the computer instructions for implementing the method of the present invention may be carried in any combination of one or more computer-readable storage media. Non-transitory computer-readable storage media may include any computer-readable media, except for the signal itself that is temporarily propagating.
[0200] Computer-readable storage media, for example, may be, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or devices, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with a system, device or device for executing instructions.
[0201] One or more programming languages or their combinations can be used to write computer program codes for performing the operation of the present invention. These programming languages include object-oriented programming languages, such as Java, Smalltalk, C++, and also include conventional procedural programming languages, such as C language or similar programming languages. In particular, Python language suitable for neural network calculations and platform frameworks based on TensorFlow, PyTorch, etc. can be used. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through various types of networks, including a local area network (LAN) or a wide area network (WAN), or an Internet connection is performed through an Internet service provider.
[0202] Although the embodiments of the present invention have been shown and described above, it should be understood that the above embodiments are exemplary and should not be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A model dynamic evaluation method based on three-dimensional object detection, characterized in that: The evaluation methods include: S1, obtain a three-dimensional model of the target scene; The target scene includes multiple power equipment; S2. Collecting training data through the three-dimensional model to obtain a training data set; S3, constructing an electric power equipment target detection model, and using the training data set to train the electric power equipment target detection model to obtain a trained electric power equipment target detection model; S4, detecting the target scene by using the trained electric power equipment target detection model, calculating the distance between each electric power equipment in the target scene according to the detection result, and obtaining the calculated value of the distance between each electric power equipment in the target scene; S5. Evaluate the three-dimensional model of the target scene according to the deviation between the calculated value and the actual value of the distance between each power device in the target scene.
2. The model dynamic evaluation method based on three-dimensional object detection according to claim 1, characterized in that: In the step S2, collecting training data through the three-dimensional model includes: S201, obtaining three-dimensional grid data of a three-dimensional model of a target scene at different observation points through a plurality of preset observation points; S202, obtaining a front view image, a side view image, and a top view image corresponding to each three-dimensional grid data through a projection algorithm; S203, annotating target frame position information and target frame classification information of the power equipment in each image by using an annotation tool; S204: Associatively match the annotated image with the corresponding three-dimensional grid data.
3. The model dynamic evaluation method based on three-dimensional object detection according to claim 2, characterized in that: In step S4, detecting the target scene by using the trained power equipment target detection model, and calculating the distance between each power equipment in the target scene according to the detection result includes: S401, inputting the three-dimensional grid data of the target scene, as well as the front view image, side view image, and top view image of the target scene into the trained power equipment target detection model to obtain the target frame position information and target frame classification information of each power equipment in the target scene; The three-dimensional grid data of the target scene is acquired by a depth camera or a laser radar, and the front view image, side view image, and top view image of the target scene are acquired by a camera; S402: Calculate the distance between each power device in the target scene according to the target frame position information and target frame classification information of each power device in the target scene.
4. The model dynamic evaluation method based on three-dimensional object detection according to any one of claims 1 to 3, characterized in that: In step S3, the electric power equipment target detection model includes: An input layer, for receiving three-dimensional grid data and corresponding images, wherein the images include: a front view image, a side view image, and a top view image; A feature extraction layer, used to extract position information from the received three-dimensional grid data, and to extract multi-scale image feature information of different viewing angles from the image; Feature fusion layer: used to perform deep feature fusion of location information and multi-scale image feature information from different perspectives to obtain fused feature information; Post-extraction unit: used to extract fusion feature information; Detection head: used to obtain the detection result according to the information extracted by the post-extraction unit; Output layer: used to output the detection results obtained by the detection head.
5. The model dynamic evaluation method based on three-dimensional object detection according to claim 4 is characterized in that: Extracting multi-scale image feature information from different perspectives from the image includes: S301, performing FPN sampling processing on the front view image, the side view image, and the top view image respectively to obtain multi-scale features of the front view angle, multi-scale features of the side view angle, and multi-scale features of the top view angle; S302, densely transform and fuse the multi-scale features of the front view, the multi-scale features of the side view, and the multi-scale features of the top view to obtain a front view feature map, a side view feature map, and a top view feature map.
6. The model dynamic evaluation method based on three-dimensional object detection according to claim 4, characterized in that: Extracting the position information from the received three-dimensional grid data specifically includes: Use the position encoding formula to convert the position information of each vertex in the three-dimensional mesh data into a coding vector composed of sine and cosine functions; The converted vertex position information is downsampled using the MLP network structure.
7. The model dynamic evaluation method based on three-dimensional object detection according to any one of claims 1 to 3, characterized in that: In step S3, the loss function of the electric power equipment target detection model includes a classification loss function and a positioning loss function; The classification loss function L cls for: In formula (1), y is the real classification information of the target box, Prediction classification information for the target box; The positioning loss function L loc for: L loc =L box +L ori-res +L ori-bin (2); In formulas (2)-(5), L box is the target box loss function, L ori-res is the prediction loss function, L ori-bin is the output function, res is the predicted position of the target box, Δres is the deviation between the predicted position and the true position of the target box, (x, y, z, w, l, h) is the set of three-dimensional coordinate sizes of each target box, SmoothL1(·) is the L1 smoothing function, is the deviation between the predicted position and the actual position of the target box in the i-th training sample, θ is the viewing angle of the i-th training sample, n is the total number of training samples in the training data set, and bin id is the input of the target detection model, For input bin id prediction results.
8. A model dynamic evaluation system based on three-dimensional object detection, characterized in that: include: An acquisition module, used for acquiring a three-dimensional model of a target scene, wherein the target scene includes a plurality of power equipment; An acquisition module, used for acquiring training data through the three-dimensional model to obtain a training data set; A model building and training module, used to build an electric power equipment target detection model, and train the electric power equipment target detection model using the training data set to obtain a trained electric power equipment target detection model; A detection module detects the target scene using the trained electric power equipment target detection model, calculates the distance between each electric power equipment in the target scene according to the detection result, and obtains the calculated value of the distance between each electric power equipment in the target scene; An evaluation module is used to evaluate the three-dimensional model of the target scene according to the deviation between the calculated value and the actual value of the distance between each power device in the target scene.
9. A model dynamic evaluation device based on three-dimensional object detection, characterized in that: The method comprises a memory and a processor, wherein the memory is used to store computer program code and transmit the computer program code to the processor; The processor is used to execute the model dynamic evaluation method based on three-dimensional object detection as described in any one of claims 1 to 7 according to the instructions in the computer program code.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the model dynamic evaluation method based on three-dimensional object detection described in any one of claims 1 to 7 is implemented.
