Diamond wire photo recognition method and device, electronic equipment and storage medium

By acquiring and verifying the relevant parameters of the diamond wire fragments in the diamond wire photographs, the problem of low recognition rate caused by the breakage of diamond particles on the diamond wire was solved, achieving higher recognition accuracy and less quality inspection workload.

CN121767261APending Publication Date: 2026-03-31高测(盐城)技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In existing technologies, the reasons for the diamond particles breaking off on diamond wires are unclear, resulting in low and inaccurate recognition rates of broken sand photos, which increases the workload of quality inspectors.

Method used

By acquiring relevant parameters of the diamond wire fragments in the diamond wire photograph, such as the number of fragments, the aggregate density of the fragments, the mass density of the fragments, the cluster center value of the busbar, and the cluster center value of the diamond, these parameters are used for dual identification and verification, thereby improving the identification accuracy of the diamond wire fragment photographs.

Benefits of technology

It improved the accuracy of identifying crushed sand photos and reduced the workload of quality inspectors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121767261A_ABST
    Figure CN121767261A_ABST
Patent Text Reader

Abstract

The invention relates to a diamond wire photo recognition method and device, electronic equipment and a storage medium, and belongs to the field of image processing. Obtaining an identification result of carrying out broken sand identification on the to-be-identified diamond wire picture; when the identification result represents that the to-be-identified diamond wire photo is a broken sand photo, obtaining broken sand related parameters of the to-be-identified diamond wire photo; and carrying out broken sand photo verification on the to-be-identified diamond wire photo by utilizing the broken sand related parameters to obtain a broken sand verification result. And when the identification result represents that the to-be-identified diamond wire photo is the broken sand photo, continuously obtaining the broken sand related parameters of the to-be-identified diamond wire photo, and carrying out broken sand photo verification on the to-be-identified diamond wire photo by using the broken sand related parameters, so that the identification accuracy of the broken sand photo is improved through dual identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of image processing, and specifically relates to a method, apparatus, electronic device and storage medium for recognizing diamond wire photographs. Background Technology

[0002] During the production of diamond wire, the diamond particles on the wire may break off. The exact cause of this breakage is currently unclear. While the resulting diamond wire photographs show a clear characteristic, the extent of the breakage (diamond particles shattering into smaller particles) is complex. For example, breakage can occur regardless of whether the amount of diamond particles used in production is low, normal, or high. Therefore, addressing the issue of low accuracy and inaccuracy in identifying broken diamond particles in photographs is crucial for the quality control of diamond wire. Summary of the Invention

[0003] Therefore, the purpose of this application is to provide a method, apparatus, electronic device and storage medium for identifying diamond wire photographs, so as to improve the accuracy of identifying crushed sand photographs and reduce the workload of quality inspectors.

[0004] The embodiments of this application are implemented as follows:

[0005] In a first aspect, embodiments of this application provide a method for identifying diamond wire photographs, comprising: obtaining an identification result of identifying the diamond wire photograph to be identified as a fragmented photograph; when the identification result indicates that the diamond wire photograph to be identified is a fragmented photograph, obtaining fragmented photograph-related parameters of the diamond wire photograph to be identified; and using the fragmented photograph-related parameters to verify the diamond wire photograph to be identified as a fragmented photograph, thereby obtaining a fragmented photograph verification result.

[0006] In the above embodiments, when the identification result indicates that the diamond wire photo to be identified is a sand fragment photo, the sand fragment related parameters of the diamond wire photo to be identified are further obtained, and the sand fragment related parameters are used to verify the diamond wire photo to be identified as a sand fragment photo. The identification accuracy of sand fragment photos is improved through dual identification.

[0007] In a possible implementation of the first aspect embodiment, if the sand fragmentation-related parameters include: sand fragmentation count and sand aggregation density, sand quantity density, sand quantity, busbar cluster center value and diamond cluster center value; the sand fragmentation-related parameters are used to verify the diamond wire image to be identified by performing sand fragmentation image verification, including: performing at least one of the following judgments: i) determining whether the sand fragmentation count is greater than a sand fragmentation threshold and whether the sand aggregation density is greater than the average sand aggregation density, to obtain a first judgment result, wherein the average sand aggregation density is the average sand aggregation density of multiple diamond wire images including the diamond wire image to be identified; ii) determining whether the sand quantity density meets a set sand quantity density rule, to obtain a second judgment result; iii) determining whether the difference between the sand quantity and the average sand quantity exceeds... iv) Determine whether the diamond cluster center value is less than the average diamond cluster center value and whether the mother wire cluster center value is greater than the average mother wire cluster center value to obtain a fourth judgment result, wherein the average diamond cluster center value is the average diamond cluster center value of multiple diamond wire photos including the diamond wire photo to be identified; the average mother wire cluster center value is the average mother wire cluster center value of multiple diamond wire photos including the diamond wire photo to be identified; when each judgment result in the at least one judgment is yes, it indicates that the diamond wire photo to be identified is a fragmented sand photo.

