A method and device for measuring geometric parameters of a sample in a transmission electron microscope image

By combining semantic segmentation models and OpenCV functions, automated and high-precision measurement of geometric feature parameters of transmission electron microscopy (TEM) image samples is achieved, solving the problems of large measurement errors and low efficiency in manual operation mode, and making it suitable for efficient analysis of large-scale datasets.

CN122345370APending Publication Date: 2026-07-07CHONGQING INST OF EAST CHINA NORMAL UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-23
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Current methods for measuring the geometric features of samples in transmission electron microscopy images rely on manual operation, which suffers from high subjectivity, large errors, low efficiency, narrow applicability, and poor repeatability, making it difficult to meet the needs of large-scale, high-precision measurements.

Method used

A semantic segmentation model is used to segment the sample region and the background region at the pixel level. Combined with OpenCV functions, geometric feature parameters are automatically calculated, and the pixel value is converted to physical unit through an image scale. The whole process does not require manual intervention.

Benefits of technology

It enables automated and high-precision measurement of geometric feature parameters of samples in transmission electron microscopy images, improves the consistency and repeatability of measurement results, significantly shortens the analysis time of a single image, and is suitable for large-scale datasets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122345370A_ABST
    Figure CN122345370A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of transmission electron microscope image sample geometry characteristic parameter measurement method and device, wherein method includes: obtaining transmission electron microscope image, and the transmission electron microscope image is preprocessed;The transmission electron microscope image after pre-processing is input to semantic segmentation model and is carried out pixel-level segmentation generation segmentation mask to sample area and background area;Geometric characteristic parameter of sample in the transmission electron microscope image is automatically calculated based on segmentation mask;The geometric characteristic parameter is realized pixel value to physical unit conversion by image scale information.This application can realize the automatic, high-precision measurement of sample geometric characteristic parameter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of material microstructure measurement technology, and in particular to a method and apparatus for measuring geometric feature parameters of transmission electron microscopy (TEM) images of samples. Background Technology

[0002] In materials science, nanotechnology, and other fields, the microscopic geometric parameters of samples (such as particle diameter and pore area) are core indicators for characterizing material properties, directly affecting the application effects and research value of materials. Therefore, the requirements for the accuracy and efficiency of microscopic parameter measurement are increasing. Transmission electron microscopy is the core equipment for acquiring images of the microstructure of samples, but the parameter measurement of these images has long relied on manual operation, making it difficult to meet the needs of large-scale, high-precision measurement, and becoming a key bottleneck restricting the improvement of research efficiency in related fields.

[0003] The current mainstream transmission electron microscopy (TEM) image analysis solutions in the industry are based on manual operation. Operators open TEM images using specialized image analysis software, manually select the target region of the sample based on experience, manually calculate the conversion ratio between pixels and physical units (such as nm) using the built-in scale in the image, and then manually read parameters such as the perimeter and area of ​​the sample using the software's built-in measurement tools. In some scenarios, simple image processing techniques are introduced to assist manual identification, such as using threshold segmentation to convert the image into a binary image to initially distinguish the sample from the background. However, the setting of the segmentation threshold still requires manual judgment, and the core measurement process is still subject to human intervention.

[0004] However, this manual operation mode has obvious shortcomings: it is highly subjective, has large errors, and is affected by factors such as operator experience and visual fatigue, making it impossible to guarantee the consistency of measurement results; it is inefficient, costly, and time-consuming to process a single image, making it difficult to handle large-scale datasets; it has a narrow scope of application, with limited ability to identify small targets, blurred boundaries, or densely distributed samples, making it easy to miss or misdetect; and it has poor repeatability, as measurement results from different times and different operators are difficult to reproduce, reducing the credibility of experimental data. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a method and apparatus for measuring the geometric feature parameters of a transmission electron microscope image sample, which can realize the automated and high-precision measurement of the geometric feature parameters of the sample.

[0006] The technical solution adopted by this invention to solve its technical problem is: to provide a method for measuring the geometric feature parameters of a sample in a transmission electron microscope image, comprising the following steps:

[0007] Acquire transmission electron microscope (TEM) images and preprocess the TEM images;

[0008] The preprocessed transmission electron microscope image is input into a semantic segmentation model to perform pixel-level segmentation of the sample region and the background region to generate a segmentation mask.

