An automated sorting method for returned energy meters based on a production line

By establishing a basic feature library and machine learning model, efficient and automated sorting of returned energy meters has been achieved, solving the problem of low efficiency in traditional sorting methods, improving classification accuracy and automation, and supporting efficient resource management of energy meters.

CN119426215BActive Publication Date: 2025-10-28GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411851027.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-10-28
Estimated Expiration
2044-12-16

AI Technical Summary

Technical Problem

Traditional manual sorting and return of electricity meters is inefficient and prone to errors. Existing image recognition technology is insufficient in terms of adaptability and maintenance costs, making it difficult to meet the needs of efficient automated sorting.

Method used

A basic feature library is established. Through PCA dimensionality reduction and random forest model, combined with convolutional neural network, multi-angle image acquisition and segmentation are performed to extract representative features and construct a classification model to achieve accurate classification of decommissioned energy meters.

Benefits of technology

It improves the granularity and accuracy of electricity meter classification, enhances classification efficiency and automation, provides clear process allocation, and supports the efficient utilization of electricity meter resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119426215B_ABST
    Figure CN119426215B_ABST
Patent Text Reader

Abstract

This invention discloses an automated sorting method for returned energy meters based on a production line, belonging to the technical field of automated sorting of returned energy meters. The method includes: establishing a basic feature library, which includes product images, attribute features, and damage types of the returned energy meters; determining representative features from the attribute features, identifying representative features and feature value ranges corresponding to each damage type; acquiring a first image of the returned energy meter; preprocessing the first image to obtain a second image; extracting the actual external features of the returned energy meter based on a recognition model; extracting actual representative features from the actual external features and detected actual electrical features; classifying the returned energy meters into corresponding damage types based on the actual representative features using a classification model; and sorting the returned energy meters to the corresponding recycling line based on the damage type. This invention can significantly improve the efficiency and effectiveness of automated sorting of returned energy meters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of automatic sorting technology for returned energy meters, specifically relating to an automated sorting method for returned energy meters based on a production line. Background Technology

[0002] Returned electricity meters refer to electricity meters that have been recycled from users due to malfunctions, replacements, or the expiration of their service life. With the widespread use of electricity meters, the number of returned meters is increasing year by year, and their status typically includes various categories, such as repairable, scrapped, or requiring upgrades. These meters need to be sorted before entering the repair, reuse, or scrapping process. However, traditional manual sorting methods are inefficient and prone to errors due to human factors, making them unsuitable for large-scale processing needs.

[0003] In recent years, image recognition technology has been increasingly used in the visual identification of decommissioned energy meters. Deep learning-based image recognition algorithms can quickly identify the appearance features of energy meters, such as the integrity of the casing, the status of the display panel, and model identification. For example, Chinese patent document CN104700425A discloses an outdoor energy meter damage detection platform. This method uses a high-definition camera to capture images of the energy meter, processes these images to extract the meter frame image, and stores a reference energy meter frame pattern in the memory. Based on the matching results between the reference energy meter frame pattern and the meter frame image, the degree of damage to the energy meter is determined. For example, document CN114202523A discloses a device, method, equipment, and medium for inspecting the appearance quality of a dismantled electricity meter. This method uses a camera to capture images of the dismantled electricity meter, preprocesses the images, performs image dilation on the preprocessed images to obtain a denoised electricity meter image, compares the denoised electricity meter image with a standard electricity meter image to obtain the number of pixels in the denoised electricity meter image that are inconsistent with the standard electricity meter image, determines whether the appearance of the dismantled electricity meter is qualified based on the number of pixels, and outputs the appearance quality inspection result of the dismantled electricity meter.

[0004] Pixel color recognition technology typically relies on manually set thresholds or simple rule-based algorithms, lacking intelligent learning and optimization capabilities. When the appearance of the electricity meter changes or new types of meters appear, manual parameter adjustments are required, resulting in poor system adaptability and high maintenance costs. Therefore, this method is gradually revealing its limitations under the current requirements of efficient and automated sorting, necessitating improvement and upgrades through more advanced image recognition technology. Summary of the Invention

