An EBSD crystal orientation accurate reconstruction system and method based on boundary perception and bandwidth contrast auxiliary input
Patent Information
- Application Number
- CN202610700894.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-20
- Publication Date
- 2026-08-18
AI Technical Summary
用于解决现有EBSD重构过程中存在的晶界模糊、取向表示不稳定、边界错位误差过大、物理信息利用不充分以及结果可解释性不足等问题,使重构系统能够在保持晶体取向场整体连续性的同时,更准确地恢复晶界位置与局部取向细节
[0070] Based on the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solution to be protected by this invention are as follows:
Smart Images

Figure CN122597533A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of material microstructure characterization and intelligent data reconstruction technology, and particularly relates to an EBSD crystal orientation accurate reconstruction system and method based on boundary perception and bandwidth contrast assisted input. Background Technology
[0002] EBSD technology can acquire key information such as crystal orientation, grain boundary distribution, phase composition, and texture of material surfaces under a scanning electron microscope platform, making it an important tool for the microstructural analysis of metallic materials, advanced alloys, semiconductors, and functional ceramics. In actual testing, to balance testing efficiency, sampling area, and data stability, trade-offs are usually necessary between step size, scan time, and signal quality. Therefore, the resulting raw orientation maps often suffer from insufficient resolution, high local noise, blurred grain boundaries, and a large number of unindexed points.
[0003] Existing EBSD post-processing methods mainly include traditional filtering, interpolation resampling, and image-oriented deep learning enhancement. Although traditional mean filtering, median filtering, or morphological post-processing methods are simple to implement, they are prone to cross-grain boundary smoothing, resulting in grain boundary passivation or even crystal orientation mixing. Conventional bilinear, bicubic, or nearest-neighbor upsampling can only amplify the image at the pixel level and cannot recover high-resolution orientation details in a crystallographic sense. Although existing super-resolution networks for grayscale images can be used for general visual image reconstruction, they are not specifically designed for the quaternion representation of the EBSD orientation field, grain boundary discontinuities, and BC physical characterization information.
[0004] The closest existing technical solution to this invention typically employs the following process: first, low-resolution input and high-resolution labels are extracted from the EBSD image; then, ordinary interpolation results or grayscale images are used as network input; and finally, the target image is recovered through a single-output regression network. This type of solution generally lacks explicit unit quaternion constraints to preserve crystal orientation and does not incorporate grain boundary masks, BC maps, or grain boundary refinement supervision into the same training framework. For grain boundary regions, existing solutions often optimize them together with intra-grain pixels, leading to heavy-tailed errors caused by grain boundary misalignment dominating the training process.
[0005] Existing implementation materials in this workspace indicate that the base data comes from 80 CTF files, which are randomly cropped to construct high-resolution samples of 128×128 and low-resolution input samples of 64×64. These are then augmented offline using Rot90 to create 32,000 training, validation, and test samples. This demonstrates that existing EBSD reconstruction tasks not only involve image upscaling but also require structured storage for large-scale sample sets, rotation consistency enhancement, and traceable metadata management.
[0006] Based on the above analysis, the existing technology faces the following urgent technical problems that need to be addressed:
[0007] (1) No specific data representation was designed for the directional properties of crystal orientation, which easily introduces artifacts at the Euler angle periodic boundary;
[0008] (2) Using the same optimization target for grain boundaries and grain interiors causes high-angle abrupt change regions at grain boundaries to become sources of training instability;
[0009] (3) Ignoring important auxiliary information such as BC that can reflect the quality of diffraction bands and grain boundary texture leads to insufficient ability of the network to locate boundaries and maintain structure;
[0010] (4) Data augmentation only performs geometric rotation without physically consistent rotation of orientation data, which can easily lead to inconsistencies between the training samples and the real crystallographic rotation relationship;
[0011] (5) The lack of explicit grain boundary output and boundary fault tolerance evaluation mechanism makes the results difficult to interpret and is not conducive to subsequent grain segmentation and microstructure statistical analysis. Summary of the Invention
[0012] To address the problems existing in the prior art, this invention provides an EBSD crystal orientation accuracy reconstruction system and method based on boundary awareness and bandwidth contrast-assisted input. It solves problems such as grain boundary ambiguity, unstable orientation representation, excessive boundary misalignment error, insufficient utilization of physical information, and insufficient interpretability of results in the existing EBSD reconstruction process. This enables the reconstruction system to more accurately recover grain boundary positions and local orientation details while maintaining the overall continuity of the crystal orientation field.
[0013] The present invention is implemented as follows: an EBSD crystal orientation accurate reconstruction system based on boundary awareness and bandwidth contrast assisted input, including an EBSD data reading and meshing module, a sample construction module, a quaternion encoding module, a BC assisted feature generation module, a grain boundary labeling module, a physical consistency enhancement module, an orientation accurate reconstruction module, a grain boundary prediction module, and a joint training and evaluation module.
[0014] The EBSD data reading and gridding module is used to read the original EBSD file in CTF format and convert the original scattered orientation data into regular grid data through the gridify operation.
[0015] The sample construction module is used to extract high-resolution sample blocks from the regular grid data and perform observation statistics on the footprint region corresponding to the low-resolution scan points to generate low-resolution orientation input and low-resolution BC input.
[0016] The quaternion encoding module is used to uniformly encode the crystal orientation in high-resolution and low-resolution samples into a four-channel unit quaternion representation, and to constrain the real part of the quaternion to be non-negative.
[0017] The BC auxiliary feature generation module is used to extract bandwidth contrast BC maps from EBSD samples to form high-resolution BCY and low-resolution BCX.
[0018] The grain boundary labeling module is used to generate grain boundary labels based on the orientation mismatch relationship or CSL relationship between adjacent orientation units in a regular grid.
[0019] The physical consistency enhancement module is used to perform offline rotation enhancement of the sample at 0°, 90°, 180° and 270°, and to apply a physically consistent orientation rotation about the normal axis to the quaternion field during the spatial rotation.
[0020] The orientation precision reconstruction module is used to receive low-resolution quaternion input and BC auxiliary input to reconstruct a high-resolution quaternion orientation field.
[0021] The grain boundary prediction module is used to share the backbone features with the orientation accurate reconstruction module and output the grain boundary edge probability corresponding to the high-resolution orientation field.
[0022] The joint training and evaluation module is used to construct boundary fault-tolerant geometric loss, intracrystalline gradient loss, intracrystalline L2 loss, and boundary head supervision loss, jointly optimize the orientation accurate reconstruction module and the grain boundary prediction module, and output Euler angle visualization, error map, and statistical indicators.
[0023] Furthermore, the high-resolution sample block size captured by the sample construction module is 128×128 pixels, the effective index rate is not less than 0.90, the preset magnification factor is 2, and the low-resolution input size is 64×64 pixels.
[0024] The sample construction module statistically analyzes the dominant orientation within the footprint region and generates dominant fraction, orientation diffusion, mixing entropy, and Xconf confidence features.
[0025] Furthermore, the BC-assisted feature generation module generates a low-resolution BCX based on the mean, minimum, standard deviation, and quality degradation caused by multi-orientation mixing of the high-resolution BCY within the footprint region, and performs blurring, noise perturbation, and contrast compression on the low-resolution BCX.
[0026] The low-resolution BCX and the low-resolution quaternion input are concatenated by channel;
[0027] The BC auxiliary feature generation module also includes a boundary protection denoising unit, which performs replacement or smoothing of intragranular outliers in the BC diagram based on the grain boundary annotation results.
[0028] Furthermore, the grain boundary marking module represents the high-resolution orientation result as a lattice orientation field and generates bndEdgeH and twinEdgeH between adjacent lattice points in the horizontal direction, and bndEdgeV and twinEdgeV between adjacent lattice points in the vertical direction.
[0029] Among them, bndEdgeH and bndEdgeV are determined by the orientation mismatch angle between adjacent orientation units, and twinEdgeH and twinEdgeV are determined by the Σ3 correspondence CSL relationship between adjacent orientation units.
[0030] The grain boundary labeling module also generates bndY and twinY visualization projection maps;
[0031] The orientation mismatch angle threshold is 10° or 15°, and the grain boundary marking results are subjected to expansion, refinement, and boundary band generation.
[0032] Furthermore, the grain boundary prediction module includes an HAGB main framework prediction submodule and a Σ3 chain segment determination submodule;
[0033] The HAGB main skeleton prediction submodule outputs the HAGB edge probability based on the low-resolution orientation input, BC input, Xconf confidence features, BC gradient, and dark band continuity.
[0034] The Σ3 segment determination submodule determines the Σ3 candidate segments on the HAGB candidate edges based on the CSL deviation between adjacent orientations, segment continuity, consistency of orientations on both sides, and local morphology score.
[0035] Furthermore, the orientation-accurate reconstruction module includes a convolutional embedding head, a multi-level residual Swing Transformer block, a PixelShuffle upsampling unit, and an orientation output head;
[0036] The orientation precision reconstruction module determines the parent-side candidate orientation and twin-side candidate orientation in the candidate regions on both sides of the Σ3 candidate chain segment. The candidate orientations come from the low-precision IPF main orientation, the neighborhood orientation, the twin candidate orientation generated based on the Σ3 operator, and the small residual correction orientation.
[0037] The orientation precision reconstruction module outputs a complete high-resolution quaternion orientation field, and the HAGB edge and Σ3 edge are recalculated from the high-resolution quaternion orientation field.
[0038] The joint training and evaluation module outputs reconstructed confidence or outlier removal markers based on BC quality, orientation confidence, and the conflict between HAGB and Σ3 relationships.
[0039] This invention also provides an EBSD crystal orientation precision reconstruction system based on boundary awareness and bandwidth contrast-assisted input, comprising:
[0040] The module includes EBSD data reading and meshing, sample construction, quaternion encoding, BC-assisted feature generation, grain boundary labeling, physical consistency enhancement, orientation-accurate reconstruction, grain boundary prediction, and joint training and evaluation.
[0041] The EBSD data reading and gridding module, connected to the sample construction module, is used to read the original EBSD files in CTF format and convert the original scattered orientation data into regular grid data through the gridify operation.
[0042] The sample construction module, connected to the quaternion encoding module, is used to randomly extract high-resolution sample blocks of a preset size from a regular grid.
[0043] The quaternion encoding module, connected to the BC auxiliary feature generation module, is used to encode crystal orientations in high-resolution and low-resolution samples into a four-channel unit quaternion representation and to constrain the real part of the quaternion to be non-negative in order to reduce the instability caused by multiple values of the same orientation.
[0044] The BC auxiliary feature generation module, connected with the quaternion encoding module, grain boundary labeling module, physical consistency enhancement module, orientation accurate reconstruction module, grain boundary prediction module, and joint training and evaluation module, is used to extract bandwidth contrast BC maps from EBSD samples to form high-resolution BCY and low-resolution BCX.
[0045] The grain boundary marking module, connected to the BC auxiliary feature generation module, is used to generate the grain boundary mask bndY based on the orientation mismatch angle of adjacent pixels.
[0046] The Physical Consistency Enhancement Module, connected to the BC Auxiliary Feature Generation Module, is used to perform offline rotation enhancements of 0°, 90°, 180° and 270° on the sample. While performing spatial rotation, a physically consistent orientation rotation about the normal axis is applied to the quaternion field so that the enhanced sample still satisfies the real crystallographic rotation relationship.
[0047] An orientation-accurate reconstruction module, connected to a BC-assisted feature generation module, is used to receive low-resolution quaternion inputs and BC-assisted inputs, and reconstruct a high-resolution quaternion orientation map based on a Swing Transformer. Preferably, this module includes a convolutional embedding head, a multi-level residual Swing Transformer block, a PixelShuffle upsampling unit, and an orientation output head.
[0048] The grain boundary prediction module is connected to the BC auxiliary feature generation module. It is used to share the backbone features with the orientation accurate reconstruction module and output the grain boundary probability map corresponding to the high-resolution orientation map, so as to realize the joint learning of orientation reconstruction and grain boundary localization.
[0049] The joint training and evaluation module, connected to the BC-assisted feature generation module, is used to construct boundary fault-tolerant geometric loss, intracrystalline gradient loss, intracrystalline L2 loss, and boundary head supervision loss, respectively. It jointly optimizes the orientation accurate reconstruction module and the grain boundary prediction module, and outputs Euler angle visualization, error map, and statistical indicators.
[0050] Furthermore, the sample block is preferably 128×128 pixels, and the effective index rate of the sample block is screened, preferably requiring an effective index rate of not less than 0.90; at the same time, the high-resolution sample is mapped to a low-resolution input according to a preset magnification factor, preferably a magnification factor of 2, corresponding to a low-resolution size of 64×64 pixels.
[0051] Furthermore, the BC-assisted feature generation module:
[0052] The BCX input is concatenated with the low-resolution quaternion input channel by channel and used as an auxiliary input for subsequent network reconstruction.
[0053] Furthermore, the BC auxiliary feature generation module also includes a boundary protection denoising unit, which replaces or smooths intragranular outliers in the BC image using a grain boundary mask to protect narrow grain boundary textures.
[0054] Furthermore, the grain boundary marking module:
[0055] The grain boundary threshold is set to 10° or 15°, and the expansion, refinement and boundary band generation of the grain boundary mask are supported to serve BC protection, boundary head supervision and boundary fault tolerance regression, respectively.
[0056] Furthermore, the orientation precision reconstruction module:
[0057] It includes a convolutional embedding head, a multi-level residual Swing Transformer block, a PixelShuffle upsampling unit, and an orientation output head.
[0058] Another objective of this invention is to provide a method for accurate reconstruction of EBSD crystal orientation based on boundary awareness and bandwidth contrast-assisted input, comprising:
[0059] Step S1: Read multiple CTF format EBSD files and convert them into regular grid data; randomly sample high-resolution orientation blocks of a preset size in each grid, filter the effective index rate, and obtain samples that meet the training requirements;
[0060] Step S2: Encode the high-resolution sample block into a high-resolution quaternion label Y and a corresponding valid mask mask Y; generate a low-resolution quaternion input X and a corresponding mask mask X according to a preset downsampling method; preferably, the low-resolution input adopts a subsampling method with random offset to more realistically simulate the boundary discontinuity phenomenon caused by low-resolution acquisition.
[0061] Step S3: Extract the BC image from the high-resolution sample to obtain BCY; perform boundary protection denoising and normalization on BCY, and then sample BCX according to the offset rule consistent with the low-resolution quaternion.
[0062] Step S4: Generate a high-resolution grain boundary mask bndY based on the orientation mismatch angle between adjacent pixels; preferably, further refine bndY into single-pixel boundary lines to serve as boundary head supervision targets; and expand bndY to obtain a boundary band for subsequent boundary fault-tolerant regression.
[0063] Step S5: Perform offline Rot90 enhancement on the samples; for the spatial rotation result of each sample, simultaneously perform a physically consistent rotation on the quaternion field using the method q' = qR ⊗ q, where qR represents the quaternion of rotation around the normal axis corresponding to the rotation angle;
[0064] Step S6: Construct the reconstructed network; preferably, the input tensor is formed by concatenating a 4-channel low-resolution quaternion with a 1-channel BCX to form a 5-channel input, which is then fed into 4 residual Swing Transformer blocks after convolution embedding. The depth of each block is preferably 6, and the window size is preferably 8. Finally, it is restored to a high-resolution feature map by PixelShuffle×2, and the high-resolution orientation result and grain boundary probability result are output by the quaternion output head and the boundary output head, respectively.
[0065] Step S7: Construct a joint loss function and train the network; wherein, the orientation regression loss is preferably a Charbonnier geometric loss based on the unit quaternion angle; in the boundary zone region, a boundary fault tolerance mechanism is introduced to minimize the angle error between the predicted pixel and the true orientation center pixel and its neighboring pixels, so as to reduce the adverse effect of slight grain boundary misalignment on training; gradient loss and L2 loss are only calculated in the intragranular region to avoid the natural discontinuity of grain boundaries dominating the loss; boundary head supervision preferably adopts a combination of Focal BCE loss and Dice loss;
[0066] Step S8: The trained model is used to reconstruct the low-resolution EBSD orientation map under test, and outputs a high-resolution quaternion orientation field, grain boundary probability map, Euler angle visualization map, and error statistics.
[0067] Another object of the present invention is to provide a computer device including a memory and a processor, the memory storing a computer program, which, when executed by the processor, causes the processor to perform the steps of the EBSD crystal orientation accurate reconstruction method based on boundary awareness and bandwidth contrast assisted input.
[0068] Another object of the present invention is to provide a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of the EBSD crystal orientation accurate reconstruction method based on boundary awareness and bandwidth contrast auxiliary input.
[0069] Another objective of this invention is to provide an information data processing terminal for implementing the EBSD crystal orientation precision reconstruction system based on boundary awareness and bandwidth contrast assisted input.
[0070] Based on the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solution to be protected by this invention are as follows:
[0071] This invention uses quaternions instead of direct Euler angles as the orientation representation, which can avoid numerical jumps caused by the periodic boundary of Euler angles and improve the stability and consistency of orientation regression.
[0072] This invention explicitly introduces the BC diagram as an auxiliary input into the network, enabling the network to utilize diffraction band quality and boundary texture information in addition to low-resolution orientation information, thereby enhancing its ability to perceive grain boundaries and local microstructures.
[0073] This invention sets up an independent boundary output head and uses joint training of boundary refinement supervision and boundary fault-tolerant regression, so that the system can not only output high-resolution orientation results, but also simultaneously output interpretable grain boundary probability maps, which facilitates subsequent grain segmentation, grain boundary statistics and microstructure analysis.
[0074] A workable implementation of this invention has been completed in the working space. The base data is constructed from 80 CTF files, resulting in 8000 base samples. After physical uniform rotation enhancement at 0°, 90°, 180°, and 270°, 32000 samples are formed, which are then divided into 25600 training samples, 3200 validation samples, and 3200 test samples. The sample metadata also records the sample_id, clipping coordinates, and downsampling offset, providing good traceability.
[0075] In the existing implementation, the best geometric loss (best_val) on the validation set of the optimal model is approximately 0.2204, and the best checkpoint occurs in the 17th training epoch. In the boundary tolerance evaluation of random test samples, the global average error is approximately 1.10° to 1.75°, the average error in the boundary region is approximately 1.99° to 2.31°, and the average error in the intracrystalline region is approximately 0.41° to 1.03°. In the aggregate evaluation of 120 random test samples, the global average error under the boundary tolerance evaluation is approximately 1.775°, the average error in the boundary region is approximately 2.178°, and the average error in the intracrystalline region is approximately 1.079°. These results demonstrate that the present invention can achieve stable recovery of the orientation field of high-resolution crystals and provide independently visualized grain boundary prediction results.
[0076] The present invention provides a complete data construction, enhancement, training, and visualization process. It can be deployed as a functional module in local microstructure analysis software or as a server-side batch processing service, providing high-resolution orientation reconstruction capabilities for EBSD post-processing software or material microstructure analysis platforms. Attached Figure Description
[0077] Figure 1 This is a block diagram of the EBSD crystal orientation accurate reconstruction system based on boundary awareness and bandwidth contrast auxiliary input provided in the embodiments of the present invention.
[0078] Figure 2 This is a flowchart of the EBSD crystal orientation accurate reconstruction method based on boundary awareness and bandwidth contrast auxiliary input provided in the embodiments of the present invention.
[0079] Figure 3 This is a schematic diagram of the overall system flow provided in the embodiments of the present invention.
[0080] Figure 4 This is a schematic diagram of the network structure and training constraints provided in an embodiment of the present invention.
[0081] Figure 5 This is a comparison image of high-resolution Euler angles and grain boundaries provided in an embodiment of the present invention.
[0082] Figure 6 This is the BC auxiliary input and grain boundary prediction map provided in the embodiments of the present invention.
[0083] Figure 7 This is a comparison result of error graphs provided in an embodiment of the present invention.
[0084] The diagram shows: 1. EBSD data reading and meshing module; 2. Sample construction module; 3. Quaternion encoding module; 4. BC auxiliary feature generation module; 5. Grain boundary labeling module; 6. Physical consistency enhancement module; 7. Orientation accurate reconstruction module; 8. Grain boundary prediction module; 9. Joint training and evaluation module. Detailed Implementation
[0085] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0086] like Figure 1 As shown, an embodiment of the present invention provides an EBSD crystal orientation precision reconstruction system based on boundary awareness and bandwidth contrast-assisted input, comprising:
[0087] EBSD Data Reading and Mesh Generation Module 1, Sample Construction Module 2, Quaternion Encoding Module 3, BC Auxiliary Feature Generation Module 4, Grain Boundary Marking Module 5, Physical Consistency Enhancement Module 6, Orientation Precision Reconstruction Module 7, Grain Boundary Prediction Module 8, Joint Training and Evaluation Module 9;
[0088] The EBSD data reading and gridding module 1, connected to the sample construction module 2, is used to read the original EBSD files in CTF format and convert the original scattered orientation data into regular grid data through the gridify operation.
[0089] Sample construction module 2, connected to quaternion encoding module 3, is used to randomly extract high-resolution sample blocks of a preset size on a regular grid.
[0090] Quaternion encoding module 3, connected to BC auxiliary feature generation module 4, is used to encode crystal orientations in high-resolution and low-resolution samples into a four-channel unit quaternion representation and constrain the real part of the quaternion to be non-negative in order to reduce the instability caused by multiple values of the same orientation.
[0091] The BC auxiliary feature generation module 4, connected with the quaternion encoding module 3, grain boundary labeling module 5, physical consistency enhancement module 6, orientation accurate reconstruction module 7, grain boundary prediction module 8, and joint training and evaluation module 9, is used to extract bandwidth contrast BC maps from EBSD samples to form high-resolution BCY and low-resolution BCX.
[0092] The grain boundary marking module 5 is connected to the BC auxiliary feature generation module 4 and is used to generate the grain boundary mask bndY based on the orientation mismatch angle of adjacent pixels.
[0093] The Physical Consistency Enhancement Module 6, connected to the BC Auxiliary Feature Generation Module 4, is used to perform offline rotation enhancement of the sample at 0°, 90°, 180° and 270°. While performing spatial rotation, a physically consistent orientation rotation about the normal axis is applied to the quaternion field so that the enhanced sample still satisfies the real crystallographic rotation relationship.
[0094] The orientation-accurate reconstruction module 7 is connected to the BC-assisted feature generation module 4. It is used to receive low-resolution quaternion input and BC-assisted input, and reconstruct a high-resolution quaternion orientation map based on the Swing Transformer. Preferably, the module includes a convolutional embedding head, a multi-level residual Swing Transformer block, a PixelShuffle upsampling unit, and an orientation output head.
[0095] The grain boundary prediction module 8 is connected to the BC auxiliary feature generation module 4. It is used to share the backbone features with the orientation accurate reconstruction module and output the grain boundary probability map corresponding to the high-resolution orientation map, so as to realize the joint learning of orientation reconstruction and grain boundary localization.
[0096] The joint training and evaluation module 9, connected to the BC-assisted feature generation module 4, is used to construct boundary fault-tolerant geometric loss, intracrystalline gradient loss, intracrystalline L2 loss, and boundary head supervision loss, respectively, to jointly optimize the orientation accurate reconstruction module and the grain boundary prediction module, and output Euler angle visualization, error map, and statistical indicators.
[0097] The sample block provided in this embodiment of the invention is preferably 128×128 pixels, and the effective index rate of the sample block is screened, preferably requiring an effective index rate of not less than 0.90; at the same time, the high-resolution sample is mapped to a low-resolution input according to a preset magnification factor, preferably a magnification factor of 2, corresponding to a low-resolution size of 64×64 pixels.
[0098] The BC auxiliary feature generation module provided in this embodiment of the invention:
[0099] The BCX input is concatenated with the low-resolution quaternion input channel by channel and used as an auxiliary input for subsequent network reconstruction.
[0100] The BC auxiliary feature generation module provided in this embodiment of the invention further includes a boundary protection and denoising unit, which replaces or smooths the intragranular outliers of the BC image through a grain boundary mask in order to protect the fine grain boundary texture.
[0101] The grain boundary marking module provided in this embodiment of the invention:
[0102] The grain boundary threshold is set to 10° or 15°, and the expansion, refinement and boundary band generation of the grain boundary mask are supported to serve BC protection, boundary head supervision and boundary fault tolerance regression, respectively.
[0103] The orientation-accurate reconstruction module provided in this embodiment of the invention:
[0104] It includes a convolutional embedding head, a multi-level residual Swing Transformer block, a PixelShuffle upsampling unit, and an orientation output head.
[0105] like Figure 2 As shown, an embodiment of the present invention provides a method for accurate reconstruction of EBSD crystal orientation based on boundary awareness and bandwidth contrast-assisted input, comprising:
[0106] Step S1: Read multiple CTF format EBSD files and convert them into regular grid data; randomly sample high-resolution orientation blocks of a preset size in each grid, filter the effective index rate, and obtain samples that meet the training requirements;
[0107] Step S2: Encode the high-resolution sample block into a high-resolution quaternion label Y and a corresponding valid mask mask Y; generate a low-resolution quaternion input X and a corresponding mask mask X according to a preset downsampling method; preferably, the low-resolution input adopts a subsampling method with random offset to more realistically simulate the boundary discontinuity phenomenon caused by low-resolution acquisition.
[0108] Step S3: Extract the BC image from the high-resolution sample to obtain BCY; perform boundary protection denoising and normalization on BCY, and then sample BCX according to the offset rule consistent with the low-resolution quaternion.
[0109] Step S4: Generate a high-resolution grain boundary mask bndY based on the orientation mismatch angle between adjacent pixels; preferably, further refine bndY into single-pixel boundary lines to serve as boundary head supervision targets; and expand bndY to obtain a boundary band for subsequent boundary fault-tolerant regression.
[0110] Step S5: Perform offline Rot90 enhancement on the samples; for the spatial rotation result of each sample, simultaneously perform a physically consistent rotation on the quaternion field using the method q' = qR ⊗ q, where qR represents the quaternion of rotation around the normal axis corresponding to the rotation angle;
[0111] Step S6: Construct the reconstructed network; preferably, the input tensor is formed by concatenating a 4-channel low-resolution quaternion with a 1-channel BCX to form a 5-channel input, which is then fed into 4 residual Swing Transformer blocks after convolution embedding. The depth of each block is preferably 6, and the window size is preferably 8. Finally, it is restored to a high-resolution feature map by PixelShuffle×2, and the high-resolution orientation result and grain boundary probability result are output by the quaternion output head and the boundary output head, respectively.
[0112] Step S7: Construct a joint loss function and train the network; wherein, the orientation regression loss is preferably a Charbonnier geometric loss based on the unit quaternion angle; in the boundary zone region, a boundary fault tolerance mechanism is introduced to minimize the angle error between the predicted pixel and the true orientation center pixel and its neighboring pixels, so as to reduce the adverse effect of slight grain boundary misalignment on training; gradient loss and L2 loss are only calculated in the intragranular region to avoid the natural discontinuity of grain boundaries dominating the loss; boundary head supervision preferably adopts a combination of Focal BCE loss and Dice loss;
[0113] Step S8: The trained model is used to reconstruct the low-resolution EBSD orientation map under test, and outputs a high-resolution quaternion orientation field, grain boundary probability map, Euler angle visualization map, and error statistics.
[0114] Another object of the present invention is to provide a computer device including a memory and a processor, the memory storing a computer program, which, when executed by the processor, causes the processor to perform the steps of the EBSD crystal orientation accurate reconstruction method based on boundary awareness and bandwidth contrast assisted input.
[0115] Another object of the present invention is to provide a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of the EBSD crystal orientation accurate reconstruction method based on boundary awareness and bandwidth contrast auxiliary input.
[0116] Another objective of this invention is to provide an information data processing terminal for implementing the EBSD crystal orientation precision reconstruction system based on boundary awareness and bandwidth contrast assisted input.
[0117] Specific implementation of the present invention:
[0118] Figure 3 This is a schematic diagram of the overall system flow, showing the entire processing chain from CTF file reading, sample construction, physical consistency enhancement to high-resolution orientation reconstruction and output.
[0119] Figure 4 This diagram illustrates the network structure and training constraints, showing the relationship between the input channel composition, the Swing Transformer backbone, the PixelShuffle upsampling, the orientation output head, the boundary output head, and various loss functions.
[0120] Figure 5 This is a high-resolution Euler angle and grain boundary comparison diagram, used to show the differences between the actual orientation, predicted orientation, and baseline results on the three components of Euler angle and the grain boundary line.
[0121] Figure 6 This is used as an auxiliary input for BC and a grain boundary prediction map to display BCY, BCX, predicted boundary heads, and real / predicted grain boundaries superimposed on the BC map.
[0122] Figure 7 The error plot comparison results are used to show the differences between the prediction results and the baseline results under strict error and boundary tolerance errors.
[0123] Example 1: EBSD Training Sample Construction. First, 80 CTF files are read from the data directory. Each file is converted into a regular grid using EBSD.load and gridify operations. Random cropping is performed using a high-resolution window size of 128×128. If the effective index ratio in the cropped window is lower than 0.90, resampling is performed until a window meeting the conditions is obtained or the maximum number of attempts is reached. For each high-resolution window, a high-resolution quaternion label Y and a low-resolution input X are generated, and maskY and maskX are saved.
[0124] Example 2: Construction of BC and Grain Boundary Features. For each high-resolution window, the BC image is extracted from the EBSD attributes to obtain a 128×128 BCY. Using a grain boundary protection-based denoising method, only intragranular outliers are replaced, preserving as much narrow grain boundary and twin boundary texture as possible. Subsequently, subsamples are sampled according to the same random offset rule as the low-resolution quaternions to obtain a 64×64 BCX. At the same time, a grain boundary mask bndY is constructed based on the mismatch angle between adjacent pixels, with a preferred boundary threshold of 10° or 15°.
[0125] Example 3: Physically Consistent Data Augmentation. Each constructed sample undergoes offline rotation augmentation at 0°, 90°, 180°, and 270°. Unlike conventional image augmentation, this invention, after performing a Rot90 operation on the spatial grid, simultaneously applies a corresponding rotation around the normal axis to the quaternion orientation field, ensuring that the augmented samples satisfy crystallographic rotation relations, rather than merely visual geometric relations. The augmented data is stored in an HDF5 file, retaining metadata such as the original index orig_idx, rotation marker rot_k, sample_id, and cropping position.
[0126] Example 4: Network Training. The input tensor consists of a 4-channel low-resolution quaternion X and a 1-channel BCX concatenated to form a 5-channel input. This is mapped to 96-dimensional features by a convolutional head, then processed by four residual Swin Transformer blocks to extract multi-level local and global correlation features. Finally, it is restored to a 128×128 high-resolution feature map via PixelShuffle×2. The network has two output branches: one outputs a 4-channel quaternion orientation map, and the other outputs a 1-channel grain boundary probability map. During training, the AdamW optimizer is used, with an initial learning rate of 2×10^-4, combined with a warmup and cosine annealing scheduling strategy.
[0127] Example 5: Joint Loss Design. For the orientation output branch, Charbonnier geometric loss based on the unit quaternion angle is used. In the grain boundary region, a boundary tolerance mechanism is employed, using the minimum geometric error between the predicted pixel and the real pixel and its neighboring pixels as the supervision signal to reduce the training heavy-tailed error caused by minor grain boundary dislocations. For the intragranular region, gradient loss and L2 loss are further introduced to constrain the local orientation change trend and numerical consistency. For the grain boundary output branch, Focal BCE loss and Dice loss are used for joint supervision, and the original thick boundary is preferably refined into a single-pixel boundary line as the supervision target.
[0128] Example 6: Result Output and Application. After training, the system can reconstruct the low-resolution EBSD orientation map under test, outputting a high-resolution quaternion orientation field, and further converting it into an Euler angle diagram for visualization; simultaneously, it outputs a grain boundary probability map and an error analysis map for users to perform grain boundary identification, grain segmentation, twinning analysis, and microstructure statistics. This system can run as a local software plugin or be packaged as a server-side batch processing service, returning high-resolution reconstruction results by uploading a low-resolution EBSD orientation map file.
[0129] Appendix: Explanation of English Abbreviations and Terminology
[0130] EBSD: Electron Backscatter Diffraction.
[0131] CTF: A common EBSD data file format.
[0132] BC: Band Contrast, used to reflect the quality of diffraction bands and local texture information.
[0133] RSTB: Residual Swing Transformer Block.
[0134] PixelShuffle: Subpixel rearrangement upsampling unit.
[0135] bndY: High-resolution grain boundary mask tag.
[0136] maskX / maskY: Effective pixel mask.
[0137] This embodiment provides a processing scheme for high-resolution orientation field reconstruction and grain boundary identification. The high-resolution IPF result or orientation result is represented as a crystal orientation field on a regular grid, with each grid corresponding to an orientation unit. Grain boundaries are not considered as pixel categories with independent orientations, but are determined by the edge relationship between adjacent orientation units. When the orientation mismatch angle of adjacent grid points in the horizontal or vertical direction meets the preset grain boundary determination condition, bndEdgeH or bndEdgeV is generated; when adjacent orientations satisfy the CSL relationship corresponding to Σ3, twinEdgeH or twinEdgeV is generated. bndY and twinY are only used as the visual projection results of the edge relationship onto the pixel plane, and the final grain boundaries are all recalculated from the reconstructed orientation field.
[0138] A large-step EBSD observation degradation module is set up during the sample construction phase. For low-resolution IPF or orientation inputs, the dominant orientation is statistically analyzed within the corresponding footprint range to form low-resolution orientation observations, and the dominant fraction, orientation diffusion, mixing entropy, and Xconf confidence features are output simultaneously. For BC inputs, low-resolution BC is generated from the mean, minimum, standard deviation, and quality degradation caused by multi-orientation mixing of high-resolution BCY within the footprint, while slight blurring, noise, and contrast compression are superimposed to simulate the observation degradation process under large-step scanning. The processing flow follows the order of first downsampling the observations of IPF and BC, and then calculating grain boundaries based on the downsampled orientations or reconstructed orientations.
[0139] The reconstruction phase includes an HAGB main framework prediction module and a Σ3 segment determination module. The HAGB main framework prediction module integrates low-resolution IPF, BC, BC gradient, Xconf, and dark band continuity features to output the probability of high-angle grain boundary edges. BC is only used to indicate local diffraction quality degradation, grain boundary candidates, or low-confidence regions, and is not used alone as a criterion for determining Σ3 twins. The Σ3 segment determination module, on the HAGB candidate edges, combines the CSL deviation of adjacent orientations, segment continuity, lateral orientation consistency, and local morphology score to determine Σ3 candidate segments, where flatness is only used as a weak constraint feature.
[0140] During the orientation determination stage, segment-level orientation filling is performed on both sides of each Σ3 candidate chain segment. Instead of predicting the orientation of the grain boundary itself, the parent-side and twin-side orientations are determined within the candidate regions on both sides of the chain segment. Candidate orientations are derived from low-precision IPF principal orientations, neighborhood orientations, twin candidate orientations generated based on the Σ3 operator, and small residual correction orientations. Optimization comprehensively considers candidate orientation confidence, consistency with low-precision orientations, smoothness of non-grain boundary regions, Σ3 pairing relationships, HAGB principal framework consistency, and uncertainties in anomalous BC regions. Finally, a complete high-resolution quaternion orientation field is output, and the HAGB edges and Σ3 edges are recalculated from this orientation field. Simultaneously, the reconstruction confidence or anomalous sample rejection marker is output.
[0141] In the description of this invention, unless otherwise stated, "a plurality of" means two or more; the terms "upper," "lower," "left," "right," "inner," "outer," "front end," "rear end," "head," "tail," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0142] It should be noted that embodiments of the present invention can be implemented in hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated-design hardware. Those skilled in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, for example, such code provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuitry such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field-programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of the above-described hardware circuitry and software, such as firmware.
[0143] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A precise EBSD crystal orientation reconstruction system based on boundary awareness and bandwidth contrast-assisted input, characterized in that, It includes EBSD data reading and meshing module, sample construction module, quaternion encoding module, BC-assisted feature generation module, grain boundary labeling module, physical consistency enhancement module, orientation accurate reconstruction module, grain boundary prediction module, and joint training and evaluation module; The EBSD data reading and gridding module is used to read the original EBSD file in CTF format and convert the original scattered orientation data into regular grid data through the gridify operation. The sample construction module is used to extract high-resolution sample blocks from the regular grid data and perform observation statistics on the footprint region corresponding to the low-resolution scan points to generate low-resolution orientation input and low-resolution BC input. The quaternion encoding module is used to uniformly encode the crystal orientation in high-resolution and low-resolution samples into a four-channel unit quaternion representation, and to constrain the real part of the quaternion to be non-negative. The BC auxiliary feature generation module is used to extract bandwidth contrast BC maps from EBSD samples to form high-resolution BCY and low-resolution BCX. The grain boundary labeling module is used to generate grain boundary labels based on the orientation mismatch relationship or CSL relationship between adjacent orientation units in a regular grid. The physical consistency enhancement module is used to perform offline rotation enhancement of the sample at 0°, 90°, 180° and 270°, and to apply a physically consistent orientation rotation about the normal axis to the quaternion field during the spatial rotation. The orientation precision reconstruction module is used to receive low-resolution quaternion input and BC auxiliary input to reconstruct a high-resolution quaternion orientation field. The grain boundary prediction module is used to share the backbone features with the orientation accurate reconstruction module and output the grain boundary edge probability corresponding to the high-resolution orientation field. The joint training and evaluation module is used to construct boundary fault-tolerant geometric loss, intracrystalline gradient loss, intracrystalline L2 loss, and boundary head supervision loss, jointly optimize the orientation accurate reconstruction module and the grain boundary prediction module, and output Euler angle visualization, error map, and statistical indicators.
2. The EBSD crystal orientation accurate reconstruction system based on boundary awareness and bandwidth contrast-assisted input according to claim 1, characterized in that, The high-resolution sample block size captured by the sample construction module is 128×128 pixels, the effective index rate is not less than 0.90, the preset magnification factor is 2, and the low-resolution input size is 64×64 pixels. The sample construction module statistically analyzes the dominant orientation within the footprint region and generates dominant fraction, orientation diffusion, mixing entropy, and Xconf confidence features.
3. The EBSD crystal orientation accurate reconstruction system based on boundary awareness and bandwidth contrast-assisted input according to claim 1, characterized in that, The BC auxiliary feature generation module generates a low-resolution BCX based on the mean, minimum, standard deviation, and quality degradation caused by multi-orientation mixing of the high-resolution BCY in the footprint area, and performs blurring, noise perturbation, and contrast compression on the low-resolution BCX. The low-resolution BCX and the low-resolution quaternion input are concatenated by channel; The BC auxiliary feature generation module also includes a boundary protection denoising unit, which performs replacement or smoothing of intragranular outliers in the BC diagram based on the grain boundary annotation results.
4. The EBSD crystal orientation precision reconstruction system based on boundary awareness and bandwidth contrast-assisted input according to claim 1, characterized in that, The grain boundary labeling module represents the high-resolution orientation results as a lattice orientation field and generates bndEdgeH and twinEdgeH between adjacent lattice points in the horizontal direction, and bndEdgeV and twinEdgeV between adjacent lattice points in the vertical direction. Among them, bndEdgeH and bndEdgeV are determined by the orientation mismatch angle between adjacent orientation units, and twinEdgeH and twinEdgeV are determined by the Σ3 correspondence CSL relationship between adjacent orientation units. The grain boundary labeling module also generates bndY and twinY visualization projection maps; The orientation mismatch angle threshold is 10° or 15°, and the grain boundary marking results are subjected to expansion, refinement, and boundary band generation.
5. The EBSD crystal orientation accurate reconstruction system based on boundary awareness and bandwidth contrast-assisted input according to claim 1, characterized in that, The grain boundary prediction module includes an HAGB main framework prediction submodule and a Σ3 chain segment determination submodule. The HAGB main skeleton prediction submodule outputs the HAGB edge probability based on the low-resolution orientation input, BC input, Xconf confidence features, BC gradient, and dark band continuity. The Σ3 segment determination submodule determines the Σ3 candidate segments on the HAGB candidate edges based on the CSL deviation between adjacent orientations, segment continuity, consistency of orientations on both sides, and local morphology score.
6. The EBSD crystal orientation precision reconstruction system based on boundary awareness and bandwidth contrast-assisted input according to claim 1, characterized in that, The orientation-accurate reconstruction module includes a convolutional embedding head, a multi-level residual Swin Transformer block, a PixelShuffle upsampling unit, and an orientation output head. The orientation precision reconstruction module determines the parent-side candidate orientation and twin-side candidate orientation in the candidate regions on both sides of the Σ3 candidate chain segment. The candidate orientations come from the low-precision IPF main orientation, the neighborhood orientation, the twin candidate orientation generated based on the Σ3 operator, and the small residual correction orientation. The orientation precision reconstruction module outputs a complete high-resolution quaternion orientation field, and the HAGB edge and Σ3 edge are recalculated from the high-resolution quaternion orientation field. The joint training and evaluation module outputs reconstructed confidence or outlier removal markers based on BC quality, orientation confidence, and the conflict between HAGB and Σ3 relationships.
7. A method for accurate reconstruction of EBSD crystal orientation based on boundary awareness and bandwidth contrast-assisted input, implementing the EBSD crystal orientation accurate reconstruction system based on boundary awareness and bandwidth contrast-assisted input as described in any one of claims 1-6, characterized in that, include: Step S1: Read multiple CTF format EBSD files and convert them into regular grid data; In each grid, high-resolution orientation blocks of a preset size are randomly sampled, and the effective indexing rate is filtered to obtain samples that meet the training requirements. Step S2: Encode the high-resolution sample block into a high-resolution quaternion label Y and a corresponding valid mask mask Y; A low-resolution quaternion input X and a corresponding mask mask X are generated according to a preset downsampling method; preferably, the low-resolution input adopts a subsampling method with random offset to more realistically simulate the boundary discontinuity phenomenon caused by low-resolution acquisition. Step S3: Extract the BC image from the high-resolution sample to obtain BCY; perform boundary protection denoising and normalization on BCY, and then sample BCX according to the offset rule consistent with the low-resolution quaternion. Step S4: Generate a high-resolution grain boundary mask bndY based on the orientation mismatch angle between adjacent pixels; preferably, further refine bndY into single-pixel boundary lines to serve as boundary head supervision targets; and expand bndY to obtain a boundary band for subsequent boundary fault-tolerant regression. Step S5: Perform offline Rot90 enhancement on the samples; for the spatial rotation result of each sample, simultaneously perform physical uniform rotation on the quaternion field using the method q' = qR⊗ q, where qR represents the quaternion of rotation around the normal axis corresponding to the rotation angle; Step S6: Construct the reconstructed network; preferably, the input tensor is formed by concatenating a 4-channel low-resolution quaternion with a 1-channel BCX to form a 5-channel input, which is then fed into 4 residual Swing Transformer blocks after convolution embedding. The depth of each block is preferably 6, and the window size is preferably 8. Finally, it is restored to a high-resolution feature map by PixelShuffle×2, and the high-resolution orientation result and grain boundary probability result are output by the quaternion output head and the boundary output head, respectively. Step S7: Construct a joint loss function and train the network; wherein, the orientation regression loss is preferably a Charbonnier geometric loss based on the unit quaternion angle; in the boundary zone region, a boundary fault tolerance mechanism is introduced to minimize the angle error between the predicted pixel and the true orientation center pixel and its neighboring pixels, so as to reduce the adverse effect of slight grain boundary misalignment on training; gradient loss and L2 loss are only calculated in the intragranular region to avoid the natural discontinuity of grain boundaries dominating the loss; boundary head supervision preferably adopts a combination of Focal BCE loss and Dice loss; Step S8: The trained model is used to reconstruct the low-resolution EBSD orientation map under test, and outputs a high-resolution quaternion orientation field, grain boundary probability map, Euler angle visualization map, and error statistics.
8. A computer device, characterized in that, The computer device includes a memory and a processor. The memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of the EBSD crystal orientation accurate reconstruction method based on boundary awareness and bandwidth contrast auxiliary input as described in claim 7.
9. A computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the EBSD crystal orientation accurate reconstruction method based on boundary awareness and bandwidth contrast-assisted input as described in claim 7.
10. An information data processing terminal, characterized in that, The information data processing terminal is used to implement the EBSD crystal orientation accurate reconstruction system based on boundary awareness and bandwidth contrast assisted input as described in any one of claims 1-6.