[0009] The geometric feature parameters of the sample in the transmission electron microscope image are automatically calculated based on the segmentation mask;

[0010] The geometric feature parameters are converted from pixel values ​​to physical units using image scale information.

[0011] The preprocessing refers to using a Gaussian filtering algorithm to remove high-frequency noise and using adaptive histogram equalization technology to improve the clarity of details in low-contrast areas.

[0012] The semantic segmentation model includes:

[0013] The backbone network is used to extract multi-scale features from each channel through pyramid convolutional patch embedding and multi-head self-attention mechanism;

[0014] The decoding head is used to fuse the multi-scale features of each channel to improve the segmentation accuracy of blurred boundaries and obtain the segmentation result;

[0015] An auxiliary head, used only during the training of the semantic segmentation model, is used to generate supervised segmentation results based on the multi-scale features of each channel.

[0016] The loss function of the semantic segmentation model is expressed as: ,in, Let be the loss function of the semantic segmentation model. The cross-entropy loss function value with class weights is calculated based on the output of the decoder. The cross-entropy loss function value with class weights is calculated based on the output of the auxiliary head. The auxiliary head loss weight is used.

[0017] The backbone network uses Twin-PCPVT, Unet, Deeplab, or Mobilenet; the decoding head uses UPerHead or LRASPPHead; and the auxiliary head uses FCNHead.

[0018] When automatically calculating the geometric feature parameters of the sample in the transmission electron microscope image based on the segmentation mask, functions from the OpenCV computer vision library are used to calculate the geometric feature parameters of the sample in the transmission electron microscope image, specifically including:

[0019] The cv2.findContours function is used to extract the outer contour of the sample from the segmentation mask in the transmission electron microscope image.

[0020] The perimeter of the sample is obtained by calculating the curve length of the outer contour using the cv2.arcLength function;

[0021] The cv2.contourArea function is used to count the number of pixels within the outer contour to obtain the area of ​​the sample;

[0022] The cv2.minEnclosingCircle function is used to fit the minimum circumcircle of the outer contour, and the diameter of the minimum circumcircle is used as the diameter of the sample.

[0023] The cv2.moments function is used to calculate the profile moments of the outer contour to obtain the centroid coordinates of the sample.

[0024] The conversion of pixel values ​​to physical units using image scale information for the geometric feature parameters specifically includes:

[0025] The Hough line detection algorithm is used to identify the rectangular region of the scale in the transmission electron microscope image, and the number of pixels corresponding to the scale length is counted.

[0026] The scale values ​​and physical units on the ruler are identified using an OCR algorithm.

[0027] The conversion ratio is calculated based on the number of pixels corresponding to the length of the ruler and the scale values ​​and physical units on the ruler.

[0028] The actual physical values ​​are obtained by multiplying the geometric characteristic parameters of the sample by a conversion ratio.

[0029] The technical solution adopted by this invention to solve its technical problem is: to provide a device for measuring the geometric feature parameters of a transmission electron microscope image sample, comprising:

[0030] A preprocessing module is used to acquire transmission electron microscope (TEM) images and preprocess the TEM images.

[0031] The semantic segmentation module is used to input the preprocessed transmission electron microscope image into the semantic segmentation model to perform pixel-level segmentation of the sample region and the background region to generate a segmentation mask.

[0032] The geometric feature parameter calculation module is used to automatically calculate the geometric feature parameters of the sample in the transmission electron microscope image based on the segmentation mask;

[0033] The unit conversion module is used to convert pixel values ​​to physical units for the geometric feature parameters using image scale information.

[0034] The technical solution adopted by the present invention to solve its technical problem is: to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-mentioned method for measuring geometric feature parameters of transmission electron microscopy image samples.

[0035] The technical solution adopted by the present invention to solve its technical problem is: to provide a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the above-mentioned method for measuring geometric feature parameters of transmission electron microscope image samples.

[0036] Beneficial effects