[0005] To address the aforementioned problems, this invention provides an automated sorting method for returned energy meters based on a production line, thereby resolving the issues in the prior art.

[0006] To achieve the aforementioned objectives, this invention proposes an automated sorting method for returned energy meters based on a production line, comprising:

[0007] A basic feature library is established, which includes product images of decommissioned energy meters and various categories of attribute features, including appearance features and electrical features. Each product image is marked with the damage type of the decommissioned energy meter.

[0008] A recognition model is established based on the basic feature library. Representative features are determined from the attribute features. The representative features and feature value ranges corresponding to each type of damage are determined by combining the basic feature library and the representative features. A classification model is established based on the feature value ranges.

[0009] First images of newly received and returned energy meters are captured from multiple preset angles, and second images are obtained by preprocessing the first images.

[0010] Based on the recognition model, the second image is segmented into multiple recognition areas. Based on the recognition areas, the actual external features of the decommissioned energy meter are extracted. From the actual external features and the actual electrical features obtained by detection, the actual representative features are extracted.

[0011] The classification model categorizes returned energy meters into their corresponding damage types based on actual representative characteristics, and sorts the returned energy meters to their corresponding recycling lines based on the damage types.

[0012] Further, determining representative features among the attribute features includes the following steps:

[0013] A dimensionality reduction matrix is ​​constructed based on the PCA dimensionality reduction algorithm and the attribute features, and the attribute features are converted into representative features based on the dimensionality reduction matrix.

[0014] Further, determining the range of eigenvalues ​​representing the characteristic includes the following steps:

[0015] The product images in the basic feature library are divided into training groups and validation groups. The maximum and minimum values ​​of the representative features of the same category in the training group are located, and the range between the maximum and minimum values ​​is set as the candidate range of the representative features.

[0016] The candidate range is discretized into a predetermined number of range intervals. The frequency of occurrence of product images of different damage types in the training group within each range interval is counted. Based on the frequency of occurrence, a first association probability is calculated for each range interval corresponding to each damage type. The first association probability with the largest value is defined as the second association probability.

[0017] Based on the second association probability, classify the damage type of the product image in the verification group and calculate the classification accuracy. If the classification accuracy is less than the second threshold, adjust the predetermined number of the range intervals and recalculate the second association probability. Repeat this step until the classification accuracy is greater than or equal to the second threshold. In each representative feature, determine the range interval where the maximum second association probability occurs as the feature value range corresponding to the damage type.

[0018] Further, classifying the damage type of the product image based on the second association probability includes the following steps:

[0019] Obtain the feature value of the representative feature of the product image in the verification group, determine the candidate range in which the feature value is located, determine the damage type corresponding to each representative feature according to the second association probability of the candidate range, and select the damage type that appears most frequently as the damage type of the product image based on the voting method.

[0020] Furthermore, establishing the classification model based on the feature value range includes the following steps:

[0021] The classification model is a random forest model. The feature value range representing the feature is used as the splitting feature of the decision tree of the classification model. The model parameters in the classification model are set, and the basic feature library is divided into multiple subsets by bootstrapping. The decision tree is constructed based on the subsets. During the construction process, information gain, information gain ratio and Gini coefficient are used as constraints, and the classification model is evaluated by confusion matrix.

[0022] Furthermore, the identification model extracts the actual external features of the decommissioned energy meter through the following steps:

[0023] The recognition model includes a first model and multiple second models. The first model segments the second image into multiple recognition regions. Each second model has a convolutional layer and a fully connected layer. The fully connected layer of each second model has a first output neuron and multiple second output neurons. The output of the first output neuron represents that the decommissioned energy meter does not have external features that represent damage. The output of the second output neuron represents the external features of the decommissioned energy meter related to damage.

[0024] Each of the recognition regions is recognized using the corresponding second model, and the recognition results generated by each second model are obtained. The recognition results are then fused to generate the actual appearance features for the recognition region.

[0025] Furthermore, fusing the recognition results includes the following steps:

[0026] If the recognition results of multiple second models are not mutually exclusive, all recognition results are output as actual appearance features. If the recognition results are mutually exclusive, the recognition results with fewer mutually exclusive results are deleted according to the size of each recognition result, and the remaining recognition results are output as actual appearance features.

