Junction box wiring inspection method and device based on image classification, equipment and storage medium

Through image classification technology, the wiring status of the power meter combined junction box is automatically detected, which solves the problem of wiring misjudgment and improves the efficiency and accuracy of power consumption inspection.

CN120339173APending Publication Date: 2025-07-18YUNNAN POWER GRID CO LTD ELECTRIC POWER RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510285165.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In the prior art, the misjudgment of the wiring status of the combined junction box of the power meter causes the power meter to not leave or reverse, causing losses to enterprises and users, and the power inspection depends on the experience of experts and labor.

Method used

By collecting image data of different wiring status of joint junction boxes, labeling and training, generating wiring inspection models, and automatically detecting wiring accuracy using image classification methods.

Benefits of technology

It realizes efficient wiring status detection, avoids human detection errors, and improves the efficiency of power inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339173A_ABST
    Figure CN120339173A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a junction box wiring inspection method and device based on image classification, equipment and a storage medium, and the method comprises the steps: collecting image data containing different wiring states of a combined junction box, marking the image data, and generating target image data containing a marking result; training a preset initial model by using the target image data to obtain a wiring inspection model; and inputting the to-be-detected wiring picture into the wiring inspection model to obtain a wiring result output by the wiring inspection model, the wiring result being correct wiring of the to-be-detected wiring picture or wrong wiring of the to-be-detected wiring picture. According to the invention, model training is carried out by acquiring the image data of the joint junction box in different wiring states, the wiring inspection model is generated, the to-be-detected wiring picture is input into the wiring inspection model, the wiring result is generated, more efficient wiring state detection is realized, and the power utilization inspection efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image classification, and in particular to a wiring inspection method and device, equipment and storage medium for a junction box based on image classification. Background Art

[0002] The function of the combined wiring box of the electricity meter is to connect the secondary wires led out by the current / voltage transformer in series and parallel through the terminals of the wiring terminal of the combined wiring box, and then connect them to the wiring terminals of the electricity meter, so as to isolate the load and circuit of the power supply and provide a safe and reliable electrical connection for the electricity meter.

[0003] Since there are many wiring terminals involved in the combined wiring box, it is very easy to misjudge the wiring state of the combined wiring box when the staff's attention is not concentrated or in a state of visual fatigue due to long-term operation. Abnormal wiring of the combined wiring box will cause the electricity meter not to run or reverse, and even unable to supply power normally, thus causing serious losses to both enterprises and users. At present, electrical inspection mainly relies on expert experience for on-site identification, but this method is time-consuming, laborious and costly. Summary of the Invention

[0004] Based on this, it is necessary to propose a wiring inspection method and device, equipment and storage medium for a junction box based on image classification to efficiently distinguish whether the wiring in the wiring picture is correct.

[0005] To achieve the above object, the first aspect of the present application provides a wiring inspection method for a junction box based on image classification, the method comprising:

[0006] Collect image data of different wiring states of the combined wiring box, and label the image data to generate target image data including labeling results;

[0007] Use the target image data to train a preset initial model to obtain a wiring inspection model;

[0008] Input the wiring picture to be detected into the wiring inspection model to obtain the wiring result output by the wiring inspection model, where the wiring result is that the wiring picture to be detected is correctly wired or the wiring picture to be detected is wrongly wired.

[0009] Further, the combined wiring box is composed of a plurality of wiring blocks with different colors;

[0010] Then the labeling of the image data to generate target image data including labeling results specifically includes:

[0011] Partition the wiring blocks corresponding to each color in the target wiring image to generate a plurality of sub-wiring images, where the target wiring image is any one of the wiring images in the image data;

[0012] Label each sub-wiring image separately to obtain the labeling results of each sub-wiring image;

[0013] Construct the target image data based on the labeling results of each sub-wiring image.

[0014] Furthermore, partitioning the wiring blocks corresponding to each color in the target wiring image to generate a number of sub-wiring images specifically includes:

[0015] Partition based on the wiring blocks corresponding to each color in the target wiring image to obtain the initial wiring images corresponding to each color;

[0016] Perform grayscale processing on the initial wiring image to obtain the initial wiring grayscale image;