[0037] By employing the aforementioned technical solutions, this invention offers the following advantages and positive effects compared to existing technologies: Firstly, preprocessing eliminates noise in electron microscopy images and enhances the contrast between the sample and background, laying a high-quality data foundation for subsequent segmentation. Secondly, relying on a semantic segmentation model, it achieves pixel-level precise segmentation of the sample and background, effectively solving the identification challenges of small targets, blurred boundaries, and densely distributed samples, thus avoiding missed detections and false detections. Thirdly, it automatically calculates geometric feature parameters based on segmentation masks and converts pixel values ​​to physical units using image scales, eliminating the need for manual intervention throughout the process. This significantly reduces subjective errors caused by operator experience and visual fatigue, improving the consistency and repeatability of measurement results. Fourthly, this invention simultaneously achieves automated and efficient measurement of electron microscopy image parameters, significantly shortening the analysis time for a single image. It can efficiently handle large-scale datasets, improving the accuracy and efficiency of material micro-parameter measurement and providing reliable data support for research in materials science, nanotechnology, and other fields. Attached Figure Description

[0038] Figure 1 This is a flowchart of the method for measuring geometric feature parameters of a transmission electron microscope image sample according to the first embodiment of the present invention;

[0039] Figure 2 This is a comparison of the original transmission electron microscope image, segmentation mask, and parameter annotation of Ag2Se particles in the embodiments of the present invention;

[0040] Figure 3 This is a comparison of the original transmission electron microscope image, segmentation mask, and parameter annotations of the VSe2 nanopore in another embodiment of the present invention. Detailed Implementation

[0041] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be understood that after reading the teachings of this invention, those skilled in the art can make various alterations or modifications to the invention, and these equivalent forms also fall within the scope defined by the appended claims.

[0042] The first embodiment of the present invention relates to a method for measuring geometric feature parameters of a sample in a transmission electron microscope image, such as... Figure 1 As shown, it includes the following steps:

[0043] Step 1: Acquire transmission electron microscope (TEM) images and preprocess the TEM images.

[0044] The purpose of preprocessing the transmission electron microscope (TEM) images in this step is to eliminate image noise, enhance the contrast between the sample and the background, and provide high-quality input data for the subsequent semantic segmentation module. Therefore, during preprocessing, Gaussian filtering can be used to remove high-frequency noise such as electron beam interference and equipment noise, and adaptive histogram equalization can be used to improve the detail clarity of low-contrast areas.

[0045] Step 2: Input the preprocessed transmission electron microscope image into the semantic segmentation model to perform pixel-level segmentation of the sample region and the background region to generate a segmentation mask.

[0046] The semantic segmentation model used in this step includes:

[0047] The backbone network can adopt Twin-PCPVT, which uses pyramid convolutional patch embedding and multi-head self-attention mechanism to achieve multi-scale feature extraction of each channel, which can take into account both local details and global contextual information; this backbone network can also be replaced by mainstream network structures such as Unet, Deeplab, and Mobilenet.

[0048] The decoder head can be UPerHead, which is used to fuse the multi-scale features of each channel to improve the segmentation accuracy of the blurred boundary and obtain the segmentation result; when in a lightweight application scenario, the decoder head can also be LRASPPHead.

[0049] The auxiliary head, FCNHead, is used only during the training of the semantic segmentation model. It is used to generate supervised segmentation results based on the multi-scale features of each channel. The setting of this auxiliary head can alleviate the gradient vanishing problem and accelerate model convergence.

[0050] The semantic segmentation model in this embodiment uses a cross-entropy loss function with class weights to address the training bias caused by the imbalance in pixel proportions between the target and background regions of the sample. It can be expressed as:

[0051] ;

[0052] in, Let be the loss function of the semantic segmentation model. The cross-entropy loss function value with class weights is calculated based on the output of the decoder. The cross-entropy loss function value with class weights is calculated based on the output of the auxiliary head. The auxiliary head loss weight is used.

[0053] When training this semantic segmentation model, the training parameters can be configured as follows: the model is built based on the PyTorch 1.12.1+cu113 framework, the optimizer is SGD (initial lr=0.01, momentum 0.9) or Adam (initial lr=0.001), the learning rate scheduling is PolyLR (max_iter=5000, final lr=1e-4) or CosineAnnealingLR, and the batch size is set to 4 (based on RTX3080 GPU, can be flexibly adjusted according to hardware configuration).

[0054] Step 3: Automatically calculate the geometric feature parameters of the sample in the transmission electron microscope image based on the segmentation mask. This step uses functions from the OpenCV computer vision library to calculate the geometric feature parameters of the sample in the transmission electron microscope image, specifically including:

[0055] The cv2.findContours function is used to extract the outer contour of the sample from the segmentation mask in the transmission electron microscope image.