[0027] Furthermore, segmenting the second image into multiple recognition regions includes the following steps:

[0028] Extract the pixel values ​​of all pixels in the second image, construct a color histogram based on the pixel values, determine the number of clusters based on the color histogram, cluster the pixel values ​​based on the number of clusters and the clustering algorithm, obtain the clustering results, assign a color cluster label to each pixel based on the clustering results, group pixels with the same color cluster label into a recognition region, smooth the boundary of the recognition region based on the morphological algorithm, and apply a region growing algorithm to connect the recognition regions of the same type.

[0029] Furthermore, the recovery lines include mild, moderate, and severe.

[0030] Furthermore, the preprocessing includes noise reduction and contrast enhancement.

[0031] Compared with the prior art, the beneficial effects of the present invention are at least as follows:

[0032] This invention constructs a comprehensive basic feature library by acquiring electricity meter images from multiple angles. Then, it efficiently analyzes the external and electrical features of the electricity meters, achieving multi-modal feature fusion. Before building the classification model, representative features are extracted, and the relationship between these features, their values, and various damage types is determined, optimizing the basic feature library. This improves training speed and reduces memory consumption during the subsequent classification model construction. In the new electricity meter detection stage, image segmentation and other techniques are used to accurately divide the recognition area, and then each recognition area is identified individually, further improving the accuracy of image recognition.

[0033] Compared to traditional classification methods that rely solely on pixels or single features, this invention not only covers various types of damage to electricity meters, such as casing damage, terminal damage, current transformer damage, and display screen damage, but also distinguishes the degree of damage, greatly improving the granularity of classification. Furthermore, by introducing data-driven statistical analysis and machine learning models, this invention significantly outperforms manual inspection or traditional algorithmic classification methods in terms of classification efficiency, accuracy, and automation. By efficiently allocating decommissioned electricity meters to minor, moderate, or severe damage lines, it provides a clear workflow for subsequent repair, dismantling, and resource recycling, contributing to the efficient utilization of electricity meter resources. Attached Figure Description

[0034] Figure 1 This is a flowchart illustrating the steps of the automated sorting method for returned energy meters based on a production line according to the present invention. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0036] It is understood that the terms "first," "second," etc., used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are used only to distinguish one element from another. For example, without departing from the scope of this application, a first script may be referred to as a second script, and similarly, a second script may be referred to as a first script.

[0037] like Figure 1 As shown, an automated sorting method for returned energy meters based on a production line includes:

[0038] S1: Establish a basic feature library, which includes product images of decommissioned energy meters and various categories of attribute features, including appearance features and electrical features. Each product image is marked with the damage type of the decommissioned energy meter.

[0039] Specifically, the basic feature database includes pre-collected product images of decommissioned energy meters from various angles and their corresponding damage types. Product images include front, back, side, and top views. Damage types include, for example, casing damage, terminal damage, current transformer damage, and display screen damage. Casing damage is further categorized as minor, moderate, and severe, and the outlines of the damaged areas are marked on the product images. Notably, this invention also includes images of undamaged decommissioned energy meters in the basic database. Different damage types correspond to different performance characteristics, i.e., attribute characteristics, such as casing length, width, and crack length. When the length and width are small, or when cracks are present, casing damage can be identified. Electrical characteristics include, for example, measurement errors that are too high or too low, and discrepancies between displayed power or electricity consumption and actual electricity consumption. Finally, the product images and their corresponding external characteristics, electrical characteristics, and damage type tags are stored in the database to form the basic feature database.

[0040] S2: Establish an identification model based on the basic feature library, determine representative features from attribute features, combine the basic feature library and representative features to determine the representative features and feature value range corresponding to each damage type, and establish a classification model based on the feature value range.