[0017] Perform functional partitioning according to the initial wiring grayscale image to obtain a voltage wiring image and a current wiring image. Both the voltage wiring image and the current wiring image are the sub-wiring images. Among them, the voltage wiring image is the image corresponding to the voltage wiring area, and the current wiring image is the image corresponding to the current wiring area.

[0018] Furthermore, the separately labeling each sub-wiring image to obtain the labeling results of each sub-wiring image specifically includes:

[0019] Obtain the standard wiring images of the correct wiring in the voltage wiring area and the current wiring area;

[0020] Compare and analyze the sub-wiring image and the standard wiring image to generate the labeling result of the sub-wiring image. The labeling result is whether the sub-wiring image is correctly wired.

[0021] Furthermore, training a preset initial model using the target image data to obtain a wiring inspection model specifically includes:

[0022] Based on the contrastive learning method, train a preset initial model using the target image data to obtain a wiring inspection model.

[0023] Furthermore, the method further includes:

[0024] Perform pruning and quantization operations on the wiring inspection model to obtain a target wiring inspection model for deploying the target wiring inspection model to a mobile device;

[0025] Then inputting the wiring picture to be detected into the wiring inspection model to obtain the wiring result output by the wiring inspection model specifically includes:

[0026] Obtain the wiring picture to be detected based on the mobile device;

[0027] Use the target wiring inspection model to perform wiring detection on the to-be-detected wiring picture and generate a wiring result.

[0028] Further, obtaining the to-be-detected wiring picture based on the mobile terminal specifically includes:

[0029] Set a reference line in the mobile terminal, and the reference line is used to calibrate the partition of the picture when obtaining the to-be-detected wiring picture;

[0030] After using the target wiring inspection model to perform wiring detection on the to-be-detected wiring picture and generating a wiring result, it further includes:

[0031] Generate a result display image based on the wiring result and the reference line, and the result display image includes the wiring result of whether each sub-wiring area is correctly wired.

[0032] To achieve the above object, a second aspect of the present application provides a wiring inspection device for a junction box based on image classification, and the device includes: a data acquisition unit, a model training unit, and a wiring detection unit;

[0033] The data acquisition unit is configured to collect image data of different wiring states including a combined junction box, and label the image data to generate target image data including a labeling result;

[0034] The model training unit is configured to train a preset initial model using the target image data to obtain a wiring inspection model;

[0035] The wiring detection unit is configured to input the to-be-detected wiring picture into the wiring inspection model to obtain a wiring result output by the wiring inspection model, and the wiring result is that the to-be-detected wiring picture is correctly wired or the to-be-detected wiring picture is wrongly wired.

[0036] To achieve the above object, a third aspect of the present application provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the processor is caused to execute the steps of the method as described in the first aspect.

[0037] To achieve the above object, a fourth aspect of the present application provides a computer device including a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor is caused to execute the steps of the method as described in the first aspect.

[0038] Adopting the embodiments of the present invention has the following beneficial effects:

[0039] An embodiment of the present invention provides a wiring inspection method for a junction box based on image classification. The method includes: collecting image data of different wiring states of a combined junction box, and annotating the image data to generate target image data containing annotation results; training a preset initial model using the target image data to obtain a wiring inspection model; inputting a wiring picture to be detected into the wiring inspection model to obtain a wiring result output by the wiring inspection model, where the wiring result is that the wiring of the picture to be detected is correct or the wiring of the picture to be detected is incorrect. By obtaining image data of the combined junction box in different wiring states for model training and generating a wiring inspection model, the present invention enables the input of a wiring picture to be detected into the wiring inspection model to generate a wiring result, realizing more efficient wiring state detection and greatly improving the efficiency of power consumption inspection. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or in the prior art, the following briefly introduces the drawings required for use in the description of the embodiments or the prior art. Obviously, the following described drawings are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0041] Among them:

[0042] Figure 1 is a schematic flow chart of the wiring inspection method for a junction box based on image classification in an embodiment of the present invention;

[0043] Figure 2 is a structural diagram of the combined junction box in an embodiment of the present invention;

[0044] Figure 3 is an example diagram of the combined junction box in an embodiment of the present invention;

[0045] Figure 4 is an example diagram when all current connection blocks in an embodiment of the present invention are in the off state;