[0008] In the above embodiments, parameters that are highly correlated with sand fragments, such as the number of broken sand fragments, sand aggregation density, sand quantity, mass of sand, cluster center value of the busbar, and cluster center value of the diamond, are obtained. Combined with at least one of the above four judgments (i, ii, iii, iv), if the result of each judgment in at least one judgment is yes, the diamond wire photograph to be identified is characterized as a broken sand photograph. This can greatly improve the recognition accuracy of broken sand photographs.

[0009] In one possible implementation of the first aspect embodiment, the fragmentation-related parameters include: busbar cluster center value and diamond cluster center value; obtaining the fragmentation-related parameters of the diamond wire photograph to be identified includes: obtaining the initial diamond cluster center value of the diamond tag of the diamond wire photograph to be identified, and the initial busbar cluster center value of the busbar tag; obtaining the diamond cluster center value of the diamond wire photograph to be identified based on the initial diamond cluster center value and a first correction coefficient; obtaining the busbar cluster center value of the diamond wire photograph to be identified based on the initial busbar cluster center value and a second correction coefficient.

[0010] In the above embodiments, the initial diamond cluster center value is corrected by the first correction coefficient to obtain the diamond cluster center value, and the initial bus cluster center value is corrected by the second correction coefficient to obtain the bus cluster center value. The correction by the correction coefficient can reduce some errors, such as reducing the error caused by inaccurate focusing and reducing the influence of lighting factors, thereby improving the recognition accuracy.

[0011] In one possible implementation of the first aspect embodiment, the step of obtaining the first correction coefficient includes: determining a first proportion of the sum of the initial diamond cluster center values ​​and the cluster center values ​​corresponding to the diamond label, the main wire label, and the background label of the diamond wire photograph to be identified; obtaining the average value of the diamond cluster centers, the average value of the main wire cluster centers, and the average value of the background cluster centers corresponding to the diamond label, the main wire label, and the background label in multiple diamond wire photographs including the diamond wire photograph to be identified; determining a second proportion of the average value of the diamond cluster centers and the sum of the average value of the diamond cluster centers, the average value of the main wire cluster centers, and the average value of the background cluster centers; and determining the first correction coefficient based on the first proportion and the second proportion.

[0012] In the above embodiments, the first proportion and the second proportion are determined by calculation. Based on the first proportion and the second proportion, the first correction coefficient used to correct the initial diamond cluster center value can be quickly determined. For example, the first correction coefficient is the absolute value of the difference between the first proportion and the second proportion. This can reduce the influence of light factors and thus improve the recognition accuracy.

[0013] In one possible implementation of the first aspect embodiment, the step of obtaining the second correction coefficient includes: determining a third proportion of the sum of the initial busbar cluster center values ​​and the cluster center values ​​corresponding to the diamond label, busbar label, and background label of the diamond wire photograph to be identified; obtaining the average value of the diamond cluster centers, the average value of the busbar cluster centers, and the average value of the background cluster centers corresponding to the diamond label, busbar label, and background label in multiple diamond wire photographs including the diamond wire photograph to be identified; determining a fourth proportion of the sum of the average value of the busbar cluster centers and the sum of the average value of the diamond cluster centers, the average value of the busbar cluster centers, and the average value of the background cluster centers; and determining the second correction coefficient based on the third proportion and the fourth proportion.

[0014] In the above embodiments, the third proportion and the fourth proportion are determined by calculation. Based on the third proportion and the fourth proportion, the second correction coefficient used to correct the initial bus cluster center value can be quickly determined. For example, the second correction coefficient is the absolute value of the difference between the third proportion and the fourth proportion. This can reduce the influence of lighting factors and thus improve the recognition accuracy.

[0015] In one possible implementation of the first aspect embodiment, the crushed sand related parameters include: busbar cluster center value and diamond cluster center value. The method further includes: clustering the pixels of the diamond wire photograph to be identified according to a specified label, and recording the cluster center value used during clustering. The specified label includes diamond label, busbar label and background label.

[0016] In the above embodiments, by clustering the pixels of the diamond wire photo to be identified, the accuracy can be improved by subsequently obtaining the diamond cluster center value and the busbar cluster center value of the diamond wire photo to be identified and then verifying the fragmented sand photo.

[0017] In one possible implementation of the first aspect embodiment, the diamond cluster center is the cluster center with the largest value among all cluster center values ​​of the diamond wire photograph to be identified, and the bus cluster center value is the cluster center in the diamond wire photograph to be identified whose value is between the largest and smallest cluster center.

[0018] In the above embodiments, since diamond has the highest brightness and the busbar has the second highest, the above method can accurately obtain the diamond cluster center value and the busbar cluster center value, which provides a guarantee for the subsequent accurate identification of the fragmented sand photos.

[0019] Secondly, embodiments of this application also provide a device for identifying diamond wire photographs, comprising: an acquisition module and a verification module; the acquisition module is used to acquire an identification result of the diamond wire photograph to be identified as a fragmented photograph; and when the identification result indicates that the diamond wire photograph to be identified is a fragmented photograph, to acquire fragmented related parameters of the diamond wire photograph to be identified; the verification module is used to verify the diamond wire photograph to be identified as a fragmented photograph using the fragmented related parameters, and to obtain a fragmented verification result.

