Wiring correctness and error detection method and system and meter installation and power connection intelligent process detection method and system
Through deep learning technology, the wiring segmentation model is constructed to solve the problem of low efficiency of manual inspection in the process of installation and electricity, and the rapid and accurate wiring detection is achieved, and the needs of the electricity connection and the actual testing are met.
Patent Information
- Application Number
- CN202411222040.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-09-02
Smart Images

Figure CN119360013A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric power engineering, and in particular to a method and system for detecting correctness of wiring, and a method and system for detecting intelligent process of meter installation and power connection. Background Art
[0002] With the development of smart grids, higher requirements are put forward for the management of meter installation and power connection. Meter installation refers to the power supply company installing an energy metering device for a user customer. After the meter is installed and connected to the power supply, the customer turns on his switch and starts using electricity; power connection refers to the power supply company connecting the power receiving device of the power user customer to the power supply network. Meter installation and power connection is an important task in power engineering, which involves many aspects such as the installation of the meter, the layout of the wiring, and the connection of electrical equipment.
[0003] It should be noted that meter installation and power connection is a highly professional job that must be completed by professionals with relevant qualifications and skills. The content of meter installation and power connection training usually includes meter installation, line laying, wiring debugging, etc. After the training, the training effect is usually evaluated to understand the learning outcomes of the trainees. The traditional meter installation and power connection correctness judgment and process analysis often rely on manual experience and visual inspection. This method is easily affected by human factors, environmental lighting conditions, equipment status and other factors. It is not only inefficient and prone to errors, but also has subjective factors.
[0004] It should also be noted that with the development of smart grids, higher requirements have been placed on the management of meter installation and power connection. Manually conducting correct and incorrect meter installation and power connection judgment and process analysis requires a lot of time and effort, and it is difficult to quickly discover complex or hidden errors.
[0005] Although the Chinese patent application number 202310875243.9 discloses an electric energy meter assembly process detection device and method based on deep learning image recognition, the detection device and method cannot detect the correctness of the wiring sequence, nor can they fully meet the needs of meter installation and power connection training and actual detection; in addition, the electric energy meter assembly process detection device and method can only detect straight-line wiring, and cannot cope with most of the bent wiring in the actual wiring process.
[0006] In order to solve the above problems, people have been seeking an ideal technical solution. Summary of the invention
[0007] Based on this, it is necessary to provide a wiring correctness detection method and system, and an intelligent process detection method and system for meter installation and power connection to address the above technical problems.
[0008] In order to achieve the above-mentioned object, the present invention provides a wiring correctness detection method in a first aspect, which comprises: constructing a wiring segmentation model in advance and configuring a first wiring segmentation data set;
[0009] Using the first wiring segmentation data set, training the wiring segmentation model;
[0010] Get the wiring to be tested Figure Ⅰ , using the wiring segmentation model trained by the first wiring segmentation data set, the wiring to be tested Figure Ⅰ The wires in the vertical direction are separated to obtain the grayscale of the wiring status Figure Ⅰ ; Wherein, the connection state grayscale Figure Ⅰ Different grayscale values correspond to different labels, and the labels refer to unique identifiers assigned to wires of different colors at different wiring positions in the wiring diagram;
[0011] In the wiring state gray Figure Ⅰ When the corresponding wiring position in is not empty, based on the pre-established association relationship, the wiring state grayscale Figure Ⅰ The grayscale value corresponding to each wire in the wiring state is used to determine the wiring color detection result; wherein the wiring color detection result refers to the grayscale value of the wiring state. Figure Ⅰ The colors of the wires at different wiring positions in the example, wherein the association relationship refers to a pre-established mapping relationship between different labels and different grayscale values;
[0012] According to the wiring color detection result, determining the wiring sequence array to be tested; wherein different element symbols in the wiring sequence array to be tested correspond to different wiring colors and wiring states;
[0013] In the wiring state gray Figure Ⅰ When the corresponding wiring position in is empty, the element symbol at the corresponding position in the wiring sequence array to be tested is set to a, where a indicates that there is a missing connection condition in the wire at the corresponding wiring position;
[0014] Obtain a pre-configured reference wiring sequence array, compare the wiring sequence array to be tested with the reference wiring sequence array, and obtain a correct or incorrect detection wiring sequence array according to the comparison result; wherein different element symbols in the correct or incorrect detection wiring sequence array represent different wiring sequence detection results, element symbol a represents that there is a missing wiring condition at the corresponding wiring position, element symbol b represents that the wiring color at the corresponding wiring position is correct, and element symbol c represents that the wiring color at the corresponding wiring position is incorrect;
[0015] Based on the correct and incorrect detection line sequence array, the wiring to be tested is obtained Figure Ⅰ Corresponding wrong wiring detection results and missing wiring detection results.
[0016] In order to achieve the above-mentioned object, the second aspect of the present invention provides a method for detecting an intelligent process of installing and connecting a meter, which comprises:
[0017] Using the above wiring correctness detection method, the wiring to be tested Figure Ⅰ Perform wiring correctness detection in the wiring area in order to obtain wrong wiring detection results and missing wiring detection results;
[0018] Get the grayscale of the wiring status Figure Ⅰ , determine the grayscale of the wiring state Figure Ⅰ The wiring closed area corresponding to each wire in the , and the fitting straight line corresponding to the pixel coordinate point in each wiring closed area is constructed Ⅰ;
[0019] Determine the minimum circumscribed rectangle of the corresponding wiring closed area based on the fitting straight line I, and measure the straightness of the wire in the vertical direction based on the number of pixels in each minimum circumscribed rectangle and the pixel area of the corresponding minimum circumscribed rectangle;
[0020] Based on the wiring under test Figure Ⅰ The upper frame of the middle junction box is used to construct a horizontal baseline; according to the horizontal baseline and the fitting straight line I in each wiring closed area, the verticality of the wire in the vertical direction is measured.
[0021] In order to achieve the above-mentioned object, the third aspect of the present invention provides a wiring error detection system, which includes a model management module, a segmentation module, a wiring color detection module, a wiring line sequence determination module and an error detection module, wherein:
[0022] The model management module is used to pre-build a wiring segmentation model and configure a first wiring segmentation data set; and is also used to train the wiring segmentation model using the first wiring segmentation data set;
[0023] The segmentation module is used to obtain the wiring to be tested Figure Ⅰ , using the wiring segmentation model trained by the first wiring segmentation data set, the wiring to be tested Figure Ⅰ The wires in the vertical direction are separated to obtain the grayscale of the wiring status Figure Ⅰ ; Wherein, the connection state grayscale Figure Ⅰ Different grayscale values correspond to different labels, and the labels refer to unique identifiers assigned to wires of different colors at different wiring positions in the wiring diagram;
[0024] The wiring color detection module is used to detect the grayscale of the wiring state. Figure Ⅰ When the corresponding wiring position in is not empty, based on the pre-established association relationship, the wiring state grayscale Figure ⅠThe grayscale value corresponding to each wire in the wiring state is used to determine the wiring color detection result; wherein the wiring color detection result refers to the grayscale value of the wiring state. Figure Ⅰ The colors of the wires at different wiring positions in the example, wherein the association relationship refers to a pre-established mapping relationship between different labels and different grayscale values;
[0025] The wiring sequence determination module is used to determine the wiring sequence array to be tested according to the wiring color detection result; and is also used to determine the wiring sequence array to be tested according to the wiring state grayscale Figure Ⅰ When the corresponding wiring position in the array is empty, the element symbol at the corresponding position in the array of wiring sequence to be tested is set to a, where a indicates that there is a missing wiring condition in the wire at the corresponding wiring position; wherein different element symbols in the array of wiring sequence to be tested correspond to different wiring colors and wiring states;
[0026] The true or false detection module is used to obtain a pre-configured reference wiring line sequence array, compare the wiring line sequence array to be tested with the reference wiring line sequence array, and obtain a true or false detection line sequence array according to the comparison result; and is also used to obtain the wiring line sequence array to be tested based on the true or false detection line sequence array. Figure Ⅰ Corresponding wrong wiring detection results and missing wiring detection results; wherein, different element symbols in the correct and incorrect detection line sequence array represent different line sequence detection results, element symbol a represents that there is a missing wiring condition at the corresponding wiring position, element symbol b represents that the wiring color at the corresponding wiring position is correct, and element symbol c represents that the wiring color at the corresponding wiring position is incorrect.
[0027] In order to achieve the above-mentioned object, the fourth aspect of the present invention provides an intelligent process detection system for meter installation and power connection, which includes a wiring correctness detection unit, a straightness measurement unit and a verticality measurement unit, wherein:
[0028] The wiring correctness detection unit uses the wiring correctness detection method according to claim 1 or 2 to detect the wiring to be tested. Figure Ⅰ Perform wiring correctness detection in the wiring area in order to obtain wrong wiring detection results and missing wiring detection results;
[0029] The straightness measurement unit is used to obtain the grayscale of the wiring state Figure Ⅰ , determine the grayscale of the wiring state Figure Ⅰ The wiring closed area corresponding to each wire in the embodiment of the present invention is constructed, and a fitting straight line I corresponding to the pixel coordinate points in each wiring closed area is constructed; it is also used to determine the minimum circumscribed rectangle of the corresponding wiring closed area based on the fitting straight line I, and to measure the straightness of the wire in the vertical direction based on the number of pixels in each minimum circumscribed rectangle and the pixel area of the corresponding minimum circumscribed rectangle;
[0030] The verticality measuring unit is used to measure the verticality of the wiring to be tested. Figure Ⅰ The upper frame of the middle junction box is used to construct a horizontal baseline; according to the horizontal baseline and the fitting straight line I in each wiring closed area, the verticality of the wire in the vertical direction is measured.
[0031] In order to achieve the above-mentioned purpose, the fifth aspect of the present invention provides an intelligent process detection device for installing and connecting the meter to the power supply, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; the memory is used to store computer programs; the processor is used to implement the above-mentioned wiring correctness detection method or the above-mentioned intelligent process detection method for installing and connecting the meter to the power supply when executing the program stored in the memory.
[0032] In order to achieve the above-mentioned purpose, the sixth aspect of the present invention provides a readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processor to execute the above-mentioned wiring correctness detection method or the above-mentioned meter installation and power connection intelligent process detection method.
[0033] The beneficial effects of the present invention are:
[0034] 1) The present invention pre-builds a wiring segmentation model, and uses a first wiring segmentation data set to train the wiring segmentation model; the wiring segmentation model trained first is used to test the wiring Figure Ⅰ The wires in the vertical direction are quickly and accurately segmented out. The present invention also determines the wiring sequence array to be tested based on the correlation between the labels of wires of different colors at different wiring locations and different grayscale values, and obtains the correctness detection wiring sequence array based on the wiring sequence array to be tested and the reference wiring sequence array, thereby quickly and accurately detecting whether the wiring sequence is correct;
[0035] 2) The present invention can also quickly and accurately detect the straightness of the wiring and whether the wiring straightness is qualified, meeting the diverse needs of meter installation and power connection training and actual testing;
[0036] 3) The present invention also constructs a fitting straight line corresponding to the levelness, and determines the levelness detection result based on the fitting straight line corresponding to the levelness, so as to quickly and accurately determine whether the wiring levelness in the wiring diagram to be tested is qualified;
[0037] 4) The present invention also pre-constructs a copper exposure detection model to detect the pixel value of the copper exposure area, thereby determining the actual copper leakage size. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a schematic diagram of the flow of the wiring correctness detection method of the present invention;
[0039] Figure 2 It is a structural schematic diagram of the wiring segmentation model (PP_LiteSeg model) of the present invention;
[0040] FIG3( a ) is a schematic diagram of a wiring image in Example 1;
[0041] FIG3( b ) is a schematic diagram of wiring annotation in Example 1 (corresponding to the association between different colored wires at different wiring locations and different grayscale values);
[0042] FIG3( c ) is a grayscale labeled image in Example 1;
[0043] FIG3( d ) is a schematic diagram of the reference wiring line sequence array, the wiring line sequence array to be tested, and the correctness detection line sequence array in Example 1;
[0044] Figure 4 This is a schematic diagram of the process of the intelligent process detection method for meter installation and power connection of the present invention. Figure 1 ;
[0045] Figure 5 is a schematic diagram of a fitting straight line and a minimum circumscribed rectangle in Example 2 of the present invention;
[0046] FIG6( a ) is a wiring image in a specific embodiment of the present invention (the wiring is chaotic, the wiring areas are mutually blocked, and there are individual wirings with large wiring horizontal spans);
[0047] Fig. 6(b) is a color map of Fig. 6(a);
[0048] FIG. 7( a ) is a wiring image in another specific embodiment of the present invention (standard wiring, no shielding between each other, and small horizontal span of wiring);
[0049] FIG7( b ) is a color map of FIG7( a );
[0050] Figure 8 It is a schematic diagram of the process detection result of the present invention;
[0051] Fig. 9 This is a schematic diagram of the process of the intelligent process detection method for meter installation and power connection of the present invention. Figure 2 (including copper leakage detection);
[0052] Fig.10 It is a schematic diagram of the detection results of the copper exposure detection model of the present invention;
[0053] Fig.11 It is a structural schematic diagram of the hardware device of the present invention. DETAILED DESCRIPTION
[0054] The technical solution of the present invention is further described in detail below through specific implementation methods.
[0055] For ease of understanding, the interactive parties and / or terms and / or custom words involved in the present invention are first described in conjunction with the technical solution of the present invention:
[0056] Wiring segmentation model: It is used to segment the area where the wires in the wiring diagram to be tested are located based on deep learning segmentation technology. Specifically, the PP_LiteSeg segmentation model can be used, as shown in the attached figure. Figure 2 As shown in the figure; PP-LiteSeg is a lightweight real-time semantic segmentation model in PaddleSeg, designed for mobile and embedded devices, with the characteristics of high precision and low latency; using the Baidu PaddlePaddle framework to deploy and run the lightweight real-time segmentation model PP-LiteSeg is a very effective way to achieve efficient image segmentation in a resource-constrained environment.
[0057] In PaddleSeg's segmentation task, annotated images refer to images that have each pixel in the original image labeled. These labels are used to train the model to identify specific objects or regions in the image. As shown in Figure 3(c), the purpose of annotated images is to tell the model which pixels belong to specific categories, such as wires. With this annotation information, the model can learn how to distinguish between different objects and backgrounds, thereby improving its segmentation accuracy on real images.
[0058] Wiring to be tested Figure Ⅰ :It is the image to be processed, which can be used as the input image for line sequence detection, straightness measurement and verticality measurement; Figure Ⅰ Input the wiring segmentation model trained by the first wiring segmentation data set, so as to divide the wiring to be tested into Figure Ⅰ The wires in the vertical direction are separated.
[0059] Wiring to be tested Figure II :It is the image to be processed, which can be used as the input image for level measurement. Figure II Input the wiring segmentation model trained by the second wiring segmentation data set to divide the wiring to be tested into Figure II The horizontal wires are separated.
[0060] Exposed copper detection model: The deep learning target detection method is used, and the YOLOv5 backbone network is adopted as the detection model. The YOLOv5 model is pre-trained using the exposed copper dataset to detect exposed copper wires in the image.
[0061] Example 1
[0062] As attached Figure 1 As shown, this embodiment provides a specific implementation of a wiring correctness detection method; the wiring correctness detection method includes:
[0063] Pre-building a wiring segmentation model and configuring a first wiring segmentation data set;
[0064] Using the first wiring segmentation data set, training the wiring segmentation model;
[0065] Get the wiring to be tested Figure Ⅰ , using the wiring segmentation model trained by the first wiring segmentation data set, the wiring to be tested Figure Ⅰ The wires in the vertical direction are separated to obtain the grayscale of the wiring status Figure Ⅰ ; Wherein, the connection state grayscale Figure Ⅰ Different grayscale values correspond to different labels, and the labels refer to unique identifiers assigned to wires of different colors at different wiring positions in the wiring diagram;
[0066] In the wiring state gray Figure Ⅰ When the corresponding wiring position in is not empty, based on the pre-established association relationship, the wiring state grayscale Figure Ⅰ The grayscale value corresponding to each wire in the wiring state is used to determine the wiring color detection result; wherein the wiring color detection result refers to the grayscale value of the wiring state. Figure Ⅰ The colors of the wires at different wiring positions in the example, wherein the association relationship refers to a pre-established mapping relationship between different labels and different grayscale values;
[0067] According to the wiring color detection result, determining the wiring sequence array to be tested; wherein different element symbols in the wiring sequence array to be tested correspond to different wiring colors and wiring states;
[0068] In the wiring state gray Figure Ⅰ When the corresponding wiring position in is empty, the element symbol at the corresponding position in the wiring sequence array to be tested is set to a, where a indicates that there is a missing connection condition in the wire at the corresponding wiring position;
[0069] Obtain a pre-configured reference wiring sequence array, compare the wiring sequence array to be tested with the reference wiring sequence array, and obtain a correct or incorrect detection wiring sequence array according to the comparison result; wherein different element symbols in the correct or incorrect detection wiring sequence array represent different wiring sequence detection results, element symbol a represents that there is a missing wiring condition at the corresponding wiring position, element symbol b represents that the wiring color at the corresponding wiring position is correct, and element symbol c represents that the wiring color at the corresponding wiring position is incorrect;
[0070] Based on the correct and incorrect detection line sequence array, the wiring to be tested is obtained Figure Ⅰ Corresponding wrong wiring detection results and missing wiring detection results.
[0071] It should be noted that the different element symbols in the array of wiring sequence to be tested are used to distinguish the wire color (such as red, yellow, green or black) and wiring status (wired or unwired) at the corresponding wiring position. The specific value or specific symbol can be pre-configured by the user and can be modified later. For example, the element symbol R indicates that the wire color at the corresponding wiring position is red, the element symbol Y indicates that the wire color at the corresponding wiring position is yellow, the element symbol G indicates that the wire color at the corresponding wiring position is green, the element symbol B indicates that the wire color at the corresponding wiring position is black or blue, and the element symbol a (the specific value of a can be pre-configured by the user, such as 0) indicates that the wire at the corresponding wiring position has a missing connection.
[0072] It should also be noted that, when comparing, in theory, the element symbol in the wiring sequence array to be tested represents a certain wiring color. The element symbols a, b, and c in the correct and incorrect detection wiring sequence array are used to distinguish correct and incorrect wiring. The specific values or specific symbols can be pre-configured by the user and can be modified later. Element symbol a indicates that the corresponding wiring position is empty, and the wiring position is in a missing wiring state; element symbol c indicates that the wire color at the corresponding wiring position does not match, and the wiring position is in an incorrect wiring state; element symbol b indicates that the wire color at the corresponding wiring position matches, and the wiring position is in a correct wiring state.
[0073] It should also be noted that, since different colored wires at different wiring positions in the wiring diagram are assigned different labels, and there is a mapping relationship between different labels and different grayscale values; therefore, the present invention can be based on the grayscale of the wiring state. Figure Ⅰ The grayscale value corresponding to each wire in the wiring diagram is determined by using the mapping relationship between different labels and different grayscale values to determine the wire colors corresponding to different wiring positions in the wiring diagram, so as to quickly and accurately detect whether the wiring sequence is correct.
[0074] In other embodiments, before outputting the grayscale image of the wiring state, a 3×3 convolution kernel is required to perform an erosion operation on the segmentation result image to eliminate the influence of individual tiny pixels on the main part of the wiring, and at the same time make the segmentation result more closely fit the core area of the wiring.
[0075] In a specific implementation, the wiring meter is a three-phase four-wire energy meter, which can implement three-phase three-way wiring or three-phase four-way wiring, and the wiring diagram is shown in Figure 3 (a);
[0076] The wiring is divided into three areas, namely the left meter wiring area (the wiring area below the left meter), the right meter wiring area (the wiring area below the right meter), and the middle bottom wiring area (the wiring area above the junction box). The wiring is labeled from left to right and from top to bottom, and labels of different colored wires at different wiring locations in the wiring diagram are obtained, L1-L10, R1-R10, and D1-D14, as shown in Figure 3(b);
[0077] The relationship between the yellow wiring and the gray value at different wiring positions is shown in the following table:
[0078]
[0079] The relationship between green wiring and grayscale values at different wiring positions is shown in the following table:
[0080]
[0081] The relationship between the red wiring and the gray value at different wiring positions is shown in the following table:
[0082]
[0083] The relationship between the ground line and the gray value is shown in the following table:
[0084] Ground wire L10 Ground R10 Ground connection D13 Ground connection D14 201 202 203 204
[0085] It should be noted that before the wiring segmentation model prediction, the present invention also pre-establishes the association relationship between different labels and different grayscale values to assign grayscale values corresponding to different colored wires at different wiring locations. Therefore, the wiring areas can be extracted one by one through the threshold segmentation method, and the wires of different colors can be output in layers according to different grayscale value intervals, and the wiring information data set of each wiring location can be obtained separately.
[0086] In another specific implementation, in the standardized operation process, the correct wiring sequence of the left meter wiring area should be [YYYGGGRRRB], the correct wiring sequence of the right meter wiring area should be [YYYGGGRRRB], and the correct wiring sequence of the middle bottom wiring area should be [YYYYGGGGRRRRBB]. The above three arrays are used as reference wiring sequence arrays. Among them, Y represents yellow wiring, G represents green wiring, R represents red wiring, and B represents the common colors of ground wires, which are black or blue. There will be missing wiring in the line sequence output in the data processing stage, and the unconnected area will be filled with '0', as shown in Figure 3 (d);
[0087] Use the wiring segmentation model to test the wiring Figure ⅠAfter the wires in the vertical direction are segmented, 34 sets of wiring information data sets are obtained. Each wiring information data set includes the pixel coordinate point information and gray value information of each wiring. If there is no wire connected at this wiring, the current data set is empty.
[0088] Determine the wire colors at different wiring positions according to the gray value information in the wiring information data set and the pre-established association relationship;
[0089] The wiring closed areas corresponding to the 34 sets of wiring information data sets are sorted according to the coordinate point positions, and finally three area sets are formed: the left meter wiring area, the right meter wiring area, and the middle bottom wiring area. The areas are sorted from left to right according to the upper left corner endpoints of the circumscribed rectangles, and the current wiring line sequence is output to obtain three arrays of wiring line sequences to be tested corresponding to the left meter wiring area, the right meter wiring area, and the middle bottom wiring area;
[0090] When judging whether the wiring is correct or not: according to the correct wiring sequence corresponding to the reference wiring sequence array, compare the wiring color and wiring status in the three wiring sequence arrays to be tested corresponding to the left meter wiring area, the right meter wiring area, and the middle bottom wiring area;
[0091] The correct wiring sequence and the actual wiring sequence are compared one by one to obtain a correct or incorrect detection sequence array: if the two are the same, 1 is output; if they are different, 2 is output; if they are different and the wiring sequence is 0, 0 is output, as shown in Figure 3(d).
[0092] In some embodiments, based on the correct and incorrect detection line sequence array, the wiring to be tested is obtained. Figure Ⅰ When the corresponding wrong wiring detection results and missing wiring detection results are displayed, execute:
[0093] According to the number and position of the element symbols c in the correct and incorrect detection line sequence array, the wrong wiring detection result is determined; wherein the wrong wiring detection result refers to the wiring to be tested Figure Ⅰ The number and location of incorrect wiring in the
[0094] According to the number and position of the element symbol a in the correct and incorrect detection line sequence array, the missing wiring detection result is determined; wherein the missing wiring detection result refers to the wiring to be tested Figure Ⅰ The number and location of missing wires.
[0095] As shown in Figure 3(d), in the standardized operation process, the second wire from left to right in the left meter wiring area or the right meter wiring area should be Y (yellow), but the wire to be tested Figure ⅠThe wiring color here is R (red), indicating that there is a wrong wiring situation; therefore, the second element in the correct and incorrect detection line sequence array is 2. According to the number and position of 2 in the correct and incorrect detection line sequence array, the number and position of the wrong wiring can be known;
[0096] As shown in Figure 3(d), in the standardized operation process, the fifth wire from left to right in the left meter wiring area or the right meter wiring area should be G (green), but the wire to be tested Figure Ⅰ This is empty (0), indicating that there is a missing connection here in the actual wiring diagram; therefore, the fifth element in the true or false detection line sequence array is 0, and the number and position of the missing connections can be known based on the number and position of 0 in the true or false detection line sequence array.
[0097] It should be noted that the wiring correctness detection method can not only determine the correctness of the wiring through line sequence comparison, but also find out the specific location and error type of the wiring error (missing wiring or wrong wiring), which is convenient for subsequent inspection and guidance of errors in the meter installation and wiring process.
[0098] Based on the above wiring correctness detection method, this embodiment also provides a specific implementation of a wiring correctness detection system;
[0099] The wiring error detection system includes a model management module, a segmentation module, a wiring color detection module, a wiring line sequence determination module and an error detection module, wherein:
[0100] The model management module is used to pre-build a wiring segmentation model and configure a first wiring segmentation data set; and is also used to train the wiring segmentation model using the first wiring segmentation data set;
[0101] The segmentation module is used to obtain the wiring to be tested Figure Ⅰ , using the wiring segmentation model trained by the first wiring segmentation data set, the wiring to be tested Figure Ⅰ The wires in the vertical direction are separated to obtain the grayscale of the wiring status Figure Ⅰ ; Wherein, the connection state grayscale Figure Ⅰ Different grayscale values correspond to different labels, and the labels refer to unique identifiers assigned to wires of different colors at different wiring positions in the wiring diagram;
[0102] The wiring color detection module is used to detect the grayscale of the wiring state. Figure Ⅰ When the corresponding wiring position in is not empty, based on the pre-established association relationship, the wiring state grayscale Figure Ⅰ The grayscale value corresponding to each wire in the wiring state is used to determine the wiring color detection result; wherein the wiring color detection result refers to the grayscale value of the wiring state. Figure ⅠThe colors of the wires at different wiring positions in the example, wherein the association relationship refers to a pre-established mapping relationship between different labels and different grayscale values;
[0103] The wiring sequence determination module is used to determine the wiring sequence array to be tested according to the wiring color detection result; and is also used to determine the wiring sequence array to be tested according to the wiring state grayscale Figure Ⅰ When the corresponding wiring position in the array is empty, the element symbol at the corresponding position in the array of wiring sequence to be tested is set to a, where a indicates that there is a missing wiring condition in the wire at the corresponding wiring position; wherein different element symbols in the array of wiring sequence to be tested correspond to different wiring colors and wiring states;
[0104] The true or false detection module is used to obtain a pre-configured reference wiring line sequence array, compare the wiring line sequence array to be tested with the reference wiring line sequence array, and obtain a true or false detection line sequence array according to the comparison result; and is also used to obtain the wiring line sequence array to be tested based on the true or false detection line sequence array. Figure Ⅰ Corresponding wrong wiring detection results and missing wiring detection results; wherein, different element symbols in the correct and incorrect detection line sequence array represent different line sequence detection results, element symbol a represents that there is a missing wiring condition at the corresponding wiring position, element symbol b represents that the wiring color at the corresponding wiring position is correct, and element symbol c represents that the wiring color at the corresponding wiring position is incorrect.
[0105] In some embodiments, the wiring segmentation model adopts a lightweight real-time segmentation model PP-LiteSeg.
[0106] It should be noted that the present invention pre-builds a wiring segmentation model. Before segmentation, the wiring segmentation model is trained using a first wiring segmentation data set, wherein the annotated objects of the first wiring segmentation data set are wires in the numerical direction. The trained wiring segmentation model is used to identify the wiring to be tested. Figure Ⅰ The wires in the vertical direction can be quickly and accurately segmented, which facilitates the subsequent objective analysis and judgment of the circuit image, greatly improving the work efficiency and accuracy of the meter installation and wiring detection tasks.
[0107] In another specific implementation, real data of each power grid company and its subsidiaries in the meter installation and wiring tasks are obtained in advance, and the target area is marked to produce a first wiring segmentation data set;
[0108] The data types in the first wiring segmentation dataset include various wiring methods, various wiring background boards, wiring status at each stage, etc.; among them, the wiring methods are divided into three-phase three-wire wiring and three-phase four-wire wiring. In a three-phase electrical system, three wires are used to transmit electrical energy. These three wires include three-phase power wires (A, B, and C phases) with phase-to-phase voltage as phase voltage, but do not include a neutral wire (N wire). Three-phase four-wire means that in a three-phase electrical system, in addition to the three-phase power wires (A, B, and C phases), there is also a neutral wire (N wire) and a ground wire (PE wire, but not all three-phase four-wire systems include a ground wire). Various types of wiring background boards include conventional frosted iron background boards, wooden texture background boards, and stainless steel hole smooth background boards. Different types of backgrounds will have different degrees of impact on the wiring segmentation model. The wiring status at each stage includes the wiring status of each step in the standardized meter installation wiring process. The wiring colors are different and the number ranges from 1 to 34 wires;
[0109] The first wiring segmentation dataset is divided into training set, test set and validation set according to a certain ratio for model training; after 80,000 iters of training on the self-made dataset, the accuracy (Acc) and average intersection-over-union ratio (mIou) of the wiring segmentation model reach 99.646% and 91.718% respectively, the size of the wiring segmentation model is 47.2Mb, and the detection speed of the wiring segmentation model is 138ms / step. The wiring segmentation model has achieved a good balance between segmentation accuracy, segmentation speed and model size, and is very suitable for real-time wiring status segmentation during meter installation and wiring.
[0110] It can be understood that when training the wiring segmentation model, the training effect of the model can be improved by adjusting the input size of the image during preprocessing, the number of iterations of the model, and the learning rate strategy. Through comparative experiments, the detection effects of models with different configurations on wiring segmentation are compared, and longitudinal comparisons are performed to compare the actual detection effects of the same model under different training rounds. Finally, a segmentation model with a relatively balanced segmentation accuracy and detection speed is selected.
[0111] Example 2
[0112] Based on Example 1, this example provides a specific implementation method of an intelligent process detection method for meter installation and power connection, as shown in the attached Figure 4 shown.
[0113] In some embodiments, the intelligent process detection method for installing and connecting a meter includes:
[0114] The wiring to be tested is tested by using the wiring correctness detection method in Example 1. Figure Ⅰ Perform wiring correctness detection in the wiring area in order to obtain wrong wiring detection results and missing wiring detection results;
[0115] Get the grayscale of the wiring status Figure Ⅰ , determine the grayscale of the wiring state Figure Ⅰ The wiring closed area corresponding to each wire in the , and the fitting straight line corresponding to the pixel coordinate point in each wiring closed area is constructed Ⅰ;
[0116] Determine the minimum circumscribed rectangle of the corresponding wiring closed area based on the fitting straight line I, and measure the straightness of the wire in the vertical direction based on the number of pixels in each minimum circumscribed rectangle and the pixel area of the corresponding minimum circumscribed rectangle;
[0117] Based on the wiring under test Figure Ⅰ The upper frame of the middle junction box is used to construct a horizontal baseline; according to the horizontal baseline and the fitting straight line I in each wiring closed area, the verticality of the wire in the vertical direction is measured.
[0118] Based on the above-mentioned intelligent process detection method for installing and connecting a meter to electricity, this embodiment also provides a specific implementation method of an intelligent process detection system for installing and connecting a meter to electricity;
[0119] The meter installation and power connection intelligent process detection system includes a wiring correctness detection unit, a straightness measurement unit and a verticality measurement unit, wherein:
[0120] The wiring correctness detection unit uses the wiring correctness detection method in embodiment 1 to detect the wiring to be tested. Figure Ⅰ Perform wiring correctness detection in the wiring area in order to obtain wrong wiring detection results and missing wiring detection results;
[0121] The straightness measurement unit is used to obtain the grayscale of the wiring state Figure Ⅰ , determine the grayscale of the wiring state Figure Ⅰ The wiring closed area corresponding to each wire in the embodiment of the present invention is constructed, and a fitting straight line I corresponding to the pixel coordinate points in each wiring closed area is constructed; it is also used to determine the minimum circumscribed rectangle of the corresponding wiring closed area based on the fitting straight line I, and to measure the straightness of the wire in the vertical direction based on the number of pixels in each minimum circumscribed rectangle and the pixel area of the corresponding minimum circumscribed rectangle;
[0122] The verticality measuring unit is used to measure the verticality of the wiring to be tested. Figure Ⅰ The upper frame of the middle junction box is used to construct a horizontal baseline; according to the horizontal baseline and the fitting straight line I in each wiring closed area, the verticality of the wire in the vertical direction is measured.
[0123] It should be noted that the intelligent process detection method for meter installation and power connection can not only obtain the wrong wiring detection results and missed wiring detection results, but also can measure the straightness and verticality of the wires in the vertical direction, which can fully meet the needs of meter installation and power connection training and actual detection, not only improve the efficiency of meter installation and power connection process detection, but also can quickly and accurately discover complex or hidden wiring errors.
[0124] It should also be noted that the minimum bounding rectangle of each fitting line to determine the corresponding wiring area is based on the direction of the fitting line as the rectangle direction, and gradually increases in width on both sides until it can completely contain all pixel coordinates, as shown in the attached figure. Figure 5 When determining the wiring status grayscale Figure II When calculating the wiring closed area corresponding to each wire in the image, the influence of individual pixels is eliminated by the height of the minimum circumscribed rectangle of the closed pixel area, and then the maximum wiring closed area of each wiring segmentation is screened.
[0125] It should also be noted that when measuring the straightness of the wires in the vertical direction, the average straightness of all the wires may be calculated, or the straightness of each wire in the vertical direction may be calculated.
[0126] It should also be noted that the straightness measurement uses the intersection and union ratio of the wiring pixel points and the wiring minimum circumscribed rectangle as the measurement standard. Based on the vertical straightness of each wire, the following formula is used to calculate the straightness of the wiring to be tested. Figure Ⅰ The average straightness of all wires in :
[0127]
[0128] Wherein, mIou represents the grayscale of the wiring state Figure Ⅰ The average straightness of all wires in the
[0129] Num i Represents the grayscale of the wiring status Figure Ⅰ The number of pixels in the minimum circumscribed rectangle corresponding to the i-th wire, H i Indicates the grayscale of the wiring status Figure Ⅰ The length of the minimum circumscribed rectangle corresponding to the i-th wire, W i Indicates the grayscale of the wiring status Figure Ⅰ The width of the smallest outer rectangle corresponding to the i-th wire in the figure, n represents the grayscale of the wiring state Figure Ⅰ The number of wires in the vertical direction.
[0130] It should also be noted that the ratio of the number of pixels in the minimum circumscribed rectangular area to the pixel area of the minimum circumscribed rectangular area is used as the straightness index. Therefore, the calculation formula for the straightness of the i-th wire in the vertical direction is:
[0131]
[0132] The value range of i is [1, n].
[0133] It should also be noted that the shooting of the wiring image has errors in angle and shooting distance, which will cause the image to tilt or distort. Therefore, when measuring the verticality, it is necessary to automatically construct a horizontal baseline to reduce the error in the verticality measurement and reduce the misjudgment rate. For the determination of the horizontal baseline, this embodiment uses the upper frame of the junction box. Specifically, a new fitting straight line can be constructed from the 14 lowest points of the wiring in the middle bottom wiring area (i.e., the contact points between the wiring and the junction box) as the horizontal baseline.
[0134] It should also be noted that, when measuring the verticality of the wires in the vertical direction based on the horizontal baseline and the fitting straight line I in each wiring closed area, the verticality corresponding to each wire in the vertical direction can be calculated (the verticality is the angle between the fitting straight line I corresponding to the wire and the horizontal baseline), and the overall verticality corresponding to all wires can also be calculated.
[0135] When constructing the fitting straight line I of the pixel coordinate points in each wiring closed area, the least squares method is used to process the pixel coordinate points in each wiring information data set to obtain the fitting straight line as shown in the attached figure. Figure 5 As shown, the expression is y1=k1x1+b1;
[0136]
[0137] Therefore, the calculation formula for the verticality of each conductor is as above.
[0138] Example 3
[0139] On the basis of the above-mentioned embodiment, this embodiment provides another specific implementation method of the intelligent process detection method for installing and connecting the meter.
[0140] In some embodiments, the intelligent process detection method for installing and connecting a meter to a power source further includes:
[0141] First, the wiring segmentation model is trained using the second wiring segmentation data set, and then the wiring segmentation model trained with the second wiring segmentation data set is used to obtain the wiring to be tested. Figure II The wires in the horizontal direction are separated to obtain the grayscale of the wiring status Figure II ; Wherein, the annotation object of the second wiring segmentation data set is the wire in the horizontal direction;
[0142] Determine the grayscale of the wiring status Figure IIThe wiring closed area corresponding to each wire in the , and the fitting straight line corresponding to the pixel coordinate point in each wiring closed area is constructed Ⅱ;
[0143] Grayscale based on the wiring status Figure II The corresponding fitting straight line II uses the preset horizontality calculation model for the wiring to be tested. Figure II Measure the levelness of the wire in the
[0144] In some embodiments, the measurement results of all horizontal wirings are integrated to evaluate the wiring horizontality of the entire image or video frame, so the preset horizontality calculation model is:
[0145]
[0146] Wherein, A represents the grayscale of the wiring state Figure II The horizontality of all the wires in the horizontal direction, N t Indicates the grayscale of the wiring status Figure II The sum of all pixel points of the wire in the figure, m represents the grayscale of the wiring state Figure II Number of wiring enclosed areas in; N j Indicates the grayscale of the wiring status Figure II The number of wiring pixels in the jth wiring closed area, A j represents the inclination angle of the fitting straight line in the jth wiring closed area in the wiring state grayscale image;
[0147] The fitting straight line in the jth closed area of the connection can be expressed as y3=k3x3+b3, so the inclination of the fitting straight line in the jth closed area of the connection is:
[0148]
[0149] It should be noted that the intelligent process detection method for meter installation and power connection of this embodiment can not only obtain the wrong wiring detection results and the missing wiring detection results (see Example 1), and perform straightness measurement and verticality measurement on the wires in the vertical direction (see Example 2), but also perform horizontality measurement on the wires in the horizontal direction.
[0150] It should also be noted that the intelligent process detection method for meter installation and power connection standardizes and digitizes the process detection in the process of meter installation and power connection, which greatly reduces the time of manual detection, greatly improves the detection efficiency, and provides new methods and directions for the field of process detection.
[0151] Based on the above-mentioned intelligent process detection method for installing and connecting the meter and the intelligent process detection system for installing and connecting the meter in Example 2, this embodiment also provides another specific implementation method of the intelligent process detection system for installing and connecting the meter;
[0152] The meter installation and power connection intelligent process detection system also includes a levelness measurement unit, which is used to first train the wiring segmentation model using the second wiring segmentation data set, and then use the wiring segmentation model trained by the second wiring segmentation data set to obtain the wiring to be tested. Figure II The wires in the horizontal direction are separated to obtain the grayscale of the wiring status Figure II ; Also used based on the wiring state grayscale Figure II The corresponding fitting straight line II uses the preset horizontality calculation model for the wiring to be tested. Figure II Measure the levelness of the wire in the
[0153] It should also be noted that when performing levelness measurement, the wiring segmentation model used is also the PP_LiteSeg segmentation model; the difference is that different data sets are used to train the wiring segmentation model, and the prediction results output by the wiring segmentation model after training with different data sets are different.
[0154] It should also be noted that the wiring to be tested Figure Ⅰ And the wiring under test Figure II , both are to manually or automatically collect images of the wiring process from the input images or video frames. The images or video frames are acquired in real time by industrial cameras and transmitted to the server in the form of video streams. The server performs frame extraction processing, which can process image information faster and give result feedback.
[0155] It should also be noted that when conducting intelligent process detection of meter installation and power connection, the wiring to be tested Figure Ⅰ And the wiring under test Figure II For the same image, the wiring segmentation models trained with different data sets can be used to segment the same image, and the wires in the vertical direction and the wires in the horizontal direction can be segmented respectively. Figure Ⅰ And the wiring under test Figure II Alternatively, for different images in different areas on the same hardware device, wiring segmentation models trained with different data sets may be used to segment different images, and the wires in the vertical direction and the wires in the horizontal direction may be segmented respectively.
[0156] It should also be noted that an image may contain both vertical and horizontal wires. In order to improve segmentation efficiency, the horizontal and vertical wires can also be pre-labeled on an image (their corresponding labels are different. For example, in FIG6 and FIG7 , the vertical wires above the junction box are labeled L1-L10, R1-R10, and D1-D14; the vertical wires below the junction box are labeled V1-V10, and the horizontal wires are labeled H1-H10); as shown in the attached figure, Figure 6(a) , 6(b)As shown in 7(a) and 7(b), during the segmentation process, the wires in the vertical direction and the wires in the horizontal direction on the same image are segmented out, and the wires in the vertical direction are subjected to connection correctness detection, straightness measurement, and verticality measurement, and the wires in the horizontal direction are subjected to horizontality measurement.
[0157] In a specific implementation, the wiring to be tested Figure Ⅰ And the wiring under test Figure II For the same image, the image contains both vertical and horizontal wires. After segmentation, the prediction result map, line sequence result map (target detection result map, each wire is framed separately with a corresponding color frame) and verticality result map (verticality is displayed at the top of each wire), as shown in Figure 1. Figure 8 shown.
[0158] Example 4
[0159] Based on the above embodiment, this embodiment provides another specific implementation method of the intelligent process detection method for meter installation and power connection, as shown in the attached Fig. 9 shown.
[0160] In some embodiments, the intelligent process detection method for installing and connecting a meter to a power source further includes:
[0161] Pre-build copper exposure detection model;
[0162] The obtained wiring diagram III to be tested is processed using the exposed copper detection model trained by the first leaked copper data set to detect the junction box area and the electric energy meter wiring area;
[0163] Using the exposed copper detection model trained by the second copper leakage data set, the junction box area and the electric energy meter wiring area are detected to detect the exposed copper area;
[0164] The ratio between the detected pixel width of the junction box area and the real width of the junction box is used as a scale, and the real exposed copper size is determined based on the scale and the pixel value of the exposed copper area.
[0165] Based on the above-mentioned intelligent process detection method for installing and connecting the meter and the intelligent process detection system for installing and connecting the meter in Embodiment 2 or 3, this embodiment further provides another specific implementation method of the intelligent process detection system for installing and connecting the meter;
[0166] The meter installation and power connection intelligent process detection system also includes a level measurement unit and / or a copper exposure detection unit, wherein:
[0167] The horizontality measuring unit is used to first train the wiring segmentation model using the second wiring segmentation data set, and then use the wiring segmentation model trained by the second wiring segmentation data set to obtain the wiring to be measured. Figure IIThe wires in the horizontal direction are separated to obtain the grayscale of the wiring status Figure II ; Also used based on the wiring state grayscale Figure II The corresponding fitting straight line II uses the preset horizontality calculation model for the wiring to be tested. Figure II Measure the horizontality of the wire in the
[0168] The copper exposure detection unit is used to pre-build a copper exposure detection model; it is also used to process the acquired wiring diagram III to be tested by using the copper exposure detection model trained by the first copper leakage data set, and detect the junction box area and the electric energy meter wiring area in the wiring diagram III to be tested; it is also used to detect the junction box area and the electric energy meter wiring area by using the copper exposure detection model trained by the second copper leakage data set, and detect the copper exposure area; it is also used to use the ratio between the pixel width of the detected junction box area and the actual width of the junction box as a scale, and determine the actual copper exposure size based on the scale and the pixel value of the copper exposure area.
[0169] It should be noted that when installing and wiring the meter, exposed copper wires may cause electric shock and short circuit, which will threaten the life and health of personnel and the safety of equipment. Therefore, exposed copper detection is particularly important in the task of installing and wiring the meter. The exposed copper detection in this embodiment mainly detects the exposed copper wires in the conductors, junction boxes and the contact position of the meter. The exposed copper is a small-scale target, and its proportion in the wiring image is relatively small, so it is relatively difficult to identify exposed copper. For the detection of small targets such as exposed copper, the present invention adopts secondary detection. First, the wiring area and the junction box area of the electric energy meter are detected, and then the exposed copper detection is performed on the area to minimize the interference of the background on the small-scale target; while detecting the exposed copper, the pixel width of the junction box is also detected. The ratio of the pixel width of the junction box to the true width is used as a scale. The area or perimeter of the exposed copper part in the image can be measured by the pixel value of the exposed copper to evaluate its size.
[0170] In some embodiments, the copper exposure detection model is constructed using a YOLOv5 target detection algorithm.
[0171] It should be noted that when the YOLOv5 target detection algorithm is used for the first detection, the junction box area can be detected. The junction box area is the same as the width of the junction box, so the pixel width of the junction box area can be calculated through the target detection result.
[0172] It should also be noted that when the YOLOv5 target detection algorithm is used for the second detection, the exposed copper area can be detected, so the pixel value (pixel y value difference) of the exposed copper area can be calculated through the target detection result.
[0173] It should also be noted that the actual width of the junction box can be measured in advance. The specific steps of determining the actual size of the exposed copper based on the scale and the pixel value of the exposed copper area are not repeated here.
[0174] In a specific embodiment, the copper exposure detection result is as follows Fig.10 As shown, the size of the exposed copper is shown in the exposed copper area.
[0175] It should also be noted that before the copper exposure detection model is trained, images of the copper exposure part are manually or automatically collected from the input image or video frame, and a first copper leakage data set (the labeled objects are the junction box area and the electric energy meter wiring area) and a second copper leakage data set (the labeled objects are the copper exposure area) are prepared for subsequent model training. The first copper leakage data set and the second copper leakage data set both include samples of copper exposure conditions at various angles, lighting conditions, and different scales.
[0176] It should also be noted that during the training process, the performance of the model is optimized by adjusting model parameters (such as input size and number of channels), increasing the number of training rounds, and using data augmentation techniques (preprocessing operations, including random rotation, symmetry processing, single-channel output, etc.).
[0177] It should also be noted that the present invention uses a neural network model and an image processing algorithm to automatically detect and analyze process problems in circuit images, such as the verticality, straightness, horizontality of wiring, and the presence of exposed copper, which is an important link in ensuring work quality. It not only improves the efficiency and accuracy of process detection, but also provides strong support for process improvement and optimization.
[0178] It should also be noted that the meter installation and power connection correction and process analysis method based on deep learning segmentation technology of the present invention can be combined with the smart grid system to lay a solid foundation for realizing the intelligent management of meter installation and power connection.
[0179] Example 5
[0180] Based on the above embodiments, this embodiment provides a specific implementation of a computer device.
[0181] In some embodiments, the computer includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0182] Memory, used to store computer programs;
[0183] The processor is used to implement the wiring correctness detection method in embodiment 1, or the meter installation and power connection intelligent process detection method in embodiment 2, 3 or 4 when executing the program stored in the memory.
[0184] It should be noted that the embodiment is an intelligent detection device designed for the power and communications industries, which aims to improve the quality and efficiency of the meter installation and wiring process and ensure the safety and stability of the network topology. The device integrates a high-precision measurement module and an intelligent recognition system, which can automatically detect errors and hidden dangers in the wiring process, and provide real-time feedback on the detection results to provide accurate guidance for operators.
[0185] Specifically, the computer device may be a terminal, and its external structure diagram may be as follows: Fig.11 As shown, those skilled in the art can understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0186] Example 6
[0187] Based on the above embodiments, this embodiment provides a readable storage medium on which instructions are stored. When executed by one or more processors, the processor executes the wiring correctness detection method in Example 1, or the meter installation and power connection intelligent process detection method in Example 2, 3 or 4.
[0188] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0189] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0190] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A wiring correctness detection method, characterized in that: include: Pre-building a wiring segmentation model and configuring a first wiring segmentation data set; Using the first wiring segmentation data set, training the wiring segmentation model; Obtaining a wiring diagram I to be tested, and using a wiring segmentation model trained with the first wiring segmentation data set to segment the wires in the vertical direction in the wiring diagram I to be tested, to obtain a wiring state grayscale image I; wherein different grayscale values in the wiring state grayscale image I correspond to different labels, and the labels refer to unique identifiers assigned to wires of different colors at different wiring positions in the wiring diagram; When the corresponding wiring position in the wiring state grayscale image I is not empty, based on the pre-established association relationship, according to the grayscale value corresponding to each wire in the wiring state grayscale image I, the wiring color detection result is determined; wherein the wiring color detection result refers to the color of the wires at different wiring positions in the wiring state grayscale image I, and the association relationship refers to the pre-established mapping relationship between different labels and different grayscale values; According to the wiring color detection result, determining the wiring sequence array to be tested; wherein different element symbols in the wiring sequence array to be tested correspond to different wiring colors and wiring states; When the corresponding wiring position in the wiring state grayscale image I is empty, the element symbol at the corresponding position in the wiring line sequence array to be tested is set to a, where a indicates that the wire at the corresponding wiring position has a missing wiring condition; Obtain a pre-configured reference wiring sequence array, compare the wiring sequence array to be tested with the reference wiring sequence array, and obtain a correct or incorrect detection wiring sequence array according to the comparison result; wherein different element symbols in the correct or incorrect detection wiring sequence array represent different wiring sequence detection results, element symbol a represents that there is a missing wiring condition at the corresponding wiring position, element symbol b represents that the wiring color at the corresponding wiring position is correct, and element symbol c represents that the wiring color at the corresponding wiring position is incorrect; Based on the correct / incorrect detection line sequence array, the wrong wiring detection result and the missing wiring detection result corresponding to the wiring diagram I to be tested are obtained.
2. The wiring correctness detection method according to claim 1, characterized in that: When the wrong wiring detection result and the missing wiring detection result corresponding to the wiring diagram I to be tested are obtained based on the correct and incorrect detection line sequence array, the following is executed: Determine the wrong wiring detection result according to the number and position of the element symbols c in the correct and incorrect detection line sequence array; wherein the wrong wiring detection result refers to the number and position of the wrong wiring in the wiring diagram I to be tested; The missing wiring detection result is determined according to the number and position of the element symbols a in the true or false detection line sequence array; wherein the missing wiring detection result refers to the number and position of the missing wiring in the wiring diagram I to be tested.
3. A method for intelligent process detection of meter installation and power connection, characterized in that: include: Using the wiring correctness detection method described in claim 1 or 2, the wiring correctness detection is performed on the wiring area in the wiring diagram I to be tested, so as to obtain the wrong wiring detection result and the missing wiring detection result; Obtain the wiring state grayscale image I, determine the wiring closed area corresponding to each wire in the wiring state grayscale image I, and construct a fitting straight line I corresponding to the pixel coordinate point in each wiring closed area; Determine the minimum circumscribed rectangle of the corresponding wiring closed area based on the fitting straight line I, and measure the straightness of the wire in the vertical direction based on the number of pixels in each minimum circumscribed rectangle and the pixel area of the corresponding minimum circumscribed rectangle; Based on the upper frame of the junction box in the wiring diagram Ⅰ to be tested, a horizontal baseline is constructed; based on the horizontal baseline and the fitting straight line Ⅰ in each wiring closed area, the verticality of the wire in the vertical direction is measured.
4. The intelligent process detection method for meter installation and power connection according to claim 3 is characterized in that: Also includes: First, the wiring segmentation model is trained using the second wiring segmentation data set, and then the wires in the horizontal direction of the acquired wiring diagram II to be tested are segmented by the wiring segmentation model trained by the second wiring segmentation data set to obtain a wiring state grayscale image II; Based on the fitting straight line II corresponding to the wiring state grayscale diagram II, a preset levelness calculation model is used to measure the levelness of the wire in the wiring diagram II to be measured.
5. The intelligent process detection method for meter installation and power connection according to claim 3 or 4, characterized in that: Also includes: Pre-build copper exposure detection model; Using the copper leakage detection model trained by the first copper leakage data set, the acquired wiring diagram III to be tested is processed to detect the junction box area and the electric energy meter wiring area in the wiring diagram III to be tested; Using the exposed copper detection model trained by the second copper leakage data set, the junction box area and the electric energy meter wiring area are detected to detect the exposed copper area; The ratio between the detected pixel width of the junction box area and the real width of the junction box is used as a scale, and the real exposed copper size is determined based on the scale and the pixel value of the exposed copper area.
6. A wiring correctness detection system, characterized in that: It includes a model management module, a segmentation module, a wiring color detection module, a wiring sequence determination module and a correctness detection module, among which: The model management module is used to pre-build a wiring segmentation model and configure a first wiring segmentation data set; and is also used to train the wiring segmentation model using the first wiring segmentation data set; The segmentation module is used to obtain the wiring diagram I to be tested, and use the wiring segmentation model trained by the first wiring segmentation data set to segment the wires in the vertical direction in the wiring diagram I to be tested, so as to obtain a wiring state grayscale image I; wherein different grayscale values in the wiring state grayscale image I correspond to different labels, and the labels refer to unique identifiers assigned to wires of different colors at different wiring positions in the wiring diagram; The wiring color detection module is used to determine the wiring color detection result based on the pre-established association relationship and the grayscale value corresponding to each wire in the wiring state grayscale image I when the corresponding wiring position in the wiring state grayscale image I is not empty; wherein the wiring color detection result refers to the color of the wire at different wiring positions in the wiring state grayscale image I, and the association relationship refers to the pre-established mapping relationship between different labels and different grayscale values; The wiring sequence determination module is used to determine the wiring sequence array to be tested according to the wiring color detection result; and is also used to set the element symbol at the corresponding position in the wiring sequence array to be tested to a when the corresponding wiring position in the wiring state grayscale image I is empty, where a indicates that there is a missing wiring condition in the wire at the corresponding wiring position; wherein different element symbols in the wiring sequence array to be tested correspond to different wiring colors and wiring states; The correctness detection module is used to obtain a pre-configured reference wiring sequence array, compare the wiring sequence array to be tested with the reference wiring sequence array, and obtain a correctness detection sequence array according to the comparison result; it is also used to obtain the wrong wiring detection result and the missing wiring detection result corresponding to the wiring diagram I to be tested based on the correctness detection sequence array; wherein different element symbols in the correctness detection sequence array represent different sequence detection results, element symbol a represents that there is a missing wiring condition at the corresponding wiring position, element symbol b represents that the wiring color at the corresponding wiring position is correct, and element symbol c represents that the wiring color at the corresponding wiring position is incorrect.
7. An intelligent process detection system for meter installation and power connection, characterized in that: It includes a wiring correctness detection unit, a straightness measurement unit and a verticality measurement unit, wherein: The wiring correctness detection unit uses the wiring correctness detection method according to claim 1 or 2 to perform wiring correctness detection on the wiring area in the wiring diagram I to be tested, so as to obtain wrong wiring detection results and missing wiring detection results; The straightness measurement unit is used to obtain the wiring state grayscale image I, determine the wiring closed area corresponding to each wire in the wiring state grayscale image I, and construct a fitting straight line I corresponding to the pixel coordinate point in each wiring closed area; it is also used to determine the minimum circumscribed rectangle of the corresponding wiring closed area based on the fitting straight line I, and measure the straightness of the wire in the vertical direction based on the number of pixels in each minimum circumscribed rectangle and the pixel area of the corresponding minimum circumscribed rectangle; The verticality measurement unit is used to construct a horizontal baseline based on the upper frame of the junction box in the wiring diagram I to be tested; and to measure the verticality of the wire in the vertical direction according to the horizontal baseline and the fitting straight line I in each wiring closed area.
8. The intelligent process detection system for meter installation and power connection according to claim 7 is characterized in that: It also includes a levelness measuring unit and / or a copper exposure detection unit, wherein: The horizontality measurement unit is used to first train the wiring segmentation model using the second wiring segmentation data set, and then segment the wires in the horizontal direction in the acquired wiring diagram II to be tested through the wiring segmentation model trained by the second wiring segmentation data set to obtain the wiring state grayscale image II; and is also used to measure the horizontality of the wires in the wiring diagram II to be tested using a preset horizontality calculation model based on the fitting straight line II corresponding to the wiring state grayscale image II; The copper exposure detection unit is used to pre-build a copper exposure detection model; it is also used to process the acquired wiring diagram III to be tested by using the copper exposure detection model trained by the first copper leakage data set, and detect the junction box area and the electric energy meter wiring area in the wiring diagram III to be tested; it is also used to detect the junction box area and the electric energy meter wiring area by using the copper exposure detection model trained by the second copper leakage data set, and detect the copper exposure area; it is also used to use the ratio between the pixel width of the detected junction box area and the actual width of the junction box as a scale, and determine the actual copper exposure size based on the scale and the pixel value of the copper exposure area.
9. A computer device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; The processor is used to implement the wiring correctness detection method as described in any one of claims 1 or 2, or the meter installation and power connection intelligent process detection method as described in any one of claims 3 to 5 when executing the program stored in the memory.
10. A readable storage medium, characterized in that: Instructions are stored thereon, and when executed by one or more processors, the processors execute the wiring correctness detection method as described in claim 1 or 2, or the meter installation and power connection intelligent process detection method as described in any one of claims 3 to 5.
Citation Information
Patent Citations
Electric energy meter assembly process detection device and method based on deep learning image recognition
CN116893386B
Automatic electrical cabinet wiring debugging system based on image recognition
CN110119680A
Intelligent wiring terminal comparison method and system, computer equipment and storage medium
CN114494681A
PCB line sequence detection method and system based on image recognition
CN115239690A
Optical fiber conductivity test method and system
CN116558777A