Emery ground defect identification method and system
By constructing the feature distribution of X-ray image samples and combining with the improved YOLOv8 model, the problem of insufficient sample size in the detection of emery ground defects is solved, the accuracy and generalization ability of the detection model are improved, and efficient identification of early defects is achieved.
Patent Information
- Application Number
- CN202510598192.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-05-09
AI Technical Summary
In the prior art, defect detection of cartilage ground relies on inefficient manual inspection and lack of effective sample augmentation methods, resulting in insufficient defect detection accuracy and generalization capabilities of deep learning models.
By constructing the first feature distribution and the second feature distribution based on X-ray image samples, combining weighted and form to fuse valuable samples and conventional sample features, the improved YOLOv8 model is used for training, and the generalization ability of the defect detection model is enhanced.
The training accuracy and generalization performance of the defect detection model are improved, and the defects in the emery ground can be more accurately identified, especially when the sample size is insufficient, effectively expanding the training data scale and enhancing the ability to identify early minor defects.
Smart Images

Figure CN120431071A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer vision technology, and in particular to a method and system for identifying diamond ground defects.
[0002] Background technology Emery flooring is formed by combining metal oxide aggregate with a concrete base. Aggregates are evenly spread on the surface of the primary setting concrete and then smoothed, compacted, and polished to create a floor with an integrated wear-resistant layer and structural layer. Due to long-term high loads and environmental factors, emery floors may develop cracks, bulging, and delamination. Promptly detecting defects not only prevents further damage but is also crucial for extending the lifespan of emery floors, reducing maintenance costs, and ensuring public safety.
[0003] Early defect detection relied primarily on manual inspection, with inspectors assessing ground conditions through visual observation, measurement tools, and complex data recording procedures. However, this labor-intensive process, coupled with inefficiencies and subjective interpretations of defect severity, gradually became unsuitable for the rapid development of ground defect detection. In recent years, the introduction of computer vision technology has significantly improved the accuracy of defect detection, such as cracks. By capturing digital images and videos using devices like drones and cameras, combined with machine learning and deep learning models, high-precision crack detection and identification can be achieved.
[0004] However, deep learning models require training with a large amount of labeled data. When the number of defect samples on the diamond abrasive floor is insufficient, how to increase the number of defect samples becomes an urgent problem to be solved. Summary of the Invention
[0005] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0006] The main purpose of the embodiments of the present disclosure is to propose a method for identifying diamond abrasive ground defects, which can augment the training samples of the defect detection model to improve the generalization ability and detection accuracy of the defect detection model.
[0007] A first aspect of an embodiment of the present application provides a method for identifying defects on a corundum surface, the method comprising: Obtaining X-ray image samples in the target diamond ground; Extracting image features from the X-ray image samples, and constructing a first feature distribution of the X-ray image samples and a second feature distribution of pixels corresponding to the X-ray image samples based on the image features; wherein the first feature distribution is obtained based on a weighted sum of image features corresponding to valuable X-ray image samples and image features corresponding to regular X-ray image samples, wherein the valuable X-ray image samples are images without identified defect features, and the regular X-ray image samples are images with identified defect features; Matching the first characteristic distribution and the second characteristic distribution in a database to obtain a matched sample set; the database includes multiple sample sets and their corresponding characteristic distributions, and the samples in each sample set are X-ray images obtained by X-ray sampling based on existing corundum ground; Training a defect detection model based on the X-ray image sample and the matched sample set until the training is completed; Defect detection is performed on the target diamond abrasive surface based on the defect detection model.
[0008] The embodiment of the present disclosure provides a method for identifying defects on diamond ground surfaces, which has at least the following beneficial effects: This method constructs a first feature distribution and a second feature distribution based on the image features in the X-ray image samples, wherein the first feature distribution refers to a comprehensive feature data distribution formed by fusing the features of valuable samples and conventional samples in a weighted sum form, which can balance the influence of different sample types on the feature space, and the combination of valuable samples and conventional samples can represent important information of data distribution characteristics and accurately reflect the data distribution; and the second feature distribution represents the feature distribution of pixel points. Combining the comprehensive expression of the two distributions and matching them in the database can match a sample set with a more accurate data distribution in the database. Finally, based on the X-ray image samples and the matched sample set, the defect detection model is trained, which can improve the accuracy of the defect detection model training.
[0009] In some embodiments, the first feature distribution includes: ; ; ; ; ; in, is the first characteristic distribution, For custom weights, is the mapping function of element-wise dot product, For the The feature vector of X-ray image samples, is the index of the X-ray image sample, is the total number of X-ray image samples, , is the total number of valuable X-ray image samples, is the total number of conventional X-ray image samples.
[0010] In some embodiments, constructing a second feature distribution of pixels corresponding to the X-ray image sample based on the image features includes: Determining key pixel points in the image features; wherein the key pixel points are pixel points that are all extreme values in a multi-scale space; Constructing a rectangular window with the key pixel point as the center; The gradient accumulation value of all pixels in the rectangular window is extracted, and the gradient accumulation value is used as the second feature distribution of the key pixel point.
[0011] In some embodiments, the matching in a database based on the first feature distribution and the second feature distribution includes: Calculating a weighted sum of the first feature distribution and the second feature distribution to obtain an overall feature distribution; Calculating the similarity between the overall feature distribution of the X-ray image sample and the overall feature distribution of the sample set in the database; The sample set with the highest similarity is selected as the matching result.
[0012] In some embodiments, the similarity is cosine similarity.
[0013] In some embodiments, before training the defect detection model based on the X-ray image sample and the matched sample set, the method further includes: Selecting an X-ray image sample to be enhanced from the X-ray image samples; Perform the following operations on the X-ray image sample to be enhanced to obtain an enhanced X-ray image sample: ; ; in, Pixels The X-ray image sample to be enhanced at Pixels Enhanced X-ray image sample at Pixels The transmittance at The value range is [0,1]; ) is a pixel The coordinates of ) is the center pixel The coordinates of is the square root of the maximum value of the height and width of the X-ray image sample to be enhanced, is the preset thickness value, is a natural exponential function; The training of the defect detection model based on the X-ray image sample and the matched sample set includes: The defect detection model is trained based on the enhanced X-ray image samples, the unenhanced X-ray image samples and the matched sample set.
[0014] In some embodiments, the defect detection model is an improved YOLOv8 model, wherein the improved YOLOv8 model includes: a backbone network, a path aggregation network and a head network part, wherein the backbone network and the head network part of the improved YOLOv8 model are the same as the backbone network and the head network part of the YOLOv8 model; the path aggregation network of the improved YOLOv8 model is based on the path aggregation network of the YOLOv8 model, and the C2F therein is replaced with C2F-MSDA; the C2F-MSDA is based on the C2F, and the MSDA attention mechanism is added.
[0015] A second aspect of the embodiments of the present application provides a diamond ground defect recognition system, the system comprising: An image sample acquisition module is used to acquire X-ray image samples from the target diamond ground surface; a feature distribution extraction module, configured to extract image features from the X-ray image samples and construct, based on the image features, a first feature distribution of the X-ray image samples and a second feature distribution of pixels corresponding to the X-ray image samples; wherein the first feature distribution is obtained based on a weighted sum of image features corresponding to valuable X-ray image samples and image features corresponding to regular X-ray image samples, wherein the valuable X-ray image samples are images without identified defect features and the regular X-ray image samples are images with identified defect features; a feature distribution matching module, configured to perform matching in a database based on the first feature distribution and the second feature distribution to obtain a matched sample set; the database comprising a plurality of sample sets and their corresponding feature distributions, wherein the samples in each sample set are X-ray images obtained by X-ray sampling based on an existing corundum ground surface; A model training module, configured to train a defect detection model based on the X-ray image sample and the matched sample set until the training is completed; A defect detection module is used to perform defect detection on the target diamond abrasive surface based on the defect detection model.
[0016] The third aspect of an embodiment of the present application proposes an electronic device, at least one controller and a memory for communicating with the at least one controller; the memory stores instructions that can be executed by the at least one controller, and the instructions are executed by the controller to enable the controller to perform the diamond abrasive ground defect identification method described in the first aspect.
[0017] A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned method for identifying defects in corundum ground.
[0018] It can be understood that the beneficial effects of the second to fourth aspects compared with the relevant technologies are the same as the beneficial effects of the first aspect compared with the relevant technologies. Please refer to the relevant description in the first aspect and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0020] Figure 1 This is a flow chart of an embodiment of a method for identifying defects on a corundum surface provided by the present application; Figure 2 This is a structural diagram of an improved YOLOv8 model embodiment provided by this application; Figure 3 This is a structural diagram of an embodiment of a diamond abrasive ground defect identification system provided by the present application; Figure 4 This is a structural diagram of an electronic device embodiment provided by this application. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0022] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and so on, in the specification, claims, and drawings, are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.
[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application. like Figure 1 As shown, an embodiment of the present application provides a method for identifying defects on a corundum surface, the method comprising: Step S110 , obtaining an X-ray image sample of the target diamond ground surface.
[0024] In step S110, the target diamond surface is the diamond surface that needs to be inspected for defects, where defects include but are not limited to: cracks, bulges, and delamination.
[0025] Because the emery ground has many textures, in order to reduce interference, X-ray technology is used for imaging and the X-ray images are used for model training. An industrial X-ray machine can be used to collect X-ray image samples.
[0026] It should also be noted that there are multiple X-ray image samples here.
[0027] Step S120, extracting image features from the X-ray image samples, and constructing a first feature distribution of the X-ray image samples and a second feature distribution of the pixels corresponding to the X-ray image samples based on the image features; wherein the first feature distribution is obtained based on a weighted sum of the image features corresponding to the valuable X-ray image samples and the image features corresponding to the conventional X-ray image samples, the valuable X-ray image samples are images without identified defect features, and the conventional X-ray image samples are images with identified defect features.
[0028] In step S120, in order to augment the samples, the data distribution of the X-ray image samples must first be determined. After knowing the data distribution, matching can be performed in a large range of diamond abrasive ground images to find samples with the same data distribution. Finally, the original samples and the matched samples are used together as training data.
[0029] This method extracts image features from X-ray image samples. A convolutional neural network (e.g., RES-Net) can be used to extract image features and perform defect detection. The X-ray image samples are then divided into valuable X-ray image samples (i.e., images with complex features that are difficult for the model to detect defects, and therefore have high mining value) and conventional X-ray image samples (images that can be detected by the model but lack significant mining value). A first feature distribution for the X-ray image samples is derived by taking the weighted sum of the feature descriptors of the valuable and conventional X-ray image samples. Then, based on the pixels in the X-ray image samples, a second feature distribution corresponding to each pixel is constructed.
[0030] The first feature distribution of this method refers to the comprehensive distribution formed by fusing the features of valuable samples and regular samples in a weighted sum form, which can balance the impact of different sample types on the feature space. Moreover, the combination of valuable samples and regular samples can represent important information about the data distribution characteristics and accurately reflect the data distribution. The second feature distribution represents the feature distribution of pixel points. Combining the comprehensive expression of the two distributions can improve the accuracy of matching in the database.
[0031] Step S130 : performing matching in a database based on the first feature distribution and the second feature distribution to obtain a matching sample set.
[0032] In step S130 , the database includes multiple sample sets and their corresponding feature distributions, and the samples in each sample set are X-ray images obtained by performing X-ray sampling on the existing corundum ground.
[0033] It should be noted that the feature distribution corresponding to the sample set in the database also includes the corresponding first feature distribution and the corresponding second feature distribution. The calculation process of the first feature distribution and the second feature distribution is the same as the calculation process of the X-ray image sample, and will not be repeated here.
[0034] Step S140 , training the defect detection model based on the X-ray image samples and the matching sample set until the training is completed.
[0035] It should be noted that during the training of the model, labels corresponding to each sample are added.
[0036] Step S150 : performing defect detection on the target diamond ground surface based on the defect detection model.
[0037] The method for identifying defects on diamond ground surfaces provided by this application has at least the following beneficial effects: This method constructs a first feature distribution and a second feature distribution based on the image features in the X-ray image samples, wherein the first feature distribution refers to a comprehensive distribution formed by fusing the features of valuable samples and conventional samples in a weighted sum form, which can balance the influence of different sample types on the feature space, and the combination of valuable samples and conventional samples can represent important information of data distribution characteristics and accurately reflect the data distribution; and the second feature distribution represents the feature distribution of pixel points. Combining the comprehensive expression of the two distributions and matching them in the database can match a sample set with a more accurate data distribution in the database. Finally, based on the X-ray image samples and the matched sample set, the matching sample set is used to expand the scale of training data and train the defect detection model, effectively alleviating the constraints of insufficient samples on model training, enhancing the generalization performance of the model under limited data conditions, and optimizing the model's recognition ability of defect features.
[0038] Furthermore, the first characteristic distribution includes: (1); (2); (3); (4); (5); in, is the first characteristic distribution, For custom weights, is the mapping function of element-wise dot product, For the The feature vector of X-ray image samples, is the index of the X-ray image sample, is the total number of X-ray image samples, , is the total number of valuable X-ray image samples, is the total number of conventional X-ray image samples.
[0039] When constructing the first feature distribution, this method first divides the corresponding X-ray image samples into valuable X-ray image samples and conventional X-ray image samples. This is because valuable X-ray image samples are a type of image with complex features and difficult to be detected by the model. They represent the weak links of the model and have great mining value for such samples. Then, a descriptor composed of valuable X-ray image samples is constructed. and conventional X-ray image sample descriptors , the ratio of the number of valuable X-ray image samples to the total number of X-ray image samples As The weight coefficient is the ratio of the number of conventional X-ray image samples to the total number of X-ray image samples. As The weight coefficient of , makes the category with less sample size obtain higher weight in feature fusion, and further add Modulated cross-product terms , this operation can enhance the complementary information of the two types of sample features.
[0040] This combination allows the feature distribution to reflect the statistical characteristics of various samples while preserving the nonlinear correlation between features. It can represent important information about the data distribution characteristics and accurately reflect the data distribution.
[0041] Compared with existing technologies, traditional methods typically rely solely on simple feature averaging or direct concatenation, failing to effectively balance the contributions of features from varying sample sizes. This method, through the combined design of weight coefficients and cross terms, mathematically establishes a dynamic correlation between sample size and feature weights. Compared to simple linear superposition, the quadratic term generated by the dot product operation can enhance the response strength of key feature dimensions, for example, providing a stronger representation of the gradient characteristics of crack edges.
[0042] Through the above technical solution, this application achieves effective feature fusion under conditions of uneven sample size. In particular, when the number of valuable samples is small, a weight adjustment mechanism ensures that their feature contributions are not overwhelmed by those of regular samples. The introduction of cross-product terms enhances the combinatorial expressiveness of features, making the constructed feature distribution more suitable for small sample training scenarios, which helps improve the defect detection model's ability to identify early minor defects.
[0043] Furthermore, constructing a second feature distribution of pixels corresponding to the X-ray image sample based on the image features includes the following steps S210 to S230: Step S210: determining key pixel points in the image features.
[0044] Among them, key pixels are pixels that are extreme values in multi-scale space.
[0045] Step S220: construct a rectangular window with the key pixel point as the center.
[0046] Step S230: extracting the gradient accumulation value of all pixels in the rectangular window, and using the gradient accumulation value as the second feature distribution of the key pixel.
[0047] In this method, when constructing the second feature distribution, a multi-scale image sequence is first generated using a Gaussian pyramid. At each scale level, local extreme points are detected as key pixels. After establishing a rectangular window around each key point, the Sobel operator is used to calculate the x-direction gradient Gx and y-direction gradient Gy of each pixel within the window. The sum of the absolute values of Gx and Gy for all pixels within the window is then vector-synthesized to form a gradient accumulation vector representing the texture features surrounding the key point, which serves as the unique identification feature of the key point.
[0048] Compared with existing technologies, traditional methods typically directly use single-scale features or simple average gradient values, which cannot effectively distinguish between real defects and texture interference. This method enhances feature discrimination by combining a local window gradient accumulation method, significantly improving the anti-interference ability of feature description while maintaining computational efficiency. Compared with methods that directly use raw pixel values or single-scale features, this technology is more robust to lighting changes and small structural deformations. This method effectively solves the problem of feature mismatching in complex backgrounds. The gradient accumulation feature can accurately characterize the geometric characteristics of the defect edge, reducing the probability of false detection caused by similar textures.
[0049] Furthermore, the matching in the database based on the first feature distribution and the second feature distribution in step S130 includes the following steps S310 to S330: Step S310 , calculating a weighted sum of the first feature distribution and the second feature distribution to obtain an overall feature distribution.
[0050] Step S320 calculates the similarity between the overall feature distribution of the X-ray image sample and the overall feature distribution of the sample set in the database. The similarity here can be cosine similarity, which measures the directional consistency of two vectors. Specifically, cosine similarity can be achieved by calculating the cosine of the angle between the two vectors. It is suitable for feature matching in high-dimensional spaces and can effectively capture the correlation between distributions.
[0051] Step S330: Select a sample set with the highest similarity as the matching result.
[0052] In this method, the overall feature distribution refers to a comprehensive description formed by weighted fusion of features at different levels. Specifically, the numerical values of different feature distributions can be superimposed using a linear combination method to comprehensively reflect the overall characteristics and local details of the image. The sample set matching result refers to the selection of the reference data set from the database that most closely matches the characteristics of the current sample. Specifically, a sorting algorithm can be used to select the data set with the highest similarity, providing more relevant comparison samples for model training.
[0053] Specifically, during the feature matching process, the first feature distribution reflecting the global statistical features is first weightedly fused with the second feature distribution representing the gradient information around the key pixel points to generate an overall feature distribution that can take into account both macro and micro features. Subsequently, the error between the overall feature distribution and the feature vectors of all sample sets in the database is calculated using the cosine similarity algorithm. Finally, by traversing the sample sets in the database and comparing the similarity values, the sample set with the highest score is selected as the matching result. For example, in the scenario of diamond ground crack detection, the matched sample set may contain X-ray image data with similar crack directions or gradient changes, providing an effective reference for subsequent model training.
[0054] Compared with existing technologies, traditional methods typically use a single feature directly for database retrieval, such as relying solely on global statistical features or local gradient features for matching, which can easily lead to incomplete feature representation. However, this method, through a weighted feature fusion strategy, can simultaneously leverage global distribution patterns and local detail features, enhancing the robustness of the matching process. Furthermore, compared to similarity calculation methods such as Euclidean distance, cosine similarity focuses more on the directional consistency of feature vectors, effectively reducing the impact of differences in feature dimensions.
[0055] Furthermore, before training the defect detection model based on the X-ray image samples and the matched sample set in step S140, the method further includes the following steps S410 to S420: Step S410, selecting an X-ray image sample to be enhanced from the X-ray image samples; Step S420: Perform the following operations on the X-ray image sample to be enhanced to obtain an enhanced X-ray image sample: (6); (7); in, Pixels The X-ray image sample to be enhanced at Pixels Enhanced X-ray image sample at Pixels The transmittance at The value range is [0,1]; ) is a pixel The coordinates of ) is the center pixel The coordinates of is the square root of the maximum value of the height and width of the X-ray image sample to be enhanced, is the preset thickness value, is a natural exponential function; The defect detection model is trained based on X-ray image samples and matching sample sets, including: The defect detection model is trained based on the enhanced X-ray image samples, the unenhanced X-ray image samples and the matched sample set.
[0056] In this method, since the environment of the diamond abrasive floor is often dusty, the image is enhanced here, that is, the dust situation is simulated through formula (6) and formula (7), which improves the adaptability of the model to the dust situation and enhances the generalization ability of the model.
[0057] like Figure 2 Furthermore, the defect detection model is an improved YOLOv8 model, wherein the improved YOLOv8 model includes: a backbone network, a path aggregation network and a head network part, wherein the backbone network and the head network part of the improved YOLOv8 model are the same as the backbone network and the head network part of the YOLOv8 model; the path aggregation network of the improved YOLOv8 model is based on the path aggregation network of the YOLOv8 model, and the C2F therein is replaced by C2F-MSDA; C2F-MSDA is based on C2F and adds the MSDA attention mechanism.
[0058] This method introduces the Multi-Scale Dilated Attention (MSDA) mechanism, which uses a self-attention mechanism and considers its locality and sparsity at shallow layers. This effectively aggregates semantic information at different scales within the receptive field, reducing computational redundancy. The introduction of MSDA effectively captures features at different scales and focuses on key areas in the image, reducing the impact of undesirable factors on detection results.
[0059] like Figure 3 One embodiment of the present application provides a diamond ground defect recognition system, the system comprising: The image sample acquisition module 1100 is used to acquire X-ray image samples of the target diamond ground surface.
[0060] The feature distribution extraction module 1200 is used to extract image features from X-ray image samples, and construct a first feature distribution of the X-ray image samples and a second feature distribution of the pixels corresponding to the X-ray image samples based on the image features; wherein the first feature distribution is obtained based on the weighted sum of the image features corresponding to the valuable X-ray image samples and the image features corresponding to the conventional X-ray image samples, the valuable X-ray image samples are images without identified defect features, and the conventional X-ray image samples are images with identified defect features.
[0061] The feature distribution matching module 1300 is used to match the first feature distribution and the second feature distribution in the database to obtain a matched sample set; the database includes multiple sample sets and their corresponding feature distributions, and the samples in each sample set are X-ray images obtained by X-ray sampling based on the existing corundum ground.
[0062] The model training module 1400 is used to train the defect detection model based on the X-ray image samples and the matching sample set until the training is completed.
[0063] The defect detection module 1500 is used to perform defect detection on the target diamond ground surface based on the defect detection model.
[0064] It should be noted that since the corundum ground defect identification system in this embodiment and the above-mentioned corundum ground defect identification method are based on the same inventive concept, the corresponding contents in the corundum ground defect identification method embodiment are also applicable to the corundum ground defect identification system embodiment and will not be described in detail here.
[0065] like Figure 4 As shown, an embodiment of the present application further provides an electronic device, the electronic device comprising: at least one memory; at least one processor; at least one program; The programs are stored in the memory, and the processor executes at least one program to implement the above-mentioned aspects of the present disclosure.
[0066] The electronic device may be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a car computer, etc.
[0067] The electronic device according to the embodiment of the present application is described in detail below.
[0068] The processor 1600 may be implemented as a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided in the embodiments of the present application. Memory 1700 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). Memory 1700 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in memory 1700 and is called by processor 1600 to execute the construction structure safety monitoring method based on sensor data in the embodiments of this application.
[0069] Input / output interface 1800, used for information input and output; Communication interface 1900, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.); Bus 2000 , which transmits information between various components of the device (e.g., processor 1600 , memory 1700 , input / output interface 1800 , and communication interface 1900 ); The processor 1600 , the memory 1700 , the input / output interface 1800 , and the communication interface 1900 are connected to each other in communication within the device via the bus 2000 .
[0070] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned construction structure safety monitoring method based on sensor data.
[0071] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. Furthermore, memory can include high-speed random access memory and non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device.
[0072] In some embodiments, the memory may optionally include a memory remotely located relative to the processor, and the remote memory may be connected to the processor via a network. Examples of the aforementioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0073] The embodiments described in this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0074] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0075] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0076] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.
[0077] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0078] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0079] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0080] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0081] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0082] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes multiple instructions for enabling an electronic device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0083] The above is a specific description of the preferred implementation of the embodiments of the present application, but the embodiments of the present application are not limited to the above-mentioned implementation methods. Technical personnel familiar with the art can also make various equivalent modifications or substitutions without violating the spirit of the embodiments of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the embodiments of the present application.
Claims
1. A method for identifying defects in corundum ground, characterized in that: The method comprises: Obtaining X-ray image samples in the target diamond ground; Extracting image features from the X-ray image samples, and constructing a first feature distribution of the X-ray image samples and a second feature distribution of pixels corresponding to the X-ray image samples based on the image features; wherein the first feature distribution is obtained based on a weighted sum of image features corresponding to valuable X-ray image samples and image features corresponding to regular X-ray image samples, wherein the valuable X-ray image samples are images without identified defect features, and the regular X-ray image samples are images with identified defect features; Matching the first characteristic distribution and the second characteristic distribution in a database to obtain a matched sample set; the database includes multiple sample sets and their corresponding characteristic distributions, and the samples in each sample set are X-ray images obtained by X-ray sampling based on existing corundum ground; Training a defect detection model based on the X-ray image sample and the matched sample set until the training is completed; Defect detection is performed on the target diamond abrasive surface based on the defect detection model.
2. The method for identifying defects in corundum ground according to claim 1, characterized in that: The first feature distribution includes: ; ; ; ; ; in, is the first characteristic distribution, For custom weights, is the mapping function of element-wise dot product, For the The feature vector of X-ray image samples, is the index of the X-ray image sample, is the total number of X-ray image samples, , is the total number of valuable X-ray image samples, is the total number of conventional X-ray image samples.
3. The method for identifying defects in corundum ground according to claim 2, characterized in that: The constructing a second feature distribution of pixels corresponding to the X-ray image sample based on the image features includes: Determining key pixel points in the image features; wherein the key pixel points are pixel points that are all extreme values in a multi-scale space; Constructing a rectangular window with the key pixel point as the center; The gradient accumulation value of all pixels in the rectangular window is extracted, and the gradient accumulation value is used as the second feature distribution of the key pixel point.
4. The method for identifying defects in corundum ground according to claim 3, characterized in that: The matching in a database based on the first feature distribution and the second feature distribution includes: Calculating a weighted sum of the first feature distribution and the second feature distribution to obtain an overall feature distribution; Calculating the similarity between the overall feature distribution of the X-ray image sample and the overall feature distribution of the sample set in the database; The sample set with the highest similarity is selected as the matching result.
5. The method for identifying defects in corundum ground according to claim 4, characterized in that: The similarity is cosine similarity.
6. The method for identifying defects in corundum ground according to claim 1, characterized in that: Before training the defect detection model based on the X-ray image sample and the matched sample set, the method further includes: Selecting an X-ray image sample to be enhanced from the X-ray image samples; Perform the following operations on the X-ray image sample to be enhanced to obtain an enhanced X-ray image sample: ; ; in, Pixels The X-ray image sample to be enhanced at Pixels Enhanced X-ray image sample at Pixels The transmittance at The value range is [0,1]; ) is a pixel The coordinates of ) is the center pixel The coordinates of is the square root of the maximum value of the height and width of the X-ray image sample to be enhanced, is the preset thickness value, is a natural exponential function; The training of the defect detection model based on the X-ray image sample and the matched sample set includes: The defect detection model is trained based on the enhanced X-ray image samples, the unenhanced X-ray image samples and the matched sample set.
7. The method for identifying defects in corundum ground according to claim 6, characterized in that: The defect detection model is an improved YOLOv8 model, wherein the improved YOLOv8 model includes: a backbone network, a path aggregation network and a head network part, wherein the backbone network and the head network part of the improved YOLOv8 model are the same as the backbone network and the head network part of the YOLOv8 model; the path aggregation network of the improved YOLOv8 model is based on the path aggregation network of the YOLOv8 model, and the C2F therein is replaced with C2F-MSDA; the C2F-MSDA is based on the C2F and adds the MSDA attention mechanism.
8. A diamond ground defect recognition system, characterized in that: The system comprises: An image sample acquisition module is used to acquire X-ray image samples from the target diamond ground surface; a feature distribution extraction module, configured to extract image features from the X-ray image samples and construct, based on the image features, a first feature distribution of the X-ray image samples and a second feature distribution of pixels corresponding to the X-ray image samples; wherein the first feature distribution is obtained based on a weighted sum of image features corresponding to valuable X-ray image samples and image features corresponding to regular X-ray image samples, wherein the valuable X-ray image samples are images without identified defect features and the regular X-ray image samples are images with identified defect features; a feature distribution matching module, configured to perform matching in a database based on the first feature distribution and the second feature distribution to obtain a matched sample set; the database comprising a plurality of sample sets and their corresponding feature distributions, wherein the samples in each sample set are X-ray images obtained by X-ray sampling based on an existing corundum ground surface; A model training module, configured to train a defect detection model based on the X-ray image sample and the matched sample set until the training is completed; A defect detection module is used to perform defect detection on the target diamond abrasive surface based on the defect detection model.
9. An electronic device, characterized in that: include: at least one controller and a memory for communicatively coupling with the at least one controller; The memory stores instructions that can be executed by the at least one controller, and the instructions are executed by the controller to enable the controller to execute the method for identifying defects in corundum ground according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the diamond abrasive floor defect identification method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Real-time face recognition system and method thereof
CN103902960A
Cross-project defect prediction method based on feature distribution alignment and neighborhood instance selection
CN113157564A
Deep learning-based X-ray industrial detection defect identification method and system
CN116596889A
Method and system for automatically detecting surface defects of flexible touch screen
CN119205777A
X-ray image defect detection method and device, equipment and storage medium
CN119251171A