[0041] First, the images in the basic feature library are uniformly resized and normalized to ensure consistency in model training. Then, data augmentation techniques, such as flipping, scaling, and rotation, are used to expand the dataset and improve the generalization ability of the subsequent recognition model. In this embodiment, the recognition model includes an improved CNN convolutional neural network model, trained based on product images from the basic feature library. For representative features, statistical analysis can be used to obtain features that are representative and have practical physical meaning, or machine learning methods can be used to obtain abstract features representing overall feature information. Then, comprehensive statistical analysis determines which representative features are associated with damage types and their corresponding feature value ranges. For example, severe damage to the outer shell corresponds to crack length (feature value range 2-10 mm) and burn area (feature value range 5-15 cm²). Finally, a classification model based on the random forest algorithm is established based on the representative features and feature value ranges. In other embodiments, a classification model can also be established based on the SVM algorithm.

[0042] S3: Acquire first images of newly received and returned energy meters from multiple preset angles, and preprocess the first images to obtain second images.

[0043] The preprocessing includes noise reduction and contrast enhancement.

[0044] S4: Based on the recognition model, the second image is segmented into multiple recognition areas. Based on the recognition areas, the actual external features of the decommissioned energy meter are extracted. The actual representative features are extracted from the actual external features and the actual electrical features obtained by detection.

[0045] The preset angle is consistent with the acquisition direction of the basic feature library images to ensure the consistency and accuracy of the classification model. Gaussian filtering and histogram equalization are used to process the first image to remove noise interference and increase contrast. Additionally, Canny edge detection can be introduced to extract key surface features, and the extracted features are used for segmentation to obtain multiple recognition areas, such as terminal areas, display screen areas, and casing areas. This embodiment uses histograms for image region segmentation, which will be described in detail later. Each recognition area is then individually identified to obtain actual surface features, such as cracks, burn marks, and stains, with cracks being a specific feature. For actual electrical features, standard testing equipment is used to detect electrical parameters such as voltage, current, and power factor of the electricity meter.

[0046] Finally, based on the previously determined representative features, actual representative features are selected from the actual appearance features and electrical features, or the actual appearance features and electrical features are compressed and converted to obtain actual representative features.

[0047] S5: The classification model categorizes returned energy meters into their corresponding damage types based on actual representative characteristics, and sorts them to the corresponding recycling lines based on the damage type.

[0048] In this embodiment, the recovery lines include mild, moderate, and severe.

[0049] The trained classification model is used to classify the actual representative features to determine the damage type of the returned energy meters. Based on the classification results, the returned energy meters are sorted to the corresponding recycling line. Each recycling line corresponds to one or more damage types. For example, the minor damage line includes energy meters with small cracks and minor stains; the moderate damage line includes energy meters with larger burn areas but that can be repaired; and the severe damage line includes energy meters that cannot be repaired, which then proceed to the dismantling or recycling stage. Through the above implementation method, this invention can efficiently and accurately classify and sort returned energy meters. For example, if an image of the front of an energy meter is input, and the extracted crack length is 8mm, located at the edge of the display screen, the classification model outputs the damage type as "casing crack," and the meter is sorted to the "minor damage line."

[0050] This invention constructs a comprehensive basic feature library from multi-angle acquired images of electricity meters, and performs normalization and data augmentation on these images, significantly improving the model's generalization ability. Subsequently, based on an improved convolutional neural network (CNN) and random forest classification model, the external and electrical features of the electricity meters are efficiently analyzed, achieving multi-modal feature fusion. Before building the classification model, representative features are extracted, and the relationship between these features, their values, and various damage types is determined, optimizing the basic feature library. This improves training speed and reduces memory consumption during the subsequent classification model construction. In the new electricity meter detection stage, Canny edge detection and histogram segmentation techniques are used to accurately divide the recognition region. Each recognition region is then identified individually, further improving the accuracy of image recognition.

[0051] Compared to traditional classification methods that rely solely on pixels or single features, this invention not only covers various types of damage to electricity meters, such as casing damage, terminal damage, current transformer damage, and display screen damage, but also distinguishes the degree of damage (e.g., moderate to severe), significantly improving the granularity of classification. Furthermore, by introducing data-driven statistical analysis and machine learning models, it outperforms manual inspection or traditional algorithmic classification methods in terms of classification efficiency, accuracy, and automation. By efficiently allocating returned electricity meters to minor, moderate, or severe damage lines, it provides a clear workflow for subsequent repair, dismantling, and resource recycling, contributing to the efficient utilization of electricity meter resources.