[0020] Thirdly, embodiments of this application also provide an electronic device, including: a memory and a processor, the processor being connected to the memory; the memory being used to store a program; the processor being used to invoke the program stored in the memory to execute the diamond wire photograph recognition method provided in any possible implementation of the first aspect embodiment and / or in combination with the first aspect embodiment.

[0021] Fourthly, embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when run by a processor, provides a method for identifying diamond wire photographs provided in any possible implementation of the first aspect embodiments and / or in combination with the first aspect embodiments.

[0022] The effective effects of the second to fourth aspects of the embodiments described above are the same as the beneficial effects of the first aspect of the embodiments described above.

[0023] Other features and advantages of this application will be set forth in the following description. The objectives and other advantages of this application can be realized and obtained through the structures specifically pointed out in the written description and the accompanying drawings. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the embodiments will be briefly described below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. The above and other objects, features, and advantages of this application will become clearer through the accompanying drawings.

[0025] Figure 1 A flowchart illustrating a method for identifying diamond wire photographs according to an embodiment of this application is shown.

[0026] Figure 2 This illustration shows a schematic diagram of the principle of a training recognition model provided in an embodiment of this application.

[0027] Figure 3 A schematic diagram of a photograph of crushed sand provided in an embodiment of this application is shown.

[0028] Figure 4 A schematic diagram of a module for recognizing diamond wire photographs provided in an embodiment of this application is shown.

[0029] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0030] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. The following embodiments are provided as examples to more clearly illustrate the technical solutions of this application, and should not be used to limit the scope of protection of this application. Those skilled in the art will understand that, without conflict, the following embodiments and features can be combined with each other.

[0031] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, relational terms such as "first," "second," etc., in the description of this application are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.

[0032] Furthermore, the term "and / or" in this application is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0033] In the description of the embodiments of this application, unless otherwise expressly specified and limited, the technical term "connection" can be a direct connection or an indirect connection through an intermediate medium.

[0034] In diamond wire quality control, industrial cameras are used to capture images of diamond wire during the production process, enabling machine vision-based quality control. Identification of sand fragments in these images is crucial for diamond wire quality control. This application provides a method for identifying sand fragments in diamond wire images, which improves the accuracy of sand fragment identification and reduces the workload of quality inspectors.

[0035] The following is combined Figure 1 The method for identifying diamond wire photographs provided in the embodiments of this application will be described.

[0036] S1: Obtain the recognition results of the diamond wire image to be identified by performing sand identification.

[0037] In one implementation, the identification result of the diamond wire photograph to be identified can be directly obtained, without performing the sand-grind identification on the photograph itself. The identification result can indicate whether the diamond wire photograph to be identified is a sand-grind photograph or not a sand-grind photograph (i.e., a normal photograph).

[0038] In some possible implementations, the diamond wire image to be identified may be subjected to sand-like particle identification first to obtain the identification result, and then the identification result of the sand-like particle identification of the diamond wire image to be identified may be obtained.

[0039] In one implementation, when performing sand identification on a photograph of diamond wire to be identified, a target recognition model can be used to identify the photograph. The resulting identification is the result obtained by the target recognition model. In this implementation, before step S1, the method further includes: extracting a specified number of optimal combination features from the photograph of diamond wire to be identified, inputting the optimal combination features into the target recognition model, and obtaining the recognition result of the target recognition model on the photograph of diamond wire to be identified. The optimal combination features are those whose dimension is the same as the dimension of the combination features used to train the target recognition model. The target recognition model is the recognition model with the highest accuracy among multiple recognition models trained using various combination features. The various combination features are selected from all features extracted from the training sample photographs required to train the recognition model.

[0040] In one possible implementation, the principle of training the recognition model is as follows: Figure 2 As shown, the above method may further include: extracting all feature data from training sample photos, the training sample photos including positive sample diamond wire photos and negative sample diamond wire photos; selecting a specified number of multiple combination feature data from all feature data; training an initial recognition model separately using each combination feature to obtain multiple trained recognition models; selecting the recognition model with the best recognition accuracy (which may be the highest accuracy) from the multiple recognition models to obtain the target recognition model and the optimal combination feature, wherein the optimal combination feature is the combination feature of the trained target recognition model.

[0041] The number of feature dimensions in each feature combination can be the same. Assuming that columns (or rows) with a high correlation to crushed sand are selected from all feature data, multiple permutations and combinations are performed to expand the feature representation set. This is used for multiple trials to obtain the optimal feature combination. When extracting feature data from diamond wire photographs, each row (or column) can represent 69 features from a single diamond wire photograph. Different rows (or columns) correspond to feature data from different diamond wire photographs. When selecting combined features, 30 features with a high correlation to crushed sand can be chosen from these 69 features.

[0042] Features from diamond wire photographs can be converted into text data. For example, multiple diamond wire photographs can be converted into a CSV (Comma Separated Values) file. During text conversion, other formats such as TXT and JSON can also be used. After conversion, positive and negative sample diamond wire photographs can be converted into fragmented and normal CSV files, representing the two classes of samples for model training. The CSV file can store feature data either row-wise or column-wise. For example, one row (or column) in the CSV file could represent the 69 features of a single diamond wire photograph.