[0056] The perimeter of the sample is obtained by calculating the curve length of the outer contour using the cv2.arcLength function;

[0057] The cv2.contourArea function is used to count the number of pixels within the outer contour to obtain the area of ​​the sample;

[0058] The cv2.minEnclosingCircle function is used to fit the minimum circumcircle of the outer contour, and the diameter of the minimum circumcircle is used as the diameter of the sample.

[0059] The cv2.moments function is used to calculate the profile moments of the outer contour to obtain the centroid coordinates of the sample.

[0060] Step 4: Convert the pixel values ​​of the geometric feature parameters to physical units using image scale information. Since the geometric feature parameters calculated in Step 3 are all pixel values, unit conversion is necessary. This step specifically includes:

[0061] The Hough LinesP algorithm was used to identify the rectangular region of the scale in the transmission electron microscope image, and the number of pixels corresponding to the scale length was counted.

[0062] The scale values ​​and physical units on the ruler are identified using an OCR algorithm.

[0063] The conversion ratio is calculated based on the number of pixels corresponding to the length of the ruler, the scale value on the ruler, and the physical unit. That is, the conversion ratio = the scale value on the ruler / the number of pixels corresponding to the length of the ruler.

[0064] Multiply the geometric characteristic parameters of the sample by the conversion ratio to obtain the actual physical values ​​of perimeter, area, diameter, and centroid coordinates.

[0065] The present invention will be further illustrated below through two specific embodiments.

[0066] Example 1:

[0067] This embodiment is an integrated hardware device model, consisting of a computer host, GPU, storage device, display and input device, which can directly connect to transmission electron microscope equipment to acquire image data.

[0068] Hardware setup: The computer host is equipped with an NVIDIA RTX3080 / 4070 GPU (≥10GB VRAM, supports CUDA11.3+) and ≥500GB SSD storage, and completes device connection through HDMI, Ethernet port and USB3.0 interface;

[0069] Software deployment: Install basic software libraries such as PyTorch 1.12.1+cu113, OpenCV, and Tesseract OCR to deploy the system software of this invention;

[0070] Model configuration: Select the appropriate backbone network and decoder head according to the type of sample to be measured, and import the trained model weight file.

[0071] In this embodiment, silver selenide (Ag2Se) particles were used as the measurement sample to verify the measurement accuracy and practicality of the system. The input image was in PNG format with a resolution of 2048×2048 pixels; the system adopted a model combination of the backbone network Twin-PCPVT, the decoder head UPerHead, and the auxiliary head FCNHead. Figure 2 The original transmission electron microscope (TEM) images, segmentation masks, and parameter annotations of Ag₂Se particles are displayed. After measurement, the actual physical values ​​of the perimeter, area, diameter, and centroid position of each particle are output. Compared with the results of precise manual measurement, the error is controlled within ±3%, proving that the system has high-precision measurement capabilities.

[0072] Example 2:

[0073] The hardware environment and software deployment are identical in this embodiment. Vanadium diselenide (VSe2) nanopores are used as the measurement sample to verify the system's adaptability to densely distributed samples. The input image is in JPG format with a resolution of 1024×1024 pixels; the system uses a model combination of the backbone network Twins-PCPVT, the decoding head UPerHead, and the auxiliary head FCNHead. Figure 3 The original transmission electron microscope (TEM) images, segmentation masks, and parameter annotations of VSe2 nanopores are presented. The system successfully identified densely distributed nanopore structures, accurately outputting the perimeter, area, diameter, and centroid coordinates of each nanopore, with no missed or false detections. Moreover, the analysis time for a single image is only in the millisecond range, demonstrating the system's high efficiency and high adaptability.

[0074] It is easy to see that this invention eliminates noise in electron microscopy images and enhances the contrast between the sample and the background through preprocessing, laying a high-quality data foundation for subsequent segmentation. Relying on a semantic segmentation model, it achieves pixel-level accurate segmentation of the sample and background, effectively solving the identification challenges of small targets, blurred boundaries, and densely distributed samples, avoiding missed detections and false detections. Based on the segmentation mask, geometric feature parameters are automatically calculated, and combined with an image scale to complete the conversion from pixel values ​​to physical units. The entire process requires no manual intervention, significantly reducing subjective errors caused by operator experience and visual fatigue, and improving the consistency and repeatability of measurement results.