[0052] Of particular note is that this invention can greatly improve the efficiency and effectiveness of automatic sorting of returned energy meters.

[0053] This embodiment determines representative features from attribute features by including the following steps:

[0054] A dimensionality reduction matrix is ​​constructed based on the PCA dimensionality reduction algorithm and attribute features, and the attribute features are then transformed into representative features based on the dimensionality reduction matrix.

[0055] After obtaining the attribute features, the attribute features and corresponding damage types of each product image are transformed into an attribute matrix. The attribute matrix is ​​then standardized so that the mean of each feature is 0 and the standard deviation is 1. The covariance matrix of the standardized feature data is then calculated, and eigenvalues ​​and corresponding eigenvectors are obtained from the covariance matrix. The magnitude of the eigenvalues ​​reflects the contribution rate of each principal component to the overall variance of the original data. The eigenvalues ​​are arranged in descending order, and the cumulative contribution rate of each principal component is calculated. This invention sets the first threshold to 95%, that is, the eigenvectors corresponding to the principal components with a cumulative contribution rate greater than 95% are selected as the column vectors of the dimensionality reduction matrix. For example, selecting the first 5 principal components represents reducing the original data to 5 dimensions. Multiplying the attribute matrix by the dimensionality reduction matrix yields the representative feature matrix. Each eigenvalue in the representative feature matrix represents the comprehensive value of the original attribute features and does not have specific physical meaning. Upon receiving new decommissioned energy meter data, multiplying the decommissioned energy meter data by the previously calculated dimensionality reduction matrix based on the basic feature library yields the actual representative features. In particular, the principal components can be restored using the inverse transformation method to determine which attribute features have a greater impact on the judgment result of damage type, so as to screen out representative features. This is a prior art technique and will not be elaborated here.

[0056] This embodiment determines the feature value range of representative features through the following steps:

[0057] The product images in the basic feature library are divided into training and validation groups. The maximum and minimum values ​​of the corresponding feature values ​​of the same category in the training group are located, and the range between the maximum and minimum values ​​is set as the candidate range of the representative feature.

[0058] The candidate range is discretized into a predetermined number of range intervals. The frequency of occurrence of product images of different damage types in the training group within each range interval is counted. Based on the frequency of occurrence, the first association probability of each range interval appearing in each damage type is calculated, and the first association probability with the largest value is defined as the second association probability.

[0059] Specifically, 70% of the product images are divided into a training group and 30% into a validation group. For each representative feature of each product image in the training group, the representative feature can be an actual feature, such as scratch length, or an abstract feature obtained after dimensionality reduction. If there are 100 product images, and the maximum value of the representative feature A is 10 and the minimum value is 1, then the range of values ​​from 1 to 10 is set as the candidate range for the representative feature A.

[0060] The candidate range is then evenly divided into multiple intervals according to a predetermined number (e.g., 10 intervals). For example, if the candidate range [1, 10] is divided into 10 intervals, then each interval has a width of 0.9, resulting in [1, 1.9], [1.9, 2.8], …, [9.1, 10]. After segmentation, each interval is assigned a unique identifier for subsequent statistics and analysis; for example, 1, 2, 3. For each interval, the number of images with different damage types is counted and recorded as the frequency of occurrence. For example, in an interval [1, 1.9], there are 100 images of crack type, 50 images of scratch type, and 30 images of deformation type; their frequencies of occurrence are 100, 50, and 30, respectively.

[0061] Then, the first association probability between the k-th representative feature and the n-th damage type within each range interval is calculated using the first formula, which is as follows: Where P is the first association probability and M is the total number of product images in the training group. Let be the frequency of occurrence of the nth damage type within k range intervals. For example, in a training set of 100 product images, for the first damage type, there are 30 product images whose representative feature A value falls within the range [1, 1.9]. Therefore, its first association probability is 30 / 100 = 0.3. For each range interval of representative feature A, the first association probability with the highest value is determined as the second association probability. For example, for representative feature A, within the range [1.9, 2.8], the first association probability of damage type 1 is the highest, at 80%. This means that when the value of representative feature A of a product image is within [1.9, 2.8], there is an 80% probability that it is damage type A.

