METHOD AND APPARATUS
20260024259 ยท 2026-01-22
Inventors
- Nigel BROWNING (Liverpool, GB)
- Daniel NICHOLLS (Liverpool, GB)
- Alex ROBINSON (Liverpool, GB)
- Jack WELLS (Liverpool, GB)
Cpc classification
G06V10/772
PHYSICS
G06V10/774
PHYSICS
G06T12/20
PHYSICS
International classification
G06V10/772
PHYSICS
Abstract
A method of reconstructing an electron microscopy image of size [Mx N] pixels of a first sample, the method implemented by a computer comprising a processor and a memory, the method comprising: providing a set of pre-learned dictionaries, including a first pre-learned dictionary including a set of p.sub.1 atoms; acquiring a sparse set of S acquired sub-images, including a first sub-image of size [ab] pixels wherein a, b[2, min {M,N}], of the first sample; and reconstructing the electron microscopy image of the first sample using the sparse set of S sub-images of the first sample and the set of pre-learned dictionaries.
Claims
1. A method of reconstructing an electron microscopy image of size [MN] pixels of a first sample, the method implemented by a computer comprising a processor and a memory, the method comprising: providing a set of pre-learned dictionaries, including a first pre-learned dictionary including a set of p.sub.1 atoms; acquiring a sparse set of S acquired sub-images, including a first sub-image of size [ab] pixels wherein a, b[2, min{M, N}], of the first sample; and reconstructing the electron microscopy image of the first sample using the sparse set of S sub-images of the first sample and the set of pre-learned dictionaries.
2. The method according to claim 1, wherein the set of pre-learned dictionaries includes a second pre-learned dictionary comprising a set of p.sub.2 atoms; and wherein reconstructing the electron microscopy image of the first sample using the sparse set of S sub-images of the first sample and the set of pre-learned dictionaries comprises reconstructing the electron microscopy image of the first sample using the sparse set of S sub-images of the first sample and a combination of the first pre-learned dictionary and the second pre-learned dictionary.
3. The method according to claim 2, wherein the combination of the first pre-learned dictionary and the second pre-learned dictionary comprises and/or is a pair-wise combination of the first pre-learned dictionary and the second pre-learned dictionary.
4. The method according to claim 1, comprising training the first pre-learned dictionary using the using the sparse set of S sub-images of the first sample.
5. The method according to claim 4, wherein reconstructing the electron microscopy image of the first sample using the sparse set of S sub-images of the first sample and the set of pre-learned dictionaries comprises reconstructing the electron microscopy image of the first sample using the sparse set of S sub-images of the first sample and the first pre-learned dictionary trained using the using the sparse set of S sub-images of the first sample.
6. The method according to claim 1, comprising selecting a subset of
7. The method according to claim 6, wherein selecting the subset of
8. The method according to claim 1, wherein providing the first pre-learned dictionary including the set of p.sub.1 atoms comprises training a dictionary using a fully sampled acquired electron microscopy image of a second sample and/or a fully sampled simulated electron microscopy image of the second sample.
9. The method according to claim 8, wherein the first sample and the second sample are mutually different.
10. The method according to claim 1, comprising transforming one or more atoms of the set of p.sub.1 atoms included in the first pre-learned dictionary.
11. A method of controlling an electron microscope, the method implemented, at least in part, by a computer comprising a processor and a memory, the method comprising: obtaining parameters of the electron microscopy; acquiring a first sparse set of S acquired sub-images of a first sample comprising controlling the electron microscope using the obtained parameters of the electron microscopy; reconstructing a first electron microscopy image of size [MN] pixels of the first sample according to claim 1 using the first sparse set of S sub-images of the first sample; comparing the first electron microscopy image against thresholds of one or more target properties of the first electron microscopy image; adapting the parameters of the electron microscopy based on a result of the comparing; and acquiring a second sparse set of S acquired sub-images of the first sample comprising controlling the electron microscope using the adapted parameters of the electron microscopy.
12. The method according to claim 11, comprising: reconstructing a second electron microscopy image of size [MN] pixels of the first sample using the second sparse set of S sub-images of the first sample.
13. (canceled)
14. An electron microscope including a computer comprising a processor and a memory configured to implement a method according to claim 1.
15. (canceled)
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0143] For a better understanding of the invention, and to show how exemplary embodiments of the same may be brought into effect, reference will be made, by way of example only, to the accompanying diagrammatic Figures, in which:
[0144]
[0145]
[0146]
[0147]
[0148]
[0149]
[0150]
[0151]
[0152]
[0153]
[0154]
[0155]
[0156]
[0157]
[0158]
[0159]
[0160]
[0161]
[0162]
[0163]
DETAILED DESCRIPTION OF THE DRAWINGS
[0164] While the main goal of this research is to investigate the application of these methods to subsampled acquisition, particularly for materials which may not currently be imaged, the general cross-compatibility of representative dictionaries applies to those trained on fully-sampled data, and sub-sampled data alike. For simplicity, and the ease of reproducing our results, the following experiments use dictionaries trained on fully-sampled images. All reconstructions in this paper therefore used K-SVD (performed in MATLAB using ksvdbox13) to generate a representative dictionary from a fully sampled image, which were then artificially subsampled (randomly, to 25%) and reconstructed using OMP (via a custom OpenMP, CPU parallelised C.sup.++ implementation). For consistency, all dictionaries were the same size (128 elements) and were trained with the same parameters.
Experiment 1: Dictionary Transfer
[0165] The concept of dictionary transfer is simple; learning a dictionary from one image (whether that be fully sampled or not) and using it to inpaint another subsampled image. One may initially suspect that if the two images are very different, this process would lead to a very poor reconstruction. However, due to the nature of a sparse linear combination of dictionary elements, widely varying signals may be represented with different combinations (and weights) of only a few atoms. The benefit of this is clear, if a pre-learned dictionary is capable of generating a reasonable quality reconstruction of any given (potential) STEM image, a fully sampled live preview of the sample may be reconstructed in minimal time (either with a significantly reduced dictionary learning step for untrained materials, or taking only the time required for the sparse-coding step for materials the dictionary is known to be appropriate for), allowing for the spatial position, magnification and more to be fine-tuned by the microscope operator before a final scan is taken. To test the feasibility of dictionary transfer, we perform an experiment on four different images, the first of which is an example of a natural image (photograph) for comparison, and the following three of which are HAADF STEM images:
TABLE-US-00002 Barbara A publicly available test image. Ceria A high resolution image of heat-treated ceria (acquired with a JEOL 2100F Cs-corrected STEM) Atomic An atomic resolution image selected from the Warwick STEM dataset Nanoparticle A high-resolution image of a nanoparticle (with atomic resolution) selected from the Warwick STEM dataset
[0166]
[0167] As can be seen above, whilst the natural image Barbara produced a wide range of dictionary elements with varying patterns, the STEM images all produced significantly less varied dictionaries, with many atoms appearing similar. This suggests that whilst the dictionary size of 128 atoms chosen to for the experiment was appropriate for Barbara, it is seemingly too large for the three STEM images, which appear to have over-fitted dictionaries; Each of the STEM may be reconstructed to a similar quality with many fewer dictionary elements than are present, due to the reduced variety of signal patterns contained within STEM images. Clearly, if this is the case for a wide range of STEM images, the requirement for fewer atoms may be exploited in the quest for real-time reconstructions, as the time-to-solution for many of the aforementioned sparse-coding (and dictionary learning) algorithms significantly depend on the dictionary size. Additionally, if the types of signal patterns present in most STEM images require fewer dictionary elements to be accurately reconstructed, the plausibility of a master dictionary able to inpaint STEM images in most scenarios without becoming prohibitively large increases.
[0168] In
[0169] As illustrated in
Experiment 2: Magnification/Feature Size
[0170] For STEM images, as well as considering the different features of various potential materials one may wish to represent with a given dictionary, the microscope adds many other factors which significantly change the visual appearance of the sample, such as the chosen detector (ABF/HAADF), focus conditions and magnification. Any successful master dictionary used to inpaint the live output of a microscope must also be able to account for these microscope conditions, the most demonstrable of which is magnification, as even the same sample of material may appear vastly different at high and low magnification. Intuitively, the size of the features (in any given [1616] patch) for each image is different; for low magnification such as 3M, clusters of nanoparticles form a rough topography with fine details only in the form of atomic planes (represented in the dictionary with elements containing alternating horizontal stripes), whereas in the 12M image, fine details are drastically different as atomic columns are clearly resolved, forming many unique shapes on a much smaller scale.
[0171] In this experiment, we test the cross-compatibility of dictionaries generated for the same sample of high-resolution heat-treated Ceria at 7 different magnifications from 3M to 12M acquired with a JEOL 2100F Cs-corrected STEM.
[0172]
[0173] With a significant increase in magnification, previously unresolved atomic columns become visible, leading to many much finer and more unique features in the image.
[0174] As shown in
Discussion
[0175] For each reconstruction performed in this paper, we have stated the PSNR (and, in
[0176] The results of the first experiment (Dictionary Transfer) are very encouraging, appearing to suggest that if the training data (i.e. the patches of the reference image) is varied enough, such as in the case of the image Barbara, then (as illustrated in
[0177] The second experiment (Magnification/Feature Size) investigated the cross-compatibility of STEM dictionaries of the same material at seven different magnifications, as an example of how live microscope conditions affect reconstruction quality. As previously discussed,
[0178] The two experiments in this paper investigated the cross-compatibility of sparsifying dictionaries in general (Dictionary Transfer) and the effects of microscope magnification on the transferral of a dictionary between different images of the same sample (Magnification/Feature Size). In both cases, the results were encouraging, but highlighted aspects that would need to be considered for any true real-time CS-STEM setup. Independent of the method chosen for learning a sparsifying basis and/or reconstructing the image (K-SVD, BPFA, neural networks etc.), our results suggest that the training data required for such a master dictionary (or network) must be sufficiently extensive (resulting in a wide range of dictionary elements) in order to produce complex features, and must contain elements with the appropriate feature size, particularly in the case of STEM images which may be obtained at any magnification. However, in order to implement a master dictionary in this way, there is a lot of work yet be done. Firstly, there are other microscope conditions mentioned, but not investigated here; such as the chosen detector (ABF/HAADF) and focus condition, which also dramatically alter the appearance of the acquired image, and thus must be accounted for (i.e. representable) by the elements of the (or an alternate) master dictionary. Once each of these effects has been determined, and a strategy devised to account for each, the next step will be the formation/training of the master dictionary. At this point, a method must be determined for producing a dictionary which is representative of the widest range of STEM images whilst remaining as small (number of elements) as possible as time-to-solution often scales linearly with dictionary size. For this, we envision an extension of current dictionary learning methods, operating on a large dataset of STEM images, iteratively converging on elements which are maximally representative of image patches across the entire dataset; this algorithm would likely require a constraint to limit the visual similarity of any two elements within the dictionary, perhaps calculated via their mutual coherence, or perhaps SSIM. Further to this, our results suggest that current image quality metrics (PSNR and SSIM), are inadequate as a predictor of image quality for STEM reconstructions, often giving high values for (objectively) poor reconstructions and vice-versa. Even without these limitations, these metrics are only possible when one has access to a fully-sampled reference image, something which is not possible when performing CS-STEM on beam-sensitive materials using only subsampled acquisition. Therefore, future work on CS-STEM may require the development of an alternate reconstruction quality metric, placing more weight the preservation of fine details (such as atomic planes) rather than the low-frequency topographical features such general contrast.
[0179] When developing a master dictionary, one may also want a metric to quantify the ability of a given dictionary to represent a wide range of STEM images, likely taking into account the variety and orthogonality of the dictionary elements present, but also may benefit from an extension of the previously proposed reconstruction metric across the dataset. In order to keep the time-to-solution for live sparse-pursuit based reconstructions as small as possible, one may wish to implement an efficient dictionary pruning strategy on a per-patch basis, providing each sparse-coding step with a reduced set of dictionary elements most appropriate to the (subsampled) input patch. Previous work has already demonstrated the ability of dictionary learning methods to separate different feature-types into multiple dictionaries, referred in the literature as Cartoon and Texture features (representing the low-frequency signals and high-frequency fine details of an image respectively). This method may be leveraged to provide a single Cartoon dictionary for all images, whilst swapping between the most appropriate Texture dictionary to represent fine details for a given material, magnification or focus condition, all whilst further reducing the overall time-to-solution.
[0180] Any process of generating a master dictionary which is maximally representative of a wide range of STEM images will require the gathering of a large dataset of training data. For currently imageable materials (in STEM), this will likely be in the form of fully-sampled data, and thus, the dictionary learning algorithm may take many forms. If this process were to be successful, it appears likely from our results that this pre-trained dictionary alone may be appropriate enough to enable real-time reconstructions of these (known to be well represented) materials without the need for any further training, skipping the dictionary learning step entirely, and thus significantly reducing time-to-solution. For other materials, it may also be the case that the pre-trained dictionary (especially via the combination of many different elements, as illustrated in
[0181] Finally, as is the case for many fields involving image processing, as the speed and accuracy of neural networks continues to improve, and consumer hardware becomes more and more efficient at machine learning, we must consider the application of a neural network in place of traditional compressive sensing methods. Neural networks have already successfully been applied to image inpainting tasks, such as image denoising auto-encoders, the removal of text from an image and the use of generative adversarial networks (GANs) to inpaint large regions of an image. Similar to the concept of a master dictionary, a neural network trained on a sufficiently large dataset, able to inpaint an image (or patch) with an arbitrary mask may produce similar, if not superior results in a shorter amount of time when compared to traditional sparse-coding methods.
CONCLUSION
[0182] The aim of this paper was to perform an initial investigation into the feasibility of dictionary transfer in general and a pre-trained master dictionary for live CS-STEM. We performed two experiments to investigate how well a dictionary learned from one image is able to reconstruct another, completely different signal and the effects of varying magnification for reconstructing images of the same sample with dictionaries learned at different magnifications. Our results show the (at times unintuitive) ability of a sufficiently complex dictionary to represent completely novel features (i.e. features that were not present in the image used in training). This suggests that if an appropriately generic and representative master dictionary was formed, dictionary transfer provides a mechanism to significantly reduce the computation required to fit a dictionary, or in some cases to skip the learning stage altogether when reconstructing images of different samples, or different frames of the same sample at different microscope conditions. While much work is yet to be done, these results show that significantly reducing the time-to-solution for reconstructing subsampled STEM images via the formation of a maximally representative dictionary is possible, bringing us a step closer to a true application of real-time CS-STEM.
Real-Time Dictionary Transfer
[0183]
[0184] Extending the concepts described above, a new method of achieving (now real-time) dictionary transfer is briefly as follows: [0185] An initial dictionary D.sub.0 is initialised (e.g. generated randomly or imported from a previous result) with parameters governing the dimensionality of the dictionary, and Bayesian priors denoting the probability of element selection, noise variance e.t.c. [0186] Two instances of BPFA are initialised, each with a different input source. The training instance Io takes the image we wish to transfer from as its input, while the reconstruction instance I.sub.1 takes the image we wish to transfer to as its input. Both share a connection to the same transient dictionary D.sub.t. [0187] The training and reconstruction iterations are performed sequentially/in parallel (in any order). In each iteration, the transient dictionary pixels (and parameters) are updated by the training loop, resulting in the dictionary learning the features of the transfer source Y.sub.0. Simultaneously, the statistical parameters (e.g. ) of the dictionary are updated by the reconstruction loop, allowing the dictionary to converge to a solution containing the features of Y.sub.0, and the selection probability (i.e. BPFA priors/parameters) governed by the target Y.sub.1. [0188] At any given step, a visualisation may be produced, representing the projection/reconstruction of the subsampled target as a product of the dictionary learned from the transfer source, and the appropriate coefficients determined by the reconstruction instance, thereby allowing for real-time dictionary transfer.
[0189] In more detail, the sixth aspect provides a method of real-time dictionary transfer, the method implemented by a computer comprising a processor and a memory, the method comprising: initialising an initial dictionary Do, for example wherein the initial dictionary is generated randomly or imported such as from a previous result, with parameters governing dimensionality and/or sparsity of the dictionary and/or Bayesian priors, for example denoting respective probabilities of element selection, noise variance, etc.; [0190] initialising a first instance of BPFA with a transfer source Y.sub.0 (i.e. a first input source such as a training image), wherein the first instance of BPFA comprises and/or is a training instance I.sub.0 of BPFA, for example wherein the training instance/, of BPFA takes the transfer source Y.sub.0 to be transferred from as an input thereof, having a first connection, for example a shared connection, to a transient dictionary D.sub.t derived from the initial dictionary D.sub.0; [0191] initialising a second instance of BPFA with a target source Y.sub.1 (i.e. a second input source such as a subsampled image to be inpainted), wherein the transfer source Y.sub.0 and the target source Y.sub.1 are mutually different, wherein the second instance of BPFA comprises and/or is a reconstruction instance I.sub.1 of BPFA, for example wherein the reconstruction instance I.sub.1 of BPFA takes an image to be transferred to as an input thereof, having a second connection, for example a shared connection, to the transient dictionary D.sub.t (i.e. the same transient dictionary D.sub.t); [0192] performing one or more training iterations and reconstruction iterations (also known as loops), for example serially (i.e. sequentially, consecutively, alternately) and/or in parallel (i.e. simultaneously, concurrently), using the first instance of BPFA and the second instance of BPFA, respectively, comprising, for each respective training iteration and reconstruction iteration: [0193] updating, by the first instance of BPFA (i.e. the training instance I.sub.0 of BPFA) during the training iteration (for example, during each training iteration), pixels of the transient dictionary D.sub.t (and optionally, statistical parameters thereof, for example , .sub., .sub.d, .sub.), whereby the transient dictionary D.sub.t learns the features of the transfer source Y.sub.0; and updating, by the second instance of BPFA (i.e. the reconstruction instance I.sub.1 of BPFA) during the reconstruction iteration (for example, during each reconstruction iteration), statistical parameters, for example , .sub., .sub.d, .sub.) of the transient dictionary Dt, whereby the transient dictionary D.sub.t converges, for example after a plurality of iterations, thereby containing features of the transfer source Y.sub.0 and/or selection probabilities (such as BPFA priors/parameters) governed by the target source Y.sub.1; and [0194] producing, using the transient dictionary D.sub.t, a visualisation , representing a reconstruction of the target source Y.sub.1 (i.e. reconstructing a visualisation
of the target source Y.sub.1 using the transient dictionary D.sub.t).
[0195] In this way, the method provides real-time dictionary transfer, for example for real-time CS-STEM as described herein. The visualisation , representing the reconstruction of the target source Y.sub.1, is a product of the transient dictionary D.sub.t, learned from the transfer source Y.sub.0, and the appropriate coefficients determined by the reconstruction instance I.sub.1 of BPFA, thereby providing real-time dictionary transfer.
[0196] The method according to the sixth aspect may include any step and/or feature as described with respect to the first aspect and/or the second aspect.
[0197] During initialization, the following parameters are set and are not altered by either instance of BPFA: [0198] K: Size of the dictionary/No. of elements [governs dimensionality] [0199] B: Shape of the dictionary elements/patches [governs dimensionality] [0200] .sub.a, .sub.b: (shown as a, b in
[0201] The following parameters are related to the statistical properties of the BPFA algorithm and are updated by BOTH instances (i.e. the reconstruction instance continues to fit the statistical parameters to the subsampled input, despite not affecting the dictionary elements themselves): [0202] also shown as .sub.k: Bayesian prior, essentially a measure of the global probability of selection for a given dictionary element. [0203] .sub.: Precision of the weights/coefficients [shown in in
[0206] The initial dictionary is just used to initialise a transient dictionary D.sub.t, it could be totally randomly generated, be some form of transform dictionary e.g. DCT, in both cases, parameters are initialised to default values. Additionally, it could be loaded back in from previous experiments (along with its parameters).
[0207] In the case of reconstructing a single image (where the pixel values of the image are constant), then a dictionary will converge to a final solution and the changes to the dictionary upon each update will tend to zero, at this point we may stop training and consider it a final dictionary. However. this form of using a transient dictionary, as showed in the flow chart if
GLOSSARY OF TERMS
[0208] ABF: Annular Bright-Field. A method of imaging samples in STEM using bright-field detectors in which an image formed using a ring-shaped detector by low-angled forward scattered electrons, not including the most central part of the transmitted beam. [0209] CS-STEM: Compressive-Sensing (driven) Scanning Transmission Electron Microscopy. The acquisition and subsequent reconstruction of a full image of a given sample using only subsampled measurements. [0210] DCT: Discrete Cosine Transform. A transform of a signal or image from the spatial domain to the frequency domain using sinusoidal functions (in this context, discretised into a set of dictionary elements) [0211] HAADF: High-Angle Annular Dark-Field. A method of imaging samples in STEM by collecting scattered electrons with an annular dark-field detector lying outside of the path of the transmitted electron beam. [0212] K-SVD: Dictionary Learning algorithm performing generalised K-Means clustering via Singular Value Decomposition (alternating between a sparse coding step and updating individual dictionary atoms to better fit the data). [0213] I.sub.0 Norm: The count of the total number of non-zero elements of a given vector.
] [0222] Traditional (BPFA) Reconstruction: Almost all previous implantations of BPFA dictionary learning and image reconstruction are designed in the following way: one (i.e. a single) instance of the BPFA algorithm is initialised, a series of dictionary learning steps/batches are performed (See
): Any projection of
=D.sub.t, where D.sub.t is a transient dictionary, or an inter-epoch projection of {circumflex over (X)}=D (for any dictionary), forming an incomplete reconstruction (See
[0228] Although a preferred embodiment has been shown and described, it will be appreciated by those skilled in the art that various changes and modifications might be made without departing from the scope of the invention, as defined in the appended claims and as described above.
[0229] At least some of the example embodiments described herein may be constructed, partially or wholly, using dedicated special-purpose hardware. Terms such as component, module or unit used herein may include, but are not limited to, a hardware device, such as circuitry in the form of discrete or integrated components, a Field Programmable Gate Array (FPGA) or Application Specific Integrated Circuit (ASIC), which performs certain tasks or provides the associated functionality. In some embodiments, the described elements may be configured to reside on a tangible, persistent, addressable storage medium and may be configured to execute on one or more processors. These functional elements may in some embodiments include, by way of example, components, such as software components, object-oriented software components, class components and task components, processes, functions, attributes, procedures, subroutines, segments of program code, drivers, firmware, microcode, circuitry, data, databases, data structures, tables, arrays, and variables. Although the example embodiments have been described with reference to the components, modules and units discussed herein, such functional elements may be combined into fewer elements or separated into additional elements. Various combinations of optional features have been described herein, and it will be appreciated that described features may be combined in any suitable combination. In particular, the features of any one example embodiment may be combined with features of any other embodiment, as appropriate, except where such combinations are mutually exclusive. Throughout this specification, the term comprising or comprises means including the component(s) specified but not to the exclusion of the presence of others.
[0230] Attention is directed to all papers and documents which are filed concurrently with or previous to this specification in connection with this application and which are open to public inspection with this specification, and the contents of all such papers and documents are incorporated herein by reference.
[0231] All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and/or all of the steps of any method or process so disclosed, may be combined in any combination, except combinations where at least some of such features and/or steps are mutually exclusive.
[0232] Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise. Thus, unless expressly stated otherwise, each feature disclosed is one example only of a generic series of equivalent or similar features.
[0233] The invention is not restricted to the details of the foregoing embodiment(s). The invention extends to any novel one, or any novel combination, of the features disclosed in this specification (including any accompanying claims, abstract and drawings), or to any novel one, or any novel combination, of the steps of any method or process so disclosed.