[0075] The second embodiment of the present invention relates to a device for measuring geometric feature parameters of a transmission electron microscope (TEM) image sample, comprising:

[0076] A preprocessing module is used to acquire transmission electron microscope (TEM) images and preprocess the TEM images.

[0077] The semantic segmentation module is used to input the preprocessed transmission electron microscope image into the semantic segmentation model to perform pixel-level segmentation of the sample region and the background region to generate a segmentation mask.

[0078] The geometric feature parameter calculation module is used to automatically calculate the geometric feature parameters of the sample in the transmission electron microscope image based on the segmentation mask;

[0079] The unit conversion module is used to convert pixel values ​​to physical units for the geometric feature parameters using image scale information.

[0080] The preprocessing refers to using a Gaussian filtering algorithm to remove high-frequency noise and using adaptive histogram equalization technology to improve the clarity of details in low-contrast areas.

[0081] The semantic segmentation model includes:

[0082] The backbone network is used to extract multi-scale features from each channel through pyramid convolutional patch embedding and multi-head self-attention mechanism;

[0083] The decoding head is used to fuse the multi-scale features of each channel to improve the segmentation accuracy of blurred boundaries and obtain the segmentation result;

[0084] An auxiliary head, used only during the training of the semantic segmentation model, is used to generate supervised segmentation results based on the multi-scale features of each channel.

[0085] The loss function of the semantic segmentation model is expressed as: ,in, Let be the loss function of the semantic segmentation model. The cross-entropy loss function value with class weights is calculated based on the output of the decoder. The cross-entropy loss function value with class weights is calculated based on the output of the auxiliary head. The auxiliary head loss weight is used.

[0086] The backbone network uses Twin-PCPVT, Unet, Deeplab, or Mobilenet; the decoding head uses UPerHead or LRASPPHead; and the auxiliary head uses FCNHead.

[0087] The geometric feature parameter calculation module uses functions from the OpenCV computer vision library to calculate the geometric feature parameters of the sample in the transmission electron microscope image, specifically including:

[0088] The outer contour extraction unit is used to extract the outer contour of the sample in the transmission electron microscope image from the segmentation mask using the cv2.findContours function.

[0089] The perimeter calculation unit is used to calculate the curve length of the outer contour using the cv2.arcLength function to obtain the perimeter of the sample;

[0090] The area calculation unit is used to count the number of pixels within the outer contour using the cv2.contourArea function to obtain the area of ​​the sample;

[0091] The diameter calculation unit is used to fit the minimum circumcircle of the outer contour using the cv2.minEnclosingCircle function, and use the diameter of the minimum circumcircle as the diameter of the sample.

[0092] The centroid coordinate calculation unit is used to calculate the profile moments of the outer contour using the cv2.moments function to obtain the centroid coordinates of the sample.

[0093] The unit conversion module includes:

[0094] The scale detection unit is used to identify the rectangular region of the scale in the transmission electron microscope image using the Hough line detection algorithm, and to count the number of pixels corresponding to the scale length.

[0095] The scale information extraction unit is used to identify the scale values ​​and physical units on the scale using an OCR algorithm.

[0096] A ratio conversion unit is used to calculate the conversion ratio based on the number of pixels corresponding to the length of the ruler and the scale value and physical unit on the ruler.

[0097] The physical parameter calculation unit is used to multiply the geometric characteristic parameters of the sample by a conversion ratio to obtain the actual physical values.

[0098] The transmission electron microscope (TEM) image sample geometric feature parameter measurement device further includes a storage module and an interaction module. The storage module is used to store the TEM image, the preprocessed TEM image, the segmentation mask, the geometric feature parameters, the geometric feature parameters after physical unit conversion, and the model weight file, and supports local storage (SSD) and data backup. The interaction module is used to provide a user interface, supporting image import / export, model parameter setting, measurement result viewing and editing, and has batch processing task submission and status display functions.

[0099] The third embodiment of the present invention relates to an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method for measuring geometric feature parameters of transmission electron microscopy image samples according to the first embodiment.

[0100] The fourth embodiment of the present invention relates to a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for measuring geometric feature parameters of a transmission electron microscope image sample according to the first embodiment.