[0062] Based on the damage type of the product image in the second association probability classification verification group, the classification accuracy is calculated. If the classification accuracy is less than the second threshold, the predetermined number of the divided range intervals is adjusted and the second association probability is recalculated. This step is repeated until the classification accuracy is greater than or equal to the second threshold. In each representative feature, the range interval in which the maximum second association probability occurs is determined as the feature value range of the corresponding damage type.

[0063] Specifically, classifying the damage type of product images based on association probability includes the following steps:

[0064] Obtain the feature values ​​of representative features of product images in the verification group, determine the candidate range in which the feature values ​​are located, determine the damage type corresponding to each representative feature based on the second association probability of the candidate range, and select the damage type that appears most frequently as the damage type of the product image based on the voting method.

[0065] After obtaining the second association probability for each representative feature, the product images in the validation set are classified. Specifically, the classification is performed as follows: Assume that for product image 1, there are representative features A, B, and C. Representative feature A is in candidate range 1, with a corresponding second association probability of 30%, corresponding to damage type 1. Representative feature B is in candidate range 3, with a corresponding second association probability of 50%, corresponding to damage type 2. Representative feature C is in candidate range 10, with a corresponding second association probability of 60%, corresponding to damage type 2. Since damage type 2 appears twice, it is set as the damage type of this product image.

[0066] Finally, the classification accuracy of the product images in the validation group is calculated. If the accuracy is less than the second threshold (e.g., 50%), the predetermined number of elements is adjusted to re-discrete the range interval. The predetermined number can be increased from 10 to 15 to improve the refinement of the interval. Then, the above method is repeated to recalculate the second association probability until the classification accuracy of the validation group reaches or exceeds the second threshold. Ultimately, the feature value range for each representative feature can be obtained. For example, if representative feature A has the highest second association probability within range interval 1, corresponding to damage type 1, then range interval 1 of the representative feature is set as the feature value range for damage type 1.

[0067] In this embodiment, establishing a classification model based on the feature value range includes the following steps:

[0068] The classification model is a random forest model. The feature value range representing the feature is used as the splitting feature of the decision tree of the classification model. The model parameters in the classification model are set, and the basic feature library is divided into multiple subsets by bootstrapping. The decision tree is built based on the subsets. During the construction process, information gain, information gain ratio and Gini coefficient are used as constraints, and the classification model is evaluated by confusion matrix.

[0069] After obtaining representative features and their value ranges, these features are labeled in the product image as training features to replace the original attribute features. For example, product image 1 shows minor damage to the outer shell, with the attribute feature being a crack length of 1cm. After replacement, the crack length becomes 0.8cm-1.1cm, or 0.02-0.05 (an abstract feature after PCA dimensionality reduction). This replacement can improve the training speed and accuracy of the random forest model. When building the random forest model, the model parameters are first specified. These parameters include the number of decision trees, the maximum depth of the decision trees, the minimum number of sample splits, and the minimum number of leaf node samples. When constructing each decision tree, multiple subsets are generated through sampling with replacement, i.e., bootstrap sampling. Each subset contains a portion of the data from the base database.

[0070] When constructing the decision tree, features that maximize the reduction of information gain entropy, the information gain ratio, and the Gini coefficient are selected for splitting to ensure the highest purity of each node in the decision tree. Finally, the classification performance of the classification model is evaluated using metrics such as precision and recall. The evaluation metrics are obtained through a confusion matrix, using existing techniques, which will not be described further here.

[0071] In this embodiment, the identification model extracts the actual external features of the decommissioned energy meter, including the following steps:

[0072] The recognition model includes a first model and multiple second models. The first model segments the second image into multiple recognition regions. Each second model has a convolutional layer and a fully connected layer. The fully connected layer of each second model has a first output neuron and multiple second output neurons. The output of the first output neuron represents that the decommissioned energy meter does not have external features that represent damage. The output of the second output neuron represents the external features of the decommissioned energy meter related to damage.

[0073] Each recognition region is recognized using a corresponding second model. The recognition results generated by each second model are obtained and then fused to generate the actual appearance features for the recognition region.