[0043] Positive sample diamond wire photos can be photos of crushed sand, used as positive samples; negative sample diamond wire photos can be normal diamond wire photos, used as negative samples, meaning the label for crushed sand photos is considered 1, and the label for normal samples is considered 0. Of course, positive and negative samples can also be interchanged. The initial recognition model and target recognition model mentioned above can be similar classification models, including but not limited to random forests.

[0044] In some possible implementations, when identifying broken sand particles in a diamond wire image, connected component detection can be performed on the diamond wire image (the image to be identified). It can be determined whether the area of ​​each connected component is less than the average area of ​​a single diamond grain. If it is less than the average area, the grain corresponding to that connected component is considered broken sand. The total number of broken sand particles in the diamond wire image is counted. The total number of broken sand particles is then divided by the total amount of sand in the diamond wire image to obtain the broken sand percentage. It is then determined whether the broken sand percentage is less than a threshold. If it is less, the diamond wire image is considered a normal image; if it is not less, the diamond wire image is considered a broken sand image. The threshold value ranges from 0.13 to 0.16 and can be determined based on the average or maximum broken sand percentage of diamond wire images marked as broken sand.

[0045] S2: When the identification result indicates that the diamond wire photograph to be identified is a fragmented photograph, obtain the fragmented related parameters of the diamond wire photograph to be identified.

[0046] After obtaining the recognition result, if the recognition result indicates that the diamond wire photo to be identified is a sand fragment photo, the sand fragment related parameters of the diamond wire photo to be identified are obtained, so as to further determine whether the diamond wire photo to be identified is a sand fragment photo based on the sand fragment related parameters, thereby improving the accuracy.

[0047] In one implementation, the obtained crushed sand-related parameters include: the number of crushed sand particles and sand aggregation density, sand mass density, sand quantity, generatrix cluster center value, and diamond cluster center value. It is understood that in some implementations, the crushed sand-related parameters may include only the number of crushed sand particles and sand aggregation density, or sand mass density, or sand quantity, or generatrix cluster center value and diamond cluster center value, or a combination of several of these parameters.

[0048] In one possible implementation, when the parameters related to the crushed sand include the busbar cluster center value and the diamond cluster center value, the method further includes: clustering the pixels of the diamond wire photograph to be identified according to a specified label, and recording the cluster center value used during clustering. The specified labels include diamond label, busbar label, and background label.

[0049] Among them, the cluster center value corresponding to the diamond label is the diamond cluster center value, which is the cluster center with the largest value among all cluster center values ​​of the diamond wire photo to be identified; the cluster center value corresponding to the mother wire label is the mother wire cluster center value, which is the cluster center in the diamond wire photo to be identified whose value is between the largest and smallest cluster center, and the value of the background cluster center corresponding to the background label is the smallest.

[0050] In one possible implementation, when the crushed wire related parameters include: busbar cluster center value and diamond cluster center value, the crushed wire related parameters for obtaining the diamond wire photograph to be identified include: obtaining the initial diamond cluster center value of the diamond tag of the diamond wire photograph to be identified, and the initial busbar cluster center value of the busbar tag; obtaining the diamond cluster center value of the diamond wire photograph to be identified based on the initial diamond cluster center value and a first correction coefficient; and obtaining the busbar cluster center value of the diamond wire photograph to be identified based on the initial busbar cluster center value and a second correction coefficient. For example, initial diamond cluster center value * (1 + first correction coefficient) = diamond cluster center value, initial busbar cluster center value * (1 + second correction coefficient) = busbar cluster center value. Alternatively, initial diamond cluster center value * first correction coefficient = diamond cluster center value, initial busbar cluster center value * second correction coefficient = busbar cluster center value. By correcting the coefficients, some errors can be reduced, such as those caused by inaccurate focusing and those caused by lighting conditions, thereby improving recognition accuracy.

[0051] Understandably, without considering the correction factor, the bus cluster center value = the initial bus cluster center value, and the initial diamond cluster center value = the diamond cluster center value.

[0052] The first and second correction coefficients are determined based on all cluster center values ​​of the diamond wire image to be identified, as well as all cluster center values ​​of multiple diamond wire images including the image to be identified. The first correction coefficient is related to the first and second proportions, while the second correction coefficient is related to the third and fourth proportions. The first proportion = initial diamond cluster center value / (initial diamond cluster center value + initial bus cluster center value + background bus cluster center value); the second proportion = average diamond cluster center value / (average diamond cluster center value + average bus cluster center value + average background cluster center value); the third proportion = initial bus cluster center value / (initial diamond cluster center value + initial bus cluster center value + background bus cluster center value); and the fourth proportion = average bus cluster center value / (average diamond cluster center value + average bus cluster center value + average background cluster center value). The average value of diamond cluster centers is the average of the initial diamond cluster center values ​​from multiple diamond wire photographs; the average value of mother wire cluster centers is the average of the initial mother wire cluster center values ​​from multiple diamond wire photographs; and the average value of background cluster centers is the average of the initial background cluster center values ​​from multiple diamond wire photographs.

