Lead melting mark classification method and system based on shape features
Through the wire melt mark classification method based on shape characteristics, the shape characteristics of wire melt marks are extracted and analyzed using TransUnet and XGBoost models, and the problem of long time for wire melt mark recognition and easy to misjudgment in the prior art is solved, and efficient and accurate melt mark classification is achieved.
Patent Information
- Application Number
- CN202411912968.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-12-05
- Filing Date
- 2024-12-24
- Publication Date
- 2025-05-30
AI Technical Summary
The existing wire melt mark recognition methods are long and are prone to misjudgment and misjudgment.
Using the wire melt mark classification method based on shape characteristics, the melting region image is extracted through the TransUnet model, combined with the grain characteristics and melting region characteristics, and input into the XGBoost model for classification.
It significantly improves work efficiency, enhances scientificity and objectivity, realizes high-precision classification, and has an accuracy rate of 88%, reducing the work burden of technicians.
Smart Images

Figure CN120070932A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wire melt mark detection, and particularly to a method and system for classifying wire melt marks based on shape features. Background Art
[0002] According to the latest data revealed by the Emergency Management Department of the Chinese Fire and Rescue Department, electrical fires account for more than a quarter of all fires. Studying the causes of electrical fires helps prevent the occurrence of electrical fires, thereby reducing casualties and direct economic losses. The causes of electrical fires are complex and usually accompanied by phenomena such as wire melting and short circuits. Studying the melting properties of wires at the fire scene helps reconstruct the fire process and determine the cause of the fire.
[0003] In the technical identification standard for physical evidence of electrical fires GB / T 16840.1-2021, according to the source of heat during the melting of the melt mark and the chronological relationship between the formation time of the melt mark and the fire ignition time, the melting properties of the melt mark are divided into primary short-circuit melt marks, secondary short-circuit melt marks, and fire burn melt marks. Each type of melt mark has a clear probative effect on the determination of the fire cause. In the actual physical evidence identification process, the process of classifying the melting properties of wire melt marks into short-circuit melt marks and fire burn melt marks plays a key role in revealing the fire cause and restoring the fire scene.
[0004] There are various methods for identifying wire melt marks, covering multiple levels from macroscopic to microscopic and from physical to chemical. There are six main identification methods in total, including macroscopic identification method, microscopic identification method, metallographic analysis method, chemical composition analysis method, residual magnetism method, and simulation experiment method. In China, there are various methods for identifying wire melt marks, and each method has its unique advantages and scope of application. In actual applications, the macroscopic identification method and metallographic analysis method are usually used in combination to draw conclusions.
[0005] The macroscopic identification method refers to the direct judgment by the appraiser through observing the appearance of the wire melt mark. This method's criterion is too subjective, and the observation result cannot be quantified and lacks scientificity. Fire investigators often make wrong or missed judgments when initially judging suspected short-circuit melt marks based on personal experience.
[0006] The metallographic analysis method is a method of observing the metallographic microstructure of the melt mark to determine the type. However, the process of making the metallographic image of the melt mark is very complex: including processes such as selection, embedding, grinding, polishing, etching, and acquisition. The grinding and polishing process takes a long time, which reduces the classification speed of wire melt marks. Most of the existing discrimination methods require the participation of professionals and professional specific instruments, often resulting in a shortage of personnel and too long a survey time.
[0007] To solve the technical problems of the existing copper wire melt mark recognition method, which takes a long time and is prone to misjudgment and missed judgment, the Chinese invention patent with the application publication number CN112465002A discloses an intelligent recognition method and device for copper wire melt marks at the fire scene. This method collects the copper wire melt mark image at the fire scene and converts it into a pixel matrix, inputs it into a neural network model to obtain a two-dimensional confidence vector (including short-circuit and fire confidence), and determines the melt mark type accordingly. It does not require professional personnel or specific instruments, shortening the recognition time and ensuring accuracy. Although this patent has achieved a high image classification accuracy through deep learning, the interpretability of deep learning classification is poor, and it is impossible to know whether the model has learned the classification specifications stipulated by the industry. In addition, deep learning classification only has classification results without intermediate processes, which is not applicable to studying other characteristic properties of wire melt marks. Summary of the Invention
[0008] The present invention aims to solve the above problems. To this end, the present invention provides a wire melt mark classification method and system based on shape features, which collect images of wire melt marks, then use the TransUnet semantic segmentation model to segment the melted area image, extract multi-dimensional features from the melted area image, and finally use the multi-dimensional feature data as input to the XGBoost model to obtain the classification result. It simplifies the operation process, enhances scientificity and objectivity, and achieves high-precision classification, significantly improving work efficiency. It also opens up a new way for the classification research of wire melt marks, having important practical application value and theoretical significance.
[0009] The present invention provides a wire melt mark classification method based on shape features, and the technical solution adopted is as follows: including: Obtain the wire melt mark image; Extract the melted area from the wire melt mark image to obtain the melted area image; Perform image grayscale processing, homomorphic filtering processing, pixel binarization processing, and denoising processing on the melted area image in sequence to obtain the highlighted grain area image on the surface of the melt mark; Calculate the grain characteristics according to the highlighted grain area image on the surface of the melt mark; Calculate the melted area characteristics according to the melted area image; Input the grain characteristics and the melted area characteristics into the classification model to calculate the melt mark type.
[0010] Further, use the trained TransUnet model to extract the melted area from the wire melt mark image to obtain the melted area image.
[0011] Further, the training process of the trained TransUnet model is: The wire melt mark samples are subjected to etchant cleaning treatment, images are taken, and a preliminary data set is obtained; the images in the preliminary data set are labeled; All images are uniformly adjusted to 512x512 pixels. The specific operations are as follows: while ensuring the original ratio of the image, the long side of the image is scaled proportionally to 512 pixels; if the short side of the image is less than 512 pixels, it is filled with black, and the pixel values of the image are normalized from 0-255 to 0-1 to obtain the melt mark image data set; The TransUnet model is trained using the melt mark image data set to obtain a trained TransUnet model.
[0012] Furthermore, the Otsu algorithm is used for pixel binaryzation processing.
[0013] Furthermore, the denoising process includes median filtering and erosion processing.
[0014] Furthermore, the contour extraction algorithm is used to extract the contour coordinate set of the melting zone from the melting zone image, and the melting zone features are calculated.
[0015] Furthermore, the grain features include the number of grains, the average area of grains, the maximum area of grains, the minimum area of grains, the average perimeter of grains, the maximum perimeter of grains, the minimum perimeter of grains, the average roundness of grains, the maximum roundness of grains, the minimum roundness of grains, the average moment of grains, the maximum moment of grains, the minimum moment of grains, the average aspect ratio of the circumscribed rectangle of grains, the maximum aspect ratio of the circumscribed rectangle of grains, the minimum aspect ratio of the circumscribed rectangle of grains, the average long side of grains, the maximum long side of grains, and the minimum long side of grains; The melting zone features include the area of the melting zone, the perimeter of the melting zone, and the roundness of the melting zone.
[0016] Furthermore, the classification model is the XGBoost model.
[0017] Furthermore, the melt mark types include short-circuit melt marks and fire melt marks.
[0018] The present invention also provides a wire melt mark classification system based on shape features, and the technical solution adopted is as follows: including: an image acquisition unit, a feature calculation unit, and a melt mark type classification unit connected in sequence, The image acquisition unit is used to obtain wire melt mark images; The feature calculation unit is used to extract the melting zone from the wire melt mark image to obtain a melting zone image; Perform image grayscale processing, homomorphic filtering processing, pixel binarization processing, and denoising processing on the molten zone image in sequence to obtain the image of the highlighted grain region on the surface of the molten mark; calculate the grain characteristics according to the image of the highlighted grain region on the surface of the molten mark; Calculate the characteristics of the molten zone according to the molten zone image; The molten mark type classification unit is used to input the grain characteristics and the molten zone characteristics into a classification model and calculate the molten mark type.
[0019] One or more of the above technical solutions in the embodiments of the present invention have at least one of the following technical effects: 1. The present invention not only optimizes the work process, but also enhances the scientificity and practicability, and significantly improves the work efficiency. Compared with the traditional metallographic method, the present invention has achieved a major breakthrough in the early preparation. Traditional methods often require cumbersome sample preparation steps, including cutting, embedding, grinding, polishing, and corrosion, etc. These steps are not only time-consuming and laborious, but also involve high labor costs. The present invention greatly simplifies the operation process and shortens the analysis cycle by directly cleaning the molten mark and taking pictures to collect images. It not only reduces the work burden of technicians, but also significantly improves the efficiency of the entire analysis process, making rapid response and efficient processing possible.
[0020] 2. The present invention enhances the scientificity and objectivity of the classification of wire molten mark images. Through advanced algorithm technology, the present invention can extract key features from the images and quantify these features into specific physical quantities. This process not only avoids the subjectivity of human judgment, but also makes the feature analysis more accurate and repeatable. By analyzing a large number of samples, the internal relationship between the properties of wire molten marks and different features can be summarized, providing a solid theoretical basis for formulating scientific and reasonable classification quantification specifications. This not only improves the accuracy of classification, but also enhances the reliability and persuasiveness of the results.
[0021] 3. The present invention realizes high-precision classification and verifies the effectiveness of the method. The present invention uses machine learning algorithms to classify wire molten mark images, and its accuracy rate is as high as 88%. This data fully proves the effectiveness and practicability of the present invention. The high accuracy rate means that in practical applications, the present invention can accurately identify and classify different types of wire molten marks, providing strong technical support for fire investigation. At the same time, it also further verifies the powerful ability of the algorithm in the field of image processing, providing useful reference and reference for future related research and technology development.
[0022] The additional aspects and advantages of the present invention will be partially given in the following description, partially become obvious from the following description, or be understood through the practice of the present invention. Description of the Drawings
[0023] To more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the accompanying drawings required in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.
[0024] Figure 1 is the flowchart of the method provided by the present invention.
[0025] Figure 2 is the image of the wire fusion mark provided by the present invention.
[0026] Figure 3 is the image of the melting zone provided by the present invention.
[0027] Figure 4 is the image after grayscale processing of the image provided by the present invention.
[0028] Figure 5 is the image after homomorphic filtering processing provided by the present invention.
[0029] Figure 6 is the image after pixel binarization processing provided by the present invention.
[0030] Figure 7 is the image of the highlighted grain region on the surface of the fusion mark provided by the present invention. Detailed implementation manners
[0031] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention with reference to the accompanying drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention. The following embodiments are used to illustrate the present invention, but cannot be used to limit the scope of the present invention.
[0032] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the embodiments of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0033] The following will further elaborate on the present invention in conjunction with Figures 1 to 7 to describe a method and system for classifying wire melting marks based on shape features of the present invention: In this embodiment, as Figure 1 shown, a method for classifying wire melting marks based on shape features is provided, including the following steps: Step 1: Obtain a wire melting mark image, as Figure 2 shown.
[0034] Perform etching agent cleaning treatment on the wire melting mark sample, then take a picture, adjust the resolution of the image to 512x512 pixels, and obtain the wire melting mark image.
[0035] In this step, only the cleaning treatment and photographing of the wire melting mark sample are performed, without multiple processes such as cutting, inlaying, polishing, and etching.
[0036] Step 2: Extract the melting zone from the wire melting mark image to obtain a melting zone image.
[0037] In this embodiment, the trained TransUnet model is used to extract the melting zone from the wire melting mark image to obtain a melting zone image, as Figure 3 shown.
[0038] The training process of the trained TransUnet model is as follows: In view of the lack of a melting mark image dataset containing grain features in the current field, this dataset is independently constructed. The process of constructing the melting mark image dataset is as follows: First, perform etching agent cleaning treatment on the wire melting mark sample to clearly show its internal grain structure. Subsequently, use a photographing device to photograph the processed wire melting mark sample with grains, record it in image form, and obtain a preliminary dataset. Since there are few wire melting mark samples, the preliminary dataset only contains 213 images, including 134 short-circuit melting marks and 79 fire melting marks. Label the above 213 images so that each image is labeled with the melting zone and the nature of the wire melting mark, preparing for subsequent training.
[0039] The content in the image can be divided into three parts: the melting zone, the wire matrix, and interference items. The characteristic data that can reflect the nature of the wire melting mark are concentrated in the melting zone area, and the features extracted from the image area outside the melting zone have interference factors for the determination of the nature of the melting mark. Therefore, separating the melting zone from the wire melting mark image is an essential step.
[0040] Preprocessing the wire melting mark images is a prerequisite for ensuring the reliability of the melting zone segmentation. The images used in the preliminary dataset have different resolutions. To avoid the loss of the model's generalization effect due to different image resolutions, all images in the dataset are uniformly adjusted to 512x512 pixels. The specific operations are as follows: Scale the long side of the image proportionally to 512 pixels while maintaining the original aspect ratio of the image; if the short side of the image is less than 512 pixels, fill it with RGB(0,0,0) black to avoid interference with the model; normalize the pixel values of the image from 0-255 to 0-1 to accelerate the convergence of the training network and enhance the generalization ability of the model. Thus, the melting mark image dataset is obtained.
[0041] Use the melting mark image dataset to train the TransUnet model, enabling the TransUnet model to have the ability to segment the melting zone. The mIoU (mean intersection over union) of the trained TransUnet model is 94.02%, proving that the model's segmentation effect is excellent.
[0042] Step 3: Perform image grayscale processing, homomorphic filtering processing, pixel binarization processing, and denoising processing on the melting zone image in sequence to obtain the highlighted grain region image on the surface of the melting mark.
[0043] The region where the melting mark grains are formed has different light reflectivities from the surrounding regions due to different phases. From the perspective of the naked eye, it means that the melting mark grain region will be slightly brighter or darker than the surrounding, and the melting mark region is a complete closed region. The difference in light and darkness is the difference in pixel values in computer images. Therefore, in the present invention, the image is grayscaled, and then the regions with brightness higher than a certain threshold in the grayscaled image are identified as the grain regions.
[0044] The present invention performs image grayscale processing on the melting zone image. The specific process is as follows: First, grayscale the melting zone image to simplify the image structure for subsequent processing without losing key information. Grayscale processing converts each pixel point in the color image from originally containing information of the red, green, and blue color channels to a single-channel image containing only one luminance information (grayscale value). This process is usually completed by the weighted average method. The formula is as follows: Among them, Gray(i,j) represents the grayscale image pixel value of the i-th row and j-th column, R(i,j) represents the red channel pixel value of the i-th row and j-th column, G(i,j) represents the green channel pixel value of the i-th row and j-th column, and B(i,j) represents the blue channel pixel value of the i-th row and j-th column. When the result of Gray(i,j) is not an integer, rounding operation is required.
[0045] The image after image grayscale processing, such asFigure 4 as shown
[0046] After grayscale conversion of the image, the level of the grayscale value can reflect the brightness of the current pixel. The bright part should be close to white, and the dark part should be close to gray. In order to better demarcate the highlighted part of the grain area, it is necessary to make the highlighted part of the image more prominent and the dark part darker, so that the grain area is more obvious.
[0047] The present invention adopts homomorphic filtering. Homomorphic filtering is a technique in image processing, especially suitable for processing images with non-uniform illumination. It combines the processing methods in the spatial domain and the frequency domain. Homomorphic filtering first performs a logarithmic transformation on the image to convert multiplicative noise into additive noise, and then converts the image to the frequency domain through the fast Fourier transform (FFT). In the frequency domain, a high-pass filter is used to enhance the high-frequency details (such as edges and textures) of the image, while suppressing the low-frequency illumination changes to reduce their influence. Then, the inverse fast Fourier transform (IFFT) is used to convert the image back to the spatial domain, and the original gray level is restored through an exponential transformation. This process not only significantly improves the contrast of the image, but also preserves the detail information of the image, especially obvious when processing images with uneven illumination or shadow areas. The image processed by homomorphic filtering, such as Figure 5 as shown
[0048] In this embodiment, the Otsu algorithm is used for pixel binarization processing. The Otsu algorithm is an automatic threshold selection algorithm, especially in the process of image binarization. The core idea of this algorithm is to traverse all possible gray-level thresholds, divide the image into foreground and background parts, and calculate the between-class variance between these two parts to find the optimal threshold that maximizes the between-class variance. In the specific implementation process, first calculate the gray histogram of the input image, and then traverse all possible thresholds. For each threshold, calculate the mean, variance, and their proportions in the whole image of the foreground and background, so as to obtain the between-class variance. Finally, select the threshold that maximizes the between-class variance as the optimal threshold to binarize the pixels of the image and achieve automatic segmentation of the image. The advantage of the Otsu algorithm is that it can automatically select the optimal threshold without manual intervention, and can achieve good segmentation effects when processing images with different illumination conditions, noise levels, and image contents. The image after pixel binarization processing, such as Figure 6 as shown
[0049] In this embodiment, the denoising process includes median filtering and erosion processing.
[0050] There is still a lot of residual interference information in the processed image, and the extracted feature data will interfere with the final classification result. Therefore, it is necessary to reduce the impact of interference data on the classification effect of the final model. The interference information in the image comes from two parts: the first part is that there are many segmentation noises remaining in the edge part of the molten zone image obtained by the semantic segmentation model, and the amount of remaining noise is larger in the part closer to the molten zone; on the other hand, using the Otsu algorithm cannot perfectly segment the grain region, and a little reflective region or local exposure region affects the judgment of the grain region extraction. Therefore, median filtering and erosion algorithms are used to eliminate the remaining interference information. After median filtering and erosion processing, the image of the bright grain region on the surface of the weld mark is as Figure 7 shown.
[0051] Step 4: Calculate the grain characteristics according to the image of the bright grain region on the surface of the weld mark.
[0052] In this embodiment, 19-dimensional grain characteristics are extracted. The grain characteristics include the number of grains, the average area of grains, the maximum area of grains, the minimum area of grains, the average perimeter of grains, the maximum perimeter of grains, the minimum perimeter of grains, the average roundness of grains, the maximum roundness of grains, the minimum roundness of grains, the average moment of grains, the maximum moment of grains, the minimum moment of grains, the average aspect ratio of the circumscribed rectangle of grains, the maximum aspect ratio of the circumscribed rectangle of grains, the minimum aspect ratio of the circumscribed rectangle of grains, the average long side of grains, the maximum long side of grains, and the minimum long side of grains.
[0053] Step 5: Calculate the molten zone characteristics according to the molten zone image.
[0054] The molten zone image obtained by using the trained TransUnet model may contain some background, and the image will be accompanied by some noises after model segmentation, such as white pixels. Therefore, using contour extraction (contour extraction includes color threshold judgment) for the segmented image can eliminate the noises after image segmentation and make the contour features more conform to the actual features.
[0055] In this embodiment, the contour coordinate set of the molten zone is extracted from the molten zone image by using the contour extraction algorithm, and the molten zone characteristics are calculated.
[0056] The contour extraction algorithm starts the contour tracking process by traversing each pixel point in the molten zone image and detecting unvisited foreground pixels. After finding a foreground pixel, use the 8-connectivity rule to track the pixels around it, search along the boundary and record the contour. The whole process relies on the adjacency relationship of pixels and the contrast between foreground and background to achieve contour detection.
[0057] The contour coordinate set itself cannot be directly used for machine learning classifiers. These pixel coordinates need to be converted into features with actual physical meanings according to the scale of the image and specific mathematical formulas. In this embodiment, the contour coordinate set is converted into 3D melting zone features, and the melting zone features include the area of the melting zone, the perimeter of the melting zone, and the roundness of the melting zone.
[0058] Step 6: Input the grain features and the melting zone features into the classification model to calculate and obtain the type of the fusion mark.
[0059] In this embodiment, the classification model is an XGBoost model.
[0060] The XGBoost model is also pre-trained. The melting mark image data set constructed in Step 2 is used to pre-train the XGBoost model. The pre-training process is as follows: First, the extracted grain features and melting zone features are organized into a format (feature vector) suitable for model training and used as input data to be passed to the XGBoost model. In the model training stage, XGBoost adopts the idea of an additive model and gradually adds new tree models to fit the bias of the previous model. Each tree is trained based on the current residual, and through continuous iteration, the bias of the model is gradually reduced. XGBoost uses the greedy algorithm to learn tree by tree, and each tree fits the bias of the previous model. When constructing each tree, all leaf nodes at the same level are tried to be split each time. The splitting process is based on the optimization of the objective function, and it is determined whether to split by comparing the gain before and after splitting. In terms of feature selection and splitting, XGBoost adopts a variety of strategies to optimize the model. It uses the method of feature parallelism for calculation, tries to use each feature as the splitting feature, finds the optimal splitting point for each feature, and selects the feature with the largest gain for splitting.
[0061] After the model training is completed, XGBoost outputs the final classification result through the integrated decision of multiple trees according to the input feature vector. Specifically, for each input sample, it will fall to a corresponding leaf node in each tree, and each leaf node corresponds to a score. Finally, the scores corresponding to each tree are added up, and the category to which the sample belongs is judged according to the score level.
[0062] Since the melting mark image data set only includes images of wire melting mark samples of short-circuit melting marks and fire melting marks, there are only two classification results of the XGBoost model, that is, the types of the melting marks include short-circuit melting marks and fire melting marks.
[0063] This embodiment verifies the effectiveness of this method through the following experiments.
[0064] In this embodiment, to evaluate the performance of different classification models when processing the wire melting mark image dataset, multiple evaluation criteria are adopted, including accuracy, recall, and F1 score.
[0065] Accuracy is an intuitive indicator to measure the overall prediction correctness of the model, and its calculation formula is: Among them, (True Positives) represents true positives, (True Negatives) represents true negatives, (False Positives) represents false positives, (False Negatives) represents false negatives. Accuracy reflects the average prediction ability of the model on all samples.
[0066] Recall measures the ability of the model to correctly identify positive samples, and its calculation formula is: .
[0067] F1 score is the harmonic mean of accuracy and recall, and is used to comprehensively evaluate the ability of the model in accurately identifying positive samples and avoiding misjudgment. The calculation formula of F1 score is: The higher the F1 score (the maximum is 1), the more reliable the classification result of the model.
[0068] .
[0069] There is a significant problem of unbalanced sample size in the dataset of this embodiment. Specifically, there are 134 fire images in the short - circuit type, while there are only 79 images of other types. To scientifically and comprehensively evaluate the model performance and fully consider the impact of unbalanced sample size, this embodiment adopts multiple weighted evaluation criteria, including weighted accuracy, weighted recall, and weighted F1 score.
[0070] That is Among them, refers to the weighted index (accuracy, recall, F1 score), refers to the number of short - circuit data, refers to the number of fire data. 、 Refers to the indicators (accuracy, recall, F1-score) corresponding to short circuits and fires.
[0071] In this embodiment, four commonly used models, SVM, KNN, CART, and RF, are selected and compared with XGBoost used in this method. The results are shown in Table 1.
[0072] Table 1 Comparison table of model classification results
[0073] XGBoost shows excellent performance in the three key indicators of weighted accuracy, weighted recall, and weighted F1-score, with specific values of 88.1%, 85.7%, and 0.8588, significantly superior to other models.
[0074] Generally speaking, the identification of wire melting marks plays a crucial role in fire investigation. However, the manual identification process is cumbersome, and the research and application of automatic identification are still insufficient. To fill this gap in the field, the present invention is based on the shape characteristics of wire melting mark images. First, an advanced semantic segmentation model, TransUnet, is used to accurately segment the melting area in the image; then, a unique algorithm for extracting the shape characteristics of grains and the melting area is designed to deeply analyze the segmented melting area image and extract 22-dimensional representative feature data; finally, the 22-dimensional feature data is input into an efficient XGBoost classifier for model learning and construction. Through a strict verification process, it is found through experiments that the accuracy score of the present invention reaches 88.1%. This result not only verifies the effectiveness of the feature extraction algorithm proposed in the present invention but also fully proves the reliability and application value of the 22-dimensional feature data in the identification of wire melting marks.
[0075] This embodiment also provides a wire melting mark classification system based on shape characteristics, and the technical solution adopted is as follows: including: an image acquisition unit, a feature calculation unit, and a melting mark type classification unit connected in sequence.
[0076] The image acquisition unit is used to obtain a wire melting mark image; and send the wire melting mark image to the feature calculation unit.
[0077] The feature calculation unit is used to extract the melting area from the wire melting mark image using the trained TransUnet model to obtain a melting area image; Perform image grayscale processing, homomorphic filtering processing, pixel binarization processing, and denoising processing on the melting area image in sequence to obtain a highlighted grain area image on the surface of the melting mark; calculate the grain characteristics according to the highlighted grain area image on the surface of the melting mark; Among them, Otsu algorithm is used for pixel binarization processing, and the denoising processing includes median filtering and corrosion processing; The described grain characteristics include the number of grains, the average area of grains, the maximum area of grains, the minimum area of grains, the average perimeter of grains, the maximum perimeter of grains, the minimum perimeter of grains, the average roundness of grains, the maximum roundness of grains, the minimum roundness of grains, the average moment of grains, the maximum moment of grains, the minimum moment of grains, the average aspect ratio of the circumscribed rectangle of grains, the maximum aspect ratio of the circumscribed rectangle of grains, the minimum aspect ratio of the circumscribed rectangle of grains, the average long side of grains, the maximum long side of grains, and the minimum long side of grains; Based on the image of the melting zone, using the contour extraction algorithm, the characteristics of the melting zone are calculated; the characteristics of the melting zone include the area of the melting zone, the perimeter of the melting zone, and the roundness of the melting zone; The 19-dimensional grain characteristics and the 3-dimensional melting zone characteristics are sent to the weld mark type classification unit.
[0078] The weld mark type classification unit is used to input the grain characteristics and the melting zone characteristics into a classification model to calculate the weld mark type. The classification model is an XGBoost model. The weld mark types include short-circuit weld marks and fire weld marks.
[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for classifying wire melt marks based on shape features, characterized in that: include: Obtaining the wire melting mark image; Extracting a melting zone from the wire melt mark image to obtain a melting zone image; The image of the melting zone is subjected to image grayscale processing, homomorphic filtering processing, pixel binarization processing, and denoising processing in sequence to obtain an image of a high-brightness grain area on the surface of the melting mark; The grain characteristics are calculated based on the image of the highlighted grain area on the surface of the melt mark; According to the melt zone image, the melt zone characteristics are calculated; The grain characteristics and the melting zone characteristics are input into the classification model to calculate the type of the melting mark.
2. A method for classifying wire melt marks based on shape features as claimed in claim 1, characterized in that: The trained TransUnet model is used to extract the melting zone from the wire melt mark image to obtain a melting zone image.
3. A method for classifying wire melt marks based on shape features as claimed in claim 2, characterized in that: The training process of the trained TransUnet model is: Carry out corrosive cleaning treatment on the wire melt mark samples, take images, and obtain a preliminary data set; annotate the images in the preliminary data set; All images are uniformly adjusted to 512x512 pixels. The specific operations are as follows: the long side of the image is proportionally scaled to 512 pixels while maintaining the original image ratio; if the short side of the image is less than 512 pixels, it is filled with black, and the pixel value of the image is normalized from 0-255 to 0-1 to obtain the melt mark image dataset; The TransUnet model is trained using the melt mark image dataset to obtain a trained TransUnet model.
4. A method for classifying wire melt marks based on shape features as claimed in claim 1, characterized in that: The Otsu algorithm is used to perform pixel binarization.
5. A method for classifying wire melt marks based on shape features as claimed in claim 1, characterized in that: The denoising process includes median filtering and corrosion processing.
6. A method for classifying wire melt marks based on shape features as claimed in claim 1, characterized in that: The contour coordinate set of the melting zone is extracted from the melting zone image by using a contour extraction algorithm, and the melting zone features are calculated.
7. A method for classifying wire melt marks based on shape features as claimed in claim 1 or 6, characterized in that: The grain characteristics include the number of grains, the average area of the grains, the maximum area of the grains, the minimum area of the grains, the average perimeter of the grains, the maximum perimeter of the grains, the minimum perimeter of the grains, the average roundness of the grains, the maximum roundness of the grains, the minimum roundness of the grains, the average moment of the grains, the maximum moment of the grains, the minimum moment of the grains, the average aspect ratio of the circumscribed rectangle of the grains, the maximum aspect ratio of the circumscribed rectangle of the grains, the minimum aspect ratio of the circumscribed rectangle of the grains, the average long side of the grains, the maximum long side of the grains and the minimum long side of the grains; The characteristics of the melting zone include the area of the melting zone, the perimeter of the melting zone and the roundness of the melting zone.
8. A method for classifying wire melt marks based on shape features as claimed in claim 1, characterized in that: The classification model is an XGBoost model.
9. A method for classifying wire melt marks based on shape features as claimed in claim 1, characterized in that: The types of melting marks include short-circuit melting marks and fire melting marks.
10. A wire melt mark classification system based on shape features, characterized in that: The method for classifying the wire melt marks based on shape features according to any one of claims 1 to 9 comprises: an image acquisition unit, a feature calculation unit and a melt mark type classification unit connected in sequence, The image acquisition unit is used to obtain the wire melting mark image; The feature calculation unit is used to extract the melting zone from the wire melting mark image to obtain the melting zone image; The image of the melting zone is subjected to image graying, homomorphic filtering, pixel binarization, and denoising in sequence to obtain an image of a highlighted grain region on the surface of the melting mark; and grain characteristics are calculated based on the image of the highlighted grain region on the surface of the melting mark; According to the melt zone image, the melt zone characteristics are calculated; The melt mark type classification unit is used to input the grain characteristics and the melt zone characteristics into a classification model to calculate the melt mark type.
Citation Information
Patent Citations
Intelligent identification method and device for copper wire melting mark on fire scene
CN112465002A