[0074] The process of fusing the recognition results includes the following steps:

[0075] If the recognition results of multiple second models are not mutually exclusive, all recognition results are output as actual appearance features. If the recognition results are mutually exclusive, based on the number of each recognition result, the recognition results with fewer mutually exclusive results are deleted, and the remaining recognition results are output as actual appearance features.

[0076] The recognition model in this embodiment is a cascaded model composed of multiple models of different categories. After newly returned energy meters arrive at the production line, images of them from different angles are captured. The first model uses techniques such as Canny edge detection and histogram segmentation to divide the recognition area, such as the display screen area, mounting hole area, and sealing cover area. Then, the second model is used to recognize these areas individually. The first model can be trained using all product images in the basic feature library. The second models are described below. Each second model has a different recognition function. For example, second model 1 is used to identify cracks and oil stains, and second model 2 is used to identify wear and oil stains. The fully connected layer of second model 1 has multiple output neurons. For example, when the first neuron is activated and outputs a result, it means that there are no damaged features in the image, and when the second neuron is activated and outputs a result, it means that there are cracks in the image. When the first neuron of second model 2 is activated and outputs a result, it means that there are no damaged features in the image, and when the second neuron is activated and outputs a result, it means that there are oil stains in the image. By using different second models for recognition, the robustness of the recognition results is improved.

[0077] Specifically, if the product image output by the second model 1 is undamaged, while the product image output by the second model 2 has oil stains, it indicates that the two are mutually exclusive. Currently, there are 4 second models. The other two second models both output recognition results indicating that the product image is undamaged, indicating that there are fewer recognition results representing oil stains than recognition results indicating that the undamaged image is undamaged. Therefore, they are deleted, and finally, the recognition result of the decommissioned energy meter being undamaged is output.

[0078] In this embodiment, segmenting the second image into multiple recognition regions includes the following steps:

[0079] Extract the pixel values ​​of all pixels in the second image, construct a color histogram based on the pixel values, determine the number of clusters based on the color histogram, cluster the pixel values ​​based on the number of clusters and the clustering algorithm, obtain the clustering results, assign a color cluster label to each pixel based on the clustering results, group pixels with the same color cluster label into a recognition region, smooth the boundaries of the recognition region based on the morphological algorithm, and apply the region growing algorithm to connect recognition regions of the same type.

[0080] The values ​​of each pixel in the second image across three channels (R, G, B) are extracted, and the frequency of color combinations in each channel is statistically analyzed. A histogram is plotted based on the frequency to determine the main color occurrence range, thereby determining the number of clusters. The number of peaks can be determined from the histogram to further determine the number of clusters. Then, the K-means clustering algorithm is used to cluster pixels based on their pixel values ​​as input features. Each pixel is assigned a color cluster based on the clustering results, for example, the main color clusters are white, gray, and black. In the second image, pixels with the same color cluster are grouped into the same recognition region, thus achieving preliminary segmentation of the recognition region, such as dividing the image into a display screen area and a black plastic shell area. To optimize the boundaries of the recognition regions, morphological operations (such as dilation and erosion) are applied to smooth the clustering results. Finally, a region growing algorithm is used to connect recognition regions of the same type, ensuring the integrity of the segmented regions. Specifically, the Flood Fill algorithm can be used, and growth conditions are set based on the differences in the color histogram.