[0046] Figure 5 is an example diagram when all current connection blocks in an embodiment of the present invention are in the on state;

[0047] Figure 6a and Figure 6b is an example diagram when only one of the current connection blocks in an embodiment of the present invention is in the off state;

[0048] Figure 7 is an example diagram of a mobile shooting reference line in an embodiment of the present invention;

[0049] Figure 8 is an example diagram of the inspection result display in an embodiment of the present invention;

[0050] Figure 9 It is a structural block diagram of a junction box wiring inspection device based on image classification according to an embodiment of the present invention;

[0051] Figure 10 It is an internal structure diagram of a computer device in an embodiment of the present invention. Specific embodiments

[0052] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0053] A combined junction box is a device used in an electrical system, mainly used for centralized connection and protection of wires and cables. There are terminal blocks inside, which are convenient for the connection and fixation of wires. Since there are many terminal blocks involved in the combined junction box, it is necessary for the staff to be highly concentrated during wiring to ensure correct wiring. However, when the staff works for a long time, it is very easy to cause misjudgment of the wiring state of the combined junction box, resulting in abnormal wiring of the combined junction box, causing serious losses to both the enterprise and the users.

[0054] Based on this, in order to ensure correct wiring in the combined junction box, an embodiment of the present invention proposes a method for inspecting the wiring of a junction box based on image classification, which can be referred to Figure 1 , Figure 1 It is a schematic flow chart of a method for inspecting the wiring of a junction box based on image classification in an embodiment of the present invention. The method includes:

[0055] Step 120: Collect image data of different wiring states of the combined junction box, and label the image data to generate target image data including labeling results.

[0056] In an embodiment of the present invention, the combined junction box includes 21 wiring positions t1 - t21 at the upper end and 13 wiring positions d1 - d13 at the lower end, and short - circuit pieces S1 - S10. Reference can be made to Figure 2 , Figure 2 It is a structural diagram of the combined junction box in an embodiment of the present invention. The voltage / current transformer and the watt - hour meter are connected through 21 wiring positions t1 - t21 at the upper end and 13 wiring positions d1 - d13 at the lower end to achieve normal power supply.

[0057] It can be understood that there are many wiring situations for the combined wiring box whether in the correct wiring state or the incorrect wiring state. Therefore, to better train the model, a large number of wiring images of different wiring states of the combined wiring can be obtained to form image data, so as to perform model training based on the image data, making the detection result of the trained model for the wiring image more accurate.

[0058] Specifically, after obtaining the image data, each wiring image needs to be labeled according to the wiring standard and the wiring principle of the combined wiring box to distinguish whether the wiring is correct. For example, if the wiring position in the wiring image is correct, the wiring image is labeled with a correct wiring label, and the correct wiring label can be set to "1"; if the wiring position in the wiring image is incorrect, the wiring image is labeled with an incorrect wiring label, and the incorrect wiring label can be set to "0".

[0059] Based on the above labeling method, wiring images with labeling results can be generated according to the image data. These wiring images with labeling results constitute the target image data, and then are used for model training to obtain a wiring inspection model that can detect whether the wiring picture is correctly wired.

[0060] Step 140: Use the target image data to train a preset initial model to obtain a wiring inspection model.

[0061] In the embodiment of the present invention, when training the model, ResNet-50 is used as the backbone network for training to improve the generalization ability and performance of the wiring inspection model.

[0062] Step 160: Input the wiring picture to be detected into the wiring inspection model to obtain the wiring result output by the wiring inspection model. The wiring result is that the wiring picture to be detected is correctly wired or the wiring picture to be detected is incorrectly wired.

[0063] In the embodiment of the present invention, the wiring picture to be detected is collected as the wiring picture to be detected, and the wiring picture to be detected can be collected through a mobile terminal. The wiring picture to be detected is input into the wiring inspection model, and the wiring inspection model is used to judge whether the wiring picture to be detected is correctly wired.

[0064] In the embodiment of the present invention, by obtaining the image data of the combined wiring box in different wiring states for model training to generate a wiring inspection model, so that the wiring picture to be detected is input into the wiring inspection model to generate a wiring result, which realizes a more efficient wiring state detection, greatly improves the power consumption inspection efficiency, and at the same time avoids the detection error during manual inspection.

