The technical field generally relates to systems and methods used to autofocus microscopic images. In particular, the technical field relates a deep learning-based method of autofocusing microscopic images using a single-shot microscopy image of a sample or specimen that is acquired at an arbitrary out-of-focus plane.
A critical step in microscopic imaging over an extended spatial or temporal scale is focusing. For example, during longitudinal imaging experiments, focus drifts can occur as a result of mechanical or thermal fluctuations of the microscope body or microscopic specimen movement when for example live cells or model organisms are imaged. Another frequently encountered scenario which also requires autofocusing is due to the nonuniformity of the specimen's topography. Manual focusing is impractical, especially for microscopic imaging over an extended period of time or a large specimen area.
Conventionally, microscopic autofocusing is performed “online”, where the focus plane of each individual field-of-view (FOV) is found during the image acquisition process. Online autofocusing can be generally categorized into two groups: optical and algorithmic methods. Optical methods typically adopt additional distance sensors involving e.g., a near-infrared laser, a light-emitting diode or an additional camera, that measure or calculate the relative sample distance needed for the correct focus. These optical methods require modifications to the optical imaging system, which are not always compatible with the existing microscope hardware. Algorithmic methods, on the other hand, extract an image sharpness function/measure at different axial depths and locate the best focal plane using an iterative search algorithm (e.g., illustrated in
In recent years, deep learning has been demonstrated as a powerful tool in solving various inverse problems in microscopic imaging, for example, cross-modality super-resolution, virtual staining, localization microscopy, phase recovery and holographic image reconstruction. Unlike most inverse problem solutions that require a carefully formulated forward model, deep learning instead uses image data to indirectly derive the relationship between the input and the target output distributions. Once trained, the neural network takes in a new sample's image (input) and rapidly reconstructs the desired output without any iterations, parameter tuning or user intervention.
Motivated by the success of deep learning-based solutions to inverse imaging problems, recent works have also explored the use of deep learning for online autofocusing of microscopy images. Some of these previous approaches combined hardware modifications to the microscope design with a neural network; for example, Pinkard et al. designed a fully connected Fourier neural network (FCFNN) that utilized additional off-axis illumination sources to predict the axial focus distance from a single image. See Pinkard, H., Phillips, Z., Babakhani, A., Fletcher, D. A. & Waller, L. Deep learning for single-shot autofocus microscopy, Optica 6, 794-797 (2019). As another example, Jiang et al. treated autofocusing as a regression task and employed a convolutional neural network (CNN) to estimate the focus distance without any axial scanning. See Jiang, S. et al. Transform- and multi-domain deep learning for single-frame rapid autofocusing in whole slide imaging, Biomed. Opt. Express 9, 1601-1612 (2018). Dastidar et al. improved upon this idea and proposed to use the difference of two defocused images as input to the neural network, which showed higher focusing accuracy. See Dastidar, T. R. & Ethirajan, R. Whole slide imaging system using deep learning-based automated focusing, Biomed. Opt. Express 11, 480-491 (2020). However, in the case of an uneven or tilted specimen in the FOV, all the techniques described above are unable to bring the whole region into focus simultaneously. Recently, a deep learning based virtual re-focusing method which can handle non-uniform and spatially-varying blurs has also been demonstrated. See Wu, Y. et al., Three-dimensional virtual refocusing of fluorescence microscopy images using deep learning, Nat. Methods (2019) doi:10.1038/s41592-019-0622-5. By appending a pre-defined digital propagation matrix (DPM) to a blurred input image, a trained neural network can digitally refocus the input image onto a user-defined 3D surface that is mathematically determined by the DPM. This approach, however, does not perform autofocusing of an image as the DPM is user-defined, based on the specific plane or 3D surface that is desired at the network output.
Other post-processing methods have also been demonstrated to restore a sharply focused image from an acquired defocused image. One of the classical approaches that has been frequently used is to treat the defocused image as a convolution of the defocusing point spread function (PSF) with the in-focus image. Deconvolution techniques such as the Richardson-Lucy algorithm require accurate prior knowledge of the defocusing PSF, which is not always available. Blind deconvolution methods can also be used to restore images through the optimization of an objective function; but these methods are usually computationally costly, sensitive to image signal-to-noise ratio (SNR) and the choice of the hyperparameters used, and are in general not useful if the blur PSF is spatially varying. There are also some emerging methods that adopt deep learning for blind estimation of a space-variant PSF in optical microscopy.
Here, a deep-learning based offline autofocusing system and method is disclosed, termed Deep-R (
Deep-R is based, in one embodiment, on a generative adversarial network (GAN) framework that is trained with accurately paired in-focus and defocused image pairs. After its training, the generator network (of the trained deep neural network) rapidly transforms a single defocused fluorescence image into an in-focus image. The performance of Deep-R trained neural network was demonstrated using various fluorescence (including autofluorescence and immunofluorescence) and brightfield microscopy images with spatially uniform defocus as well as non-uniform defocus within the FOV. The results reveal that the system and method that utilizes the Deep-R trained neural network significantly enhances the imaging speed of a benchtop microscope by ˜15-fold by eliminating the need for axial scanning during the autofocusing process.
Importantly, the work of the autofocusing method is performed offline (in the training of the Deep-R network) and does not require the presence of complicated and expensive hardware components or computationally intensive and time-consuming algorithmic solutions. This data-driven offline autofocusing approach is especially useful in high-throughput imaging over large sample areas, where focusing errors inevitably occur, especially over longitudinal imaging experiments. With Deep-R, the DOF of the microscope and the range of usable images can be significantly extended, thus reducing the time, cost and labor required for reimaging of out-of-focus areas of a sample. Simple to implement and purely computational, Deep-R can be applicable to a wide range of microscopic imaging modalities, as it requires no hardware modifications to the imaging system.
In one embodiment, a method of autofocusing a defocused microscope image of a sample or specimen includes providing a trained deep neural network that is executed by image processing software using one or more processors, the trained deep neural network comprising a generative adversarial network (GAN) framework trained using a plurality of matched pairs of (1) defocused microscopy images, and (2) corresponding ground truth focused microscopy images. A single defocused microscopy input image of the sample or specimen is input to the trained deep neural network. The trained deep neural network then outputs a focused output image of the sample or specimen from the trained deep neural network.
In another embodiment, a system for outputting autofocused microscopy images of a sample or specimen includes a computing device having image processing software executed thereon, the image processing software comprising a trained deep neural network that is executed using one or more processors of the computing device, wherein the trained deep neural network comprises a generative adversarial network (GAN) framework trained using a plurality of matched pairs of (1) defocused microscopy images, and (2) corresponding ground truth focused microscopy images, the image processing software configured to receive a single defocused microscopy input image of the sample or specimen and outputting a focused output image of the sample or specimen from the trained deep neural network. The computing device may be integrated with or associated with a microscope that is used to obtain the defocused images.
A microscope 102 is used to obtain, in some embodiments, a single defocused image 50 of the sample or specimen 100 that is then input to a trained deep neural network 10 which generates or outputs a corresponding focused image 52 of the sample or specimen 100. It should be appreciated that a focused image 52 (including focused ground truth images 51 discussed below) refers to respective images that are in-focus. Images are obtained with at least one image sensor 6 as seen in
The microscope 102 may include any number of microscope types including, for example, a fluorescence microscope, a brightfield microscope, a super-resolution microscope, a confocal microscope, a light-sheet microscope, a darkfield microscope, a structured illumination microscope, a total internal reflection microscope, and a phase contrast microscope. The microscope 102 includes one or more image sensors 6 that are used to capture the individual defocused image(s) 50 of the sample or specimen 100. The image sensor 6 may include, for example, commercially available complementary metal oxide semiconductor (CMOS) image sensors, or charge-coupled device (CCD) sensors. The microscope 102 may also include a whole slide scanning microscope that autofocuses microscopic images of tissue samples. This may include a scanning microscope that autofocuses smaller image field-of-views of a sample or specimen 100 (e.g., tissue sample) that are then stitched or otherwise digitally combined using image processing software 18 to create a whole slide image of the tissue. A single image 50 is obtained from the microscope 102 that is defocused in one or more respects. Importantly, one does not need to know of the defocus distance, its direction (i.e., + or −), or the blur PSF, or whether it is spatially-varying or not.
As explained herein, the deep neural network 10 is trained using a generative adversarial network (GAN) framework in a preferred embodiment. This GAN 10 is trained using a plurality of matched pairs of (1) defocused microscopy images 50, and (2) corresponding ground truth or target focused microscopy images 51 as illustrated in
Note that for training of the trained deep neural network 10, the defocused microscopy images 50 that are used for training may include spatially uniform defocused microscopy images 50. The resultant trained deep neural network 10 that is created after training may be input with defocused microscopy images 50 that are spatially uniform or spatially non-uniform. That is to say, even though the deep neural network 10 was trained only with spatially uniform defocused microscopy images 50, the final trained neural network 10 is still able to generate focused images 52 from input defocused images 50 that are spatially non-uniform. The trained deep neural network 10 thus has general applicability to a broad set of input images. Separate training of the deep neural network 10 for spatially non-uniform, defocused images is not needed as trained deep neural network 10 is still able to accommodate these different image types despite having never been specifically trained on them.
As explained herein, each defocused image 50 is input to the trained deep neural network 10. The trained deep neural network 10 rapidly transforms a single defocused image 50 into an in-focus image 52. Of course, while only a single defocused image 50 is run through the trained deep neural network 10, multiple defocused images 50 may be input to the trained deep neural network 10. In one particular embodiment, the autofocusing performed by the trained deep neural network 10 is performed very quickly, e.g., over a few or several seconds. For example, prior online algorithms may take on the order of ˜40 s/mm2 to autofocus. This compares with the Deep-R system 2 and method described herein that doubles this speed (e.g., ˜20 s/mm2) using the same CPU. Implementation of the method using a GPU processor 16 may improve the speed even further (e.g., ˜3 s/mm2). The focused image 52 that is output by the trained deep neural network 10 may be displayed on a display 12 for a user or may be saved for later viewing. The autofocused image 52 may be subject to other image processing prior to display (e.g., using manual or automatic image manipulation methods). Importantly, the Deep-R system 2 and method generates improved autofocusing without the need for any PSF information or parameter tuning.
Experimental
Deep-R Based Autofocusing of Defocused Fluorescence Images
Deep-R Based Autofocusing of Non-Uniformly Defocused Images
Although Deep-R is trained on uniformly defocused microscopy images 50, during blind testing it can also successfully autofocus non-uniformly defocused images 50 without prior knowledge of the image distortion or defocusing. As an example,
Point Spread Function Analysis of Deep-R Performance
To further quantify the autofocusing capability of Deep-R, samples containing 300 nm polystyrene beads (excitation and emission wavelengths of 538 nm and 584 nm, respectively) were imaged using a 40×/0.95NA objective lens and trained two different neural networks with an axial defocus range of ±5 μm and ±8 μm, respectively. After the training phase, the 3D PSF of the input image stack was measured and the corresponding Deep-R output image stack by tracking 164 isolated nanobeads across the sample FOV as a function of the defocus distance. For example,
Comparison of Deep-R Computation Time Against Online Algorithmic Autofocusing Methods
While the conventional online algorithmic autofocusing methods require multiple image capture at different depths for each FOV to be autofocused, Deep-R instead reconstructs the in-focus image from a single shot at an arbitrary depth (within its axial training range). This unique feature greatly reduces the scanning time, which is usually prolonged by cycles of image capture and axial stage movement during the focus search before an in-focus image of a given FOV can be captured. To better demonstrate this and emphasize the advantages of Deep-R, the autofocusing time of four (4) commonly used online focusing methods were experimentally measured: Vollath-4 (VOL4), Vollath-5 (VOL5), standard deviation (STD) and normalized variance (NVAR). Table 1 summarizes the results, where an autofocusing time per 1 mm2 of sample FOV is reported. Overall, these online algorithms take ˜40 s/mm2 to autofocus an image using a 3.5 GHz Intel Xeon E5-1650 CPU, while Deep-R inference takes ˜20 s/mm2 on the same CPU, and ˜3 s/mm2 on an Nvidia GeForce RTX 2080Ti GPU.
Comparison of Deep-R Autofocusing Quality with Offline Deconvolution Techniques
Next, Deep-R autofocusing was compared against standard deconvolution techniques, specifically, the Landweber deconvolution and the Richardson-Lucy (RL) deconvolution, using the ImageJ plugin DeconvolutionLab2 (see
Deep-R Based Autofocusing of Brightfield Microscopy Images
While all the previous results are based on images obtained by fluorescence microscopy, Deep-R can also be applied to other incoherent imaging modalities, such as brightfield microscopy. As an example, the Deep-R framework was applied on brightfield microscopy images 50 of an H&E (hematoxylin and eosin) stained human prostate tissue (
Deep-R Autofocusing on Non-Uniformly Defocused Samples
Next, it was demonstrated that the axial defocus distance of every pixel in the input image is in fact encoded and can be inferred during Deep-R based autofocusing in the form of a digital propagation matrix (DPM), revealing pixel-by-pixel the defocus distance of the input image 50. For this, a Deep-R network 10 was first pre-trained without the decoder 124, following the same process as all the other Deep-R networks, and then the parameters of Deep-R were fixed. A separate decoder 124 with the same structure of the up-sampling path of the Deep-R network was separately optimized (see the Methods section) to learn the defocus DPM of an input image 50. The network 10 and decoder 124 system is seen in
Next, Deep-R was further tested on non-uniformly defocused images that were this time generated using a pre-trained Deep-Z network 11 fed with various non-uniform DPMs that represent tilted, cylindrical and spherical surfaces (
Although trained with uniformly defocused images, the Deep-R trained neural network 10 can successfully autofocus images of samples that have non-uniform aberrations (or spatial aberrations), computationally extending the DOF of the microscopic imaging system. Stated differently, Deep-R is a data-driven, blind autofocusing algorithm that works without prior knowledge regarding the defocus distance or aberrations in the optical imaging system (e.g., microscope 102). This deep learning-based framework has the potential to transform experimentally acquired images that were deemed unusable due to e.g., out-of-focus sample features, into in-focus images, significantly saving imaging time, cost and labor that would normally be needed for re-imaging of such out-of-focus regions of the sample.
In addition to post-correction of out-of-focus or aberrated images, the Deep-R network 10 also provides a better alternative to existing online focusing methods, achieving higher imaging speed. Software-based conventional online autofocusing methods acquire multiple images at each FOV. The microscope captures the first image at an initial position, calculates an image sharpness feature, and moves to the next axial position based on a focus search algorithm. This iteration continues until the image satisfies a sharpness metric. As a result, the focusing time is prolonged, which leads to increased photon flux on the sample, potentially introducing photobleaching, phototoxicity or photodamage. This iterative autofocusing routine also compromises the effective frame rate of the imaging system, which limits the observable features in a dynamic specimen. In contrast, Deep-R performs autofocusing with a single-shot image, without the need for additional image exposures or sample stage movements, retaining the maximum frame rate of the imaging system.
Although the blind autofocusing range of Deep-R can be increased by incorporating images that cover a larger defocusing range, there is a tradeoff between the inference image quality and the axial autofocusing range. To illustrate this tradeoff, three (3) different Deep-R networks 10 were trained on the same immunofluorescence image dataset as in
As generalization is still an open challenge in machine learning, the generalization capabilities of the trained neural network 10 in autofocusing images of new sample types that were not present during the training phase was undertaken. For that, the public image dataset BBBC006v1 from the Broad Bioimage Benchmark Collection was used. The dataset was composed of 768 image z-stacks of human U2OS cells, obtained using a 20× objective scanned using ImageXpress Micro automated cellular imaging system (Molecular Devices, Sunnyvale, Calif.). at two different channels for nuclei (Hoechst 33342, Ex/Em 350/461 nm) and phalloidin (Alexa Fluor 594 phalloidin, Ex/Em 581/609 nm), respectively, as shown in
One general concern for the applications of deep learning methods to microscopy is the potential generation of spatial artifacts and hallucinations. There are several strategies that were implemented to mitigate such spatial artifacts in output images 52 generated by the Deep-R network 10. First, the statistics of the training process was closely monitored, by evaluating e.g., the validation loss and other statistical distances of the output data with respect to the ground truth images. As shown in
Deep-R is a deep learning-based autofocusing framework that enables offline, blind autofocusing from a single microscopy image 50. Although trained with uniformly defocused images, Deep-R can successfully autofocus images of samples 100 that have non-uniform aberrations, computationally extending the DOF of the microscopic imaging system 102. This method is widely applicable to various incoherent imaging modalities e.g., fluorescence microscopy, brightfield microscopy and darkfield microscopy, where the inverse autofocusing solution can be efficiently learned by a deep neural network through image data. This approach significantly increases the overall imaging speed, and would especially be important for high-throughput imaging of large sample areas over extended periods of time, making it feasible to use out-of-focus images without the need for re-imaging the sample, also reducing the overall photon dose on the sample.
Materials and Methods
Sample Preparation
Breast, ovarian and prostate tissue samples: the samples were obtained from the Translational Pathology Core Laboratory (TPCL) and prepared by the Histology Lab at UCLA. All the samples were obtained after the de-identification of the patient related information and prepared from existing specimens. Therefore, the experiments did not interfere with standard practices of care or sample collection procedures. The human tissue blocks were sectioned using a microtome into 4 μm thick sections, followed by deparaffinization using Xylene and mounting on a standard glass slide using Cytoseal™ (Thermo-Fisher Scientific, Waltham, Mass., USA). The ovarian tissue slides were labelled by pan-cytokeratin tagged by fluorophore Opal 690, and the prostate tissue slides were stained with H&E.
Nano-bead sample preparation: 300 nm fluorescence polystyrene latex beads (with excitation/emission at 538/584 nm) were purchased from MagSphere (PSFR300NM), diluted 3,000× using methanol. The solution is ultrasonicated for 20 min before and after dilution to break down clusters. 2.5 μL of diluted bead solution was pipetted onto a thoroughly cleaned #1 coverslip and let dry.
3D nanobead sample preparation: following a similar procedure as described above, nanobeads were diluted 3,000× using methanol. 10 μL of Prolong Gold Antifade reagent with DAPI (ThermoFisher P-36931) was pipetted onto a thoroughly cleaned glass slide. A droplet of 2.5 μL of diluted bead solution was added to Prolong Gold reagent and mixed thoroughly. Finally, a cleaned coverslip was applied to the slide and let dry.
Image Acquisition
The autofluorescence images of breast tissue sections were obtained by an inverted microscope (IX83, Olympus), controlled by the Micro-Manager microscope automation software. The unstained tissue was excited near the ultraviolet range and imaged using a DAPI filter cube (OSF13-DAPI-5060C, EX377/50, EM447/60, DM409, Semrock). The images were acquired with a 20×/0.75NA objective lens (Olympus UPLSAPO 20×/0.75NA, WD 0.65). At each FOV of the sample, autofocusing was algorithmically performed, and the resulting plane was set as the initial position (i.e., reference point), z=0 μm. The autofocusing was controlled by the OughtaFocus plugin in Micro-Manager, which uses Brent's algorithm for searching of the optimal focus based on Vollath-5 criterion. For the training and validation datasets, the z-stack was taken from −10 μm to 10 μm with 0.5 μm axial spacing (DOF=0.8 μm). For the testing image dataset, the axial spacing was 0.2 μm. Each image was captured with a scientific CMOS image sensor (ORCA-flash4.0 v.2, Hamamatsu Photonics) with an exposure time of ˜100 ms.
The immunofluorescence images of human ovarian samples were imaged on the same platform with a 40×/0.95NA objective lens (Olympus UPLSAPO 40×/0.95NA, WD 0.18), using a Cy5 filter cube (CY5-4040C-OFX, EX628/40, EM692/40, DM660, Semrock). After performing the autofocusing, a z-stack was obtained from −10 μm to 10 μm with 0.2 μm axial steps.
Similarly, the nanobeads sample were imaged with the same 40×/0.95NA objective lens, using a Texas red filter cube (OSFI3-TXRED-4040C, EX562/40, EM624/40, DM593, Semrock), and a z-stack was obtained from −10 μm to 10 μm with 0.2 μm axial steps after the autofocusing step (z=0 μm).
Finally, the H&E stained prostate samples were imaged on the same platform using brightfield mode with a 20×/0.75NA objective lens (Olympus UPLSAPO 20×/0.75NA, WD 0.65). After performing autofocusing on the automation software, a z-stack was obtained from −10 μm to 10 μm with an axial step size of 0.5 μm.
Data Pre-Processing
To correct for rigid shifts and rotations resulting from the microscope stage, the image stacks were first aligned using the ImageJ plugin ‘StackReg’. Then, an extended DOF (EDOF) image was generated using the ImageJ plugin ‘Extended Depth of Field’ for each FOV, which typically took ˜180 s/FOV on a computer with i9-7900X CPU and 64 GB RAM. The stacks and the corresponding EDOF images were cropped into non-overlapping 512×512-pixel image patches in the lateral direction, and the ground truth image was set to be the one with the highest SSIM with respect to the EDOF image. Then, a series of defocused planes, above and below the focused plane, were selected as input images and input-label image pairs were generated for network training (
Network Structure, Training and Validation
A GAN 10 is used to perform snapshot autofocusing (see
L
G=λ×(1−D(G(x)))2+v×MSSSIM(y,G(x))+ξ×BerHu(y,G(x)) (1)
L
D
=D(G(x))2+(1−D(y))2 (2)
where x represents the defocused input image, y denotes the in-focus image used as ground truth, G(x) denotes the generator output, D(⋅) is the discriminator inference. The generator loss function (LG) is a combination the adversarial loss with two additional regularization terms: the multiscale structural similarity (MSSSIM) index and the reversed Huber loss (BerHu), balanced by regularization parameters λ, ν, ξ. In the training, these parameters are set empirically such that three sub-types of losses contributed approximately equally after the convergence. MSSSIM is defined as:
where xj and yj are the distorted and reference images downsampled 2j-1 times, respectively; μx, μy, are the averages of x, y; σx2, σy2 are the variances of x, y; σxy is the covariance of x, y; C1, C2, C3 are constants used to stabilize the division with a small denominator; and αM, βj, γj are exponents used to adjust the relative importance of different components. The MSSSIM function is implemented using the Tensorflow function tf.image.ssim_multiscale, using its default parameter settings. The BerHu loss is defined as:
where x(m, n) refers to the pixel intensity at point (m, n) of an image of size M×N, c is a hyperparameter, empirically set as ˜10% of the standard deviation of the normalized ground truth image. MSSSIM provides a multi-scale, perceptually-motivated evaluation metric between the generated image and the ground truth image, while BerHu loss penalizes pixel-wise errors, and assigns higher weights to larger losses exceeding a user-defined threshold. In general, the combination of a regional or a global perceptual loss, e.g., SSIM or MSSSIM, with a pixel-wise loss, e.g., L1, L2, Huber and BerHu, can be used as a structural loss to improve the network performance in image restoration related tasks. The introduction of the discriminator helps the network output images to be sharper.
All the weights of the convolutional layers were initialized using a truncated normal distribution (Glorot initializer), while the weights for the fully connected (FC) layers were initialized to 0.1. An adaptive moment estimation (Adam) optimizer was used to update the learnable parameters, with a learning rate of 5×10−4 for the generator and 1×10−6 for the discriminator, respectively. In addition, six updates of the generator loss and three updates of the discriminator loss are performed at each iteration to maintain a balance between the two networks. A batch size of five (5) was used in the training phase, and the validation set was tested every 50 iterations. The training process converges after ˜100,000 iterations (equivalent to ˜50 epochs) and the best model is chosen as the one with the smallest BerHu loss on the validation set, which was empirically found to perform better. The details of the training and the evolution of the loss term are presented in
For the optimization of the DPM decoder 124 (
L
Dec=Σm,n(x(m,n)−y(m,n))2 (5)
where x and y denote the output DPM and the ground-truth DPM, respectively, and m, n stand for the lateral coordinates.
Implementation Details
The network is implemented using TensorFlow on a PC with Intel Xeon Core W-2195 CPU at 2.3 GHz and 256 GB RAM, using Nvidia GeForce RTX 2080Ti GPU. The training phase using ˜30,000 image pairs (512×512 pixels in each image) takes about ˜30 hours. After the training, the blind inference (autofocusing) process on a 512×512-pixel input image takes ˜0.1 sec.
Image Quality Analysis
Difference image calculation: the raw inputs and the network outputs were originally 16-bit. For demonstration, all the inputs, outputs and ground truth images were normalized to the same scale. The absolute difference images of the input and output with respect to the ground truth were normalized to another scale such that the maximum error was 255.
Image sharpness coefficient for tilted sample images: Since there was no ground truth for the tilted samples, a reference image was synthesized using a maximum intensity projection (MIP) along the axial direction, incorporating 10 planes between z=0 μm and z=1.8 μm for the best visual sharpness. Following this, the input and output images were first convolved with a Sobel operator to calculate a sharpness map, S, defined as:
S(I)=√{square root over (IX2+IY2)} (6)
where IX, IY represent the gradients of the image I along X and Y axis, respectively. The relative sharpness of each row with respect to the reference image was calculated as the ordinary least square (OLS) coefficient without intercept:
where Si is the i-th row of S, y is the reference image, N is the total number of rows.
The standard deviation of the relative sharpness is calculated as:
where RSSi stands for the sum of squared residuals of OLS regression at the ith row.
Estimation of the Lateral FWHM Values for PSF Analysis
A threshold was applied to the most focused plane (with the largest image standard deviation) within an acquired axial image stack to extract the connected components. Individual regions of 30×30 pixels were cropped around the centroid of the sub-regions. A 2D Gaussian fit (lsqcurvefit) using Matlab (MathWorks) was performed on each plane in each of the regions to retrieve the evolution of the lateral FWHM, which was calculated as the mean FWHM of x and y directions. For each of the sub-regions, the fitted centroid at the most focused plane was used to crop a x-z slice, and another 2D Gaussian fit was performed on the slide to estimate the axial FHWM. Using the statistics of the input lateral and axial FWHM at the focused plane, a threshold was performed on the sub-regions to exclude any dirt and bead clusters from this PSF analysis.
Implementation of RL and Landweber Image Deconvolution Algorithms
The image deconvolution (which was used to compare the performance of Deep-R) was performed using the ImageJ plugin DeconvolutionLab2. The parameters for RL and Landweber algorithm were adjusted such that the reconstructed images had the best visual quality. For Landwerber deconvolution, 100 iterations were used with a gradient descent step size of 0.1. For RL deconvolution, the best image was obtained at the 100th iteration. Since the deconvolution results exhibit known boundary artifacts at the edges, 10 pixels at each image edge were cropped when calculating the SSIM and RMSE index to provide a fair comparison against Deep-R results.
Speed Measurement of Online Autofocusing Algorithms
The autofocusing speed measurement is performed using the same microscope (IX83, Olympus) with a 20×/0.75NA objective lens using nanobead samples. The online algorithmic autofocusing procedure is controlled by the OughtaFocus plugin in Micro-Manager, which uses the Brent's algorithm. The following search parameters were chosen: SearchRange=10 μm, tolerance=0.1 μm, exposure=100 ms. Then, the autofocusing time of 4 different focusing criteria were compared: Vollath-4 (VOL4), Vollath-5 (VOL5), standard deviation (STD) and normalized variance (NVAR). These criteria are defined as follows:
where μ is the mean intensity defined as:
The autofocusing time is measured by the controller software, and the exposure time for the final image capture is excluded from this measurement. The measurement is performed on four (4) different FOVs, each measured four (4) times, with the starting plane randomly initiated from different heights. The final statistical analysis (Table 1) was performed based on these 16 measurements.
While embodiments of the present invention have been shown and described, various modifications may be made without departing from the scope of the present invention. For example, the system and method described herein may be used to autofocus a wide variety of spatially non-uniform defocused images including spatially aberrated images. Likewise, the sample or specimen that is imaged can be autofocused with a single shot even though the sample holder is tilted, curved, spherical, or spatially warped. The invention, therefore, should not be limited, except to the following claims, and their equivalents.
This application claims priority to U.S. Provisional Patent Application No. 62/992,831 filed on Mar. 20, 2020, which is hereby incorporated by reference. Priority is claimed pursuant to 35 U.S.C. § 119 and any other applicable statute.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/US2021/023040 | 3/18/2021 | WO |
Number | Date | Country | |
---|---|---|---|
62992831 | Mar 2020 | US |