[0101] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0102] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0103] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction methods implemented in a process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0104] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0105] 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 variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for measuring geometric feature parameters of a sample in a transmission electron microscope image, characterized in that, Includes the following steps: Acquire transmission electron microscope (TEM) images and preprocess the TEM images; The preprocessed transmission electron microscope image is input into a semantic segmentation model to perform pixel-level segmentation of the sample region and the background region to generate a segmentation mask. The geometric feature parameters of the sample in the transmission electron microscope image are automatically calculated based on the segmentation mask; The geometric feature parameters are converted from pixel values ​​to physical units using image scale information.

2. The method for measuring geometric feature parameters of a transmission electron microscope image sample according to claim 1, characterized in that, The preprocessing refers to using a Gaussian filtering algorithm to remove high-frequency noise and using adaptive histogram equalization technology to improve the clarity of details in low-contrast areas.

3. The method for measuring geometric feature parameters of a transmission electron microscope image sample according to claim 1, characterized in that, The semantic segmentation model includes: The backbone network is used to extract multi-scale features from each channel through pyramid convolutional patch embedding and multi-head self-attention mechanism; The decoding head is used to fuse the multi-scale features of each channel to improve the segmentation accuracy of blurred boundaries and obtain the segmentation result; An auxiliary head, used only during the training of the semantic segmentation model, is used to generate supervised segmentation results based on the multi-scale features of each channel.

4. The method for measuring geometric feature parameters of a transmission electron microscope image sample according to claim 3, characterized in that, The loss function of the semantic segmentation model is expressed as: ,in, Let be the loss function of the semantic segmentation model. The cross-entropy loss function value with class weights is calculated based on the output of the decoder. The cross-entropy loss function value with class weights is calculated based on the output of the auxiliary head. The auxiliary head loss weight is used.

5. The method for measuring geometric feature parameters of a transmission electron microscope image sample according to claim 1, characterized in that, The backbone network uses Twin-PCPVT, Unet, Deeplab, or Mobilenet; the decoding head uses UPerHead or LRASPPHead; and the auxiliary head uses FCNHead.

6. The method for measuring geometric feature parameters of a transmission electron microscope image sample according to claim 1, characterized in that, When automatically calculating the geometric feature parameters of the sample in the transmission electron microscope image based on the segmentation mask, functions from the OpenCV computer vision library are used to calculate the geometric feature parameters of the sample in the transmission electron microscope image, specifically including: The cv2.findContours function is used to extract the outer contour of the sample from the segmentation mask in the transmission electron microscope image. The perimeter of the sample is obtained by calculating the curve length of the outer contour using the cv2.arcLength function; The cv2.contourArea function is used to count the number of pixels within the outer contour to obtain the area of ​​the sample; The cv2.minEnclosingCircle function is used to fit the minimum circumcircle of the outer contour, and the diameter of the minimum circumcircle is used as the diameter of the sample. The cv2.moments function is used to calculate the profile moments of the outer contour to obtain the centroid coordinates of the sample.

7. The method for measuring geometric feature parameters of a transmission electron microscope image sample according to claim 1, characterized in that, The conversion of pixel values ​​to physical units using image scale information for the geometric feature parameters specifically includes: The Hough line detection algorithm is used to identify the rectangular region of the scale in the transmission electron microscope image, and the number of pixels corresponding to the scale length is counted. The scale values ​​and physical units on the ruler are identified using an OCR algorithm. The conversion ratio is calculated based on the number of pixels corresponding to the length of the ruler and the scale values ​​and physical units on the ruler. The actual physical values ​​are obtained by multiplying the geometric characteristic parameters of the sample by a conversion ratio.

8. A device for measuring geometric feature parameters of a sample in a transmission electron microscope image, characterized in that, include: A preprocessing module is used to acquire transmission electron microscope (TEM) images and preprocess the TEM images. The semantic segmentation module is used to input the preprocessed transmission electron microscope image into the semantic segmentation model to perform pixel-level segmentation of the sample region and the background region to generate a segmentation mask. The geometric feature parameter calculation module is used to automatically calculate the geometric feature parameters of the sample in the transmission electron microscope image based on the segmentation mask; The unit conversion module is used to convert pixel values ​​to physical units for the geometric feature parameters using image scale information.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for measuring geometric feature parameters of transmission electron microscopy image samples as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for measuring geometric feature parameters of transmission electron microscopy image samples as described in any one of claims 1-7.