[0065] In an embodiment of the present invention, the combined wiring box is composed of several wiring blocks with different colors, and reference can be made to Figure 3 , Figure 3This is an example diagram of the combined junction box according to the embodiment of the present invention. The combined junction box has yellow connection blocks, green connection blocks, red connection blocks, and blue connection blocks. Based on this, in step 120, the image data is labeled to generate target image data containing the labeling results, which specifically includes:

[0066] Step 210: Partition the connection blocks corresponding to each color in the target connection image to generate a number of sub-connection images, where the target connection image is any one of the connection images in the image data.

[0067] In the embodiment of the present invention, any one of the connection images in the image data is selected as the target connection image for labeling the target connection image.

[0068] When collecting the connection images, the connection images may contain the combined junction box image and the background image. To exclude the interference of the background image, the target connection image can be pre-processed first. A pre-trained image segmentation model can be used to segment the combined junction box image and the background image in the target connection image, and the segmented combined junction box image is corrected to obtain a standard target connection image, so as to partition the standard target connection image and improve the accuracy of connection image detection.

[0069] Since there are many possible wiring cases for the combined junction box, and there are also many cases of correct wiring, the labeling difficulty is very high and the labeling efficiency is very low. To improve the labeling efficiency, in the embodiment of the present invention, according to the fact that the combined junction box is composed of connection blocks of different colors, and the wiring principle and the correct wiring method in each color block are the same, the combined junction box is selected for color partitioning. Since the wiring principle and the correct wiring method in each color area are the same, the connection blocks of each color can be labeled as the same connection blocks respectively, and the correct wiring cases are simplified to improve the labeling efficiency.

[0070] Specifically, the standard target connection image is color-partitioned to obtain sub-connection images corresponding to each color respectively.

[0071] In the embodiment of the present invention, each color connection block of the combined junction box contains a voltage connection block and a current connection block, or only contains a voltage connection block, and the wiring principle and the correct wiring method of each current connection block / voltage connection block are the same. Based on this, to further improve the labeling efficiency, the target connection image can be functionally divided. Specifically, Step 210: Partition the connection blocks corresponding to each color in the target connection image to generate a number of sub-connection images, which specifically includes:

[0072] Step 211: Partition based on the connection blocks corresponding to each color in the target connection image to obtain initial connection images corresponding to each color.

[0073] Specifically, first, color partitioning is performed on the joint wiring box in the target wiring image. Based on the different colors of the joint wiring box, the target wiring image is divided into several initial wiring images, and each initial wiring image corresponds to a different color. For example, referring to Figure 3 , Figure 3 where the joint wiring box contains four colors: yellow, green, red, and blue, it can be color-partitioned into four initial wiring images.

[0074] Step212. Perform grayscale processing on the initial wiring image to obtain an initial wiring grayscale image.

[0075] Step213. Perform functional partitioning based on the initial wiring grayscale image to obtain a voltage wiring image and a current wiring image. Both the voltage wiring image and the current wiring image are sub-wiring images. Among them, the voltage wiring image is the image corresponding to the voltage wiring area, and the current wiring image is the image corresponding to the current wiring area.

[0076] To facilitate partitioning of different functional blocks in the initial wiring image, first, grayscale processing is performed on each initial wiring image to generate an initial wiring grayscale image. Based on the initial wiring grayscale image, functional partitioning is performed to generate wiring images corresponding to each functional area.

[0077] In the embodiment of the present invention, the functions include: voltage wiring and current wiring. Therefore, the sub-wiring images obtained after functional partitioning of the initial wiring grayscale image are current wiring images or voltage wiring images.

[0078] Step220. Perform labeling on each sub-wiring image respectively to obtain the labeling results of each sub-wiring image.

[0079] After obtaining each sub-wiring image, labeling is performed on each sub-wiring image respectively to obtain the labeling result of each sub-wiring image.

[0080] In an embodiment of the present invention, Step220. Perform labeling on each sub-wiring image respectively to obtain the labeling results of each sub-wiring image, specifically including:

[0081] Step221. Obtain a standard wiring image of the correct wiring in the voltage wiring area and the current wiring area.

