[go: up one dir, main page]

CN115526850A - Training method and device for real-space decoder of refrigeration electron microscope and electronic equipment - Google Patents

Training method and device for real-space decoder of refrigeration electron microscope and electronic equipment Download PDF

Info

Publication number
CN115526850A
CN115526850A CN202211146222.5A CN202211146222A CN115526850A CN 115526850 A CN115526850 A CN 115526850A CN 202211146222 A CN202211146222 A CN 202211146222A CN 115526850 A CN115526850 A CN 115526850A
Authority
CN
China
Prior art keywords
projection image
mask
decoder
input
projection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211146222.5A
Other languages
Chinese (zh)
Inventor
许瑞晗
王宇航
张林峰
孙伟杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Shenshi Technology Co ltd
Original Assignee
Beijing Shenshi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Shenshi Technology Co ltd filed Critical Beijing Shenshi Technology Co ltd
Priority to CN202211146222.5A priority Critical patent/CN115526850A/en
Publication of CN115526850A publication Critical patent/CN115526850A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Biophysics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Quality & Reliability (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Image Processing (AREA)

Abstract

本发明提供了一种冷冻电镜实空间解码器的训练方法、装置和电子设备。其中,该方法包括:获取冷冻电镜的输入投影图像和标签信息;将输入投影图像的投影参数输入解码器中,输出预测投影图像;通过掩膜对三维重构目标结构的机器学习表示形式、预测投影图像和输入投影图像进行掩膜处理;基于掩膜处理后的输入投影图像和预测投影图像计算损失值,基于损失值调整解码器的参数;直至满足预设的训练条件,得到训练完成的解码器。该方式适用于机器学习场景,让基于机器学习的冷冻电镜三维重构更能满足实际需求,可专注于三维重构目标结构的重点局部信息,有效分离前景和背景,从而提升重构质量,在图像较少时也能取得较为不错的结果。

Figure 202211146222

The invention provides a training method, device and electronic equipment for a cryo-electron microscope real-space decoder. Among them, the method includes: obtaining the input projection image and label information of the cryo-electron microscope; inputting the projection parameters of the input projection image into the decoder, and outputting the predicted projection image; using the mask to reconstruct the machine learning representation and prediction of the three-dimensional reconstruction target structure The projection image and the input projection image are masked; the loss value is calculated based on the masked input projection image and the predicted projection image, and the parameters of the decoder are adjusted based on the loss value; until the preset training conditions are met, the trained decoding is obtained. device. This method is suitable for machine learning scenarios, so that the 3D reconstruction of cryo-EM based on machine learning can better meet the actual needs. It can focus on the key local information of the 3D reconstruction target structure, and effectively separate the foreground and background, thereby improving the quality of reconstruction. Better results can also be achieved with fewer images.

Figure 202211146222

Description

冷冻电镜实空间解码器的训练方法、装置和电子设备Training method, device and electronic equipment for cryo-electron microscope real-space decoder

技术领域technical field

本发明涉及冷冻电镜技术领域,尤其是涉及一种冷冻电镜实空间解码器的训练方法、装置和电子设备。The invention relates to the technical field of cryo-electron microscopy, in particular to a training method, device and electronic equipment for a real-space decoder of a cryo-electron microscope.

背景技术Background technique

单颗粒冷冻电镜是结构生物学领域一项重要的实验技术。该技术使用来自电子显微镜拍摄的生物大分子二维图像来解析该大分子的三维结构,从而帮助生物学家理解生物大分子的功能机理,辅助新药设计。三维重构是单颗粒冷冻电镜技术中的一个核心步骤,它实现了从电镜二维图像到三维分子密度图的转换。Single particle cryo-electron microscopy is an important experimental technique in the field of structural biology. This technology uses two-dimensional images of biological macromolecules taken by electron microscopes to analyze the three-dimensional structure of the macromolecules, thereby helping biologists understand the functional mechanism of biological macromolecules and assisting in the design of new drugs. Three-dimensional reconstruction is a core step in single-particle cryo-EM technology, which realizes the conversion from two-dimensional electron microscope images to three-dimensional molecular density maps.

传统的冷冻电镜三维重构算法可以分为两大类。第一种是代数类重构算法,第二类是傅立叶变换类算法。基于傅立叶变换类算法在频率空间进行三维重构的算法是当前普遍使用的算法,但是该算法存在以下问题:该类算法需要在频率空间进行插值计算,而这种插值算法很难做到既快又准。常用的快速插值算法会导致因准确性损失而导致的瑕疵以及重构后的三维密度图的分辨率损失。这种缺陷在小数据集上表现的尤为突出,因为小数据集在频率空间缺失的信息更多。频域空间的表示形式只保留了对全局结构的描述,对实空间的局部结构的不规则性不敏感,很难对特定的空间区域做优化。Traditional cryo-EM 3D reconstruction algorithms can be divided into two categories. The first is an algebraic reconstruction algorithm, and the second is a Fourier transform algorithm. The algorithm of three-dimensional reconstruction in frequency space based on Fourier transform algorithm is currently commonly used algorithm, but this algorithm has the following problems: this type of algorithm needs to perform interpolation calculation in frequency space, and this interpolation algorithm is difficult to achieve fast And accurate. Commonly used fast interpolation algorithms lead to artifacts due to loss of accuracy and loss of resolution of the reconstructed 3D density map. This defect is particularly prominent on small data sets, because small data sets have more missing information in the frequency space. The representation of the frequency domain space only retains the description of the global structure, and is not sensitive to the irregularity of the local structure of the real space, so it is difficult to optimize a specific spatial region.

传统的代数类算法虽然可以避免这两个问题,但是这些算法本身计算效率低,且不能直接应用到机器学习的框架下,从而在计算效率上远不如基于机器学习加速的三维重构算法,并且难以和其他机器学习算法结合,例如基于机器学习的电镜图像三维分类等。因此该类方法阻碍了基于机器学习的高效实空间三维重构算法的发展。Although traditional algebraic algorithms can avoid these two problems, these algorithms themselves have low computational efficiency and cannot be directly applied to the framework of machine learning, so their computational efficiency is far inferior to the 3D reconstruction algorithm based on machine learning acceleration, and It is difficult to combine with other machine learning algorithms, such as three-dimensional classification of electron microscope images based on machine learning. Therefore, this type of method hinders the development of efficient real-space 3D reconstruction algorithms based on machine learning.

发明内容Contents of the invention

有鉴于此,本发明的目的在于提供一种冷冻电镜实空间解码器的训练方法、装置和电子设备,以让冷冻电镜实空间三维重构的优势能够在机器学习的框架下得到充分发挥。In view of this, the object of the present invention is to provide a training method, device and electronic equipment for a cryo-electron microscope real-space decoder, so that the advantages of cryo-electron microscope real-space three-dimensional reconstruction can be fully utilized under the framework of machine learning.

第一方面,本发明实施例提供了一种冷冻电镜实空间解码器的训练方法,方法包括:从样本集中获取冷冻电镜的输入投影图像和输入投影图像的标签信息;其中,输入投影图像的标签信息包括:输入投影图像的投影参数和掩膜,投影参数包括投影角度和图像平移;将输入投影图像的投影参数输入解码器中,对解码器内部的三维重构目标结构的机器学习表示形式的投影视野进行空间变换,输出预测投影图像;其中,机器学习表示形式包括显式表示形式和隐式表示形式;通过掩膜对三维重构目标结构的机器学习表示形式、预测投影图像和输入投影图像进行掩膜处理;基于掩膜处理后的输入投影图像和预测投影图像计算损失值,基于损失值调整解码器的参数;多次执行从样本集中获取冷冻电镜的输入投影图像和输入投影图像的标签信息的步骤,直至满足预设的训练条件,得到训练完成的解码器。In the first aspect, an embodiment of the present invention provides a training method for a cryo-electron microscope real-space decoder. The method includes: obtaining the input projection image of the cryo-electron microscope and the label information of the input projection image from the sample set; wherein, the label information of the input projection image The information includes: the projection parameters and mask of the input projection image, the projection parameters include projection angle and image translation; the projection parameters of the input projection image are input into the decoder, and the machine learning representation of the 3D reconstruction target structure inside the decoder is determined. The projected field of view is spatially transformed, and the predicted projection image is output; among them, the machine learning representation includes explicit representation and implicit representation; the machine learning representation of the 3D reconstruction target structure, the predicted projection image and the input projection image through the mask Perform mask processing; calculate the loss value based on the input projection image and predicted projection image after mask processing, adjust the parameters of the decoder based on the loss value; perform multiple executions to obtain the input projection image of the cryo-electron microscope and the label of the input projection image from the sample set The step of information until the preset training conditions are met, and the trained decoder is obtained.

在本申请可选的实施例中,上述掩膜包括3D局域掩膜、2D局域掩膜和/或平面前景背景掩膜。In an optional embodiment of the present application, the above mask includes a 3D local mask, a 2D local mask and/or a planar foreground and background mask.

在本申请可选的实施例中,上述3D局域掩膜包括内切球形掩膜或带有权重的掩膜,2D局域掩膜基于3D局域掩膜确定。In an optional embodiment of the present application, the above-mentioned 3D local mask includes an inscribed spherical mask or a weighted mask, and the 2D local mask is determined based on the 3D local mask.

在本申请可选的实施例中,基于投影参数对3D局域掩膜进行空间变换和投影计算,得到2D局域掩膜。In an optional embodiment of the present application, spatial transformation and projection calculation are performed on the 3D local mask based on projection parameters to obtain a 2D local mask.

在本申请可选的实施例中,上述平面前景背景掩膜用于区分投影图像的前景区域和背景区域。In an optional embodiment of the present application, the above-mentioned planar foreground and background masks are used to distinguish the foreground area and the background area of the projected image.

在本申请可选的实施例中,三维重构目标结构的显式表示形式包括:通过三维格点矩阵的格点编码三维结构的库伦势能值;三维重构目标结构的隐式表示形式包括:用神经网络表征把空间坐标映射到三维结构的库伦势能值的函数。In an optional embodiment of the present application, the explicit representation of the three-dimensional reconstruction target structure includes: encoding the Coulomb potential energy value of the three-dimensional structure through the grid points of the three-dimensional lattice matrix; the implicit representation of the three-dimensional reconstruction target structure includes: Functions that map spatial coordinates to Coulomb potential energy values of three-dimensional structures are represented by neural networks.

在本申请可选的实施例中,上述将输入投影图像的投影参数输入解码器中的步骤之后,方法还包括:对解码器内部的三维重构目标结构的机器学习表示形式的投影视野进行空间变换和后续处理,输出预测投影图像。In an optional embodiment of the present application, after the above-mentioned step of inputting the projection parameters of the input projection image into the decoder, the method further includes: spatially performing the projection field of view of the machine learning representation of the 3D reconstructed target structure inside the decoder. Transformation and subsequent processing to output predicted projected images.

在本申请可选的实施例中,上述基于掩膜处理后的输入投影图像和预测投影图像计算损失值的步骤,包括:基于2D局域掩膜和平面前景背景掩膜对输入投影图像进行掩膜处理,得到掩膜处理后的输入投影图像;基于平面前景背景掩膜对预测投影图像进行掩膜处理,得到掩膜处理后的预测投影图像;基于掩膜处理后的输入投影图像和预测投影图像确定输入投影图像的指定区域的损失值。In an optional embodiment of the present application, the step of calculating the loss value based on the masked input projection image and the predicted projection image includes: masking the input projection image based on the 2D local mask and the planar foreground and background mask Mask processing to obtain the input projection image after mask processing; perform mask processing on the predicted projection image based on the plane foreground and background mask to obtain the predicted projection image after mask processing; based on the mask processed input projection image and predicted projection image determines the loss value for the specified region of the input projected image.

在本申请可选的实施例中,上述掩膜处理后的输入投影图像包括指定区域和其他区域;得到掩膜处理后的输入投影图像的步骤之后,方法还包括:通过正则化的方式抑制其他区域的噪声。In an optional embodiment of the present application, the above masked input projection image includes the designated area and other areas; after the step of obtaining the masked input projection image, the method further includes: suppressing other area noise.

在本申请可选的实施例中,上述方法还包括:将冷冻电镜的第一电镜图像输入投影参数预测编码器,输出第一电镜图像的空间变换参数;其中,空间变换参数表征所示第一电镜图像的投影参数;将空间变换参数输入到冷冻电镜实空间解码器,并进行训练迭代;其中,训练迭代产生的损失值通过机器学习计算图反传给编码器和解码器,并基于训练迭代产生的损失值对编码器和解码器的参数进行更新。In an optional embodiment of the present application, the above method further includes: inputting the first electron microscope image of the cryo-electron microscope into the projection parameter prediction encoder, and outputting the space transformation parameters of the first electron microscope image; wherein, the space transformation parameters represent the first The projection parameters of the electron microscope image; input the space transformation parameters into the cryo-electron microscope real space decoder, and perform training iterations; where the loss value generated by the training iterations is passed back to the encoder and decoder through the machine learning calculation graph, and based on the training iterations The resulting loss values update the parameters of the encoder and decoder.

第二方面,本发明实施例还提供一种冷冻电镜实空间解码器的训练装置,装置包括:输入投影图像获取模块,用于从样本集中获取冷冻电镜的输入投影图像和输入投影图像的标签信息;其中,输入投影图像的标签信息包括:输入投影图像的投影参数和掩膜,投影参数包括投影角度和图像平移;预测投影图像输出模块,用于将输入投影图像的投影参数输入解码器中,对解码器内部的三维重构目标结构的机器学习表示形式的投影视野进行空间变换,输出预测投影图像;其中,机器学习表示形式包括显式表示形式和隐式表示形式;掩膜处理模块,用于通过掩膜对三维重构目标结构的机器学习表示形式、预测投影图像和输入投影图像进行掩膜处理;损失值计算模块,用于基于掩膜处理后的输入投影图像和预测投影图像计算损失值,基于损失值调整解码器的参数;解码器训练完成模块,用于多次执行从样本集中获取冷冻电镜的输入投影图像和输入投影图像的标签信息的步骤,直至满足预设的训练条件,得到训练完成的解码器。In the second aspect, an embodiment of the present invention also provides a training device for a cryo-electron microscope real-space decoder, the device comprising: an input projection image acquisition module, configured to acquire an input projection image of a cryo-electron microscope and label information of the input projection image from a sample set ; Wherein, the tag information of the input projection image includes: the projection parameter and the mask of the input projection image, and the projection parameter includes projection angle and image translation; the predicted projection image output module is used to input the projection parameters of the input projection image into the decoder, Perform spatial transformation on the projection field of view of the machine learning representation of the three-dimensional reconstruction target structure inside the decoder, and output the predicted projection image; wherein, the machine learning representation includes explicit representation and implicit representation; the mask processing module uses It is used to perform mask processing on the machine learning representation of the three-dimensional reconstruction target structure, the predicted projection image and the input projection image through the mask; the loss value calculation module is used to calculate the loss based on the masked input projection image and the predicted projection image value, adjust the parameters of the decoder based on the loss value; the decoder training completion module is used to perform the steps of obtaining the input projection image of the cryo-electron microscope and the label information of the input projection image from the sample set for multiple times until the preset training conditions are met, Get the trained decoder.

第三方面,本发明实施例还提供一种电子设备,其特征在于,包括处理器和存储器,存储器存储有能够被处理器执行的计算机可执行指令,处理器执行计算机可执行指令以实现上述的冷冻电镜实空间解码器的训练方法。In the third aspect, the embodiment of the present invention also provides an electronic device, which is characterized in that it includes a processor and a memory, the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to achieve the above-mentioned A training method for a real-space decoder for cryo-EM.

第四方面,本发明实施例还提供一种计算机可读存储介质,其特征在于,计算机可读存储介质存储有计算机可执行指令,计算机可执行指令在被处理器调用和执行时,计算机可执行指令促使处理器实现上述的冷冻电镜实空间解码器的训练方法。In the fourth aspect, the embodiment of the present invention also provides a computer-readable storage medium, which is characterized in that the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable The instruction prompts the processor to implement the above-mentioned training method of the cryo-EM real-space decoder.

本发明实施例带来了以下有益效果:Embodiments of the present invention bring the following beneficial effects:

本发明实施例提供的一种冷冻电镜实空间解码器的训练方法、装置和电子设备,适用于机器学习场景,让基于机器学习的电镜实空间下三维重构更能满足实际需求,可专注于三维重构目标结构的重点局部信息,有效分离前景和背景,从而提升重构质量,避免了频域三维重构插值算法的弊端,在图像较少时也能取得较为不错的结果。The embodiment of the present invention provides a training method, device, and electronic equipment for a cryo-electron microscope real-space decoder, which are suitable for machine learning scenarios, so that the three-dimensional reconstruction based on machine learning in electron microscope real space can better meet actual needs, and can focus on The key local information of the 3D reconstruction target structure can effectively separate the foreground and background, thereby improving the reconstruction quality, avoiding the disadvantages of the frequency domain 3D reconstruction interpolation algorithm, and achieving relatively good results when there are few images.

本公开的其他特征和优点将在随后的说明书中阐述,或者,部分特征和优点可以从说明书推知或毫无疑义地确定,或者通过实施本公开的上述技术即可得知。Other features and advantages of the present disclosure will be set forth in the following description, or some of the features and advantages can be inferred or unambiguously determined from the description, or can be known by implementing the above-mentioned techniques of the present disclosure.

为使本公开的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments will be described in detail below together with the accompanying drawings.

附图说明Description of drawings

为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the specific implementation of the present invention or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings that need to be used in the specific implementation or description of the prior art. Obviously, the accompanying drawings in the following description The drawings show some implementations of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative work.

图1为本发明实施例提供的一种冷冻电镜实空间解码器的训练方法的流程图;Fig. 1 is the flowchart of the training method of a kind of cryo-electron microscope real space decoder provided by the embodiment of the present invention;

图2为本发明实施例提供的另一种冷冻电镜实空间解码器的训练方法的流程图;Fig. 2 is a flowchart of another training method for a cryo-electron microscope real-space decoder provided by an embodiment of the present invention;

图3为本发明实施例提供的一种解码器算法的示意图;FIG. 3 is a schematic diagram of a decoder algorithm provided by an embodiment of the present invention;

图4为本发明实施例提供的一种带有编码器和解码器算法的示意图;Fig. 4 is a kind of schematic diagram with encoder and decoder algorithm provided by the embodiment of the present invention;

图5为本发明实施例提供的一种冷冻电镜实空间解码器的训练装置的结构示意图;5 is a schematic structural diagram of a training device for a cryo-electron microscope real-space decoder provided by an embodiment of the present invention;

图6为本发明实施例提供的一种电子设备的结构示意图。FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.

具体实施方式detailed description

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合附图对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. the embodiment. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

单颗粒冷冻电镜是结构生物学领域一项重要的实验技术。该技术使用来自电子显微镜拍摄的生物大分子二维图像来解析该大分子的三维结构,从而帮助生物学家理解生物大分子的功能机理,辅助新药设计。Single particle cryo-electron microscopy is an important experimental technique in the field of structural biology. This technology uses two-dimensional images of biological macromolecules taken by electron microscopes to analyze the three-dimensional structure of the macromolecules, thereby helping biologists understand the functional mechanism of biological macromolecules and assisting in the design of new drugs.

三维重构是单颗粒冷冻电镜技术中的一个核心步骤,它实现了从电镜二维图像到三维分子密度图的转换。本实施例关注的重点问题是在给定电镜三维重构关键参数(空间角度/图像平移)的条件下实现从二维投影图到三维物体的重构。Three-dimensional reconstruction is a core step in single-particle cryo-EM technology, which realizes the conversion from two-dimensional electron microscope images to three-dimensional molecular density maps. The focus of this embodiment is to realize the reconstruction from the two-dimensional projection image to the three-dimensional object under the given key parameters (spatial angle/image translation) of the three-dimensional reconstruction of the electron microscope.

目前,传统的冷冻电镜三维重构算法可以分为两大类。第一种是代数类重构算法(如SIRT、ART),这一类算法在直接利用电镜图像的物理成像原理来估测对应一组电镜投影图的三维体积。第二类是傅立叶变换类算法(如Relion、cryoSPARC电镜软件里用到的方法)。这类算法是建立在傅立叶切片定理的基础上,把投影问题转换成频率空间的插值问题。At present, the traditional 3D reconstruction algorithms for cryo-EM can be divided into two categories. The first is the algebraic reconstruction algorithm (such as SIRT, ART). This type of algorithm directly uses the physical imaging principle of the electron microscope image to estimate the three-dimensional volume corresponding to a set of electron microscope projection images. The second type is the Fourier transform algorithm (such as the method used in Relion and cryoSPARC electron microscope software). This type of algorithm is based on the Fourier slice theorem, and converts the projection problem into the interpolation problem of frequency space.

基于机器学习的三维重构方法(如cryoDRGN)的设计普遍基于傅立叶切片定理,用神经网络来拟合一个描述目标物体在频率空间的三维表示形式的函数,从而实现三维重构。The design of 3D reconstruction methods based on machine learning (such as cryoDRGN) is generally based on the Fourier slice theorem, using a neural network to fit a function that describes the 3D representation of the target object in frequency space, thereby achieving 3D reconstruction.

然而,基于傅立叶变换类算法在频率空间进行三维重构的算法是当前普遍使用的算法,但是该算法存在以下问题:该类算法需要在频率空间进行插值计算,而这种插值算法很难做到既快又准。常用的快速插值算法会导致因准确性损失而导致的瑕疵以及重构后的三维密度图的分辨率损失。这种缺陷在小数据集上表现的尤为突出,因为小数据集在频率空间缺失的信息更多。频域空间的表示形式只保留了对全局结构的描述,对实空间的局部结构的不规则性不敏感,很难对特定的空间区域做优化。However, the algorithm for three-dimensional reconstruction in frequency space based on Fourier transform algorithm is currently commonly used algorithm, but this algorithm has the following problems: this type of algorithm needs to perform interpolation calculation in frequency space, and this interpolation algorithm is difficult to do Fast and accurate. Commonly used fast interpolation algorithms lead to artifacts due to loss of accuracy and loss of resolution of the reconstructed 3D density map. This defect is particularly prominent on small data sets, because small data sets have more missing information in the frequency space. The representation of the frequency domain space only retains the description of the global structure, and is not sensitive to the irregularity of the local structure of the real space, so it is difficult to optimize a specific spatial region.

传统的代数类算法虽然可以避免这两个问题,但是这些算法本身计算效率低,且不能直接应用到机器学习的框架下,从而在计算效率上远不如基于机器学习加速的三维重构算法,并且难以和其他机器学习算法结合,例如基于机器学习的电镜图像三维分类等。因此,该类方法阻碍了基于机器学习的高效实空间三维重构算法的发展。Although traditional algebraic algorithms can avoid these two problems, these algorithms themselves have low computational efficiency and cannot be directly applied to the framework of machine learning, so their computational efficiency is far inferior to the 3D reconstruction algorithm based on machine learning acceleration, and It is difficult to combine with other machine learning algorithms, such as three-dimensional classification of electron microscope images based on machine learning. Therefore, this type of method hinders the development of efficient real-space 3D reconstruction algorithms based on machine learning.

基于此,本发明实施例提供的一种冷冻电镜实空间解码器的训练方法、装置和电子设备,具体涉及了一种适用于机器学习的带有掩膜的冷冻电镜实域空间的三维重构解码器。Based on this, the embodiments of the present invention provide a training method, device and electronic equipment for a cryo-electron microscope real space decoder, specifically relating to a three-dimensional reconstruction of a cryo-electron microscope real space with a mask that is suitable for machine learning decoder.

现有的三维重构大部分实在频率空间完成的,受频率空间信号插值算法准确度的限制,频率空间的三维重构结果在高频实空间信号的重构上容易失真,导致重构结果不准确,尤其是在小数据集上。另外,频率空间重构对局部空间结构变化的不规则性不敏感,很难实现对目标体积的局部优化。传统的实空间三维重构算法不经过改动不能直接应用到机器学习框架下。本实施例提供的方法可以避免频率空间三维重构的缺陷,同时也适用于机器学习的场景。Most of the existing 3D reconstructions are done in the frequency space. Limited by the accuracy of the frequency space signal interpolation algorithm, the 3D reconstruction results in the frequency space are easily distorted in the reconstruction of high frequency real space signals, resulting in inaccurate reconstruction results. Accurate, especially on small datasets. In addition, frequency-space reconstruction is not sensitive to irregularities in local spatial structure changes, making it difficult to achieve local optimization of the target volume. Traditional real-space 3D reconstruction algorithms cannot be directly applied to the machine learning framework without modification. The method provided in this embodiment can avoid the defect of frequency-space three-dimensional reconstruction, and is also applicable to the scene of machine learning.

为便于对本实施例进行理解,首先对本发明实施例所公开的一种冷冻电镜实空间解码器的训练方法进行详细介绍。In order to facilitate the understanding of this embodiment, a training method for a cryo-electron microscope real-space decoder disclosed in the embodiment of the present invention is firstly introduced in detail.

实施例一:Embodiment one:

本发明实施例提供一种冷冻电镜实空间解码器的训练方法,参见图1所示的一种冷冻电镜实空间解码器的训练方法的流程图,该冷冻电镜实空间解码器的训练方法包括以下步骤:An embodiment of the present invention provides a training method for a cryo-electron microscope real-space decoder. Referring to the flowchart of a training method for a cryo-electron microscope real-space decoder shown in FIG. 1 , the training method for the cryo-electron microscope real-space decoder includes the following step:

步骤S102,从样本集中获取冷冻电镜的输入投影图像和输入投影图像的标签信息;其中,输入投影图像的标签信息包括:输入投影图像的投影参数和掩膜,投影参数包括投影角度和图像平移。Step S102, acquiring the input projection image of the cryo-electron microscope and the label information of the input projection image from the sample set; wherein, the label information of the input projection image includes: projection parameters and a mask of the input projection image, and the projection parameters include projection angle and image translation.

本实施例的解码器是能够从电镜投影角度和投影平移预测出投影图的网络,在训练解码器时,需要将冷冻电镜的输入投影图像和输入投影图像的标签信息作为样本进行训练。其中,标签信息包括:输入投影图像的投影角度、图像平移和掩膜。本实施例的掩膜并不一定是单一的掩膜,可以包括多种掩膜,例如:3D局域掩膜、2D局域掩膜、平面前景/背景掩膜等。The decoder in this embodiment is a network capable of predicting the projection image from the projection angle and projection translation of the electron microscope. When training the decoder, it is necessary to use the input projection image of the cryo-electron microscope and the label information of the input projection image as samples for training. Among them, the label information includes: the projection angle of the input projected image, image translation and mask. The mask in this embodiment is not necessarily a single mask, and may include multiple masks, for example: 3D local mask, 2D local mask, planar foreground/background mask, and the like.

步骤S104,将输入投影图像的投影参数输入解码器中,对解码器内部的三维重构目标结构的机器学习表示形式的投影视野进行空间变换,输出预测投影图像。Step S104, input the projection parameters of the input projection image into the decoder, perform spatial transformation on the projection field of view of the machine learning representation of the 3D reconstruction target structure inside the decoder, and output the predicted projection image.

其中,机器学习表示形式包括显式表示形式和隐式表示形式,解码器可以根据输入的投影参数对三维重构目标结构(3DR)的显式表示形式、隐式表示形式或者投影视野等进行空间变换,解码器可以输出预测投影图像。Among them, machine learning representations include explicit representations and implicit representations, and the decoder can spatially perform explicit representations, implicit representations, or projection views of the three-dimensional reconstruction target structure (3DR) according to the input projection parameters. transform, the decoder can output a predicted projected image.

例如,可以对显式表示形式和隐式表示形式的投影视野进行空间变换,也可以直接对显式表示形式进行空间变换和后续处理,输出预测投影图像。For example, the spatial transformation can be performed on the projection view of the explicit representation and the implicit representation, and the spatial transformation and subsequent processing can be directly performed on the explicit representation to output the predicted projection image.

步骤S106,通过掩膜对三维重构目标结构的机器学习表示形式、预测投影图像和输入投影图像进行掩膜处理。Step S106, performing mask processing on the machine learning representation of the three-dimensionally reconstructed target structure, the predicted projection image, and the input projection image through a mask.

本实施例可以通过掩膜对三维重构目标结构的机器学习表示形式、预测投影图像和输入投影图像进行掩膜处理,通过掩膜处理,可以保证预测投影图像和输入投影图像使用相同的区域进行后续计算。In this embodiment, mask processing can be performed on the machine learning representation of the 3D reconstruction target structure, the predicted projection image, and the input projection image. Through mask processing, it can be ensured that the same area is used for the predicted projection image and the input projection image. Subsequent calculations.

步骤S108,基于掩膜处理后的输入投影图像和预测投影图像计算损失值,基于损失值调整解码器的参数。Step S108, calculating a loss value based on the masked input projection image and the predicted projection image, and adjusting the parameters of the decoder based on the loss value.

基于预先设置的损失函数,可以计算得到于掩膜处理后的输入投影图像和预测投影图像的损失值,根据损失值可以调整解码器的参数,从而完成一次解码器的迭代。Based on the preset loss function, the loss value of the input projection image and the predicted projection image after mask processing can be calculated, and the parameters of the decoder can be adjusted according to the loss value, thereby completing one iteration of the decoder.

步骤S110,多次执行从样本集中获取冷冻电镜的输入投影图像和输入投影图像的标签信息的步骤,直至满足预设的训练条件,得到训练完成的解码器。In step S110, the step of obtaining the input projection image of the cryo-electron microscope and the label information of the input projection image from the sample set is performed multiple times until the preset training conditions are met, and a trained decoder is obtained.

本实施例中可以预先设置迭代的总次数(例如3000次)作为训练条件,当迭代次数达到该总次数,可以认为满足预设的训练条件,得到训练完成的解码器。In this embodiment, the total number of iterations (for example, 3000) can be preset as the training condition. When the number of iterations reaches the total number, it can be considered that the preset training condition is met, and a trained decoder can be obtained.

本发明实施例提供的一种冷冻电镜实空间解码器的训练方法,适用于机器学习场景,让基于机器学习的电镜实空间下三维重构更能满足实际需求,可专注于三维重构目标结构的重点局部信息,有效分离前景和背景,从而提升重构质量,避免了频域三维重构插值算法的弊端,在图像较少时也能取得较为不错的结果。The embodiment of the present invention provides a training method for a cryo-electron microscope real space decoder, which is suitable for machine learning scenarios, so that the three-dimensional reconstruction based on machine learning in electron microscope real space can better meet the actual needs, and can focus on three-dimensional reconstruction of the target structure The key local information can effectively separate the foreground and background, thereby improving the reconstruction quality, avoiding the disadvantages of the three-dimensional reconstruction interpolation algorithm in the frequency domain, and achieving relatively good results when there are few images.

实施例二:Embodiment two:

本实施例提供了另一种冷冻电镜实空间解码器的训练方法,该方法在上述实施例的基础上实现,如图2所示的另一种冷冻电镜实空间解码器的训练方法的流程图,本实施例中的种冷冻电镜实空间解码器的训练方法包括如下步骤:This embodiment provides another training method for a cryo-electron microscope real-space decoder, which is implemented on the basis of the above-mentioned embodiments, as shown in Figure 2 is a flowchart of another training method for a cryo-electron microscope real-space decoder , the training method of a cryo-electron microscope real space decoder in the present embodiment comprises the following steps:

步骤S202,从样本集中获取冷冻电镜的输入投影图像和输入投影图像的标签信息;其中,输入投影图像的标签信息包括:输入投影图像的投影参数和掩膜,投影参数包括投影角度和图像平移。Step S202, acquiring the input projection image of the cryo-electron microscope and the label information of the input projection image from the sample set; wherein, the label information of the input projection image includes: projection parameters and a mask of the input projection image, and the projection parameters include projection angle and image translation.

为便于理解,可以参见图3所示的一种解码器算法的示意图,上述解码器算法可以包括训练过程和推理过程。在训练过程中,将电镜图像及其标签信息输入网络进行训练,待训练损失不再下降或达到一定训练迭代次数后终止。For ease of understanding, refer to a schematic diagram of a decoder algorithm shown in FIG. 3 , the above decoder algorithm may include a training process and an inference process. During the training process, the electron microscope images and their label information are input into the network for training, and the training is terminated when the training loss no longer decreases or reaches a certain number of training iterations.

训练过程中使用到的输入投影图像及其标签信息,输入投影图像包括实验获取的冷冻电镜投影图像,标签信息包括:输入投影图像的投影角度、图像平移和掩膜等。The input projection image and its label information used in the training process. The input projection image includes the cryo-electron microscope projection image obtained in the experiment. The label information includes: the projection angle, image translation and mask of the input projection image.

步骤S204,将输入投影图像的投影参数输入解码器中,对解码器内部的三维重构目标结构的机器学习表示形式的投影视野进行空间变换,输出预测投影图像。Step S204, inputting the projection parameters of the input projection image into the decoder, performing spatial transformation on the projection field of view of the machine learning representation of the 3D reconstruction target structure inside the decoder, and outputting the predicted projection image.

机器学习表示形式包括显式表示形式和隐式表示形式,本实施例中还可以对解码器内部的三维重构目标结构的机器学习表示形式的投影视野进行空间变换和后续处理,输出预测投影图像。Machine learning representations include explicit representations and implicit representations. In this embodiment, spatial transformation and subsequent processing can be performed on the projection field of view of the machine learning representation of the 3D reconstruction target structure inside the decoder, and the predicted projection image can be output. .

其中,三维重构目标结构的显式表示形式包括:通过三维格点矩阵的格点编码三维结构的库伦势能值;三维重构目标结构的隐式表示形式包括:用神经网络表征把空间坐标映射到三维结构的库伦势能值的函数。Among them, the explicit representation of the 3D reconstruction target structure includes: encoding the Coulomb potential energy value of the 3D structure through the grid points of the 3D lattice matrix; the implicit representation of the 3D reconstruction target structure includes: mapping the spatial coordinates with the neural network representation to the function of the Coulomb potential energy value of the three-dimensional structure.

显式3DR的一种实现形式是三维格点矩阵,每个格点可以用数值或者带有参数的函数(比如球谐函数)来编码三维结构的库伦势能值。隐式3DR的一种实现方式是用神经网络来代表一个可以计算对应空间中每一个坐标值的三维结构的库伦势能值的函数。One implementation form of explicit 3DR is a three-dimensional lattice matrix, and each lattice point can encode the Coulomb potential energy value of the three-dimensional structure with a numerical value or a function with parameters (such as a spherical harmonic function). One implementation of implicit 3DR is to use a neural network to represent a function that can calculate the Coulomb potential energy value of a three-dimensional structure corresponding to each coordinate value in the space.

如图3所示,训练过程中,网络需要输入一组投影参数,根据该投影角度对3DR做投影,输出该角度上的投影图,并和输入的实验电镜图像计算损失函数。As shown in Figure 3, during the training process, the network needs to input a set of projection parameters, project the 3DR according to the projection angle, output the projection map at this angle, and calculate the loss function with the input experimental electron microscope image.

对于显式3DR的二维平面投影计算,可以根据输入的空间变换参数(包含旋转和平移信息)将三维格点矩阵变换到新的空间取向和位置,然后用原始三维格点矩阵的体素信息做插值算法,计算新三维格点矩阵的体素信息。然后在投影方向上做积分或者计算均值。For the two-dimensional planar projection calculation of explicit 3DR, the three-dimensional lattice matrix can be transformed to a new spatial orientation and position according to the input space transformation parameters (including rotation and translation information), and then the voxel information of the original three-dimensional lattice matrix can be used Do an interpolation algorithm to calculate the voxel information of the new 3D grid matrix. Then integrate or calculate the mean in the projected direction.

此外,上述显式3DR也可以替换为基于神经网络的隐式表示形式,例如:基于位置编码的神经网络,SIREN等基于正弦/余弦激活函数的网络,基于GAN/VAE/diffusion model等生成技术的网络等。In addition, the above-mentioned explicit 3DR can also be replaced by implicit representations based on neural networks, such as: neural networks based on position encoding, networks based on sine/cosine activation functions such as SIREN, and generation technologies based on GAN/VAE/diffusion model network etc.

在获取投影时,本实施例可以使用旋转三维格点矩阵的方式获得投影,也可以使用其他方式获取投影,例如:不旋转三维格点,直接在对应的旋转角度和平移位置上做投影;通过神经网络,直接预测对应投影参数的投影视野内的三维重构目标物体的库伦势能值并做投影;使用以上方法,对3DR使用前景/背景掩膜、局部掩膜等处理后再进行投影。When obtaining the projection, this embodiment can use the method of rotating the three-dimensional lattice matrix to obtain the projection, and can also use other methods to obtain the projection, for example: do not rotate the three-dimensional lattice point, and directly perform projection on the corresponding rotation angle and translation position; through The neural network directly predicts the Coulomb potential energy value of the 3D reconstructed target object within the projection field of view corresponding to the projection parameters and performs projection; using the above method, the 3DR is processed by foreground/background mask, local mask, etc. before projection.

电镜投影参数可以通过其他专业软件预测;通过数值搜索算法并结合三维重构方法预测;通过适用于图像处理的神经网络预测;在训练过程中使用神经网络预测,并同步优化该预测网络和三维重构网络;通过以上任意一种方法增加修正项预测。Electron microscope projection parameters can be predicted by other professional software; predicted by numerical search algorithm combined with three-dimensional reconstruction method; predicted by neural network suitable for image processing; predicted by neural network in the training process, and simultaneously optimize the prediction network and three-dimensional reconstruction Network structure; add correction items to predict by any of the above methods.

步骤S206,通过掩膜对三维重构目标结构的机器学习表示形式、预测投影图像和输入投影图像进行掩膜处理。Step S206, performing mask processing on the machine learning representation of the three-dimensionally reconstructed target structure, the predicted projection image, and the input projection image through a mask.

具体地,本实施例的掩膜包括3D局域掩膜、2D局域掩膜和/或平面前景背景掩膜。其中,3D局域掩膜包括内切球形掩膜或带有权重的掩膜,2D局域掩膜基于3D局域掩膜确定,例如:基于投影参数对3D局域掩膜进行空间变换和投影计算,得到2D局域掩膜。Specifically, the mask in this embodiment includes a 3D local mask, a 2D local mask and/or a planar foreground and background mask. Among them, the 3D local mask includes an inscribed spherical mask or a mask with weights, and the 2D local mask is determined based on the 3D local mask, for example: spatial transformation and projection of the 3D local mask based on projection parameters Calculate to get a 2D local mask.

3D局域掩膜有很多设计方案,例如内切球形掩膜,即将3DR边角的掩膜值置零,而将3DR内切球内的掩膜值设成1。3D局域掩膜也可以设置成带有权重的掩膜,即对3DR不同区域设置不同的掩膜权重值(在0到1之间)。There are many design schemes for 3D local masks, such as inscribed spherical masks, which set the mask value at the corner of 3DR to zero, and set the mask value inside the 3DR inscribed sphere to 1. 3D local masks can also be Set as a weighted mask, that is, set different mask weight values (between 0 and 1) for different areas of 3DR.

2D局域掩膜的设计是基于3D局域掩膜的。一种可能的实现方案是对3D局域掩膜依据输入投影参数做空间变换后进行投影计算来得到。The design of the 2D local mask is based on the 3D local mask. A possible implementation solution is to perform projection calculation on the 3D local mask according to the input projection parameters after spatial transformation.

如图3所示,显式的3DR可以由三维格点矩阵构成,隐式的3DR可以由神经网络构成。另外,3DR在旋转/平移变换之前需要经过一个三维掩膜预处理,来避免三维重构过程中在八个立方体边角出现伪信号。本实施例使用的三维掩膜(即3D局域掩膜)可以是三维格点矩阵的内切球,即内切球以内的体素信号保留,内切球意外的体素信号置零。As shown in Figure 3, the explicit 3DR can be formed by a three-dimensional lattice matrix, and the implicit 3DR can be formed by a neural network. In addition, 3DR needs to undergo a three-dimensional mask preprocessing before the rotation/translation transformation to avoid false signals at the corners of the eight cubes during the three-dimensional reconstruction process. The three-dimensional mask (that is, the 3D local mask) used in this embodiment may be an inscribed sphere of the three-dimensional lattice matrix, that is, the voxel signals inside the inscribed sphere are reserved, and the voxel signals outside the inscribed sphere are set to zero.

本实施例提供的解码器是完全在实空间的操作,这里的三维掩膜可以根据用户需要设计成带有权重的三维前景掩膜。比如,如果三维重构的目标物体含有A,B,C三个空间区域,而用户对A区域最感兴趣,对B区域略感兴趣,对C区域不感兴趣。那么这里的三维掩膜可以给A区域设置最高的权重,对B区域设置较低的权重,而对C区域设置很低的权重或者直接将权重置零。The decoder provided in this embodiment operates entirely in real space, and the three-dimensional mask here can be designed as a weighted three-dimensional foreground mask according to user needs. For example, if the 3D reconstructed target object contains three spatial regions A, B, and C, the user is most interested in region A, slightly interested in region B, and not interested in region C. Then the three-dimensional mask here can set the highest weight for the A region, set a lower weight for the B region, and set a very low weight for the C region or directly reset the weight to zero.

三维掩膜可以转换成二维掩膜(即2D局域掩膜),例如:通过对三维掩膜做与3DR同样的空间变换和投影即可得到二维掩膜。这个二维掩膜可以在后续损失函数计算时对输入的电镜图片进行预处理,来保证预测图片和输入图片使用相同的区域进行相关计算。A three-dimensional mask can be converted into a two-dimensional mask (that is, a 2D local mask). For example, a two-dimensional mask can be obtained by performing the same spatial transformation and projection on the three-dimensional mask as 3DR. This two-dimensional mask can preprocess the input electron microscope image during subsequent loss function calculations to ensure that the predicted image and the input image use the same area for correlation calculations.

步骤S208,基于掩膜处理后的输入投影图像和预测投影图像计算损失值,基于损失值调整解码器的参数。In step S208, a loss value is calculated based on the masked input projection image and the predicted projection image, and parameters of the decoder are adjusted based on the loss value.

具体地,本实施例可以基于2D局域掩膜和平面前景背景掩膜对输入投影图像进行掩膜处理,得到掩膜处理后的输入投影图像;基于平面前景背景掩膜对预测投影图像进行掩膜处理,得到掩膜处理后的预测投影图像;基于掩膜处理后的输入投影图像和预测投影图像确定输入投影图像的指定区域的损失值。Specifically, in this embodiment, the input projection image may be masked based on the 2D local mask and the planar foreground and background mask to obtain the masked input projection image; the predicted projection image may be masked based on the planar foreground and background mask. The mask processing is to obtain a mask-processed predicted projection image; based on the mask-processed input projection image and the predicted projection image, the loss value of a designated area of the input projection image is determined.

此外,本实施例还可以通过正则化的方式抑制其他区域的噪声。In addition, this embodiment can also suppress noise in other regions through regularization.

如图3所示,平面前景/背景掩膜的设计的目的把前景和背景区分开。这里的前景是指投影图中对应三维重构目标结构的区域,背景是指投影图内的其它区域。As shown in Figure 3, the planar foreground/background mask is designed to separate the foreground from the background. The foreground here refers to the area corresponding to the 3D reconstruction target structure in the projection image, and the background refers to other areas in the projection image.

在训练过程可以使用二维前景/背景掩膜提升重构质量。具体方法为:在计算损失函数的步骤中,可以对输入和预测投影图进行二维前景/背景掩膜处理,模型只计算全局或局部前景的损失函数,而对背景部分使用正则化方法抑制噪声。Two-dimensional foreground/background masks can be used during training to improve reconstruction quality. The specific method is: in the step of calculating the loss function, two-dimensional foreground/background mask processing can be performed on the input and predicted projection images, the model only calculates the loss function of the global or local foreground, and uses a regularization method for the background part to suppress noise .

前景/背景掩膜可以通过人工设计,可以通过其他专业软件计算,也可以直接通过投影结果预测。通过前景掩膜方法可以在保留信号的同时降低噪声,从而提升模型的性能。The foreground/background mask can be manually designed, calculated by other professional software, or directly predicted by projection results. The foreground mask method can reduce the noise while preserving the signal, thereby improving the performance of the model.

对于全局前景掩膜,本实施例设计了一个自动化的二维前景/背景掩膜生成方案。在该方案中,可以对输入图片做平滑处理(比如用高斯滤波器),如果处理后的输入投影图的像素值超过一定阈值,这些区域就被设定为前景,其它区域设为背景,然后根据这些区域制作二分或者带有权重的前景/背景掩膜。前景和背景的过渡区域可以用平滑的函数(比如sigmoid函数)进行渐变处理。For the global foreground mask, this embodiment designs an automatic two-dimensional foreground/background mask generation scheme. In this scheme, the input image can be smoothed (such as using a Gaussian filter). If the pixel value of the processed input projection image exceeds a certain threshold, these areas are set as the foreground, and other areas are set as the background, and then Make binary or weighted foreground/background masks from these regions. The transition area between the foreground and the background can be processed gradually with a smooth function (such as a sigmoid function).

如果要设计带有权重的前景掩膜,权重可以根据平滑后的像素值来进行计算(比如归一化处理或者把这些像素值输入到某个权重生成函数来得到掩膜权重)。局部前景掩膜可以通过前述三维到二维区域掩膜的方式生成。值得强调的是,同一张投影图可以经过多层掩膜处理。If you want to design a foreground mask with weights, the weights can be calculated based on the smoothed pixel values (such as normalization or inputting these pixel values into a weight generation function to obtain mask weights). The local foreground mask can be generated by the aforementioned three-dimensional to two-dimensional area mask. It is worth emphasizing that the same projection image can be processed with multiple layers of masks.

在计算损失函数的时候可以对预测投影图像和输入投影图像的比较采用了L2loss,而对重构的三维体积采用了L1 loss。最终的损失函数包含这两部分。另外,可以对三维体积的L1 loss添加了前置因子beta来优化降低输入图片里的噪声对三维重构的负面影响。优选地,把beta设置成0.05对三维重构效果最好。When calculating the loss function, L2loss can be used for the comparison between the predicted projection image and the input projection image, and L1 loss can be used for the reconstructed three-dimensional volume. The final loss function contains these two parts. In addition, the prefactor beta can be added to the L1 loss of the 3D volume to optimize and reduce the negative impact of the noise in the input image on the 3D reconstruction. Preferably, setting beta to 0.05 has the best effect on 3D reconstruction.

此外,本实施例中使用的损失函数可以用其它类似的函数替换,包括:smooth L1loss,Huber loss,Hinge loss,cross-entropy loss等;正则化项可以用其他正则化损失函数替换,包括:L1 loss,L2 loss,L1+L2 loss,TV loss等。In addition, the loss function used in this embodiment can be replaced by other similar functions, including: smooth L1loss, Huber loss, Hinge loss, cross-entropy loss, etc.; the regularization term can be replaced by other regularized loss functions, including: L1 loss, L2 loss, L1+L2 loss, TV loss, etc.

步骤S210,多次执行从样本集中获取冷冻电镜的输入投影图像和输入投影图像的标签信息的步骤,直至满足预设的训练条件,得到训练完成的解码器。In step S210, the step of obtaining the input projection image of the cryo-electron microscope and the label information of the input projection image from the sample set is performed multiple times until the preset training conditions are met, and a trained decoder is obtained.

本实施例可以采用AdamW optimizer进行机器学的迭代。优选地,将AdamWoptimizer的weight decay参数设置成1.0E-6的重构效果最好。In this embodiment, AdamW optimizer can be used for machine learning iteration. Preferably, the reconstruction effect of setting the weight decay parameter of AdamWoptimizer to 1.0E-6 is the best.

步骤S212,生成与输入投影图数据集相匹配的三维重构结构。Step S212, generating a three-dimensional reconstructed structure matching the input projection image data set.

在推理过程中,编码器的网路可以直接输出表征三维重构目标结构库伦势能的三维格点矩阵作为重构结果。本实施例的三维重构算法在低端显卡上也可以运行并获得比较好的重构结果。优选地,将batch size设成8就可以完成比较不错的三维重构。把learningrate设成0.1的效果最好。During the inference process, the network of the encoder can directly output the 3D lattice matrix representing the Coulomb potential energy of the 3D reconstructed target structure as the reconstruction result. The 3D reconstruction algorithm of this embodiment can also run on a low-end graphics card and obtain relatively good reconstruction results. Preferably, setting the batch size to 8 can complete relatively good 3D reconstruction. Setting the learningrate to 0.1 works best.

此外,本实施例还可以将冷冻电镜的第一电镜图像输入投影参数预测编码器,输出第一电镜图像的空间变换参数;其中,空间变换参数表征所示第一电镜图像的投影参数;将空间变换参数输入到冷冻电镜实间解码器,并进行训练迭代;其中,训练迭代产生的损失值通过机器学习计算图反传给编码器,并基于训练迭代产生的损失值对编码器和解码器的参数进行更新。In addition, in this embodiment, the first electron microscope image of the cryo-electron microscope can also be input into the projection parameter prediction encoder, and the spatial transformation parameters of the first electron microscope image can be output; wherein, the spatial transformation parameters represent the projection parameters of the first electron microscope image shown; The transformation parameters are input to the cryo-electron microscope real-time decoder, and the training iteration is performed; the loss value generated by the training iteration is passed back to the encoder through the machine learning calculation graph, and based on the loss value generated by the training iteration, the encoder and decoder are compared. The parameters are updated.

其中,空间变换参数包括各种空间变换的表示形式,比如空间变换矩阵,四元数,Rodrigues空间旋转向量等,可以参见图4所示的一种带有编码器和解码器算法的示意图。Among them, the space transformation parameters include various representation forms of space transformation, such as space transformation matrix, quaternion, Rodrigues space rotation vector, etc., as shown in FIG. 4 for a schematic diagram with encoder and decoder algorithms.

具体地,可以将冷冻电镜的电镜样本图像输入初始编码器,输出空间变换参数;将电镜样本图像的空间变换参数作为三维重构目标结构的投影角度对初始编码器进行训练,直至满足预设的训练条件,得到训练完成的投影参数预测编码器。Specifically, the electron microscope sample image of the cryo-electron microscope can be input into the initial encoder, and the spatial transformation parameters are output; the initial encoder is trained using the spatial transformation parameters of the electron microscope sample image as the projection angle of the three-dimensional reconstruction target structure until the preset Training conditions, get the trained projection parameter prediction encoder.

投影参数可以通过神经网络预测出来,例如:将第一电镜图像输入到角度预测网络,输出为一个空间旋转平移变换参数或者等效表示形式,将该变换参数作为3DR的空间变换参数加入训练过程,实现三维重构网络和投影参数预测网络的联合训练。The projection parameters can be predicted by the neural network. For example, the first electron microscope image is input to the angle prediction network, and the output is a spatial rotation and translation transformation parameter or an equivalent representation. The transformation parameter is added to the training process as a 3DR spatial transformation parameter. Implement joint training of 3D reconstruction network and projection parameter prediction network.

综上,本实施例提供的上述方法,可以在重构过程中的实空间表示;重构过程中使用了实空间投影算法;实空间掩膜可以在重构过程应用。该方式中,实现了在机器学习的框架下的实空间的可微分电镜三维重构,避免了频率空间三维重构的种种弊端;设计了适用于机器学习的实空间掩膜,用于提升三维重构整体质量和局部特征的重点优化。To sum up, the above method provided by this embodiment can be represented in real space during the reconstruction process; a real space projection algorithm is used in the reconstruction process; and a real space mask can be applied in the reconstruction process. In this method, the differentiable three-dimensional reconstruction of electron microscopy in real space under the framework of machine learning is realized, which avoids various disadvantages of three-dimensional reconstruction in frequency space; a real-space mask suitable for machine learning is designed to improve three-dimensional Focused optimization of reconstructed overall quality and local features.

实施例三:Embodiment three:

对应于上述方法实施例,本发明实施例提供了一种冷冻电镜实空间解码器的训练装置,参见图5所示的一种冷冻电镜实空间解码器的训练装置的结构示意图,该冷冻电镜实空间解码器的训练装置包括:Corresponding to the above-mentioned method embodiment, the embodiment of the present invention provides a training device for a cryo-electron microscope real-space decoder. Referring to the schematic structural diagram of a training device for a cryo-electron microscope real-space decoder shown in FIG. The training setup for the spatial decoder consists of:

输入投影图像获取模块51,用于从样本集中获取冷冻电镜的输入投影图像和输入投影图像的标签信息;其中,输入投影图像的标签信息包括:输入投影图像的投影参数和掩膜,投影参数包括投影角度和图像平移;The input projection image acquisition module 51 is used to obtain the input projection image of the cryo-electron microscope and the label information of the input projection image from the sample set; wherein, the label information of the input projection image includes: the projection parameters and the mask of the input projection image, and the projection parameters include projection angle and image translation;

预测投影图像输出模块52,用于将输入投影图像的投影参数输入解码器中,对解码器内部的三维重构目标结构的机器学习表示形式的投影视野进行空间变换,输出预测投影图像;其中,机器学习表示形式包括显式表示形式和隐式表示形式;The predicted projection image output module 52 is used to input the projection parameters of the input projection image into the decoder, perform spatial transformation on the projection field of view of the machine learning representation of the three-dimensional reconstruction target structure inside the decoder, and output the predicted projection image; wherein, Machine learning representations include explicit representations and implicit representations;

掩膜处理模块53,用于通过掩膜对三维重构目标结构的机器学习表示形式、预测投影图像和输入投影图像进行掩膜处理;The mask processing module 53 is used to perform mask processing on the machine learning representation of the three-dimensional reconstruction target structure, the predicted projection image and the input projection image through a mask;

损失值计算模块54,用于基于掩膜处理后的输入投影图像和预测投影图像计算损失值,基于损失值调整解码器的参数;The loss value calculation module 54 is used to calculate the loss value based on the input projection image and the predicted projection image processed by the mask, and adjust the parameters of the decoder based on the loss value;

解码器训练完成模块55,用于多次执行从样本集中获取冷冻电镜的输入投影图像和输入投影图像的标签信息的步骤,直至满足预设的训练条件,得到训练完成的解码器。The decoder training completion module 55 is used to perform the step of obtaining the input projection image of the cryo-electron microscope and the label information of the input projection image from the sample set for multiple times until the preset training conditions are met to obtain a trained decoder.

本发明实施例提供的一种冷冻电镜实空间解码器的训练装置,适用于机器学习场景,让基于机器学习的电镜实空间下三维重构更能满足实际需求,可专注于三维重构目标结构的重点局部信息,有效分离前景和背景,从而提升重构质量,避免了频域三维重构插值算法的弊端,在图像较少时也能取得较为不错的结果。The embodiment of the present invention provides a training device for a cryo-electron microscope real space decoder, which is suitable for machine learning scenarios, so that the three-dimensional reconstruction based on machine learning in electron microscope real space can better meet the actual needs, and can focus on three-dimensional reconstruction of the target structure The key local information can effectively separate the foreground and background, thereby improving the reconstruction quality, avoiding the disadvantages of the three-dimensional reconstruction interpolation algorithm in the frequency domain, and achieving relatively good results when there are few images.

上述掩膜包括3D局域掩膜、2D局域掩膜和/或平面前景背景掩膜。The aforementioned masks include 3D local masks, 2D local masks and/or planar foreground and background masks.

上述3D局域掩膜包括内切球形掩膜或带有权重的掩膜,2D局域掩膜基于3D局域掩膜确定。基于投影参数对3D局域掩膜进行空间变换和投影计算,得到2D局域掩膜。The above-mentioned 3D local mask includes an inscribed spherical mask or a weighted mask, and the 2D local mask is determined based on the 3D local mask. Based on the projection parameters, space transformation and projection calculation are performed on the 3D local mask to obtain a 2D local mask.

上述平面前景背景掩膜用于区分投影图像的前景区域和背景区域。The above planar foreground and background masks are used to distinguish the foreground area and the background area of the projected image.

上述三维重构目标结构的显式表示形式包括:通过三维格点矩阵的格点编码三维结构的库伦势能值;三维重构目标结构的隐式表示形式包括:用神经网络表征把空间坐标映射到三维结构的库伦势能值的函数。The explicit representation of the above three-dimensional reconstruction target structure includes: encoding the Coulomb potential energy value of the three-dimensional structure through the grid points of the three-dimensional lattice matrix; the implicit representation of the three-dimensional reconstruction target structure includes: using neural network representation to map the spatial coordinates to A function of the Coulomb potential energy value of the three-dimensional structure.

上述预测投影图像输出模块,还用于对解码器内部的三维重构目标结构的机器学习表示形式的投影视野进行空间变换和后续处理,输出预测投影图像。The above-mentioned predictive projection image output module is also used to perform spatial transformation and subsequent processing on the projection field of view of the machine learning representation of the three-dimensional reconstruction target structure inside the decoder, and output the predictive projection image.

上述损失值计算模块,用于基于2D局域掩膜和平面前景背景掩膜对输入投影图像进行掩膜处理,得到掩膜处理后的输入投影图像;基于平面前景背景掩膜对预测投影图像进行掩膜处理,得到掩膜处理后的预测投影图像;基于掩膜处理后的输入投影图像和预测投影图像确定输入投影图像的指定区域的损失值。The above loss value calculation module is used to perform mask processing on the input projection image based on the 2D local mask and the planar foreground background mask to obtain the input projection image after mask processing; based on the planar foreground and background mask, the predicted projection image is Mask processing, obtaining a predicted projection image after mask processing; determining a loss value of a designated area of the input projection image based on the input projection image after mask processing and the predicted projection image.

上述掩膜处理后的输入投影图像包括指定区域和其他区域;上述中装置还包括:噪声抑制模块,用于通过正则化的方式抑制其他区域的噪声。The input projected image processed by the above mask includes the specified area and other areas; the above device further includes: a noise suppression module, which is used to suppress noise in other areas by means of regularization.

上述中装置还包括:投影参数预测编码器处理模块,用于将冷冻电镜的第一电镜图像输入投影参数预测编码器,输出第一电镜图像的空间变换参数;其中,空间变换参数表征所示第一电镜图像的投影参数;将空间变换参数输入到冷冻电镜实空间解码器,并进行训练迭代;其中,训练迭代产生的损失值通过机器学习计算图反传给编码器和解码器,并基于训练迭代产生的损失值对编码器和解码器的参数进行更新。The above-mentioned device also includes: a projection parameter prediction encoder processing module, which is used to input the first electron microscope image of the cryo-electron microscope into the projection parameter prediction encoder, and output the space transformation parameters of the first electron microscope image; wherein, the space transformation parameters represent the first The projection parameters of an electron microscope image; input the space transformation parameters into the cryo-electron microscope real space decoder, and perform training iterations; wherein, the loss value generated by the training iterations is passed back to the encoder and decoder through the machine learning calculation graph, and based on the training The loss values generated by the iterations update the parameters of the encoder and decoder.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的冷冻电镜实空间解码器的训练装置的具体工作过程,可以参考前述的冷冻电镜实空间解码器的训练方法的实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the training device of the cryo-electron microscope real-space decoder described above can refer to the implementation of the aforementioned training method of the cryo-electron microscope real-space decoder The corresponding process in the example will not be repeated here.

实施例四:Embodiment four:

本发明实施例还提供了一种电子设备,用于运行上述冷冻电镜实空间解码器的训练方法;参见图6所示的一种电子设备的结构示意图,该电子设备包括存储器100和处理器101,其中,存储器100用于存储一条或多条计算机指令,一条或多条计算机指令被处理器101执行,以实现上述冷冻电镜实空间解码器的训练方法。The embodiment of the present invention also provides an electronic device for running the training method of the cryo-electron microscope real space decoder; refer to the schematic structural diagram of an electronic device shown in FIG. 6 , the electronic device includes a memory 100 and a processor 101 , wherein the memory 100 is used to store one or more computer instructions, and one or more computer instructions are executed by the processor 101 to implement the above-mentioned training method of the cryo-electron microscope real-space decoder.

进一步地,图6所示的电子设备还包括总线102和通信接口103,处理器101、通信接口103和存储器100通过总线102连接。Further, the electronic device shown in FIG. 6 further includes a bus 102 and a communication interface 103 , and the processor 101 , the communication interface 103 and the memory 100 are connected through the bus 102 .

其中,存储器100可能包含高速随机存取存储器(RAM,Random Access Memory),也可能还包括非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。通过至少一个通信接口103(可以是有线或者无线)实现该系统网元与至少一个其他网元之间的通信连接,可以使用互联网,广域网,本地网,城域网等。总线102可以是ISA总线、PCI总线或EISA总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图6中仅用一个双向箭头表示,但并不表示仅有一根总线或一种类型的总线。Wherein, the memory 100 may include a high-speed random access memory (RAM, Random Access Memory), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local network, metropolitan area network, etc. can be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one double-headed arrow is used in FIG. 6 , but it does not mean that there is only one bus or one type of bus.

处理器101可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器101中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器101可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(DigitalSignal Processor,简称DSP)、专用集成电路(Application Specific IntegratedCircuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器100,处理器101读取存储器100中的信息,结合其硬件完成前述实施例的方法的步骤。The processor 101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 101 or instructions in the form of software. The above-mentioned processor 101 can be a general-purpose processor, including a central processing unit (Central Processing Unit, referred to as CPU), a network processor (Network Processor, referred to as NP), etc.; it can also be a digital signal processor (Digital Signal Processor, referred to as DSP) , Application Specific Integrated Circuit (ASIC for short), Field Programmable Gate Array (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Various methods, steps and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. The steps of the methods disclosed in the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory 100, and the processor 101 reads the information in the memory 100, and completes the steps of the methods in the foregoing embodiments in combination with its hardware.

本发明实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令在被处理器调用和执行时,计算机可执行指令促使处理器实现上述冷冻电镜实空间解码器的训练方法,具体实现可参见方法实施例,在此不再赘述。An embodiment of the present invention also provides a computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are invoked and executed by a processor, the computer-executable instructions cause the processor to implement For the training method of the cryo-electron microscope real-space decoder, see the method embodiment for specific implementation, and details are not repeated here.

本发明实施例所提供的冷冻电镜实空间解码器的训练方法、装置和电子设备的计算机程序产品,包括存储了程序代码的计算机可读存储介质,程序代码包括的指令可用于执行前面方法实施例中的方法,具体实现可参见方法实施例,在此不再赘述。The computer program product of the training method, device and electronic equipment of the cryo-electron microscope real-space decoder provided by the embodiments of the present invention includes a computer-readable storage medium storing program codes, and the instructions included in the program codes can be used to execute the foregoing method embodiments For the specific implementation of the method, please refer to the method embodiment, which will not be repeated here.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统和/或装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the system and/or device described above can refer to the corresponding process in the foregoing method embodiment, and details are not repeated here.

另外,在本发明实施例的描述中,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本发明中的具体含义。In addition, in the description of the embodiments of the present invention, unless otherwise specified and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be a fixed connection or a detachable connection , or integrally connected; it may be mechanically connected or electrically connected; it may be directly connected or indirectly connected through an intermediary, and it may be the internal communication of two components. Those of ordinary skill in the art can understand the specific meanings of the above terms in the present invention in specific situations.

所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes. .

在本发明的描述中,需要说明的是,术语“中心”、“上”、“下”、“左”、“右”、“竖直”、“水平”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。此外,术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性。In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" etc. The indicated orientation or positional relationship is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred device or element must have a specific orientation, or in a specific orientation. construction and operation, therefore, should not be construed as limiting the invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and should not be construed as indicating or implying relative importance.

最后应说明的是:以上所述实施例,仅为本发明的具体实施方式,用以说明本发明的技术方案,而非对其限制,本发明的保护范围并不局限于此,尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本发明实施例技术方案的精神和范围,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。Finally, it should be noted that: the above-described embodiments are only specific implementations of the present invention, used to illustrate the technical solutions of the present invention, rather than limiting them, and the scope of protection of the present invention is not limited thereto, although referring to the foregoing The embodiment has described the present invention in detail, and those skilled in the art should understand that any person familiar with the technical field can still modify the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention Changes can be easily thought of, or equivalent replacements are made to some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of the present invention within the scope of protection. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (13)

1. A training method of a real-space decoder of a cryoelectron microscope is characterized by comprising the following steps:
acquiring an input projection image of a cryoelectron microscope and label information of the input projection image from a sample set; wherein the inputting of the label information of the projection image includes: inputting projection parameters and a mask of a projection image, wherein the projection parameters comprise a projection angle and image translation;
inputting the projection parameters of the input projection image into a decoder, performing spatial transformation on a projection visual field of a three-dimensional reconstruction target structure in the decoder in a machine learning representation form, and outputting a prediction projection image; wherein the machine learning representation comprises an explicit representation and an implicit representation;
masking the machine learning representation of the three-dimensional reconstructed target structure, the predicted projection image and the input projection image through the mask;
calculating a loss value based on the input projection image and the predicted projection image after the mask processing, and adjusting a parameter of the decoder based on the loss value;
and repeatedly acquiring the input projection image of the cryoelectron microscope and the label information of the input projection image from the sample set until a preset training condition is met, so as to obtain the trained decoder.
2. The method of claim 1, wherein the mask comprises a 3D local mask, a 2D local mask, and/or a planar foreground background mask.
3. The method of claim 2, wherein the 3D local mask comprises an inscribed sphere mask or a weighted mask, and wherein the 2D local mask is determined based on the 3D local mask.
4. The method of claim 2, wherein the 2D local mask is obtained by performing spatial transformation and projection calculation on the 3D local mask based on projection parameters.
5. The method of claim 2, wherein the planar foreground background mask is used to distinguish between foreground and background regions of the projected image.
6. The method of claim 1, wherein the explicit representation of the three-dimensional reconstructed target structure comprises: encoding a coulombic potential value of a three-dimensional structure through lattice points of a three-dimensional lattice point matrix;
the implicit representation of the three-dimensional reconstructed target structure comprises: a function mapping the spatial coordinates to the coulomb potential value of the three-dimensional structure is characterized by a neural network.
7. The method of claim 1, wherein after the step of inputting projection parameters of the input projection image into a decoder, the method further comprises:
and carrying out spatial transformation and subsequent processing on the projection visual field of the three-dimensional reconstruction target structure in the decoder in a machine learning representation form, and outputting the prediction projection image.
8. The method of claim 2, wherein the step of calculating a loss value based on the masked input projection image and the predicted projection image comprises:
masking the input projection image based on the 2D local mask and a plane foreground background mask to obtain the masked input projection image;
masking the predicted projection image based on the plane foreground background mask to obtain the masked predicted projection image;
determining a loss value of a designated region of the input projection image based on the masked input projection image and the predicted projection image.
9. The method according to claim 8, wherein the input projection image after mask processing includes a designated area and other areas; after the step of obtaining the masked input projection image, the method further includes:
and suppressing the noise of the other areas in a regularization mode.
10. The method of claim 1, further comprising:
inputting a first electron microscope image of a cryoelectron microscope into a projection parameter prediction encoder, and outputting a spatial transformation parameter of the first electron microscope image; the space transformation parameters represent projection parameters of the first electron microscope image;
inputting the space transformation parameters into the real space decoder of the refrigeration electron microscope, and performing training iteration;
and transmitting the loss values generated by the training iteration to the encoder and the decoder through a machine learning calculation graph, and updating the parameters of the encoder and the decoder based on the loss values generated by the training iteration.
11. A training device for a real-space decoder of a cryoelectron microscope, the device comprising:
the system comprises an input projection image acquisition module, a data acquisition module and a data processing module, wherein the input projection image acquisition module is used for acquiring an input projection image of a cryoelectron microscope and label information of the input projection image from a sample set; wherein the label information of the input projection image includes: inputting projection parameters and a mask of a projection image, wherein the projection parameters comprise a projection angle and image translation;
the predicted projection image output module is used for inputting the projection parameters of the input projection image into a decoder, performing spatial transformation on a projection visual field of a three-dimensional reconstruction target structure in the decoder in a machine learning representation form, and outputting a predicted projection image; wherein the machine-learned representation comprises an explicit representation and an implicit representation;
the mask processing module is used for performing mask processing on a machine learning representation form of a three-dimensional reconstruction target structure, the prediction projection image and the input projection image through the mask;
a loss value calculation module for calculating a loss value based on the input projection image and the predicted projection image after the mask processing, and adjusting a parameter of the decoder based on the loss value;
and the decoder training completion module is used for repeatedly executing the step of obtaining the input projection image of the cryoelectron microscope and the label information of the input projection image from the sample set until a preset training condition is met, so as to obtain a trained decoder.
12. An electronic device comprising a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the training method of a cryoelectron microscopy real-space decoder as defined in any one of claims 1 to 10.
13. A computer-readable storage medium storing computer-executable instructions that, when invoked and executed by a processor, cause the processor to carry out the training method of a cryoelectron microscopy real-space decoder according to any one of claims 1 to 10.
CN202211146222.5A 2022-09-20 2022-09-20 Training method and device for real-space decoder of refrigeration electron microscope and electronic equipment Pending CN115526850A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211146222.5A CN115526850A (en) 2022-09-20 2022-09-20 Training method and device for real-space decoder of refrigeration electron microscope and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211146222.5A CN115526850A (en) 2022-09-20 2022-09-20 Training method and device for real-space decoder of refrigeration electron microscope and electronic equipment

Publications (1)

Publication Number Publication Date
CN115526850A true CN115526850A (en) 2022-12-27

Family

ID=84698232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211146222.5A Pending CN115526850A (en) 2022-09-20 2022-09-20 Training method and device for real-space decoder of refrigeration electron microscope and electronic equipment

Country Status (1)

Country Link
CN (1) CN115526850A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116071745A (en) * 2023-03-06 2023-05-05 北京深势科技有限公司 A processing method and device for an electron microscope density image target recognition model
CN116389706A (en) * 2023-06-06 2023-07-04 北京深势科技有限公司 A joint training method and device for electron microscope projection map encoder and decoder
CN117197114A (en) * 2023-09-28 2023-12-08 北京有竹居网络技术有限公司 Cryo-electron microscope image processing method, device, terminal and storage medium
CN118247148A (en) * 2024-04-01 2024-06-25 寰渺科技(上海)有限公司 Real domain expression-based continuous heterogeneous reconstruction method, system, equipment, chip and medium for frozen electron microscope

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110288671A (en) * 2019-06-25 2019-09-27 南京邮电大学 A low-dose CBCT image reconstruction method based on 3D adversarial generative network
CN110503715A (en) * 2019-08-08 2019-11-26 苏州浪潮智能科技有限公司 A kind of three-dimensional rebuilding method of medical image, device and electronic equipment and storage medium
US20200320753A1 (en) * 2019-04-03 2020-10-08 Uih America, Inc. Systems and methods for positron emission tomography image reconstruction
CN112837415A (en) * 2021-02-07 2021-05-25 浙江工业大学 A three-dimensional structure reconstruction method of protein cryo-electron microscope projection images
CN113272869A (en) * 2018-12-05 2021-08-17 西门子医疗有限公司 Three-dimensional shape reconstruction from topograms in medical imaging
US20210287430A1 (en) * 2020-03-13 2021-09-16 Nvidia Corporation Self-supervised single-view 3d reconstruction via semantic consistency
CN114283217A (en) * 2021-09-23 2022-04-05 腾讯科技(深圳)有限公司 Method, device and equipment for training reconstruction model of three-dimensional electron microscope image

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113272869A (en) * 2018-12-05 2021-08-17 西门子医疗有限公司 Three-dimensional shape reconstruction from topograms in medical imaging
US20200320753A1 (en) * 2019-04-03 2020-10-08 Uih America, Inc. Systems and methods for positron emission tomography image reconstruction
CN110288671A (en) * 2019-06-25 2019-09-27 南京邮电大学 A low-dose CBCT image reconstruction method based on 3D adversarial generative network
CN110503715A (en) * 2019-08-08 2019-11-26 苏州浪潮智能科技有限公司 A kind of three-dimensional rebuilding method of medical image, device and electronic equipment and storage medium
US20210287430A1 (en) * 2020-03-13 2021-09-16 Nvidia Corporation Self-supervised single-view 3d reconstruction via semantic consistency
CN112837415A (en) * 2021-02-07 2021-05-25 浙江工业大学 A three-dimensional structure reconstruction method of protein cryo-electron microscope projection images
CN114283217A (en) * 2021-09-23 2022-04-05 腾讯科技(深圳)有限公司 Method, device and equipment for training reconstruction model of three-dimensional electron microscope image

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨子枢: "冷冻电镜单颗粒图像复原及三维重构算法研究与实现", 《中国优秀硕士学位论文全文数据库》, 15 June 2019 (2019-06-15) *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116071745A (en) * 2023-03-06 2023-05-05 北京深势科技有限公司 A processing method and device for an electron microscope density image target recognition model
CN116071745B (en) * 2023-03-06 2023-10-31 北京深势科技有限公司 Method and device for processing electron microscope density map target recognition model
CN116389706A (en) * 2023-06-06 2023-07-04 北京深势科技有限公司 A joint training method and device for electron microscope projection map encoder and decoder
CN116389706B (en) * 2023-06-06 2023-09-29 北京深势科技有限公司 A joint training method and device for electron microscope projection image encoder and decoder
CN117197114A (en) * 2023-09-28 2023-12-08 北京有竹居网络技术有限公司 Cryo-electron microscope image processing method, device, terminal and storage medium
CN118247148A (en) * 2024-04-01 2024-06-25 寰渺科技(上海)有限公司 Real domain expression-based continuous heterogeneous reconstruction method, system, equipment, chip and medium for frozen electron microscope

Similar Documents

Publication Publication Date Title
JP7797779B2 (en) High-Resolution Neural Rendering
CN115526850A (en) Training method and device for real-space decoder of refrigeration electron microscope and electronic equipment
CN107730503B (en) Image object component level semantic segmentation method and device embedded with three-dimensional features
CN114241388B (en) Video instance segmentation method and segmentation device based on spatiotemporal memory information
CN118628939A (en) A small target detection method for UAV images based on improved YOLOv8 algorithm
CN113450396A (en) Three-dimensional/two-dimensional image registration method and device based on bone features
CN113628211B (en) Parameter prediction recommendation method, device and computer readable storage medium
CN118537564B (en) A method, system and device for fitting geometric primitives of three-dimensional point cloud data
CN118506271B (en) Fire detection method, device and equipment
Chuang et al. Learning-guided point cloud vectorization for building component modeling
CN118229977A (en) Thyroid nodule ultrasound image segmentation method, system, equipment and storage medium
CN118505723A (en) TensorRT acceleration-based yolov s-seg infrared image instance segmentation and low-light-level image background fusion algorithm
Liu et al. SimpleMask: parameter link and efficient instance segmentation
CN112652059B (en) Improved target detection and 3D reconstruction method based on Mesh R-CNN model
CN117315724B (en) Open scene-oriented three-dimensional pedestrian detection method, system, equipment and medium
CN119006742B (en) Human body three-dimensional reconstruction method and system based on deep learning
CN119992236A (en) 3D zero-sample anomaly detection method and device based on 2D multimodal large model
CN115526986A (en) Image processing method, device and electronic equipment
CN116665201A (en) Monocular three-dimensional object detection method, device, equipment and storage medium
Qiu et al. Generative image inpainting with dilated deformable convolution
Viriyavisuthisakul et al. Parametric regularization loss in super-resolution reconstruction
Tonti et al. Lightweight 3-D convolutional occupancy networks for virtual object reconstruction
Su et al. PFSC: Pyramid R-CNN for point-voxels with focal sparse convolutional networks for 3D object detection
CN116843854A (en) Three-dimensional object reconstruction method and device
Shi et al. 3D Vehicle Detection Algorithm Based on Multimodal Decision-Level Fusion.

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Country or region after: China

Address after: 100082 Beijing City Haidian District Hai Dian East Third Street No. 2 14th Floor 1401

Applicant after: Beijing DeepModel Technology Co., Ltd.

Address before: 100082 Beijing City Haidian District Hai Dian East Third Street No. 2 14th Floor 1401

Applicant before: Beijing Shenshi Technology Co.,Ltd.

Country or region before: China