[0053] In one possible implementation, the step of obtaining the first correction coefficient includes: determining a first proportion of the sum of the initial diamond cluster center values ​​and the cluster center values ​​corresponding to the diamond labels, busbar labels, and background labels of the diamond wire photograph to be identified; obtaining the average value of the diamond cluster centers, the average value of the busbar cluster centers, and the average value of the background cluster centers corresponding to the diamond labels, busbar labels, and background labels in multiple diamond wire photographs, including the diamond wire photograph to be identified; determining a second proportion of the average value of the diamond cluster centers and the sum of the average values ​​of the diamond cluster centers, busbar cluster centers, and background cluster centers; and determining the first correction coefficient based on the first and second proportions. The first correction coefficient = the absolute difference between the first and second proportions = |first proportion - second proportion|. At this point, the initial diamond cluster center value * (1 + first correction coefficient) = the diamond cluster center value.

[0054] In one implementation, the first correction coefficient can be the ratio of the first proportion to the second proportion. In this implementation, the initial diamond cluster center value * first correction coefficient = diamond cluster center value.

[0055] The steps for obtaining the second correction coefficient are similar to those for obtaining the first correction coefficient. For example, obtaining the second correction coefficient includes: determining a third proportion of the sum of the initial busbar cluster center values ​​and the sum of the cluster center values ​​corresponding to the diamond label, busbar label, and background label of the diamond wire photograph to be identified; obtaining the average value of the diamond cluster centers, the average value of the busbar cluster centers, and the average value of the background cluster centers corresponding to the diamond label, busbar label, and background label in multiple diamond wire photographs, including the diamond wire photograph to be identified; determining a fourth proportion of the sum of the average value of the busbar cluster centers and the sum of the average values ​​of the diamond cluster centers, busbar cluster centers, and background cluster centers; and determining the second correction coefficient based on the third and fourth proportions. At this point, the initial busbar cluster center value * (1 + second correction coefficient) = busbar cluster center value.

[0056] In one implementation, the second correction coefficient can be the ratio of the third proportion to the fourth proportion. In this implementation, the initial bus cluster center value * the second correction coefficient = the bus cluster center value.

[0057] S3: Use the aforementioned sand-related parameters to perform sand-image verification on the diamond wire image to be identified, and obtain the sand-image verification result.

[0058] After obtaining the sand-related parameters of the diamond wire image to be identified, these parameters can be used to perform sand-image verification on the diamond wire image to be identified, thus obtaining the sand-image verification result. The sand-image verification result indicates whether the diamond wire image to be identified is a sand-image image or not.

[0059] In one implementation, if the parameters related to the crushed sand include: the number of crushed sand particles and the aggregate density, the mass density, the mass of sand, the cluster center value of the generatrix, and the cluster center value of the diamond, then the process of verifying the crushed sand image using the parameters related to the crushed sand may include: performing at least one of the following judgments:

[0060] i) Determine whether the number of broken sand particles (the number of diamond particles whose area is less than a specified value) is greater than the broken sand threshold (such as the average number of broken sand particles in multiple broken sand photos) and whether the sand aggregation density is greater than the average sand aggregation density, and obtain the first judgment result. The average sand aggregation density is the average sand aggregation density of multiple diamond wire photos, including the diamond wire photo to be identified.

[0061] ii) Determine whether the sand density meets the set sand density rules. For example, determine whether the sand density is greater than the first sand density threshold (e.g., 3) or equal to the second sand density threshold (e.g., 0) to obtain the second determination result.

[0062] iii) Determine whether the difference between the amount of abrasive (diamond particles) and the average amount of abrasive exceeds the preset reasonable range, and obtain the third judgment result. The average amount of abrasive is the average of the abrasive amount of multiple diamond wire photos, including the diamond wire photo to be identified.

[0063] iv) Determine whether the diamond cluster center value is less than the average diamond cluster center value and whether the busbar cluster center value is greater than the average busbar cluster center value to obtain the fourth determination result. The average diamond cluster center value is the average of the diamond cluster center values ​​of multiple diamond wire photos, including the diamond wire photo to be identified; the average busbar cluster center value is the average of the busbar cluster center values ​​of multiple diamond wire photos, including the diamond wire photo to be identified.

[0064] When the result of each of the above at least one judgment is yes, the diamond wire photograph to be identified is characterized as a fragmented sand photograph. It is understood that the above four judgments (i, ii, iii, iv) can be performed individually, or in combination of two or more. When two or more combinations are performed, and the result of each judgment is yes, the diamond wire photograph to be identified is characterized as a fragmented sand photograph.

[0065] Among them, aggregate density refers to the proportion of diamond particle area per unit area. For example, if a diamond wire photograph is divided into 4*4 blocks, the ratio of diamond area to the total area of ​​each block is calculated, and the largest ratio is taken as the aggregate density. Quantity density refers to the number of diamond particles per unit area. For example, if a diamond wire photograph is divided into 4*4 blocks, the number of diamond particles in each block is calculated, and the maximum number of diamond particles in each block is taken as the quantity density.