[0082] Step222. Compare and analyze the sub-wiring image and the standard wiring image to generate the labeling result of the sub-wiring image. The labeling result is whether the sub-wiring image is correctly wired.

[0083] In the embodiments of the present invention, there is electrical connection above and below each column of terminals in the combined junction box. For the voltage connection block, when the terminal is located below, the corresponding phase is open; for the current connection, when the shorting bar is closed, the two connected terminals are shorted, so there is no current in the secondary circuit, which is convenient for maintenance and repair. When the combined junction box is working normally, the wiring position and the wiring terminal should satisfy the following relationship:

[0084] In the voltage connection area, the shorting bar should be in the closed position.

[0085] In the current connection area, when all the shorting bars are in the open position, the wiring positions in the upper and lower areas should be connected to the terminals in the same column; when only one shorting bar is in the closed state, the wiring positions corresponding to the two columns of terminals in the closed position cannot be wired simultaneously; when all the shorting bars are in the closed position, only the wiring positions on both sides can be connected in the upper and lower wiring areas.

[0086] For each voltage connection block, all possible wiring situations are as follows:

[0087]

[0088] Among them, 2 is the type of position of the shorting bar (upper or lower), and there are 3 correct wiring methods.

[0089] For each current connection block, all possible wiring situations are as follows:

[0090]

[0091] The correct wiring methods are arranged according to the position of the shorting bar, and there are the following situations:

[0092] (1) Refer to Figure 4 , Figure 4 which is an example diagram when all the current connection blocks in the embodiments of the present invention are in the open state. When both shorting bars S2 and S3 are open, the wiring positions in the upper and lower areas must be located on the terminals in the same column. For example, when connecting t4 and d2 at the same time, or connecting t5 and d3 at the same time, or connecting t6 and d4 at the same time, the correct wiring methods are:

[0093]

[0094] (2) Refer to Figure 5 , Figure 5 which is an example diagram when all the current connection blocks in the embodiments of the present invention are in the closed state. When both shorting bars S2 and S3 are closed, the wiring positions in the upper and lower areas must be located on the terminals in the same column, and the wiring positions in the upper and lower areas can only be connected to the positions of t1d1 and t3d3, with a total of 1 situation.

[0095] (3) can be referred to Figure 6a and Figure 6b , Figure 6a and Figure 6b Figure of an example where only one current connection block of the embodiment of the present invention is in the off state. When the shorting piece is located at the position of Figure 6a , t1d1 must be connected. When connecting to d2 or d3, t2 or t3 can be selected above. Therefore, there are 5 correct wiring situations. Similarly, when the shorting piece is located at the position of Figure 6b , the correct wiring situations are also 5.

[0096] In summary, for each current connection block, the correct wiring situations are:

[0097] 3 + 1 + 5 + 5 = 14 kinds

[0098] When performing data annotation, if the combined junction box is not partitioned and the entire combined junction box is regarded as a whole, then all possible situations are:

[0099] 6 4 × 36 3 = 60466176 kinds

[0100] Among them, the correct situations are:

[0101] 3 4 × 14 3 = 222264 kinds

[0102] In this case, it is difficult to traverse and the annotation efficiency is low.

[0103] In the embodiment of the present invention, it is observed that the wiring determination rules of each current area of the combined junction box are the same, and the voltage area is also the same, only the colors are different. Therefore, the combined junction box can be partitioned by color and function, and a combined junction box is regarded as 7 parts and annotated separately. Then the possible wiring situations at this time become:

[0104] 6 × 4 + 36 × 3 = 132 kinds

[0105] All correct wiring situations are:

[0106] 3 × 4 + 14 × 3 = 54 kinds

[0107] Furthermore, if the junction box is grayscale processed to reduce the influence of color, at this time, it only needs to be divided into two categories: current wiring and voltage wiring. Then all possible wiring situations are:

[0108] 6 + 36 = 42 kinds

[0109] All correct situations are:

[0110] 3 + 14 = 17 kinds

[0111] Thus, the data annotation situation is greatly simplified, and the power consumption inspection problem of the combined junction box can be modeled as a classification problem with 42 categories.

[0112] In the embodiment of the present invention, 17 standard wiring images of correct wiring can be obtained and analyzed with the sub-wiring images to determine whether the sub-wiring images are correctly wired.

