A graphite brick defect sample expansion method, device, storage medium and equipment
Patent Information
- Application Number
- CN202510329799.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2026-09-22
AI Technical Summary
[0003]但在实际工业生产中,工业制品的缺陷形态复杂多变,且随着工艺水平的持续提升,带缺陷的工业制品变得越发稀少,使得缺陷样本的获取变得极为困难,与此同时缺陷的标注也面临高昂的人工成本
[0051] This application provides a method for expanding graphite brick defect samples, comprising acquiring multiple two-dimensional image slices corresponding to graphite defect samples, and determining a defect segmentation mask for each two-dimensional image slice by defect annotation. Then, from the three-dimensional data of the graphite brick defect sample to which the two-dimensional image slice belongs, the method extracts the real defect data corresponding to the defect segmentation mask, performs at least one of extraction, defect transformation, and combination on the extracted real defect data to obtain target defect data, and determines the defect insertion position of the target defect data from the three-dimensional data of multiple graphite brick defect samples, and then fuses the target defect data with the defect insertion position to obtain the expanded graphite brick defect sample.
Smart Images

Figure CN122799201A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of expanding defect samples of industrial products, and in particular to a method, apparatus, storage medium and equipment for expanding defect samples of graphite bricks. Background Technology
[0002] In the manufacturing and quality control of high-precision industrial products such as carbon bricks and graphite bricks, defect detection is a crucial step in ensuring product performance and lifespan. In recent years, deep neural networks have been widely used in defect detection tasks for industrial products due to their powerful learning and generalization capabilities. However, the demands of industrial scenarios are constantly evolving, and the training of deep neural networks often relies on a large number of diverse training samples.
[0003] However, in actual industrial production, the defects of industrial products are complex and varied, and with the continuous improvement of technology, defective industrial products are becoming increasingly rare, making it extremely difficult to obtain defect samples. At the same time, the labeling of defects also faces high labor costs.
[0004] Therefore, there is an urgent need to find a solution for expanding high-quality defect samples from carbon bricks and graphite bricks for neural network training. Summary of the Invention
[0005] This application provides a method, apparatus, storage medium, and device for expanding graphite brick defect samples, in order to partially solve the aforementioned problems existing in the prior art.
[0006] The technical solution adopted in this application is as follows:
[0007] In a first aspect, embodiments of this application provide a method for expanding defect samples in graphite bricks, including:
[0008] Obtain two-dimensional image slices corresponding to multiple graphite brick defect samples;
[0009] For each two-dimensional image slice, the defect segmentation mask of the two-dimensional image slice is determined by the defect annotation;
[0010] Extract the real defect data corresponding to the defect segmentation mask from the three-dimensional data of the graphite brick defect sample to which the two-dimensional image slice belongs;
[0011] The target defect data is obtained by extracting, transforming, and combining at least one of the following methods from real defect data: defect extraction, defect transformation, and combination. The defect transformation includes at least one of geometric transformation and feature transformation.
[0012] Determine the defect insertion position of the target defect data from the three-dimensional data of multiple graphite brick defect samples;
[0013] The target defect data is fused with the defect insertion location to obtain an expanded graphite brick defect sample.
[0014] In some embodiments, the step of obtaining target defect data by extracting, transforming, and combining at least one of real defect data specifically includes:
[0015] Extract candidate defect data from real defect data;
[0016] When there are multiple candidate defect data, the candidate defect data are combined.
[0017] Defect transformation is performed on the combined candidate defect data to obtain the target defect data.
[0018] In some embodiments, the step of obtaining target defect data by extracting, transforming, and combining at least one of the following methods from real defect data specifically includes:
[0019] Defect transformation is performed on real defect data to obtain expanded defect data;
[0020] Target defect data is extracted from each real defect data and each expanded defect data.
[0021] In some embodiments, the step of extracting target defect data from each real defect data and each expanded defect data specifically includes:
[0022] Candidate defect data are extracted from each real defect data and each expanded defect data;
[0023] When there are multiple candidate defect data, the candidate defect data are combined to obtain the target defect data.
[0024] In some embodiments, the step of extracting target defect data from each real defect data and each augmented defect data specifically includes:
[0025] Receive user's expansion instructions;
[0026] Based on the target defect type carried by the extended instruction, defect data whose defect type information is consistent with the target defect type is extracted from each real defect data and each extended defect data, and used as the target defect data. Among them, the real defect data has corresponding defect type information, which is one of the following: hole, crack, and looseness.
[0027] In some embodiments, the step of fusing the target defect data with the defect insertion location to obtain an expanded graphite brick defect sample specifically includes:
[0028] Determine the display parameters of the graphite brick defect sample to which the defect insertion location belongs, including at least one of grayscale range, window width, and window level;
[0029] Based on the display parameters, adjust the visualization effect of the 3D model corresponding to the target defect data;
[0030] The adjusted target defect data is fused with the defect insertion position to obtain the expanded graphite brick defect sample.
[0031] In some embodiments, the step of determining the defect insertion position of the target defect data from the three-dimensional data of the plurality of graphite brick defect samples specifically includes:
[0032] The areas outside the air layer and existing defect locations in these multiple graphite brick defect samples are designated as unused areas.
[0033] Based on the geometric characteristics of the target defect data, select the defect insertion position of the target defect data from the idle area.
[0034] In some embodiments, the step of selecting the defect insertion position of the target defect data from the idle area based on the geometric characteristics of the target defect data specifically includes:
[0035] From the idle area, select regions that meet the geometric characteristics of the target defect data as candidate regions;
[0036] From the candidate region, select a position where the distance to the surface of the three-dimensional model corresponding to the graphite brick defect sample or the inner surface of an existing defect in the graphite brick defect sample is greater than a preset threshold, and use this position as the defect insertion position for the target defect data.
[0037] In some embodiments, after fusing the target defect data with the defect insertion location to obtain the expanded defect sample, the method further includes:
[0038] Determine the splicing boundary between the target defect data and the defect insertion location;
[0039] The splicing boundary is smoothed, including its physical parameters and shape.
[0040] Secondly, embodiments of this application provide a graphite brick defect sample expansion device, comprising:
[0041] The acquisition module is used to acquire each two-dimensional image slice corresponding to multiple graphite brick defect samples;
[0042] The two-dimensional annotation module is used to determine the defect segmentation mask of each two-dimensional image slice by annotating defects.
[0043] The three-dimensional extraction module is used to extract the real defect data corresponding to the defect segmentation mask from the three-dimensional data of the graphite brick defect sample to which the two-dimensional image slice belongs;
[0044] The defect insertion module is used to extract, transform, and combine at least one of the following to obtain target defect data: defect data, wherein the defect transformation includes at least one of geometric transformation and feature transformation.
[0045] The insertion position module is used to determine the defect insertion position of the target defect data from the three-dimensional data of multiple graphite brick defect samples;
[0046] The expansion module is used to fuse the target defect data with the defect insertion position to obtain an expanded graphite brick defect sample.
[0047] Thirdly, embodiments of this application provide an electronic device, which includes: a memory and a program or instructions stored in the memory and executable on a processor. When the program or instructions are executed by the processor, they implement the graphite brick defect sample expansion method provided in any of the above embodiments of this application.
[0048] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored. When the program or instructions are executed by a processor, they implement the graphite brick defect sample expansion method provided in any of the above embodiments of this application.
[0049] Fifthly, embodiments of this application provide a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform the graphite brick defect sample expansion method provided in any of the above embodiments of this application.
[0050] The technical solutions provided by the embodiments of this application bring at least the following beneficial effects:
[0051] This application provides a method for expanding graphite brick defect samples, comprising acquiring multiple two-dimensional image slices corresponding to graphite defect samples, and determining a defect segmentation mask for each two-dimensional image slice by defect annotation. Then, from the three-dimensional data of the graphite brick defect sample to which the two-dimensional image slice belongs, the method extracts the real defect data corresponding to the defect segmentation mask, performs at least one of extraction, defect transformation, and combination on the extracted real defect data to obtain target defect data, and determines the defect insertion position of the target defect data from the three-dimensional data of multiple graphite brick defect samples, and then fuses the target defect data with the defect insertion position to obtain the expanded graphite brick defect sample.
[0052] The technical solution provided in this application can realize the diversified automatic expansion of graphite brick defect samples. It involves labeling defects in two-dimensional image slices and, based on the labeling results, extracting real defect data from the three-dimensional data of the graphite brick defect samples. Through a mapping process from two-dimensional labeling to three-dimensional defect extraction, high-precision labeling is achieved. At least one of the following methods—extraction, defect transformation, and combination—can be used to generate various forms of defect data. Subsequently, based on the fusion of the target defect data and the defect insertion position, a large number of diverse graphite brick defect samples are expanded to meet the needs of neural networks for large-scale training data. Attached Figure Description
[0053] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 This is a flowchart illustrating a method for expanding defect samples in graphite bricks according to an embodiment of this application.
[0055] Figure 2 This is a schematic diagram illustrating the principle of generating diverse and expanded defect data through defect annotation, defect capture, and defect transformation, as provided in the embodiments of this application.
[0056] Figure 3 This is a schematic diagram illustrating the principle of determining the expanded graphite brick defect sample according to one embodiment of this application;
[0057] Figure 4 This is a schematic diagram of the structure of a graphite brick defect sampling device provided in an embodiment of this application;
[0058] Figure 5 This is a schematic diagram of the structure of a graphite brick defect sampling device provided in an embodiment of this application. Detailed Implementation
[0059] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0060] It should be noted that, in this document, relational terms such as "first" and "second" 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. Furthermore, 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. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0061] It should also be noted that the acquisition, storage, use, and processing of data in this application comply with relevant national laws and regulations. In the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of the embodiments in this application, and do not imply that the applicant has already used or necessarily used such solutions.
[0062] In the manufacturing and quality control of high-precision industrial products such as graphite bricks and carbon bricks, defect detection is a key step in ensuring product performance and lifespan.
[0063] In recent years, deep neural networks have been widely used in defect detection tasks of industrial products due to their powerful learning and generalization capabilities. However, training deep neural networks often requires a large number of diverse defect samples.
[0064] Collecting defective samples requires significant manpower and resources, and with advancements in manufacturing processes, defective industrial products are becoming increasingly difficult to obtain. Furthermore, with a limited number of defective samples, it is challenging to adequately train and optimize neural networks.
[0065] Based on the technical problems mentioned above, embodiments of this application provide a method, apparatus, storage medium, and device for expanding graphite brick defect samples. By annotating defects in two-dimensional image slices corresponding to the graphite brick defect samples, and based on the defect segmentation mask on the two-dimensional image slices, the actual defect data corresponding to the two-dimensional defect annotation results is extracted from the three-dimensional data of the graphite brick defect samples. Target defect data is obtained by performing at least one operation on the actual defect data, including extraction, defect transformation, and combination, thus achieving the generation of diverse defect data. Finally, the obtained target defect data is fused into the selected defect insertion position in the three-dimensional data of the graphite brick defect samples to obtain expanded graphite brick defect samples. This achieves automated defect sample generation and reduces the acquisition cost of graphite brick defect samples.
[0066] The technical solution provided in this application can automatically capture defects in three-dimensional space based on the results of defect annotation in two-dimensional space, thereby obtaining real defect data. It performs at least one operation among extraction, defect transformation, and combination on the real defect data to automatically generate diverse target defect data. Then, it determines the defect insertion position of the target defect data in the three-dimensional data of multiple graphite brick defect samples. Finally, it fuses the target defect data with the defect insertion position to generate diverse graphite brick defect samples, thus expanding the graphite brick defect sample pool. Furthermore, the diverse graphite brick defect samples can meet the needs of subsequent neural networks for large-scale training data.
[0067] Regarding the execution entity used in the embodiments of this application, it can specifically be a terminal device capable of annotating and capturing defects in graphite brick defect samples, such as a desktop computer, laptop computer, or server. Alternatively, the execution entity used in the embodiments of this application can also be a software entity, such as a client or software program installed on the terminal device. For ease of explanation, the embodiments of this application below use a server as the execution entity to describe the provided method for expanding graphite brick defect samples.
[0068] This application does not strictly limit the specific application scenarios of the graphite brick defect sample expansion method, apparatus, storage medium, and equipment provided in the embodiments. They can be flexibly selected according to actual needs, such as in building engineering inspection, to meet the training requirements of a large number of defect samples for detection models targeting structural cracks and large-area voids. To facilitate understanding of the practical application scenarios of the technical solutions provided in the embodiments of this application, the following examples illustrate the application scenarios of the graphite brick defect sample expansion method, apparatus, storage medium, and equipment provided in the embodiments of this application.
[0069] For example, in the field of industrial manufacturing defect detection, using the method provided in this application, the server acquires two-dimensional image slices corresponding to multiple industrial product defect samples, annotates each two-dimensional image slice with defects to obtain a defect segmentation mask, and then captures the real defect data corresponding to the defect segmentation mask in three-dimensional space. The server then performs geometric transformations and / or feature transformations on the real defect data to obtain diversified augmented defect data. Then, the real defect data / augmented defect data are fused with the industrial product samples to generate diversified industrial product defect samples. This effectively reduces the acquisition cost of industrial product defect samples, and the diversified industrial product defect samples can provide training data support for deep learning and machine learning models. The industrial products can be graphite bricks, carbon bricks, metal castings, components for aircraft / rockets / satellites, etc., and are not limited to these in this application.
[0070] It should be noted that the application scenarios described above are only for more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by this application. Those skilled in the art will understand that with the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems. The graphite brick defect sample expansion method provided by the embodiments of this application can be applied to various application scenarios that require defect data transformation and defect sample expansion.
[0071] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.
[0072] Figure 1 The flowchart of a method for expanding defect samples in graphite bricks provided in this application is shown, including the following steps:
[0073] S100: Obtain two-dimensional image slices corresponding to multiple graphite brick defect samples.
[0074] In one or more embodiments of this application, graphite brick is a high-precision industrial material, and the defects of graphite brick mainly include cracks, holes, and porosity. In order to extract real defect data through defect annotation and defect capture in subsequent steps, in this step, the server needs to acquire two-dimensional image slices corresponding to multiple graphite brick defect samples.
[0075] Specifically, the server can obtain two-dimensional image slices corresponding to multiple graphite brick defect samples.
[0076] It should be noted that this application does not limit the method of obtaining two-dimensional image slices of graphite brick defect samples, such as obtaining them through scanning equipment such as industrial CT scanners, laser scanners, and line scan cameras. Furthermore, in this application, the server can also preprocess each two-dimensional image slice after obtaining it to improve image quality. Of course, this application does not limit the specific content of the preprocessing and can set it according to needs, such as noise removal, image enhancement, and other preprocessing operations.
[0077] S101: For each two-dimensional image slice, determine the defect segmentation mask of the two-dimensional image slice through defect annotation.
[0078] In one or more embodiments of this application, in order to extract real defect data in three-dimensional space in subsequent steps, in this step, the server needs to determine the defect segmentation mask corresponding to each two-dimensional image slice through defect annotation.
[0079] Specifically, the server can determine the defect segmentation mask for each two-dimensional image slice by using defect annotations.
[0080] It should be noted that this application does not limit the specific method of defect annotation. For example, an automatic segmentation algorithm can be used to automatically detect and annotate defect regions in two-dimensional image slices; or a semantic segmentation network and manual correction can be used to complete defect annotation. In another embodiment of this application, the server can also perform annotation data enhancement on the defect segmentation mask of each two-dimensional image slice through random perturbation and / or interpolation algorithms to generate diverse annotation versions. The enhanced annotation data can cover a wider range of scenes and variations, enhancing diversity and improving the generalization ability of subsequent models. This application does not limit the specific content of random perturbation and / or interpolation processing on the defect segmentation mask. For example, random noise or minor geometric transformations (translation, rotation, or scaling) can be introduced into the defect segmentation mask to adjust its position or shape, or new pixel values can be generated in the defect segmentation mask through interpolation algorithms. In another embodiment of this application, a deep learning semantic segmentation model can be used to automatically locate and extract defect regions, reducing manual costs. That is, the server can segment two-dimensional image slices using a pre-trained semantic segmentation model to determine the defect segmentation mask for the defect region.
[0081] S102: Extract the real defect data corresponding to the defect segmentation mask from the three-dimensional data of the graphite brick defect sample to which the two-dimensional image slice belongs.
[0082] In one or more embodiments of this application, in order to obtain expanded defect data through geometric transformation and / or feature transformation in subsequent steps, in this step, the server needs to extract real defect data from the three-dimensional data of the graphite brick defect sample based on the defect segmentation mask determined in two-dimensional space in step S101, and construct a "defect dictionary" composed of real defect data.
[0083] Specifically, for each two-dimensional image slice, the server can extract the real defect data corresponding to the defect segmentation mask from the three-dimensional data of the graphite brick defect sample to which the two-dimensional image slice belongs, based on the defect segmentation mask of the two-dimensional image slice.
[0084] It should be noted that this application does not limit the specific method of defect capture based on two-dimensional annotation defect segmentation mask in three-dimensional space, and can be set according to actual needs. For example, defect capture can be achieved through direct region clipping, where the server can directly clip the defect region from the 3D data based on the boundary of the defect segmentation mask determined in step S101, thus obtaining the real defect data corresponding to the defect region; or cluster-based segmentation can be used to automatically segment the defect region to improve extraction accuracy, where the server can extract the pixels in the defect segmentation mask and use clustering algorithms (K-Means, DBSCAN, etc.) to cluster these pixels, thereby obtaining the real defect data of the defect region corresponding to the clustering result; or high-precision cutting algorithms (Marching Cubes, Poisson Surface Reconstruction, deep learning methods such as U-Net, Mask R-CNN, etc.) can be used to perform high-precision surface segmentation and extraction of the defect region, where the server converts the 3D data into a mesh representation using a high-precision segmentation algorithm, extracts the corresponding defect surface in the mesh based on the defect segmentation mask, reconstructs the extracted defect surface, obtains a high-precision defect model, and then determines the real defect data of the defect model; or dynamic region growing can be used. RegionSelection means that the server can start from the boundary of the defect segmentation mask and gradually expand outwards, using a dynamic threshold to determine whether to continue expanding until a preset condition is met, and extract the real defect data of the expanded area. Through adaptive expansion, it can ensure that defect details are not lost.
[0085] S103: Extract, transform, and combine at least one of the real defect data to obtain target defect data, wherein the defect transformation includes at least one of geometric transformation and feature transformation.
[0086] In one or more embodiments of this application, in order to generate diverse graphite brick defect samples in subsequent steps, the server needs to perform at least one of defect transformation, extraction, and combination on the real defect data obtained through defect capture in step S102 to obtain target defect data.
[0087] Specifically, the server can extract, transform, and combine at least one of the following methods to obtain target defect data: defect extraction, defect transformation, and combination. Defect transformation includes at least one of geometric transformation or feature transformation. Geometric transformation is used to simulate the behavior of defects in different spatial postures, mainly including rotation, flipping, and scaling. Feature transformation is used to adjust the visual features of the defects, mainly including color, grayscale, and contrast. Combining defect data is to simulate more complex defect distributions. This application does not limit the specific method of defect data combination, such as overlay or adjacency, and can be set according to actual needs. Furthermore, this application does not limit the quantity or extraction rules of target defect data, and can be set according to actual needs. For example, based on expansion requirements, real defect data or expanded defect data with the required defect type information (holes, cracks, or looseness) can be extracted as target defect data.
[0088] It should be noted that this application does not limit the specific methods of geometric transformation and / or feature transformation of the real defect data, and can be set according to actual needs. For example, the real defect data can be rotated in three dimensions using Euler angles, quaternions, or rotation matrices; the real defect data can be mirrored around a reference axis; and the size of the real defect data can be adjusted using linear or nonlinear scaling. For example, grayscale can be adjusted using linear transformation; and image contrast can be enhanced using histogram equalization or gamma correction.
[0089] In one or more embodiments of this application, the diversity of expanded defect data can be improved by modifying the texture of real defect data, performing random deformations, etc. The server can "replace or add new texture data to real defect data" and / or "introduce fractal or noise perturbations" to simulate the defect appearance of real industrial surfaces and enhance the complexity of defect morphology in graphite brick defect samples. Specifically, predefined textures can be used to replace the texture of the defect area, or new textures can be generated according to the defect generation logic (e.g., crack textures can be generated by simulating the crack growth logic under material stress or high temperature conditions). Fractal algorithms can be used to generate complex defect morphologies, and / or random noise can be added to the defect area. This application does not limit the order of extraction, defect transformation, and combination of real defect data, and any one or more of the "extraction, defect transformation, and combination" operations can be performed to obtain the target defect data, which can be set according to requirements. For example, any defect data can be directly extracted from real defect data as the target defect data, or two defect data can be extracted from real defect data and combined to obtain the target defect data.
[0090] In one or more embodiments of this application, the server can extract candidate defect data from real defect data. If there are multiple candidate defect data, the server can combine the candidate defect data and perform defect transformation on the combined candidate defect data to obtain target defect data. If there is only one candidate defect data, the server can use that candidate defect data as the target defect data. In another embodiment, the server can perform defect transformation on real defect data to obtain expanded defect data, and then extract candidate defect data from each real defect data and each expanded defect data. If there are multiple candidate defect data, the server can combine the candidate defect data to obtain target defect data. If there is only one candidate defect data, the server can use that candidate defect data as the target defect data.
[0091] like Figure 2 The diagram shown is a schematic of how this application generates diverse and expanded defect data through defect annotation, defect capture, and defect transformation.
[0092] S104: Determine the defect insertion position of the target defect data from the three-dimensional data of the plurality of graphite brick defect samples.
[0093] In one or more embodiments of this application, in order to obtain the expanded graphite defect sample in a subsequent step, in this step, the server needs to determine the defect insertion position of the target defect data from the three-dimensional data of multiple graphite brick defect samples.
[0094] Specifically, the server can determine the defect insertion position of the target defect data from the 3D data of multiple graphite brick defect samples. The defect insertion position is located in an unoccupied area of the graphite brick defect sample, avoiding conflict with air layers or existing defect areas. This application does not limit the specific method of selecting the defect insertion position; for example, it can be randomly selected. Alternatively, the server can provide the user with feedback information, including the 3D data of multiple graphite brick defect samples and the target defect data, and receive the defect insertion position determined by the user based on this feedback information. This involves a manually assisted selection method to simulate graphite brick defect samples in a real industrial scenario.
[0095] S105: The target defect data is fused with the defect insertion position to obtain an expanded graphite brick defect sample.
[0096] In one or more embodiments of this application, the server can fuse the target defect data obtained in step S103 with the defect insertion position determined in step S104 to obtain an expanded graphite brick defect sample.
[0097] Specifically, the server can paste the target defect data into the defect insertion position determined in step S104 to achieve the fusion of the target defect data and the graphite brick defect sample to which the defect insertion position belongs, thereby obtaining the expanded graphite brick defect sample.
[0098] It should be noted that the server can export the expanded graphite brick defect samples into common file formats for subsequent training of detection algorithms or neural networks. This application does not restrict the type of exported file format; it can be set according to actual needs, such as point cloud format (Polygon File Format, Object File Format), voxel mesh format (NPZ, BINVOX), or deep learning training-specific formats (TFRecord, HDF5). Alternatively, the generated data can be uploaded to a cloud platform, allowing different terminals to simultaneously obtain the expanded defect data, the real defect data, and the expanded graphite brick defect samples.
[0099] In the above method, the server acquires two-dimensional image slices corresponding to multiple graphite brick defect samples. For each two-dimensional image slice, a defect segmentation mask is determined through defect annotation, achieving defect annotation in two-dimensional space. Based on the result of defect annotation in two-dimensional space, real defect data is extracted from the three-dimensional data of the graphite brick defect samples. That is, the defect extraction process is achieved by mapping two-dimensional annotation to three-dimensional space, realizing high-precision annotation. Subsequently, at least one of the following can be performed on the extracted real defect data: extraction, defect transformation, and combination, to obtain target defect data. Among them, defect transformation of the extracted real defect data can generate multiple different forms of defect data based on the same defect data. Then, the obtained target defect data is fused with the defect insertion position, thereby expanding and generating a large number of diverse graphite brick defect samples to meet the needs of deep learning for large-scale training data.
[0100] It should be noted that this application does not limit the selection of defect insertion positions to existing graphite brick defect samples, but also allows selection from defect-free graphite brick samples, thereby fusing the target defect data with defect-free graphite brick samples to generate new graphite brick defect samples.
[0101] like Figure 3 The diagram shown is a structural schematic of a sample of a graphite brick defect that has been expanded according to an embodiment of this application.
[0102] In step S106, after pasting the target defect data to the defect insertion position, the splicing boundary can be processed to naturalize the edges, so as to avoid obvious separation between the defect and the graphite brick defect sample to which the defect insertion position belongs at the splicing point.
[0103] In one or more embodiments of this application, the server can determine the splicing boundary after fusing the target defect data with the defect insertion position, and perform smoothing processing on the splicing boundary, including physical parameters and morphology.
[0104] It should be noted that this application does not limit the specific methods for smoothing the splicing boundary, including physical parameters and morphology, and can be set according to actual needs. For example, smoothing algorithms and bilateral filtering can be used to eliminate the sharp transition at the defect pasting boundary, making the edge softer; or Laplacian smoothing can be used, that is, updating the boundary vertices of the defect region of the target defect data so that they gradually tend to the average position of the surrounding vertices; or surface fitting can be used, that is, using spline interpolation to fit the boundary points of the splicing boundary to generate a smooth splicing boundary; or Bézier curve fitting can be used to fit the splicing boundary; or noise simulation can be used, that is, adding random gradient noise at the splicing boundary to make the splicing boundary and the graphite brick defect sample to which the defect insertion position belongs merge more naturally; or even specialized neural network models (such as networks based on PatchGAN, Inpainting networks, etc.) can be used to perform deep learning fusion processing on the defect edges to achieve natural connection.
[0105] In step S104, it is mentioned that based on the expansion requirements, real defect data or expanded defect data of the required defect type information (pores, cracks, or looseness) can be extracted as target defect data to meet the specific graphite brick defect sample expansion requirements. Based on this, in one or more embodiments of this application, the server can receive the user's expansion instruction and, based on the expansion instruction, extract real defect data and / or expanded defect data that meet the user's requirements as target defect data, specifically as follows:
[0106] Specifically, the server can receive an expansion command initiated by the user, and based on the target defect type carried in the expansion command, extract defect data whose defect type information matches the target defect type from each real defect data and each expanded defect data, as the target defect data. The real defect data has corresponding defect type information, which is one of voids, cracks, or looseness. In another embodiment, the server can receive an expansion command initiated by the user, and based on the target defect type carried in the expansion command, extract defect data whose defect type information matches the target defect type from each real defect data, as candidate defect data. The candidate defect data is then combined and transformed to obtain the target defect data. Of course, in this application, defect data extraction can be based on the user's expansion command, and the specific content extracted is not limited in this application.
[0107] It should be noted that this application does not limit the specific method for determining the defect type information corresponding to each real defect data. The method can be set according to actual needs, such as using the defect annotation method mentioned in S101 to determine the defect type information of each real defect data type. Of course, to meet the subsequent expansion needs of specific defect type information, the server can construct a defect dictionary corresponding to each defect type information based on the real defect data of that defect type information, thereby facilitating the automatic expansion of the graphite brick defect sample according to expansion needs.
[0108] In step S106, the server needs to fuse the target defect data with the defect insertion position. However, since the target defect data and the defect insertion position may come from different graphite brick defect samples, they may not be completely identical in display parameters such as grayscale range, window level, and window width. Therefore, in one or more embodiments of this application, in order to improve the realism of the graphite brick defect samples obtained through fusion, the server can adjust the visualization effect of the 3D model corresponding to the real defect data, as follows:
[0109] Specifically, the server can determine the display parameters of the graphite brick defect sample to which the defect insertion position belongs, and based on these display parameters, adjust the visualization effect of the 3D model corresponding to the target defect data. The adjusted target defect data is then fused with the defect insertion position to obtain the expanded graphite brick defect sample. The display parameters include at least one of grayscale range, window width, and window level.
[0110] It should be noted that the purpose of adjusting the visualization effect based on the display parameters described above is to ensure that the visualization effect of the target defect data is consistent with that of the graphite brick defect sample to which the defect insertion position belongs, thereby improving the fusion effect. Therefore, in one or more embodiments of this application, the server can also adjust the visualization effect of the 3D model corresponding to the graphite brick defect sample to which the defect insertion position belongs based on the display parameters of the real defect data. Of course, the server can also adjust each real defect data and each graphite brick defect sample based on preset display parameters to achieve a consistent visualization effect.
[0111] In step S105, the server may randomly select a defect insertion position for the target defect data from an idle area among multiple graphite brick defect samples, which may require multiple attempts to find a suitable insertion position. Therefore, in one or more embodiments of this application, the server may select a defect insertion position from an idle area based on the geometric features of the target defect data, as follows:
[0112] Specifically, the server can use the air layer and the area outside the existing defect location in multiple graphite brick defect samples as idle areas, and select the defect insertion position of the target defect data from the idle areas according to the geometric characteristics of the target defect data.
[0113] It should be noted that this application does not limit the specific method of selecting the defect insertion position based on geometric features. For example, based on the target defect data, the size of the inserted defect corresponding to the target defect data is determined, and a position that can accommodate the size is randomly selected from the idle area as the defect insertion position.
[0114] Of course, to avoid interference between the inserted target defect data and existing defect areas, and considering that in actual industrial scenarios, the defect distribution in graphite bricks is usually random, but these defects maintain a certain distance from each other, in order to avoid mutual interference between defects and improve the rationality of defect insertion, in one or more embodiments of this application, the server can select the defect insertion position of the target defect data based on a preset threshold of the set distance, as follows:
[0115] Specifically, the server can select regions from the idle areas that meet the geometric characteristics of the target defect data as candidate regions, and select from the candidate regions the position where the distance to the surface of the three-dimensional model corresponding to the graphite brick defect sample or the inner surface of the existing defect in the graphite brick defect sample is greater than a preset threshold, as the defect insertion position of the target defect data.
[0116] In the above, by setting a preset threshold for distance, the distribution of graphite brick defects in an industrial setting can be simulated more realistically, and mutual interference between defects can be avoided, which facilitates the subsequent training of the neural network. Of course, this application does not limit the specific method of selecting the defect insertion position based on the preset threshold. For example, ICP (Iterative ClosestPoint) or a matching algorithm based on Hausdorff distance can be used to determine the spatial alignment relationship between the target defect data and the inner and outer surfaces of the graphite brick defect sample.
[0117] In the above embodiments, the method of mapping two-dimensional annotation to three-dimensional space is used to capture real defect data. Furthermore, this application can also utilize augmented reality (AR) technology to allow users to directly annotate defects on the three-dimensional model of graphite brick defect samples; or it can use point cloud slicing technology to slice the three-dimensional data of graphite brick defect samples into multiple layers, use a deep learning model (such as PointCore or a memory-based detector) to segment and identify defects in the sliced point cloud, and then use Delaunay triangulation or Poisson Surface Reconstruction to directly generate the three-dimensional defect surface corresponding to the real defect data from the annotated point cloud; or it can use a visually guided semi-automatic tool that combines the advantages of automation and manual annotation, allowing users to draw defect outlines on the three-dimensional model of graphite brick defect samples using intelligent pen drawing, automatic edge detection, and other auxiliary functions, with the system automatically recognizing and generating annotations.
[0118] Of course, in this application, the server can also use multi-view image reconstruction to restore the three-dimensional defect morphology corresponding to the real defect data, or perform highly realistic three-dimensional reconstruction of complex morphological defects based on neural radiation field technology such as NeRF.
[0119] The above describes a method for expanding graphite brick defect samples in one or more embodiments of this application. Based on the same idea, this application also provides a corresponding device for expanding graphite brick defect samples, such as... Figure 4 As shown.
[0120] The acquisition module 400 is used to acquire each two-dimensional image slice corresponding to multiple graphite brick defect samples;
[0121] The two-dimensional annotation module 401 is used to determine the defect segmentation mask of each two-dimensional image slice by using defect annotation;
[0122] The three-dimensional extraction module 402 is used to extract the real defect data corresponding to the defect segmentation mask from the three-dimensional data of the graphite brick defect sample to which the two-dimensional image slice belongs;
[0123] The insertion defect module 403 is used to extract, transform, and combine at least one of the real defect data to obtain target defect data, wherein the defect transformation includes at least one of geometric transformation and feature transformation;
[0124] The insertion position module 404 is used to determine the defect insertion position of the target defect data from the three-dimensional data of the plurality of graphite brick defect samples;
[0125] The expansion module 405 is used to fuse the target defect data with the defect insertion position to obtain an expanded graphite brick defect sample.
[0126] In the embodiments provided in this application, the above-described apparatus can be used to expand the graphite brick defect samples. Specifically, it involves acquiring multiple two-dimensional image slices corresponding to graphite defect samples, and for each two-dimensional image slice, determining the defect segmentation mask through defect annotation, thus achieving defect annotation in two-dimensional space. Based on the result of defect annotation in two-dimensional space, real defect data is extracted from the three-dimensional data of the graphite brick defect samples. This process of mapping two-dimensional annotation to three-dimensional space achieves high-precision annotation. Subsequently, at least one of the following methods—extraction, defect transformation, and combination—is performed on the extracted real defect data to generate various forms of defect data, thereby obtaining target defect data. This target data is then fused with the defect insertion position, expanding and generating a large number of diverse graphite brick defect samples to meet the neural network's need for large-scale training data.
[0127] In one embodiment, the above-mentioned defect insertion module 403 is specifically used to: extract candidate defect data from the real defect data; combine the candidate defect data when there are multiple candidate defect data; and perform defect transformation on the combined candidate defect data to obtain target defect data.
[0128] In one embodiment, the above-mentioned defect insertion module 403 can also be used to perform defect transformation on the real defect data to obtain expanded defect data; and extract target defect data from each real defect data and each expanded defect data.
[0129] In one embodiment, the above-mentioned defect insertion module 403 can also be used to extract candidate defect data from each real defect data and each expanded defect data; and when there are multiple candidate defect data, combine the candidate defect data to obtain target defect data.
[0130] In one embodiment, the above-mentioned defect insertion module 403 can also be used to receive an expansion instruction from a user; and according to the target defect type carried by the expansion instruction, extract defect data whose defect type information is consistent with the target defect type from each real defect data and each expanded defect data as target defect data, wherein the real defect data has corresponding defect type information, and the defect type information is one of hole, crack and looseness.
[0131] In one embodiment, the expansion module 405 is specifically used to: determine the display parameters of the graphite brick defect sample to which the defect insertion position belongs, wherein the display parameters include at least one of grayscale range, window width, and window level; adjust the visualization effect of the three-dimensional model corresponding to the target defect data according to the display parameters; and fuse the adjusted target defect data with the defect insertion position to obtain the expanded graphite brick defect sample.
[0132] In one embodiment, the insertion position module 404 is specifically used to: regard the area outside the air layer and existing defect positions in the plurality of graphite brick defect samples as an idle area; and select the defect insertion position of the target defect data from the idle area according to the geometric characteristics of the target defect data.
[0133] In one embodiment, the insertion position module 404 can also be used to: filter out regions that meet the geometric characteristics of the target defect data from the idle regions as candidate regions; and select from the candidate regions a position where the distance to the surface of the three-dimensional model corresponding to the graphite brick defect sample or the inner surface of an existing defect in the graphite brick defect sample is greater than a preset threshold as the defect insertion position of the target defect data.
[0134] In one embodiment, the device further includes a splicing processing module 406 specifically configured to determine the splicing boundary between the target defect data and the defect insertion position; and to perform smoothing processing on the splicing boundary, including physical parameters and morphology.
[0135] Based on the above-described method for expanding graphite brick defect samples, this application also provides a specific embodiment of a graphite brick defect sample expansion device.
[0136] Figure 5 This is a schematic diagram of the hardware structure of a graphite brick defect sample expansion device provided in one embodiment of this application.
[0137] A graphite brick defect sample expansion device may include a processor 501 and a memory 502 storing computer program instructions.
[0138] Specifically, the processor 501 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0139] Memory 502 may include mass storage for data or instructions. For example, and not limitingly, memory 502 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 502 may include removable or non-removable (or fixed) media. Where appropriate, memory 502 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 502 is non-volatile solid-state memory.
[0140] The processor 501 reads and executes computer program instructions stored in the memory 502 to implement any of the graphite brick defect sample expansion methods in the above embodiments.
[0141] In one example, a graphite brick defect sample expansion device may further include a communication interface 503 and a bus 510. Wherein, as... Figure 5 As shown, the processor 501, memory 502, and communication interface 503 are connected through bus 510 and complete communication with each other.
[0142] The communication interface 503 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0143] Bus 510 includes hardware, software, or both, that couples components of a graphite brick defect sample augmentation device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 510 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.
[0144] Furthermore, in conjunction with the graphite brick defect sample expansion method described in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the graphite brick defect sample expansion methods described in the above embodiments.
[0145] In addition, in conjunction with the graphite brick defect sample expansion method in the above embodiments, this application embodiment can provide a computer program product to implement it. When the instructions in the computer program product are executed by the processor of an electronic device, the electronic device executes the graphite brick defect sample expansion method provided by any aspect of the above embodiments of this application.
[0146] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0147] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0148] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0149] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0150] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A method for expanding defect samples in graphite bricks, characterized in that, include: Obtain two-dimensional image slices corresponding to multiple graphite brick defect samples; For each two-dimensional image slice, the defect segmentation mask of the two-dimensional image slice is determined by the defect annotation; Extract the real defect data corresponding to the defect segmentation mask from the three-dimensional data of the graphite brick defect sample to which the two-dimensional image slice belongs; The target defect data is obtained by extracting, transforming, and combining at least one of the real defect data, wherein the defect transformation includes at least one of geometric transformation and feature transformation. The defect insertion position of the target defect data is determined from the three-dimensional data of the multiple graphite brick defect samples; The target defect data is fused with the defect insertion position to obtain an expanded graphite brick defect sample.
2. The method according to claim 1, characterized in that, The step of extracting, transforming, and combining at least one of the real defect data to obtain the target defect data specifically includes: Candidate defect data are extracted from the actual defect data; When there are multiple candidate defect data, the candidate defect data are combined. Defect transformation is performed on the combined candidate defect data to obtain the target defect data.
3. The method according to claim 1, characterized in that, The step of extracting, transforming, and combining at least one of the real defect data to obtain the target defect data specifically includes: Defect transformation is performed on the real defect data to obtain expanded defect data; Target defect data is extracted from each real defect data and each expanded defect data.
4. The method according to claim 3, characterized in that, The step of extracting target defect data from each real defect data and each expanded defect data specifically includes: Candidate defect data are extracted from each real defect data and each expanded defect data; When there are multiple candidate defect data, the candidate defect data are combined to obtain the target defect data.
5. The method according to claim 3, characterized in that, The step of extracting target defect data from each real defect data and each expanded defect data specifically includes: Receive user's expansion instructions; According to the target defect type carried by the extended instruction, defect data whose defect type information is consistent with the target defect type is extracted from each real defect data and each extended defect data, and used as target defect data. The real defect data has corresponding defect type information, which is one of hole, crack and looseness.
6. The method according to claim 1, characterized in that, The step of fusing the target defect data with the defect insertion position to obtain the expanded graphite brick defect sample specifically includes: Determine the display parameters of the graphite brick defect sample to which the defect insertion position belongs, wherein the display parameters include at least one of grayscale range, window width, and window level; Based on the display parameters, adjust the visualization effect of the three-dimensional model corresponding to the target defect data; The adjusted target defect data is fused with the defect insertion position to obtain the expanded graphite brick defect sample.
7. The method according to claim 1, characterized in that, The step of determining the defect insertion position of the target defect data from the three-dimensional data of the plurality of graphite brick defect samples specifically includes: The areas outside the air layer and existing defect locations in the multiple graphite brick defect samples are designated as unused areas. Based on the geometric characteristics of the target defect data, the defect insertion position of the target defect data is selected from the idle area.
8. The method according to claim 7, characterized in that, The step of selecting the defect insertion position of the target defect data from the idle area based on the geometric features of the target defect data specifically includes: From the idle areas, regions that meet the geometric characteristics of the target defect data are selected as candidate regions; From the candidate region, a position whose distance from the surface of the three-dimensional model corresponding to the graphite brick defect sample or the inner surface of an existing defect in the graphite brick defect sample is greater than a preset threshold is selected as the defect insertion position of the target defect data.
9. The method according to claim 1, characterized in that, After fusing the target defect data with the defect insertion position to obtain the expanded defect sample, the method further includes: Determine the splicing boundary between the target defect data and the defect insertion position; The splicing boundary is smoothed, including physical parameters and morphology.
10. A device for expanding defect samples in graphite bricks, characterized in that, include: The acquisition module is used to acquire each two-dimensional image slice corresponding to multiple graphite brick defect samples; The two-dimensional annotation module is used to determine the defect segmentation mask of each two-dimensional image slice by using defect annotation; The three-dimensional extraction module is used to extract the real defect data corresponding to the defect segmentation mask from the three-dimensional data of the graphite brick defect sample to which the two-dimensional image slice belongs; The defect insertion module is used to extract, transform, and combine at least one of the real defect data to obtain target defect data, wherein the defect transformation includes at least one of geometric transformation and feature transformation. The insertion position module is used to determine the defect insertion position of the target defect data from the three-dimensional data of the plurality of graphite brick defect samples; An expansion module is used to fuse the target defect data with the defect insertion position to obtain an expanded graphite brick defect sample.
11. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores a program or instructions that, when executed by a processor, implement the method as described in any one of claims 1-9.
12. An electronic device, characterized in that, The device includes: a processor and a memory storing programs or instructions; When the processor executes the program or instructions, it implements the method as described in any one of claims 1-9.