[0066] In some implementations, the process of verifying the diamond wire image to be identified using sand-related parameters may include: determining whether the number of sand fragments is greater than a sand fragment threshold and whether the sand aggregation density is greater than the average sand aggregation density, to obtain a first judgment result; determining whether the sand density meets a set sand density rule, to obtain a second judgment result; determining whether the difference between the sand quantity and the average sand quantity exceeds a preset reasonable range, to obtain a third judgment result; determining whether the diamond cluster center value is less than the average diamond cluster center value and whether the mother wire cluster center value is greater than the average mother wire cluster center value, to obtain a fourth judgment result; and using the first, second, third, and fourth judgment results, performing sand fragment image verification on the diamond wire image to be identified, to obtain a sand fragment verification result. In this implementation, the above four judgments are performed, which can maximize the probability of improving the recognition rate of sand fragment images.

[0067] The above-mentioned sand density rules can be determined based on the sand density of the confirmed fragmented sand photograph. For example, the sand density rules may include the first sand density threshold (e.g., 3) and the second sand density threshold (e.g., 0). If the sand density is greater than the first sand density threshold or equal to the second sand density threshold, it can be considered to conform to the sand density rules.

[0068] The above-mentioned judgment on whether the difference between the sand quantity and the average sand quantity exceeds the preset reasonable range can be judged by whether the difference between the sand quantity and the average sand quantity exceeds 1 times the standard deviation of the sand quantity. If it does not exceed 1 times the standard deviation of the sand quantity, it is considered to be within the reasonable range.

[0069] In one implementation, when determining whether the diamond cluster center value is less than the average value of the diamond cluster centers and whether the bus cluster center value is greater than the average value of the bus cluster centers to obtain the fourth determination result, it can also be determined whether the diamond cluster center value is less than a preset threshold (e.g., 110) and less than the average value of the diamond cluster centers, and whether the bus cluster center value is greater than the average value of the bus cluster centers to obtain the fourth determination result.

[0070] To better understand the above method for recognizing diamond wire images, an example will be used for illustration below. Figure 3 The number 119 indicates the number of diamond particles, 10 kilometers and 60 meters represent the length of the diamond wire produced up to 10 kilometers plus 60 meters, and L=9 indicates that this is the 9th production line (there can be multiple production lines when producing diamond wire). Figure 3 Here is an example photo of a diamond wire fragment, which can be used as a positive sample, while a normal diamond wire photo can be used as a negative sample.

[0071] After collecting positive sample diamond wire photographs (fragmented sand photographs) and negative sample diamond wire photographs (normal photographs), a text algorithm is used to convert the positive and negative sample diamond wire photographs into a fragmented sand CSV file and a normal CSV file, respectively, representing the two types of samples for model training (which can be a random forest). During model training, all feature data can be extracted from the training sample photographs, and a specified number of multiple combination feature data can be selected from all feature data. An initial recognition model is trained separately using each combination feature, resulting in multiple trained recognition models. Then, the recognition model with the best recognition accuracy (which can be the highest accuracy) is selected from these models. Finally, the optimal recognition model is used to identify fragmented sand from the diamond wire photograph to be identified.

[0072] When selecting features, you can choose from a CSV file. For example, if a single line in the CSV file contains 69 features for a diamond wire photograph, you can select a specified number of features from these 69. Selected features include: 'ratio of sand grains on the positive and negative sides', 'area ratio of sand grains on the positive and negative sides', 'number of sand agglomerates (each agglomerate contains more than 4 sand grains)', 'agglomeration severity level (maximum level)', 'diameter of the diamond wire', 'number of sand grains', 'uniformity index', 'fragmentation count' (number of sand grains with fewer particles)', 'brightness area of ​​all diamonds in a single image', and 'average area of ​​a single diamond (total area of ​​sand grains / number of sand grains)'. The model includes 54 feature metrics, such as 'x-direction uniformity variance (calculated by taking the difference between two adjacent sand grains, and then calculating the variance after obtaining many differences)', 'diamond grain area variance (calculated based on the area of ​​many diamond grains)', 'maximum diamond area', 'median diamond area', 'y-direction diamond pixel total fluctuation variance (calculated based on the diamond pixels in each column in the y-direction)', 'area data distribution skewness', 'area data distribution kurtosis', 'area coefficient of variation', 'maximum consecutive diamond-free length in the x-direction pixel row (calculated by taking the distance between two adjacent sand grains, and finding the maximum distance)', and 'distribution unevenness (variance of diamond area in 16 regions)'. These 54 features were selected through extensive experimentation and represent a relatively optimal combination. After model training, the model will output the probability of sand breakage in a single diamond wire photograph, for example... Figure 3 The probability of the photo showing broken sand is 0.91, meaning there is a 91% chance that the photo is a broken sand photo. The following is the final logic for determining if a photo is a broken sand photo (all conditions must be met simultaneously):

[0073] 1. The machine learning model outputs a probability greater than 0.75;

[0074] 2. The number of broken sand particles in the current photo to be identified is greater than the threshold t (t is the average number of broken sand particles in multiple photos of broken sand particles), and the sand aggregation density of the current photo to be identified is greater than the average sand aggregation density of multiple photos of diamond wire, including the photo of diamond wire to be identified.

[0075] 3. The current image to be identified has a bus cluster center < 110, and the current image to be identified has a diamond cluster center smaller than the average diamond cluster center value, while the current image to be identified has a bus cluster center larger than the average bus cluster center value; where the average diamond cluster center value is the average of the diamond cluster center values ​​of multiple diamond wire images including the image to be identified; the average bus cluster center value is the average of the bus cluster center values ​​of multiple diamond wire images including the image to be identified.

