Sample determination method and device, electronic equipment, storage medium and computer program product
By generating defect images through fractal modeling and Perlin noise technology, and processing samples using high-precision laser and micro-milling techniques, the problem of insufficient training sample quality in existing technologies is solved. This enables the efficient generation of training samples that conform to the characteristics of the target defect and the imaging environment, thereby improving the performance of the defect detection model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA INSTITUTE OF ATOMIC ENERGY
- Filing Date
- 2025-12-09
- Publication Date
- 2026-04-24
AI Technical Summary
Existing technologies struggle to generate high-quality, controllable, and reproducible training samples that meet the training requirements of defect detection models, especially when simulating minute surface defects in nuclear fuel rods, where conventional processing techniques fail to accurately reflect the characteristics of natural defects.
Defect images are generated by fractal modeling and Perlin noise technology. Samples are then processed using high-precision laser and micro-milling techniques to generate vectorized processing paths that conform to the target defects. High-resolution imaging is then performed to obtain training samples that include defect features, processing features, and imaging environment features.
It achieves high quality and controllability of training samples, accurately reflects the characteristics of target defects and imaging environment, and improves the training efficiency and recognition accuracy of defect detection models.
Smart Images

Figure CN121921591A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence (AI), and more particularly to a sample determination method, apparatus, electronic device, storage medium, and computer program product. Background Technology
[0002] Currently, nuclear fuel rods may develop minute surface defects during production and service, such as pores, cracks, and inclusions. These defects pose potential risks to nuclear safety; therefore, establishing a highly robust defect detection model (which can also be understood as an automated defect detection model) is crucial.
[0003] However, there is currently no effective solution for obtaining training samples (which can also be understood as defect samples, etc.) that can meet the training requirements of defect detection models. Summary of the Invention
[0004] To address the related technical issues, embodiments of this application provide a sample determination method, apparatus, electronic device, storage medium, and computer program product.
[0005] The technical solution of this application embodiment is implemented as follows: This application provides a sample determination method, including: Generate a defect image corresponding to the target defect; Based on the defect image, a vectorized processing path is generated; The defective sample is obtained by processing according to the vectorized processing path. The defective sample is imaged to obtain the imaging results, which are then used as training samples for the defect detection model.
[0006] In the above scheme, the training samples include defect features, processing features, and imaging environment features.
[0007] In the above scheme, the imaging environment features are associated with one or more of the following: Imaging reflection; Imaging shadows; Imaging illumination; Imaging noise; Image focal length distortion.
[0008] In the above scheme, generating the defect image corresponding to the target defect includes: The defect image is obtained by merging multiple noise images generated by the Perlin noise function using fractal modeling techniques; wherein the noise image is associated with the target defect.
[0009] In the above scheme, the processing according to the vectorized processing path includes: Based on high-precision laser technology and / or micro-milling technology, machining is performed according to the vectorized machining path.
[0010] In the above scheme, the defect morphology of the defective sample is continuously controlled by adjusting the processing parameters in real time.
[0011] In the above scheme, local controllable perturbation is performed during the processing to simulate the random energy release characteristics corresponding to the target defect in the defect sample.
[0012] The method in the above scheme further includes: Using the defect images and imaging results, the processing accuracy of the defective sample is evaluated to obtain evaluation results, which are used at least to adjust the processing parameters.
[0013] This application embodiment also provides a sample determining device, disposed in an electronic device, including: The generation unit is used to generate the defect image corresponding to the target defect; The path conversion unit is used to generate a vectorized processing path based on the defect image; A processing unit is used to process according to the vectorized processing path to obtain a defective sample; An imaging unit is used to image the defective sample, obtain imaging results, and use the imaging results as training samples associated with the defect detection model.
[0014] This application also provides an electronic device, including: a processor and a communication interface; wherein, The processor is used to generate a defect image corresponding to the target defect; Based on the defect image, a vectorized processing path is generated; The defective sample is obtained by processing according to the vectorized processing path. The defective sample is imaged to obtain the imaging results, which are then used as training samples for the defect detection model.
[0015] This application also provides an electronic device, including: a processor and a memory for storing a computer program capable of running on the processor. When the processor runs the computer program, it executes the steps of any of the above methods.
[0016] This application also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of any of the above methods.
[0017] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above methods.
[0018] The sample determination method, apparatus, electronic device, storage medium, and computer program product provided in this application generate a defect image corresponding to a target defect; generate a vectorized processing path based on the defect image; process the defect sample according to the vectorized processing path to obtain a defective sample; image the defective sample to obtain an imaging result, and use the imaging result as a training sample associated with a defect detection model. The solution provided in this application, by constructing an integrated sample determination method that includes a defect image, processing path, and training sample, enables the training sample to simultaneously reflect the characteristics of both the target defect and the imaging environment, improving the quality of the training sample; at the same time, it ensures the controllability and reproducibility of the training sample. Attached Figure Description
[0019] Figure 1 This is a schematic flowchart of the sample determination method in an embodiment of this application; Figure 2 A schematic diagram illustrating the process of generating defect images for embodiments of this application; Figure 3 This is a schematic diagram illustrating the effect of fractal accumulation in an embodiment of this application; Figure 4 This is a flowchart illustrating a method for the controllable generation and high-precision processing of random defects on the surface of nuclear fuel rods, serving as an application example of this application. Figure 5 This is a schematic diagram illustrating the conversion from defect mask to processing path, which is an application example of this application. Figure 6 This is an imaging schematic diagram of a defective sample used as an application example in this application; Figure 7 This is a schematic diagram of the sample determination device according to an embodiment of this application; Figure 8 This is a schematic diagram of the electronic device structure according to an embodiment of this application. Detailed Implementation
[0020] The present application will now be described in further detail with reference to the accompanying drawings and embodiments.
[0021] Currently, in scenarios where defect detection models (i.e., AI models used to detect defects) are used to detect potential defects in nuclear fuel rods, the training samples used to train these models need to be controllable and reproducible (or controllable reproducible) to ensure that the performance of models trained on the same set of training samples remains consistent, thereby improving the stability of model performance. Therefore, the methods for obtaining training samples typically include the following two: The first method involves collecting samples of nuclear fuel rod defects that naturally form during the use of nuclear fuel rods and obtaining training samples through imaging. The second approach involves using conventional processing techniques such as 3D printing and / or machining to fabricate defect structures that can simulate nuclear fuel rods, resulting in defect samples (i.e., physical samples with defects), which are then used to obtain training samples through imaging.
[0022] Regarding the first method mentioned above, when collecting samples of nuclear fuel rod defects that naturally form during the use of nuclear fuel rods, there are problems such as a low defect sample acquisition rate (e.g., less than 0.8%) and uneven distribution of defect types. Therefore, the quantity and quality of training samples obtained using naturally formed defect samples are difficult to meet the training requirements of the defect detection model. For example, there may be insufficient model generalization ability due to problems such as a small number of training samples and uneven sample distribution.
[0023] Regarding the second approach mentioned above, in scenarios where conventional machining techniques such as 3D printing and / or mechanical cutting are used to simulate naturally generated irregular and randomly distributed defect structures, the following limitations may exist: 1) Resolution limitations: The minimum forming layer thickness in 3D printing and the radius of the cutting tools used in mechanical cutting are usually in the tens of micrometers. Therefore, the processing accuracy of conventional processing techniques is limited, and it is usually difficult to reproduce microcracks or fine defects such as pores. 2) Regularization of morphology: Machining paths are often generated based on regular geometric trajectories and do not have random disturbance characteristics, so it is difficult to simulate the irregular boundaries of natural defects.
[0024] It is evident that defective samples obtained using conventional processing techniques cannot accurately reflect the characteristics of natural defects. Consequently, the quality of training samples obtained based on these defective samples is also low, making it difficult to meet the learning requirements of defect recognition models for the characteristics of natural defects.
[0025] As can be seen from the above description, there is an urgent need for a method to determine training samples (which can also be understood as a generation method or construction method, etc.) to meet the training requirements of defect detection models.
[0026] Based on this, in various embodiments of this application, by constructing an integrated sample determination method that includes defect images, processing paths, and training samples, it is possible to enable the training samples to simultaneously reflect the characteristics of the target defect and the imaging environment, thereby improving the quality of the training samples; at the same time, it ensures the controllability and reproducibility of the training samples.
[0027] This application provides a sample determination method, applied to electronic devices, such as... Figure 1 As shown, the method includes: Step 101: Generate the defect image corresponding to the target defect; Step 102: Generate a vectorized processing path based on the defect image; Step 103: Process according to the vectorized processing path to obtain a defective sample; Step 104: Image the defective sample to obtain the imaging result, and use the imaging result as a training sample for the defect detection model.
[0028] In practical applications, the electronic device may include a computer, server, or other device equipped with a processor and communication interface. This application does not limit this, as long as its function is implemented.
[0029] The defect detection model is used at least to detect natural defects, i.e., target defects, that appear in the target object (such as nuclear fuel rods) in actual application scenarios. For example, in the production and service scenarios of nuclear fuel rods, one or more types (one or more types can also be understood as at least one type) of minor defects such as pores, cracks, and inclusions appearing on the surface of the nuclear fuel rods; this application embodiment does not limit the target object detected by the defect detection model, the application scenario of the target object, or the type of target defect. The defect detection model can also be understood as a model used to detect target defects, a defect identification model, an AI detection model, etc., and this application embodiment does not limit it in this way.
[0030] In practical applications, the process of detecting target defects using the defect detection model can include: performing imaging processing on the target object to be detected (specifically, it can include single-angle imaging, panoramic imaging, three-dimensional imaging, or X-ray imaging, etc.) to obtain imaging results that reflect the defect status of the target object; then, inputting the imaging results into the defect detection model for inference to obtain inference results (which can also be understood as output or detection results, etc.); wherein, the inference results are used to indicate whether the target object to be detected has defects, and when the target object has defects, the inference results can also be used to indicate specific defect status (such as defect type, defect size, etc.).
[0031] To ensure the performance (such as recognition accuracy) of the defect detection model, the training samples should meet the following requirements during the training process: 1) Sample balance, that is, the training samples should be able to cover all possible defects of the target object (such as defect type, defect size, etc.), and the number of training samples corresponding to each defect should be balanced to avoid local overfitting; 2) Feature completeness, meaning that the training samples should be able to accurately reflect all the key features that may indicate defects in the target object; 3) Quantitative completeness, that is, the number of training samples for each defect type should be sufficient to support the model in learning the inherent patterns of that defect type, thus avoiding underfitting; 4) Samples can be reproducibly controlled. In other words, the training samples should be able to ensure that the model trained using the same training samples has consistent performance and meets the requirements for industrial-grade deployment.
[0032] In practical applications, in step 101, the electronic device generates one or more (or at least one) defect images for the target defect; wherein each of the one or more defect images can be used to determine at least one training sample; the defect image contains relevant features of the target defect (or the defect image can mimic the target defect), and the relevant features of the target defect include at least one or more of the following (one or more can be understood as at least one): Irregularity of shape: Naturally formed target defects (such as cracks, pores, inclusions, etc.) usually have complex and asymmetrical boundary contours, and are random and unpredictable; Diversity of scale distribution: The target defect contains both coarse macroscopic outlines and microscopic textures, rather than just features of a single scale; Non-uniformity of spatial distribution: Target defects are usually randomly distributed on the material surface, without periodicity or following simple geometric laws.
[0033] In practical applications, since Perlin noise superposition and fractal modeling techniques can mathematically simulate the formation rules of the target defect, the electronic device can use these techniques to generate the defect image, ensuring that the generated two-dimensional defect image meets the requirements of "mimicking the target defect" in both statistical and visual characteristics. That is, in some optional embodiments, step 101 may include: The defect image is obtained by merging multiple noise images generated by the Perlin noise function using fractal modeling techniques; wherein the noise image is associated with the target defect.
[0034] The Perlin noise function is a smooth pseudo-random function. Unlike the discrete point distribution texture of traditional white noise, the Perlin noise function can generate a texture map with natural continuous variation characteristics, i.e., the noise image. In other words, the noise image generated by the Perlin noise function can visually more closely resemble the texture of the target defect in nature that is "smoothly transitioned".
[0035] The fractal modeling technique refers to combining Perlin noise signals of different frequencies and amplitudes (or noise images generated using the Perlin noise function) through multi-scale superposition (which can also be understood as multi-layer superposition, multi-octave superposition), so that the generated image can present a rough outline on a large scale and have a fine texture structure on a small scale; that is, by adding noise through the fractal modeling technique, the resulting defect image can contain multi-scale features that conform to the target defect. Among them, the Octaves mechanism function can be expressed as formula (1): (1) in, Indicates the coordinates in the image are The noise value corresponding to the pixel; Indicates the first i The basic Perlin noise function for the layer; Indicates the first i The frequency of the layers is used to control the detail scale of the capping layer. The higher the value, the denser the noise variations in that layer (the richer the detail); correspondingly, The smaller the value, the sparser the noise variation of the layer (the less detail). Indicates the first i The amplitude of the layer, It is related to the base amplitude and amplitude attenuation factor of the layer (which can usually be 0.5).
[0036] In practical applications, the electronic device utilizes fractal modeling technology to merge multiple noisy images generated by the Perlin noise function, as follows: Figure 2 As shown, the following steps may be included: Step 201: Initialize the number of Octaves, and the frequency and amplitude corresponding to each Octave; then, execute step 202; Step 202: For each Octave, perform steps 203 through 205; Step 203: Use the Perlin noise function to generate a noisy image corresponding to the current Octave (which can also be understood as Perlin noise); then, execute step 204; Step 204: As Figure 3 As shown, the noise image corresponding to the current Octave is added to the total noise image, and Octave is updated; then, step 205 is executed; Step 205: Determine whether the updated Octave reaches the Octave threshold (which can also be understood as the maximum Octave threshold), and obtain the determination result; In practical applications, when the judgment result is that the Octave threshold has not been reached, steps 203 to 205 are repeated; correspondingly, when the judgment result is that the Octave threshold has been reached, step 206 is executed.
[0037] The Octave threshold value can be set according to actual needs, and this application embodiment does not limit it.
[0038] Step 206: Perform normalization processing on the accumulated total noise image to obtain a normalized image (which can also be understood as a fractal Perlin noise image), that is, map the value range to the range of [0,1]; then, execute step 207; Step 207: Based on the set grayscale threshold, binarize the normalized image to obtain the defect mask; then, proceed to step 208. In practical applications, for each pixel in the normalized image, if the noise value corresponding to the pixel is greater than the grayscale threshold, the pixel is considered to belong to a non-defect area, and the value of the pixel is set to 255; correspondingly, if the noise value corresponding to the pixel is less than or equal to the grayscale threshold, the pixel is considered to belong to a defect area, and the value of the pixel is set to 0.
[0039] The grayscale threshold value can be set according to actual needs, and this application embodiment does not limit it.
[0040] Step 208: Invert the color of the defect mask to obtain a black background with white spots that can simulate the target defect, i.e., the defect image.
[0041] In practical applications, the above process can be implemented using AI models, which has the following advantages compared to ordinary image overlay methods: It can learn the distribution characteristics of real target defects, rather than relying solely on manually set parameters; The generated defect images have more natural and complex textures of target defects, resulting in higher physical realism. It can realize feature transfer and generation control for specific defect conditions (which can also be understood as defect types, such as cracks, inclusions, etc.), and enhance the diversity of training samples determined based on defect images; It can be linked with subsequent CNC machining models for optimization, making the generated defect images more consistent with machining process parameters (such as defect depth and area distribution).
[0042] The AI model used may include one of the following: Generative Adversarial Network (GAN) models (such as StyleGAN, Pix2Pix, etc.): continuously optimize the generator through the discriminator, making the defect image closer to the statistical features of real defect samples, and can be used to generate more natural random defect textures. Diffusion Model: Generates natural textures through a process of progressively adding and removing noise, which can maintain the continuity of image details while controlling randomness; Variational Autoencoder (VAE): It generates a simulated defect image by extracting the latent space distribution of real defect samples and then randomly sampling from the latent space.
[0043] In practical applications, the electronic device can select any of the above-mentioned AI models to add noise according to actual needs, and this application embodiment does not limit this.
[0044] In practical applications, when the electronic device generates the defect image using Perlin noise superposition and fractal modeling technology, it can precisely control one or more of the defects in the defect image, such as density, connectivity, and morphological complexity, by adjusting the noise frequency, amplitude, and threshold. This achieves controllable randomness and ensures the reproducibility of the training samples obtained from the defect image.
[0045] In practical applications, after generating the defect image, the electronic device can process each defect image to obtain a physical sample containing the defect in the defect image, i.e., a defect sample; then, the defect sample is used for imaging to obtain a training sample.
[0046] In practical applications, when using the defect detection model to detect target defects, in addition to the target defects themselves, the processing condition of the target object and the imaging environment during imaging will also affect the detection results. Therefore, the training samples can include not only target defect features but also processing features and imaging environment features to ensure that when the defect detection model is trained using the training samples, it can learn the effects of different processing accuracies and imaging conditions during the imaging process. In other words, in some optional embodiments, the training samples include defect features, processing features, and imaging environment features.
[0047] In some optional embodiments, the imaging environment features are associated with one or more of the following: Imaging reflection; Imaging shadows; Imaging illumination; Imaging noise; Image focal length distortion.
[0048] As can be seen from the above description, after obtaining the defect image, by processing the defect sample corresponding to the defect image and imaging the defect sample, it is possible to ensure that the obtained training sample has the processing features and imaging environment features that exist in the actual detection scenario, thereby further improving the fidelity (i.e. feature integrity) of the training data.
[0049] In practical applications, vectorized machining paths are not limited by geometric trajectories compared to machining paths generated based on geometric trajectories. They possess random perturbation characteristics, ensuring that the processed defect samples have characteristics that better match the target defect (such as irregular boundaries, crack propagation, etc.).
[0050] Based on this, in step 102, the electronic device converts the defect image into a vectorized processing path to achieve the integration of the defect image with the processing technology. The electronic device can utilize an image contour extraction algorithm to convert the defect image into a vectorized processing path; the image contour extraction algorithm may include the findContours algorithm from the Open Source Computer Vision Library (OpenCV), etc., and this embodiment of the application does not limit this to a specific algorithm.
[0051] After obtaining the vectorized machining path, in step 103, the electronic device can process the defective sample based on high-precision laser technology and / or micro-milling technology, thereby ensuring the sample processing accuracy and making the processed defective sample more closely match the characteristics of the target defect. That is, in some optional embodiments, processing according to the vectorized machining path includes: Based on high-precision laser technology and / or micro-milling technology, machining is performed according to the vectorized machining path.
[0052] The advantages of high-precision laser technology and / or micro-milling technology include one or more of the following: High processing precision: The diameter of the laser focusing spot can be controlled within 1 micrometer ( ) to 10 At the order of magnitude, it can achieve sub-pixel level local etching; Flexible processing path: The processing path is generated by vectorization of the defect mask, which is not limited by geometric trajectory and can completely reproduce the irregular defect boundary corresponding to the target defect; Flexible parameter control: Parameters such as laser power, pulse width, and scanning speed can be adjusted in real time to achieve continuous control of defect morphology; that is, in some optional embodiments, the electronic device can continuously control the defect morphology of the defect sample by adjusting the processing parameters in real time; wherein, the processing parameters may include one or more of the following parameters: laser power, pulse width, and scanning speed (which can also be understood as feed rate); the defect morphology may include one or more of the following: defect size, shape, structure (such as depth), surface texture, geometric features, and distribution; Simulated physical characteristics: Through local controllable perturbation, the random energy release characteristics of target defects in industrial scenarios (such as crack propagation) can be simulated; that is, in some optional embodiments, the electronic device can perform local controllable perturbation during the processing to simulate the random energy release characteristics corresponding to the target defect in the defect sample.
[0053] In practical applications, the electronic device can control the high-precision laser system and / or micro-milling system (which can also be understood as CNC machining control) through G-code or a custom CNC instruction set to realize machining using high-precision laser technology and / or micro-milling technology; wherein, the high-precision laser system and / or micro-milling system can be deployed together with the electronic device (i.e., co-located) or deployed separately, and this application embodiment does not limit this.
[0054] After obtaining the defective sample, in step 104, the electronic device can perform high-resolution imaging on the defective sample to obtain the imaging result, thereby using the imaging result as a training sample that can be used to train the defect detection model, that is, the input sample in the training process corresponding to the defect detection model.
[0055] In practical applications, the electronic device can utilize an imaging device to perform high-resolution imaging of the defective sample. The imaging device may include one or more of the following: an electron microscope, a computed tomography (CT) scanner, or an industrial camera; this application embodiment does not limit the specific type of imaging device. The imaging device may be deployed together with the electronic device (i.e., co-located) or separately; this application embodiment does not limit the specific type of imaging device.
[0056] After obtaining the imaging results, the electronic device can evaluate the processing accuracy of the defective sample by comparing the difference between the defect image and the imaging results, so as to adjust the processing parameters and obtain better processing results; that is, in some optional embodiments, the method may further include: Using the defect images and imaging results, the processing accuracy of the defective sample is evaluated to obtain evaluation results, which are used at least to adjust the processing parameters.
[0057] In practical applications, after obtaining the training samples, the electronic device can use the training samples to train the defect detection model, ensuring the performance of the defect detection model.
[0058] The sample determination method provided in this application generates a defect image corresponding to a target defect; generates a vectorized processing path based on the defect image; processes the sample according to the vectorized processing path to obtain a defective sample; images the defective sample to obtain an imaging result, and uses the imaging result as a training sample associated with a defect detection model. The solution provided in this application, by constructing an integrated sample determination method that includes a defect image, a processing path, and training samples, enables the training samples to simultaneously reflect the characteristics of both the target defect and the imaging environment, improving the quality of the training samples; simultaneously, it ensures the controllability and reproducibility of the training samples.
[0059] The following section provides a more detailed description of this application with reference to application examples.
[0060] This application example provides a method for the controllable generation and high-precision processing of random defects on the surface of nuclear fuel rods, such as... Figure 4 As shown, it includes the following steps: Step 401: Generate a random defect image (which can also be understood as a defect mask); then, proceed to step 402; In practical applications, Perlin noise superposition and fractal modeling techniques can be used to construct two-dimensional images that mimic natural defects, and noise can be added to the defect images using an artificial intelligence model.
[0061] Step 402: Interconnect the defect image with the processing technology to obtain the processed sample; then, proceed to step 403; In practical applications, the specific process for integrating defect images with processing techniques includes: Step 1: Defect image to path conversion; In practical applications, image contour extraction algorithms (such as the findContours algorithm in OpenCV) can be used to convert defect masks into vector processing paths; among them, such as Figure 5 As shown, the process of converting vector processing paths using image contour extraction algorithms can also be understood as contour generalization.
[0062] Step 2: CNC machining control In practical applications, laser / micro-milling systems can be controlled based on G-code or custom CNC instruction sets to perform surface etching or cutting, thereby creating real micro-defects. Step 3: Adjustment of processing parameters In practical applications, parameters such as machining depth, power, and feed rate can be set to achieve high-precision control of defect size, shape, and distribution.
[0063] Step 403: Perform high-resolution imaging on the processed sample to obtain training samples; then, proceed to step 404. Among them, the imaging results of high-resolution imaging (i.e., training samples) have the following characteristics: It accurately reflects the geometric morphology, optical reflection, and noise characteristics of the defect; The defect region labels corresponding to the mask are retained and can be directly used for supervised learning; A series of samples can be generated under different processing parameters for testing the generalization performance of the model.
[0064] In practical applications, such as Figure 6 As shown, training samples corresponding to various defect situations can be obtained, which can meet the training requirements of the defect recognition model.
[0065] In practical applications, the imaging results can be compared with the defect images to assess the processing accuracy and verify the consistency of the defects.
[0066] Step 404: Train the model using training samples.
[0067] In practical applications, training samples can be input into the defect recognition model to train the defect recognition model and / or test the model's generalization ability.
[0068] For example, when nuclear fuel cladding material is used as the substrate (i.e., the target object), the above process may include: setting the image resolution of the generated defect image to 512x512, the number of Octaves stacking to 8, the initial frequency to 1, and the grayscale threshold to 0.66; then, generating the defect image based on Perlin noise stacking and fractal modeling technology; subsequently, inputting the defect image into a path extraction module (such as a model based on an image contour extraction algorithm) to generate a processing path; then, using a laser etching device (which can be set to a power of 20 watts (W) and a scanning speed of 200 millimeters per second (mm / s)) to etch the defect on the surface of the fuel rod to obtain a defect sample; after processing, obtaining the imaging results by scanning with an electron microscope, which are used to train the defect recognition model; at the same time, the consistency between the morphology of the defect area and the defect image can be compared based on the imaging results to verify the accuracy and reliability of the defect processing.
[0069] The solution provided in this application example addresses the core technical problem that "existing processing technologies struggle to simulate irregular, randomly distributed defect structures in nature." It proposes a defect sample preparation method that integrates a statistical model of metal defects with precision CNC machining. This method generates a defect mask with fractal characteristics through a random defect image algorithm and combines it with high-precision laser / micro-milling processing technologies to controllably generate random defect regions on the surface of fuel rods. These regions are used to train and validate the detection algorithm, thereby improving the intelligence level of nuclear fuel rod defect detection. Specifically, the random defect image generation algorithm provides statistically realistic target morphology, serving as the "digital driving layer" of the processing. High-precision laser / micro-milling processing technology is the key execution layer that physicalizes the digital defect model and enables controllable reproduction. Together, they form a closed-loop system. The algorithm defines the randomness, and laser processing enables the controllable reproduction of this randomness. This method offers the following advantages: (1) It can realistically simulate the geometric morphology and distribution characteristics of natural defects in the service environment of nuclear fuel rods; (2) The generated defects are controllable and repeatable, making them suitable for constructing standard samples; (3) It can be widely used in defect detection modeling of other metallic materials, such as aircraft blades and engine parts; (4) Improve the training efficiency and recognition accuracy of AI models and reduce the risk of manual detection.
[0070] To implement the method of the embodiments of this application, the embodiments of this application also provide a sample determining device, which is installed on an electronic device, such as... Figure 7 As shown, the device includes: The generation unit 701 is used to generate a defect image corresponding to the target defect; The path conversion unit 702 is used to generate a vectorized processing path based on the defect image; The processing unit 703 is used to process according to the vectorized processing path to obtain a defective sample; The imaging unit 704 is used to image the defective sample, obtain the imaging result, and use the imaging result as a training sample associated with the defect detection model.
[0071] In some optional embodiments, the generation unit 701 is specifically used for: The defect image is obtained by merging multiple noise images generated by the Perlin noise function using fractal modeling techniques; wherein the noise image is associated with the target defect.
[0072] In some optional embodiments, the processing unit 703 is specifically used for: Based on high-precision laser technology and / or micro-milling technology, machining is performed according to the vectorized machining path.
[0073] In some optional embodiments, the processing unit 703 is specifically used for: The defect morphology of the defective sample is continuously controlled by adjusting the processing parameters in real time.
[0074] In some optional embodiments, the processing unit 703 is specifically used for: During the processing, local controllable perturbation is performed to simulate the random energy release characteristics corresponding to the target defect in the defect sample.
[0075] In some alternative embodiments, the device may further include: An evaluation unit is used to evaluate the processing accuracy of the defective sample using the defective image and imaging results, and to obtain an evaluation result, which is used at least to adjust the processing parameters.
[0076] In practical applications, the generation unit 701, path conversion unit 702, and evaluation unit can be implemented by the processor in the sample determination device, and the processing unit 703 and imaging unit 704 can be implemented by the processor in the sample determination device in combination with the communication interface.
[0077] It should be noted that the sample determination device provided in the above embodiments is only illustrated by the division of the above-described program units. In practical applications, the above processing can be assigned to different program units as needed, that is, the internal structure of the device can be divided into different program units to complete all or part of the processing described above. In addition, the sample determination device and the sample determination method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0078] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiments of this application, the embodiments of this application also provide an electronic device, such as... Figure 8 As shown, the electronic device 800 includes: The communication interface 801 enables information exchange with other devices; The processor 802 is connected to the communication interface 801 to enable information interaction with other devices and to execute the methods provided by one or more of the above-mentioned technical solutions when running a computer program; The computer program is stored in memory 803.
[0079] Specifically, the processor 802 is used for: Generate a defect image corresponding to the target defect; Based on the defect image, a vectorized processing path is generated; By combining the communication interface 801, processing is performed according to the vectorized processing path to obtain a defective sample; Using the communication interface 801, the defective sample is imaged to obtain the imaging result, which is then used as a training sample for the defect detection model.
[0080] In some optional embodiments, the processor 802 is specifically used for: The defect image is obtained by merging multiple noise images generated by the Perlin noise function using fractal modeling techniques; wherein the noise image is associated with the target defect.
[0081] In some alternative embodiments, the processor 802 is specifically used for: In conjunction with the communication interface 801, processing is performed based on high-precision laser technology and / or micro-milling technology, according to the vectorized machining path.
[0082] In some alternative embodiments, the processor 802 is specifically used for: By combining the communication interface 801, the defect morphology of the defective sample can be continuously controlled by adjusting the processing parameters in real time. In some alternative embodiments, the processor 802 is specifically used for: In conjunction with the communication interface 801, localized controllable perturbations are performed during the processing to simulate the random energy release characteristics corresponding to the target defect in the defective sample. In some optional embodiments, the processor 802 is further configured to: Using the defect images and imaging results, the processing accuracy of the defective sample is evaluated to obtain evaluation results, which are used at least to adjust the processing parameters.
[0083] It should be noted that the specific processing procedures of the processor 802 and the communication interface 801 can be understood by referring to the above method.
[0084] Of course, in practical applications, the various components in electronic device 800 are coupled together through bus system 804. It can be understood that bus system 804 is used to realize the connection and communication between these components. In addition to a data bus, bus system 804 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in... Figure 8 The general labeled all buses as Bus System 804.
[0085] The memory 803 in this embodiment is used to store various types of data to support the operation of the electronic device 800. Examples of such data include any computer program used to operate on the electronic device 800.
[0086] The methods disclosed in the embodiments of this application can be applied to the processor 802, or implemented by the processor 802. The processor 802 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor 802 or by instructions in the form of software. The processor 802 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 802 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in the memory 803. The processor 802 reads the information in the memory 803 and combines its hardware to complete the steps of the aforementioned method.
[0087] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned method.
[0088] It is understood that the memory (memory 803) in this embodiment of the application can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memories described in the embodiments of this application are intended to include, but are not limited to, these and any other suitable types of memories.
[0089] In an exemplary embodiment, this application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a memory 803 storing a computer program, which can be executed by the processor 802 of the electronic device 800 to complete the steps described in the aforementioned method. The computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.
[0090] In an exemplary embodiment, this application also provides a computer program product, including a computer program that can be executed by a processor 802 of an electronic device 800 to complete the steps described in the aforementioned method.
[0091] It should be noted that terms such as "first" and "second" are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0092] Furthermore, the technical solutions described in the embodiments of this application can be combined arbitrarily without conflict.
[0093] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.
Claims
1. A method for determining samples, characterized in that, include: Generate a defect image corresponding to the target defect; Based on the defect image, a vectorized processing path is generated; The defective sample is obtained by processing according to the vectorized processing path. The defective sample is imaged to obtain the imaging results, which are then used as training samples for the defect detection model.
2. The method according to claim 1, characterized in that, The training samples include defect features, processing features, and imaging environment features.
3. The method according to claim 2, characterized in that, The imaging environment features are associated with one or more of the following: Imaging reflection; Imaging shadows; Imaging illumination; Imaging noise; Image focal length distortion.
4. The method according to claim 1, characterized in that, The generation of the defect image corresponding to the target defect includes: The defect image is obtained by merging multiple noise images generated by the Perlin noise function using fractal modeling techniques; wherein the noise image is associated with the target defect.
5. The method according to claim 1, characterized in that, The processing according to the vectorized processing path includes: Based on high-precision laser technology and / or micro-milling technology, machining is performed according to the vectorized machining path.
6. The method according to claim 5, characterized in that, The defect morphology of the defective sample is continuously controlled by adjusting the processing parameters in real time.
7. The method according to claim 5, characterized in that, During the processing, local controllable perturbation is performed to simulate the random energy release characteristics corresponding to the target defect in the defect sample.
8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: Using the defect images and imaging results, the processing accuracy of the defective sample is evaluated to obtain evaluation results, which are used at least to adjust the processing parameters.
9. A sample determining device, characterized in that, Configured in electronic devices, including: The generation unit is used to generate the defect image corresponding to the target defect; The path conversion unit is used to generate a vectorized processing path based on the defect image; A processing unit is used to process according to the vectorized processing path to obtain a defective sample; An imaging unit is used to image the defective sample, obtain imaging results, and use the imaging results as training samples associated with the defect detection model.
10. An electronic device, characterized in that, include: Processor and communication interface; among which, The processor is used to generate a defect image corresponding to the target defect; Based on the defect image, a vectorized processing path is generated; By combining the communication interface and processing according to the vectorized processing path, a defective sample is obtained; Using the communication interface, the defective sample is imaged to obtain the imaging result, which is then used as a training sample for the defect detection model.
11. An electronic device, characterized in that, include: The processor and the memory used to store computer programs that can run on the processor. When the processor is used to run the computer program, it performs the steps of the method according to any one of claims 1 to 8.
12. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.