A method and system for detecting defects in low-voltage switch housing based on visual inspection
Through a low-voltage switch housing defect detection method based on visual inspection, combined with image recognition and electrical and thermal performance parameters, the accuracy and environmental limitations of defect detection in the existing technology are solved, and the service life and safety of the low-voltage switch are improved.
Patent Information
- Application Number
- CN202410955112.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-07-17
AI Technical Summary
Existing low-voltage switch shell defect detection methods have problems such as missing small or hidden defects, high detection environment requirements, high equipment costs, difficulty in capturing complex defects, and inability to provide scientific guidance for post-processing of defect identification, resulting in low-voltage switches being easily damaged and having a short service life. .
Using a method based on visual inspection, the low-voltage switch housing image is collected, and the trained defect recognition model is used for image segmentation, feature extraction and identification. The degree of defects is evaluated based on the insulation resistance value, leakage current and housing temperature rise, and the reinforcement learning algorithm is used. Generate usage recommendations.
It improves the accuracy and service life of defect detection, reduces redundant feature interference, improves model detection accuracy, improves the use environment and parameter settings of low-voltage switches, and extends the service life.
Smart Images

Figure CN118505685B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of low-voltage switch defect detection, and in particular to a low-voltage switch housing defect detection method and system based on visual detection. Background Art
[0002] At present, there are several commonly used methods for detecting defects in low-voltage switch casings: one is visual inspection, which relies on inspectors to visually check whether the switch casing has cracks, scratches, deformation, corrosion or other visible physical damage; the second is non-destructive detection methods such as ultrasonic testing; the third is through X-ray or laser scanning three-dimensional imaging and other methods.
[0003] However, although visual inspection is simple and the most intuitive, it is easy to miss small or hidden defects. Ultrasonic testing has high requirements for the testing environment. It requires a clean and smooth surface to obtain accurate results, and it is difficult to detect defects whose direction is parallel to the propagation direction of ultrasonic waves. X-ray or laser scanning three-dimensional imaging usually has high equipment costs and it is difficult to capture details of complex defects. In addition, the current defect detection method only considers the identification of defect types, and cannot provide scientific guidance for post-processing operations of defect identification, which leads to the problem that low-voltage switches are easily damaged and have a short service life. Summary of the invention
[0004] In order to solve at least one of the technical problems mentioned above, the present invention provides a method and system for detecting defects in a low-voltage switch casing based on visual inspection.
[0005] In a first aspect, the present invention provides a method for detecting defects in a low-voltage switch housing based on visual inspection, the method comprising:
[0006] Collect the shell image of the low-voltage switch to be tested, input the shell image into the trained defect recognition model, and identify the shell defect type and the corresponding defect quantity;
[0007] Obtain the insulation resistance value, leakage current and shell temperature rise of the low-voltage switch to be tested, and evaluate the shell defect degree of the low-voltage switch to be tested according to the shell defect type, defect quantity, insulation resistance value, leakage current and shell temperature rise:
[0008] ;
[0009] In the formula, Indicates the degree of shell defects, Respectively represent weights, , , Respectively represent the insulation resistance value, leakage current, and shell temperature rise of the low-voltage switch to be tested; They represent the maximum and minimum insulation resistance values that are acceptable within the safe working range respectively; represents the safety threshold of leakage current, Indicates the maximum permissible value of the shell temperature rise; Indicates The number of defects of defect types, a total of Types of defects, For the The weight of each defect type;
[0010] The environmental data and equipment usage data of the low-voltage switch casing to be tested during its historical use are obtained, and a reinforcement learning algorithm is used to learn the environmental data, equipment usage data, and the evaluation results of the degree of casing defects to generate usage recommendations for the low-voltage switch to be tested.
[0011] Preferably, the step of inputting the shell image into a trained defect recognition model to identify the shell defect type and the corresponding defect quantity includes:
[0012] Perform image segmentation on the shell image, perform Gaussian filtering, image enhancement and brightness normalization on the segmented sub-images to obtain the target image;
[0013] Extract features of the target image, including extracting texture features, edge features and grayscale mean features of the target image, using the Kendall rank correlation coefficient to calculate the correlation between the features, eliminating features that do not meet the correlation conditions, and generating target features;
[0014] The target features are input into the defect recognition model for defect recognition to obtain the shell defect type and the corresponding defect quantity.
[0015] Preferably, the feature extraction of the target image includes:
[0016] The local binary method is used to extract the texture features of the target image, and the edge detection algorithm is used to extract the edge features of the target image.
[0017] Preferably, a CCD camera is used to collect multiple images of the housing of the low-voltage switch to be tested in different directions.
[0018] In a second aspect, the present invention further provides a low-voltage switch housing defect detection system based on visual detection, the system comprising:
[0019] An image acquisition unit is used to acquire a shell image of the low-voltage switch to be tested, input the shell image into a trained defect recognition model, and identify the shell defect type and the corresponding defect quantity;
[0020] The defect degree evaluation unit is used to obtain the insulation resistance value, leakage current and shell temperature rise of the low-voltage switch to be tested, and evaluate the shell defect degree of the low-voltage switch to be tested according to the shell defect type, defect quantity, insulation resistance value, leakage current and shell temperature rise:
[0021] ;
[0022] In the formula, Indicates the degree of shell defects, Respectively represent weights, , , Respectively represent the insulation resistance value, leakage current, and shell temperature rise of the low-voltage switch to be tested; They represent the maximum and minimum insulation resistance values that are acceptable within the safe working range respectively; represents the safety threshold of leakage current, Indicates the maximum permissible value of the shell temperature rise; Indicates The number of defects of defect types, a total of Types of defects, For the The weight of each defect type;
[0023] The reinforcement learning unit is used to obtain environmental data and equipment usage data during the historical use of the low-voltage switch casing to be tested, and adopts a reinforcement learning algorithm to learn the environmental data, equipment usage data, and the evaluation results of the degree of casing defects to generate usage recommendations for the low-voltage switch to be tested.
[0024] Preferably, the image acquisition unit is further used for:
[0025] Perform image segmentation on the shell image, perform Gaussian filtering, image enhancement and brightness normalization on the segmented sub-images to obtain the target image;
[0026] Extract features of the target image, including extracting texture features, edge features and grayscale mean features of the target image, using the Kendall rank correlation coefficient to calculate the correlation between the features, eliminating features that do not meet the correlation conditions, and generating target features;
[0027] The target features are input into the defect recognition model for defect recognition to obtain the shell defect type and the corresponding defect quantity.
[0028] Preferably, the image acquisition unit is further used for:
[0029] The local binary method is used to extract the texture features of the target image, and the edge detection algorithm is used to extract the edge features of the target image.
[0030] Preferably, the image acquisition unit is further used to use a CCD camera to acquire multiple images of the shell of the low-voltage switch to be tested in different directions.
[0031] In a third aspect, the present invention further provides an electronic device comprising: a processor and a memory, wherein the memory is used to store computer program code, wherein the computer program code comprises computer instructions, and when the processor executes the computer instructions, the electronic device executes the method as described in the first aspect above and any possible implementation thereof.
[0032] In a fourth aspect, the present invention further provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program includes program instructions, and when the program instructions are executed by a processor of an electronic device, the processor executes the method as described in the first aspect above and any possible implementation thereof.
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] 1) The present invention provides a method for detecting defects in the housing of a low-voltage switch based on visual inspection. The housing image of the low-voltage switch to be tested is collected, and the housing image is input into a trained defect recognition model to identify the housing defect type and the corresponding number of defects. When performing defect recognition, the image quality can be improved through image segmentation, Gaussian filtering, image enhancement and brightness normalization processing to improve the clarity of subsequent feature extraction. When extracting features, the texture features, edge features and grayscale mean features of the target image are extracted, and the correlation between the features is calculated using the Kendall rank correlation coefficient. The features that do not meet the correlation conditions are eliminated to generate target features. This can reduce redundant feature interference and improve the detection accuracy of the model defect type and quantity.
[0035] 2) The present invention obtains the insulation resistance value, leakage current and shell temperature rise of the low-voltage switch to be tested, and evaluates the shell defect degree of the low-voltage switch to be tested according to the shell defect type, defect quantity, insulation resistance value, leakage current and shell temperature rise. The defect situation detected by image is combined with the current electrical and thermal performance parameters of the low-voltage switch to be tested, which can greatly improve the accuracy of shell defect degree assessment.
[0036] 3) After evaluating the degree of defects in the low-voltage switch casing, the present invention will obtain the environmental data and equipment usage data during the historical use of the low-voltage switch casing to be tested, and use a reinforcement learning algorithm to learn the environmental data, equipment usage data, and the evaluation results of the degree of defects in the casing to generate usage recommendations for the low-voltage switch to be tested. In this way, the use environment and parameter settings of the low-voltage switch can be improved, thereby improving the safety of the low-voltage switch during use, thereby increasing the service life of the low-voltage switch.
[0037] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.
[0039] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.
[0040] Figure 1 A schematic flow chart of a method for detecting defects in a low-voltage switch housing based on visual inspection provided by an embodiment of the present invention;
[0041] Figure 2 A schematic structural diagram of a low-voltage switch casing defect detection system based on visual inspection provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0044] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0045] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0046] In addition, in order to better illustrate the present invention, numerous specific details are provided in the following specific embodiments. It should be understood by those skilled in the art that the present invention can be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present invention.
[0047] At present, there are still problems such as high cost, low accuracy, and limited detection environment in the detection method of low-voltage switch housing defects, and the results after detection cannot be effectively analyzed to improve the service life of the low-voltage switch. To this end, the present invention provides a low-voltage switch housing defect detection method based on visual detection, which can quickly and accurately identify defects through machine vision detection, refined feature extraction and model feature recognition, and evaluate the degree of defects based on the defect identification results combined with the electrical and thermal performance parameters of the low-voltage switch, so as to study the relationship between the equipment use environment, use parameters and the degree of defects through reinforcement learning, so as to provide reasonable and effective usage suggestions to improve the safety of the low-voltage switch during use, and ultimately extend the service life of the low-voltage switch.
[0048] See also Figure 1 , Figure 1 The present invention provides a flow chart of a method for detecting defects in a low-voltage switch housing based on visual inspection. Figure 1 As shown, the method comprises the following steps:
[0049] S100, collecting a shell image of the low-voltage switch to be tested, inputting the shell image into a trained defect recognition model, and identifying the shell defect type and the corresponding defect quantity.
[0050] In order to identify the shell defects of the low-voltage switch, this embodiment mainly adopts a defect recognition model, which collects the shell image of the low-voltage switch and then performs recognition after feature extraction.
[0051] In one embodiment, a CCD camera is used to capture multiple images of the housing of the low-voltage switch to be tested in different directions. When capturing, the low-voltage switch is first placed on a stable platform to ensure that it does not move during the image capture process. A clamp or fixture is used to keep the camera in a stable position to avoid image quality being affected by camera vibration. In terms of lighting settings, uniform and sufficient lighting is provided to reduce shadows and reflections to ensure image clarity and contrast. In addition, the housing image of the low-voltage switch needs to be captured from multiple angles to ensure that all visible surfaces are covered.
[0052] After the shell image is collected, a pre-trained defect recognition model is used to identify these defects. In one embodiment, the shell image is input into the trained defect recognition model to identify the shell defect type and the corresponding defect quantity, including:
[0053] 1) Perform image segmentation on the shell image, perform Gaussian filtering, image enhancement and brightness normalization on the segmented sub-images to obtain the target image.
[0054] In step 1), the goal of image segmentation is to divide the image into several regions with similar attributes, thereby separating the target region of interest. For the image of the low-voltage switch housing, image segmentation can focus on the housing itself and remove background interference. Specifically, this embodiment adopts a threshold segmentation method. After obtaining multiple sub-images, they can be processed in parallel when extracting features, thereby speeding up feature extraction.
[0055] Gaussian filtering is a linear smoothing filter used to remove image noise while preserving the integrity of image edges. Applying Gaussian filtering before image enhancement can reduce artifacts in subsequent processing. In this embodiment, a filter with a Gaussian kernel of 3x3 is preferably used to remove fine noise while preserving edges and details as much as possible.
[0056] Image enhancement aims to improve the quality of an image. In this embodiment, histogram equalization, contrast stretching, and sharpening are specifically used for image enhancement. Histogram equalization mainly expands the dynamic range of the image and increases the contrast to make the image details clearer. Contrast stretching enhances the contrast of the image by adjusting the minimum and maximum grayscale values of the image. Sharpening makes the image look clearer by emphasizing edges and textures.
[0057] Finally, brightness normalization can eliminate brightness differences caused by uneven lighting, ensuring that all images have the same brightness level for easy comparison and analysis. In this embodiment, local normalization is used. For situations where there are local brightness changes, a normalization strategy within a local window can be used.
[0058] 2) Perform feature extraction on the target image, including extracting the texture features, edge features and grayscale mean features of the target image, using the Kendall rank correlation coefficient to calculate the correlation between the features, eliminating the features that do not meet the correlation conditions, and generating the target features.
[0059] Preferably, the feature extraction of the target image includes extracting texture features of the target image using a local binary method and extracting edge features of the target image using an edge detection algorithm.
[0060] After obtaining each feature, in order to avoid the influence of redundant features, correlation analysis is required. First, for each image, all the features extracted above are combined into a feature vector. The Kendall rank correlation coefficient is used to evaluate the rank correlation of two sets of data, and the symbol is For each pair of features, calculate the Kendall rank correlation coefficient between them. , The range is Between, if indicates a completely positive correlation. indicates a completely negative correlation. Indicates no correlation. Further, a threshold is set, for example, to 0.9. If this threshold is exceeded, the two features are considered to be highly correlated and one of them can be considered to be removed.
[0061] 3) Input the target features into the defect recognition model for defect recognition to obtain the shell defect type and the corresponding defect quantity.
[0062] When training the defect recognition model, it is first necessary to collect a large amount of annotated image data, which contains various types of shell defects. The data set should cover various possible defect types to ensure that the model can be generalized to unseen defect instances. For image defect recognition, common models include but are not limited to convolutional neural networks CNN, U-Net, YOLO or Faster R-CNN. In this embodiment, any model can be selected to train the defect recognition model. The construction of the model needs to define its hierarchical structure, including convolutional layers, pooling layers, fully connected layers, etc., and select loss functions and optimizers. Further, the collected data set is divided into a training set, a validation set and a test set. The model is trained using the training set, and the weights are adjusted by the back propagation algorithm to minimize the loss function. At the end of each epoch, the model performance is evaluated using the validation set to prevent overfitting. Hyperparameters such as learning rate, batch size, regularization terms, etc. may need to be adjusted during the training process. Finally, when the loss function can meet the training termination conditions, a defect recognition model is generated. When applied, only the target features need to be input into the defect recognition model for defect recognition, and the shell defect type and the corresponding number of defects can be obtained quickly and accurately.
[0063] S200, obtaining the insulation resistance value, leakage current and shell temperature rise of the low-voltage switch to be tested, and evaluating the shell defect degree of the low-voltage switch to be tested according to the shell defect type, defect quantity, insulation resistance value, leakage current and shell temperature rise:
[0064] ;
[0065] In the formula, Indicates the degree of shell defects, Respectively represent weights, , , Respectively represent the insulation resistance value, leakage current, and shell temperature rise of the low-voltage switch to be tested; They represent the maximum and minimum insulation resistance values that are acceptable within the safe working range respectively; represents the safety threshold of leakage current, Indicates the maximum permissible value of the shell temperature rise; Indicates The number of defects of defect types, a total of Types of defects, For the The weight of each defect type;
[0066] The insulation resistance value is a measure of the ability of an insulating material to resist the passage of electric current under an applied voltage. A lower insulation resistance value may indicate an aging problem of the insulating material, that is, a defect in the outer shell. Leakage current refers to a small current flowing through an insulator under normal operating conditions. If the leakage current exceeds the expected range, this may be caused by a defect in the insulating shell. Excessive shell temperature rise can directly reflect the degradation of the thermal performance of the shell material, such as increased heat conduction due to corrosion or cracks, which is also related to shell defects. Therefore, this embodiment uses the defect type and number identified by the image in the previous step, combined with parameters such as the insulation resistance value, leakage current and shell temperature rise here, to evaluate the degree of shell defects from multiple dimensions, thereby improving the accuracy of the defect degree assessment results.
[0067] S300, obtaining environmental data and equipment usage data during the historical use of the shell of the low-voltage switch to be tested, using a reinforcement learning algorithm to learn the environmental data, equipment usage data, and evaluation results of the degree of shell defects, and generating usage recommendations for the low-voltage switch to be tested.
[0068] Since the degree of shell defects is closely related to the use environment and usage of the low-voltage switch, when evaluating the degree of defects, the relationship between these parameters can be learned through a reinforcement learning algorithm to generate reasonable usage suggestions for the low-voltage switch in turn. Specifically, the implementation step S300 includes the following contents:
[0069] 1) Data collection and preprocessing:
[0070] First, it is necessary to collect various environmental conditions (such as temperature, humidity, pollution level) and operating conditions (such as load, opening and closing frequency, duration) that the low-voltage switch to be tested experiences during its service life. These data should cover the normal operation of the equipment as well as the situation when defects occur. The data preprocessing stage includes cleaning, missing value processing, normalization or standardization, etc., to facilitate the subsequent machine learning model training.
[0071] 2) Model construction:
[0072] Define the environment and agent:
[0073] In the reinforcement learning framework, the environment refers to the external system that the agent is in, in this case the low voltage switch and the environment it operates in. The agent is the subject that learns how to make decisions in the environment, taking actions based on observed states and receiving feedback (rewards or penalties).
[0074] State Space:
[0075] The state space consists of all possible environmental configurations, which, in the case of a low-voltage switch enclosure, may include enclosure temperature, ambient temperature and humidity, load conditions, switching frequency, defect type and severity.
[0076] Action Space:
[0077] Identify actions that the agent can take, such as adjusting loads to reduce stress, performing preventive maintenance, replacing specific parts, and monitoring and logging abnormal conditions;
[0078] Reward Function:
[0079] The reward function defines the criteria for the good or bad behavior of the agent. In the application scenario of low-voltage switch enclosures, the reward function includes reducing the probability of failure, extending the life of the equipment, and reducing maintenance costs.
[0080] Training process:
[0081] The agent collects experience through interaction with the environment, which is used to update its internal strategy. In the early stages of training, the agent may take actions randomly or based on simple heuristics. As training progresses, it will learn which actions are more likely to lead to high rewards in specific states. Among them, the Q-learning algorithm is used to control the interactive learning of the agent and the environment to provide the optimal strategy. Once the training is completed, the agent's strategy will be evaluated on the test set to ensure its generalization ability. If the results are satisfactory, the agent can be deployed in the actual low-voltage switch monitoring system to provide real-time equipment usage recommendations based on the degree of shell defects, such as under what ambient temperature and humidity is it best to use a low-voltage switch, or how to adjust the load to reduce stress in a specific environment, which preventive maintenance measures can best improve equipment reliability, and when to perform maintenance or replace parts is most cost-effective.
[0082] 3) Continuous adaptive learning and updating:
[0083] Reinforcement learning models should be retrained regularly using the latest equipment usage data to adapt to environmental changes and equipment aging. This ensures that the model's recommendations always match the actual conditions of the low-voltage switch, ultimately increasing the service life of the switch.
[0084] In summary, the low-voltage switch housing defect detection method based on visual inspection provided by the embodiment of the present invention can at least achieve the following effects:
[0085] 1) By collecting the shell image of the low-voltage switch to be tested, the shell image is input into the trained defect recognition model to identify the shell defect type and the corresponding defect quantity. When performing defect recognition, the image quality can be improved through image segmentation, Gaussian filtering, image enhancement and brightness normalization processing to improve the clarity of subsequent feature extraction. When extracting features, by extracting the texture features, edge features and grayscale mean features of the target image, the Kendall rank correlation coefficient is used to calculate the correlation between each feature, and the features that do not meet the correlation conditions are eliminated to generate target features. This can reduce redundant feature interference and improve the detection accuracy of the model defect type and quantity.
[0086] 2) By obtaining the insulation resistance value, leakage current and shell temperature rise of the low-voltage switch to be tested, the shell defect degree of the low-voltage switch to be tested is evaluated according to the shell defect type, defect quantity, insulation resistance value, leakage current and shell temperature rise. The accuracy of shell defect degree evaluation can be greatly improved by combining the defect situation detected by image with the current electrical and thermal performance parameters of the low-voltage switch to be tested.
[0087] 3) After evaluating the degree of defects in the low-voltage switch casing, the present invention will obtain the environmental data and equipment usage data during the historical use of the low-voltage switch casing to be tested, and use a reinforcement learning algorithm to learn the environmental data, equipment usage data, and the evaluation results of the degree of defects in the casing to generate usage recommendations for the low-voltage switch to be tested. In this way, the use environment and parameter settings of the low-voltage switch can be improved, thereby improving the safety of the low-voltage switch during use, thereby increasing the service life of the low-voltage switch.
[0088] See also Figure 2 In some embodiments, the present invention further provides a low-voltage switch housing defect detection system based on visual detection, the method comprising:
[0089] The image acquisition unit 100 is used to acquire the shell image of the low-voltage switch to be tested, input the shell image into the trained defect recognition model, and identify the shell defect type and the corresponding defect quantity;
[0090] The defect degree evaluation unit 200 is used to obtain the insulation resistance value, leakage current and shell temperature rise of the low-voltage switch to be tested, and evaluate the shell defect degree of the low-voltage switch to be tested according to the shell defect type, defect quantity, insulation resistance value, leakage current and shell temperature rise:
[0091] ;
[0092] In the formula, Indicates the degree of shell defects, Respectively represent weights, , , Respectively represent the insulation resistance value, leakage current, and shell temperature rise of the low-voltage switch to be tested; They represent the maximum and minimum insulation resistance values that are acceptable within the safe working range respectively; represents the safety threshold of leakage current, Indicates the maximum permissible value of the shell temperature rise; Indicates The number of defects of defect types, a total of Types of defects, For the The weight of each defect type;
[0093] The reinforcement learning unit 300 is used to obtain environmental data and equipment usage data during the historical use of the low-voltage switch shell to be tested, and use the reinforcement learning algorithm to learn the environmental data, equipment usage data, and the evaluation results of the shell defect degree to generate usage recommendations for the low-voltage switch to be tested.
[0094] In one embodiment, the image acquisition unit 100 is further configured to:
[0095] Perform image segmentation on the shell image, perform Gaussian filtering, image enhancement and brightness normalization on the segmented sub-images to obtain the target image;
[0096] Extract features of the target image, including extracting texture features, edge features and grayscale mean features of the target image, using the Kendall rank correlation coefficient to calculate the correlation between the features, eliminating features that do not meet the correlation conditions, and generating target features;
[0097] The target features are input into the defect recognition model for defect recognition to obtain the shell defect type and the corresponding defect quantity.
[0098] In one embodiment, the image acquisition unit 100 is further configured to:
[0099] The local binary method is used to extract the texture features of the target image, and the edge detection algorithm is used to extract the edge features of the target image.
[0100] In one embodiment, the image acquisition unit 100 is further configured to:
[0101] It is also used to collect multiple shell images of the low-voltage switch to be tested in different directions using a CCD camera.
[0102] It can be understood that the functions or modules included in the system provided in this embodiment can be used to execute the method described in the above method embodiment. Its specific implementation can refer to the description of the above method embodiment. For the sake of brevity, it will not be repeated here.
[0103] The present invention also provides an electronic device, comprising: a processor and a memory, wherein the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor executes the computer instructions, the electronic device executes a method as described in any possible implementation manner.
[0104] The present invention also provides a computer-readable storage medium, in which a computer program is stored. The computer program includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes a method as described in any possible implementation manner.
[0105] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0106] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. Those skilled in the art can also clearly understand that the descriptions of the various embodiments of the present invention have different focuses. For the convenience and brevity of description, the same or similar parts may not be repeated in different embodiments. Therefore, for parts not described or not described in detail in a certain embodiment, refer to the records of other embodiments.
[0107] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0108] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0109] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0110] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0111] A person skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned method embodiments. The aforementioned storage medium includes: a read-only memory (ROM) or a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
Claims
1. A method for detecting defects in low-voltage switch casing based on visual inspection, It is characterized in that The method comprises: Collect the shell image of the low-voltage switch to be tested, input the shell image into the trained defect recognition model, and identify the shell defect type and the corresponding defect quantity; Obtain the insulation resistance value, leakage current and shell temperature rise of the low-voltage switch to be tested, and evaluate the shell defect degree of the low-voltage switch to be tested according to the shell defect type, defect quantity, insulation resistance value, leakage current and shell temperature rise: ; In the formula, Indicates the degree of shell defects, Respectively represent weights, , , Respectively represent the insulation resistance value, leakage current, and shell temperature rise of the low-voltage switch to be tested; They represent the maximum and minimum insulation resistance values that are acceptable within the safe working range respectively; represents the safety threshold of leakage current, Indicates the maximum permissible value of the shell temperature rise; Indicates The number of defects of defect types, a total of Types of defects, For the The weight of each defect type; The environmental data and equipment usage data of the low-voltage switch casing to be tested during its historical use are obtained, and a reinforcement learning algorithm is used to learn the environmental data, equipment usage data, and the evaluation results of the degree of casing defects to generate usage recommendations for the low-voltage switch to be tested.
2. According to the method for detecting defects in a low-voltage switch housing based on visual inspection according to claim 1, It is characterized in that The step of inputting the shell image into the trained defect recognition model to identify the shell defect type and the corresponding defect quantity includes: Perform image segmentation on the shell image, perform Gaussian filtering, image enhancement and brightness normalization on the segmented sub-images to obtain the target image; Extract features of the target image, including extracting texture features, edge features and grayscale mean features of the target image, using the Kendall rank correlation coefficient to calculate the correlation between the features, eliminating features that do not meet the correlation conditions, and generating target features; The target features are input into the defect recognition model for defect recognition to obtain the shell defect type and the corresponding defect quantity.
3. The method for detecting defects in a low-voltage switch housing based on visual inspection according to claim 2, It is characterized in that The feature extraction of the target image comprises: The local binary method is used to extract the texture features of the target image, and the edge detection algorithm is used to extract the edge features of the target image.
4. The method for detecting defects in a low-voltage switch housing based on visual inspection according to claim 1, It is characterized in that A CCD camera is used to collect multiple shell images of the low-voltage switch to be tested in different directions.
5. A low voltage switch housing defect detection system based on visual inspection, It is characterized in that The system comprises: An image acquisition unit is used to acquire a shell image of the low-voltage switch to be tested, input the shell image into a trained defect recognition model, and identify the shell defect type and the corresponding defect quantity; The defect degree evaluation unit is used to obtain the insulation resistance value, leakage current and shell temperature rise of the low-voltage switch to be tested, and evaluate the shell defect degree of the low-voltage switch to be tested according to the shell defect type, defect quantity, insulation resistance value, leakage current and shell temperature rise: ; In the formula, Indicates the degree of shell defects, Respectively represent weights, , , Respectively represent the insulation resistance value, leakage current, and shell temperature rise of the low-voltage switch to be tested; They represent the maximum and minimum insulation resistance values that are acceptable within the safe working range respectively; represents the safety threshold of leakage current, Indicates the maximum permissible value of the shell temperature rise; Indicates The number of defects of defect types, a total of Types of defects, For the The weight of each defect type; The reinforcement learning unit is used to obtain environmental data and equipment usage data during the historical use of the low-voltage switch casing to be tested, and adopts a reinforcement learning algorithm to learn the environmental data, equipment usage data, and the evaluation results of the degree of casing defects to generate usage recommendations for the low-voltage switch to be tested.
6. The low-voltage switch housing defect detection system based on visual detection according to claim 5, It is characterized in that The image acquisition unit is further used for: Perform image segmentation on the shell image, perform Gaussian filtering, image enhancement and brightness normalization on the segmented sub-images to obtain the target image; Extract features of the target image, including extracting texture features, edge features and grayscale mean features of the target image, using the Kendall rank correlation coefficient to calculate the correlation between the features, eliminating features that do not meet the correlation conditions, and generating target features; The target features are input into the defect recognition model for defect recognition to obtain the shell defect type and the corresponding defect quantity.
7. The low-voltage switch housing defect detection system based on visual detection according to claim 6, It is characterized in that The image acquisition unit is further used for: The local binary method is used to extract the texture features of the target image, and the edge detection algorithm is used to extract the edge features of the target image.
8. The low-voltage switch housing defect detection system based on visual detection according to claim 5, It is characterized in that The image acquisition unit is also used to use a CCD camera to acquire multiple shell images of the low-voltage switch to be tested in different directions.
9. An electronic device, It is characterized in that include: A processor and a memory, wherein the memory is used to store computer program code, wherein the computer program code includes computer instructions, and when the processor executes the computer instructions, the electronic device executes the low-voltage switch housing defect detection method based on visual inspection as described in any one of claims 1 to 4.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes the low-voltage switch casing defect detection method based on visual inspection as described in any one of claims 1 to 4.