[0076] 4. The sand density of the current photo to be identified is greater than 3 or equal to 0;

[0077] 5. The amount of abrasive in the current image to be identified deviates from the average amount of abrasive in multiple diamond wire images, including the image to be identified, by more than one standard deviation.

[0078] Finally, if all five conditions are met simultaneously, the diamond wire photograph is determined to contain sand fragments.

[0079] This application embodiment also provides a diamond wire photograph recognition device 100, such as... Figure 4 As shown, the diamond wire image recognition device 100 includes an acquisition module 110 and a verification module 120.

[0080] The acquisition module 110 is used to acquire the recognition result of the crushed sand identification of the diamond wire photo to be identified; and when the recognition result indicates that the diamond wire photo to be identified is a crushed sand photo, to acquire the crushed sand related parameters of the diamond wire photo to be identified.

[0081] The verification module 120 is used to verify the diamond wire image to be identified using the sand-related parameters, and to obtain the sand verification result.

[0082] In one implementation, if the crushed sand related parameters include: crushed sand number and sand aggregation density, sand mass density, sand quantity, busbar cluster center value and diamond cluster center value, then the verification module 120 is used to perform at least one of the following judgments:

[0083] i) Determine whether the number of broken sand particles is greater than the broken sand threshold and whether the sand aggregation density is greater than the average sand aggregation density to obtain a first determination result, wherein the average sand aggregation density is the average of the sand aggregation densities of multiple diamond wire photos, including the diamond wire photo to be identified; ii) Determine whether the sand density satisfies the set sand density rules to obtain a second determination result.

[0084] iii) Determine whether the difference between the amount of abrasive and the average amount of abrasive exceeds a preset reasonable range, and obtain a third determination result, wherein the average amount of abrasive is the average amount of abrasive in multiple diamond wire photographs, including the diamond wire photograph to be identified.

[0085] iv) Determine whether the diamond cluster center value is less than the average diamond cluster center value, and whether the busbar cluster center value is greater than the average busbar cluster center value, to obtain a fourth determination result, wherein the average diamond cluster center value is the average of the diamond cluster center values ​​of multiple diamond wire photographs including the diamond wire photograph to be identified; the average busbar cluster center value is the average of the busbar cluster center values ​​of multiple diamond wire photographs including the diamond wire photograph to be identified;

[0086] When the result of each of the at least one judgments is yes, the diamond wire photograph to be identified is a fragment photograph.

[0087] The diamond wire photograph to be identified is a photograph of diamond wire whose pixels are clustered according to diamond label, busbar label and background label. The crushed sand related parameters include: busbar cluster center value and diamond cluster center value; the acquisition module 110 is used to: acquire the initial diamond cluster center value of the diamond label of the diamond wire photograph to be identified, and the initial busbar cluster center value of the busbar label; obtain the diamond cluster center value of the diamond wire photograph to be identified based on the initial diamond cluster center value and a first correction coefficient; obtain the busbar cluster center value of the diamond wire photograph to be identified based on the initial busbar cluster center value and a second correction coefficient.

[0088] In one possible implementation, the parameters related to the crushed sand include: the cluster center value of the busbar and the cluster center value of the diamond. The identification device 100 for the diamond wire photograph may also include a clustering module for clustering the pixels of the diamond wire photograph to be identified according to a specified label and recording the cluster center value used during clustering. The specified label includes a diamond label, a busbar label and a background label.

[0089] The diamond wire photograph recognition device 100 provided in this application embodiment has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.

[0090] like Figure 5 As shown, Figure 5 This diagram illustrates a structural block diagram of an electronic device 200 provided in an embodiment of this application. The electronic device 200 includes: a transceiver 210, a memory 220, a communication bus 230, and a processor 240.

[0091] The transceiver 210, memory 220, and processor 240 are electrically connected directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses 230 or signal lines. The transceiver 210 is used to send and receive data. The memory 220 is used to store computer programs, such as... Figure 4The software functional module shown is the diamond wire photograph recognition device 100. The diamond wire photograph recognition device 100 includes at least one software functional module that can be stored as software or firmware in the memory 220 or embedded in the operating system (OS) of the electronic device 200. The processor 240 is used to execute executable modules stored in the memory 220, such as the software functional module or computer program included in the diamond wire photograph recognition device 100. For example, the processor 240 is used to execute the diamond wire photograph recognition method described above.

[0092] The memory 220 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0093] Processor 240 may be an integrated circuit chip with signal processing capabilities. The aforementioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), a microprocessor, etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. Alternatively, processor 240 can also be any conventional processor.

[0094] The aforementioned electronic equipment 200 includes, but is not limited to, computers, servers, or diamond wire cutting machines.

[0095] This application embodiment also provides a non-volatile computer-readable storage medium (hereinafter referred to as the storage medium) storing a computer program, which, when run by a computer such as the electronic device 200 described above, executes the diamond wire photograph recognition method described above.