[0113] Step230. Construct target image data based on the annotation results of each sub-wiring image.

[0114] After obtaining the annotation results of each sub-wiring image, model training can be performed according to all the sub-wiring images with annotation results.

[0115] In an embodiment of the present invention, in step 140, the preset initial model is trained using the target image data to obtain a wiring inspection model, specifically including: training the preset initial model using the target image data based on the contrast learning method to obtain a wiring inspection model.

[0116] During the process of collecting wiring images, there are more images of correct wiring and fewer images of incorrect wiring actually collected. As a result, during the model training process, there will be a situation where there are more positive examples and fewer negative examples. Therefore, in order to avoid the impact of this situation on the accuracy of the detection results, in the embodiment of the present invention, a one-class learning method based on contrast learning is used for model training during the training process to widen the distance between positive examples and negative examples, making the model training effect better and thus improving the accuracy of model classification.

[0117] In an embodiment of the present invention, the wiring inspection model can be deployed to a mobile terminal. Before deployment, pruning and quantization operations need to be performed on the wiring inspection model to obtain a target wiring inspection model for deploying the target wiring inspection model to the mobile terminal. The pruned and quantized target wiring inspection model can adapt to the computing power of the mobile terminal.

[0118] Based on this, in step 160, the wiring picture to be detected is input into the wiring inspection model to obtain the wiring result output by the wiring inspection model, specifically including:

[0119] Step610. Obtain the wiring picture to be detected based on the mobile terminal.

[0120] Specifically, a reference line is set in the mobile terminal, and reference can be made to Figure 7 , Figure 7This is an example diagram of the shooting reference line for the mobile device in the embodiment of the present invention. The shooting function of the mobile device can be used to obtain the wiring picture to be detected. When shooting, a more standard wiring picture can be obtained according to the reference line, and the reference line is used to calibrate the picture partition when obtaining the wiring picture to be detected.

[0121] Step620: Use the target wiring inspection model to perform wiring detection on the wiring picture to be detected and generate a wiring result.

[0122] Specifically, after obtaining the wiring picture to be detected, input it into the target wiring inspection model for wiring detection to determine whether the wiring in the wiring picture to be detected is correct. If the wiring is incorrect, an error area indication is generated.

[0123] In an embodiment of the present invention, a result display image can be generated based on the wiring result and the reference line. The result display image includes the wiring result of whether each sub-wiring area is correctly wired. Figure 8 , Figure 8 This is an example diagram of the inspection result display in the embodiment of the present invention. By displaying the wiring result, it is provided to the staff for timely inspection and correction.

[0124] In the embodiment of the present invention, a wiring box wiring inspection device based on image classification is also proposed. Refer to Figure 9 , Figure 9 This is the structural block diagram of the wiring box wiring inspection device based on image classification in the embodiment of the present invention. The device includes: a data acquisition unit 901, a model training unit 902, and a wiring detection unit 903.

[0125] The data acquisition unit 901 is used to collect image data including different wiring states of the combined wiring box, and label the image data to generate target image data including the labeling result.

[0126] The model training unit 902 is used to train a preset initial model using the target image data to obtain a wiring inspection model.

[0127] The wiring detection unit 903 is used to input the wiring picture to be detected into the wiring inspection model to obtain the wiring result output by the wiring inspection model. The wiring result is that the wiring in the wiring picture to be detected is correct or the wiring in the wiring picture to be detected is incorrect.

[0128] The wiring box wiring inspection device based on image classification proposed by the present invention performs model training by obtaining image data of the combined wiring box in different wiring states to generate a wiring inspection model, so that the wiring picture to be detected is input into the wiring inspection model to generate a wiring result, realizing a more efficient wiring state detection and greatly improving the power consumption inspection efficiency.

[0129] Figure 10The internal structure diagram of a computer device in an embodiment of the present invention is shown. The computer device may specifically be a terminal or a system. As Figure 10 shown, the computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement each step in the above method embodiment. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can execute each step in the above method embodiment. Those skilled in the art can understand that Figure 10 the structure shown in

[0130] is only a block diagram of some structures 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 some components, or have different component arrangements.