[0081] It should be understood that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0082] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. An automated sorting method for returned energy meters based on a production line, characterized in that, include: A basic feature library is established, which includes product images of decommissioned energy meters and various categories of attribute features, including appearance features and electrical features. Each product image is marked with the damage type of the decommissioned energy meter. A recognition model is established based on the basic feature library. Representative features are determined from the attribute features. The representative features and feature value ranges corresponding to each type of damage are determined by combining the basic feature library and the representative features. A classification model is established based on the feature value ranges. The determination of the feature value range of representative features includes the following steps: dividing the product images in the basic feature library into training groups and validation groups; locating the maximum and minimum values ​​of the corresponding feature values ​​of the representative features of the same category in the training group; setting the range between the maximum and minimum values ​​as the candidate range of the representative features; discretizing the candidate range into a predetermined number of range intervals; statistically analyzing the frequency of occurrence of product images of different damage types in the training group within each range interval; calculating the first association probability of each range interval appearing in each damage type based on the frequency of occurrence; defining the first association probability with the largest value as the second association probability; classifying the damage type of the product images in the validation group based on the second association probability; calculating the classification accuracy; if the classification accuracy is less than a second threshold, adjusting the predetermined number of range intervals and recalculating the second association probability; repeating this step until the classification accuracy is greater than or equal to the second threshold; and determining the range interval with the largest second association probability in each representative feature as the feature value range corresponding to the damage type. The method of classifying the damage type of the product image based on the second association probability includes the following steps: obtaining the feature value of the representative feature of the product image in the verification group, determining the candidate range in which the feature value is located, determining the damage type corresponding to each representative feature according to the second association probability of the candidate range, and taking the damage type that appears most frequently as the damage type of the product image based on the voting method. The classification model established based on the feature value range includes the following steps: The classification model is a random forest model. The feature value range representing the feature is used as the splitting feature of the decision tree of the classification model. The model parameters in the classification model are set. The basic feature library is divided into multiple subsets by the bootstrap method. The decision tree is constructed based on the subsets. During the construction process, information gain, information gain ratio and Gini coefficient are used as constraints. The classification model is evaluated by confusion matrix. First images of newly received and returned energy meters are captured from multiple preset angles, and second images are obtained by preprocessing the first images. Based on the recognition model, the second image is segmented into multiple recognition regions. The actual external features of the decommissioned energy meter are extracted from these recognition regions. Actual representative features are extracted from the actual external features and the detected actual electrical features. The recognition model includes a first model and multiple second models. The first model segments the second image into multiple recognition regions. Each second model has a convolutional layer and a fully connected layer. Each fully connected layer of the second model has a first output neuron and multiple second output neurons. The output of the first output neuron represents that the decommissioned energy meter does not have external features representing damage, and the output of the second output neurons represents all relevant external features related to damage to the decommissioned energy meter. Each recognition region is recognized using a corresponding second model. The recognition results generated by each second model are obtained, and the recognition results are fused to generate actual external features for the recognition region. The classification model categorizes returned energy meters into their corresponding damage types based on actual representative characteristics, and sorts the returned energy meters to their corresponding recycling lines based on the damage types.

2. The method according to claim 1, characterized in that, Determining representative features from the attribute features includes the following steps: A dimensionality reduction matrix is ​​constructed based on the PCA dimensionality reduction algorithm and the attribute features, and the attribute features are converted into representative features based on the dimensionality reduction matrix.

3. The method according to claim 1, characterized in that, The fusion of the recognition results includes the following steps: If the recognition results of multiple second models are not mutually exclusive, all recognition results are output as actual appearance features. If the recognition results are mutually exclusive, the recognition results with fewer mutually exclusive results are deleted according to the size of each recognition result, and the remaining recognition results are output as actual appearance features.

4. The method according to claim 1, characterized in that, Segmenting the second image into multiple recognition regions includes the following steps: Extract the pixel values ​​of all pixels in the second image, construct a color histogram based on the pixel values, determine the number of clusters based on the color histogram, cluster the pixel values ​​based on the number of clusters and the clustering algorithm, obtain the clustering results, assign a color cluster label to each pixel based on the clustering results, group pixels with the same color cluster label into a recognition region, smooth the boundary of the recognition region based on the morphological algorithm, and apply a region growing algorithm to connect the recognition regions of the same type.

5. The method according to claim 1, characterized in that, The recovery lines include mild, moderate, and severe.

6. The method according to claim 1, characterized in that, The preprocessing includes noise reduction and contrast enhancement.

Citation Information

Patent Citations

  • Detecting platform for damaged degrees of outdoor electric energy meter

    CN104700425A

  • Device, method and equipment for detecting appearance quality of disassembled electric energy meter and medium

    CN114202523A

  • Method and device for detecting and sorting electric energy meter

    CN108311400A

  • Modular rapid electric energy meter sorting device and sorting method

    CN110687496A