[0096] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0097] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0098] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0099] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a computer-readable storage medium and includes several instructions to cause a computer device (which may be a personal computer, laptop, server, or electronic device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned computer-readable storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0100] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for identifying diamond wire photographs, characterized in that, include: Obtain the identification results of the diamond wire image to be identified by the sand identification process; When the identification result indicates that the diamond wire photograph to be identified is a fragmented photograph, the fragmented related parameters of the diamond wire photograph to be identified are obtained; The crushed sand related parameters are used to verify the crushed sand image of the diamond wire to be identified, and the crushed sand verification result is obtained.

2. The identification method according to claim 1, characterized in that, If the relevant parameters of the crushed sand include: the number of crushed sand particles and the aggregate density of the sand, the sand density, the sand quantity, the cluster center value of the busbar, and the cluster center value of the diamond; the crushed sand image verification of the diamond wire image to be identified is performed using the relevant parameters of the crushed sand, including: Perform at least one of the following judgments: i) Determine whether the number of broken sands is greater than the broken sand threshold and whether the sand aggregation density is greater than the average sand aggregation density to obtain a first determination result, wherein the average sand aggregation density is the average of the sand aggregation densities of multiple diamond wire photos, including the diamond wire photo to be identified. ii) Determine whether the sand density meets the set sand density rules to obtain a second determination result; iii) Determine whether the difference between the amount of abrasive and the average amount of abrasive exceeds a preset reasonable range, and obtain a third determination result, wherein the average amount of abrasive is the average amount of abrasive in multiple diamond wire photographs, including the diamond wire photograph to be identified. iv) Determine whether the diamond cluster center value is less than the average diamond cluster center value, and whether the busbar cluster center value is greater than the average busbar cluster center value, to obtain a fourth determination result, wherein the average diamond cluster center value is the average of the diamond cluster center values ​​of multiple diamond wire photographs including the diamond wire photograph to be identified; the average busbar cluster center value is the average of the busbar cluster center values ​​of multiple diamond wire photographs including the diamond wire photograph to be identified; When the result of each of the at least one judgments is yes, the diamond wire photograph to be identified is a fragment photograph.

3. The identification method according to claim 2, characterized in that, The fragmentation-related parameters include: busbar cluster center value and diamond cluster center value; obtaining the fragmentation-related parameters of the diamond wire image to be identified includes: Obtain the initial diamond cluster center value of the diamond tag of the diamond wire photograph to be identified, and the initial bus cluster center value of the bus tag; Based on the initial diamond cluster center value and the first correction coefficient, the diamond cluster center value of the diamond wire image to be identified is obtained; Based on the initial bus cluster center value and the second correction coefficient, the bus cluster center value of the diamond wire photograph to be identified is obtained.

4. The identification method according to claim 3, characterized in that, The steps for obtaining the first correction coefficient include: Determine the first ratio between the initial diamond cluster center value and the sum of the cluster center values ​​corresponding to the diamond label, the main wire label, and the background label of the diamond wire image to be identified; Obtain the average value of diamond cluster centers, average value of mother wire cluster centers, and average value of background cluster centers corresponding to diamond labels, mother wire labels, and background labels from multiple diamond wire photos, including the diamond wire photo to be identified. Determine a second proportion of the sum of the average value of the diamond cluster centers, the average value of the busbar cluster centers, and the average value of the background cluster centers; The first correction coefficient is determined based on the first proportion and the second proportion.

5. The identification method according to claim 3, characterized in that, The steps for obtaining the second correction coefficient include: The third ratio is determined by the sum of the initial busbar cluster center values ​​and the sum of the cluster center values ​​corresponding to the diamond label, busbar label, and background label of the diamond wire photograph to be identified; Obtain the average value of diamond cluster centers, average value of mother wire cluster centers, and average value of background cluster centers corresponding to diamond labels, mother wire labels, and background labels from multiple diamond wire photos, including the diamond wire photo to be identified. A fourth proportion is determined by the sum of the average value of the bus cluster centers, the average value of the diamond cluster centers, the average value of the bus cluster centers, and the average value of the background cluster centers; The second correction coefficient is determined based on the third proportion and the fourth proportion.

6. The identification method according to claim 1, characterized in that, The parameters related to the crushed sand include: busbar cluster center value and diamond cluster center value. The method further includes: The pixels of the diamond wire photograph to be identified are clustered according to a specified label, and the cluster center value used in the clustering is recorded. The specified label includes diamond label, busbar label and background label.

7. The identification method according to claim 6, characterized in that, The diamond cluster center is the cluster center with the largest value among all cluster center values ​​in the diamond wire image to be identified, and the bus cluster center value is the cluster center in the diamond wire image to be identified whose value is between the largest and smallest cluster center.

8. A device for recognizing diamond wire photographs, characterized in that, include: The acquisition module is used to acquire the recognition results of the diamond wire image to be identified by the sand identification process; And when the identification result indicates that the diamond wire photograph to be identified is a fragmented photograph, obtain the fragmented related parameters of the diamond wire photograph to be identified; The verification module is used to verify the diamond wire image to be identified using the sand-related parameters, and obtain the sand verification result.

9. An electronic device, characterized in that, include: A memory and a processor, wherein the processor is connected to the memory; The memory is used to store programs; The processor is configured to invoke a program stored in the memory to execute the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a processor, performs the method as described in any one of claims 1-7.