[0131] In an embodiment, a computer device is proposed, including a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor executes each step in the above method embodiment.

[0132] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0133] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, 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, it should be considered as the scope described in this specification.

[0134] The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.

Claims

1. A wiring inspection method for a junction box based on image classification, characterized in that, The method includes: Collecting image data including different wiring states of a combined junction box, and annotating the image data to generate target image data including annotation results; Training a preset initial model using the target image data to obtain a wiring inspection model; Inputting a wiring picture to be detected into the wiring inspection model to obtain a wiring result output by the wiring inspection model, where the wiring result is that the wiring picture to be detected is correctly wired or the wiring picture to be detected is incorrectly wired.

2. The method according to claim 1, wherein The combined junction box is composed of several wiring blocks with different colors; Then, the annotating the image data to generate target image data including annotation results specifically includes: Partitioning the wiring blocks corresponding to each color in the target wiring image to generate several sub-wiring images, where the target wiring image is any wiring image in the image data; Annotating each sub-wiring image respectively to obtain annotation results of each sub-wiring image; Constituting the target image data based on the annotation results of each sub-wiring image.

3. The method according to claim 2, characterized in that, The partitioning the wiring blocks corresponding to each color in the target wiring image to generate several sub-wiring images specifically includes: Partitioning based on the wiring blocks corresponding to each color in the target wiring image to obtain initial wiring images corresponding to each color; Performing gray-scale processing on the initial wiring images to obtain initial wiring gray-scale images; Performing functional partitioning according to the initial wiring gray-scale images to obtain a voltage wiring image and a current wiring image, where both the voltage wiring image and the current wiring image are the sub-wiring images, and the voltage wiring image is the image corresponding to the voltage wiring area, and the current wiring image is the image corresponding to the current wiring area.

4. The method according to claim 3, wherein The respectively annotating each sub-wiring image to obtain annotation results of each sub-wiring image specifically includes: Obtaining standard wiring images of correct wiring in the voltage wiring area and the current wiring area; Comparing and analyzing the sub-wiring image and the standard wiring image to generate an annotation result of the sub-wiring image, where the annotation result is whether the sub-wiring image is correctly wired.

5. The method according to claim 1, characterized in that, The training the preset initial model using the target image data to obtain a wiring inspection model specifically includes: Training the preset initial model using the target image data based on a contrast learning method to obtain a wiring inspection model.

6. The method according to claim 1, wherein The method further includes: Performing pruning and quantization operations on the wiring inspection model to obtain a target wiring inspection model for deploying the target wiring inspection model to a mobile device; Then, the inputting the wiring picture to be detected into the wiring inspection model to obtain a wiring result output by the wiring inspection model specifically includes: Obtaining the wiring picture to be detected based on the mobile device; Performing wiring detection on the wiring picture to be detected using the target wiring inspection model to generate a wiring result.

7. The method according to claim 6, wherein The obtaining the wiring picture to be detected based on the mobile device specifically includes: Setting a reference line in the mobile device, where the reference line is used to calibrate the partition of the picture when obtaining the wiring picture to be detected. After using the target wiring inspection model to perform wiring inspection on the wiring picture to be detected and generating a wiring result, the following steps are further included: Generating a result display image based on the wiring result and the reference line, where the result display image includes the wiring result of whether each sub-wiring area is correctly wired.

8. A wiring inspection device for a junction box based on image classification, characterized in that, The device includes: a data acquisition unit, a model training unit, and a wiring inspection unit; The data acquisition unit is configured to acquire image data of different wiring states including a combined wiring box, and annotate the image data to generate target image data including an annotation result; The model training unit is configured to train a preset initial model using the target image data to obtain a wiring inspection model; The wiring inspection unit is configured to input the wiring picture to be detected into the wiring inspection model to obtain a wiring result output by the wiring inspection model, where the wiring result is that the wiring picture to be detected is correctly wired or the wiring picture to be detected is incorrectly wired.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, the processor is caused to execute the steps of the method according to any one of claims 1 to 7.

10. A computer device, comprising a memory and a processor, characterized in that, The memory stores a computer program, and when the computer program is executed by the processor, the processor is caused to execute the steps of the method according to any one of claims 1 to 7.