3D Cell Shape Prediction from 2D Images
3D Cell Shape Prediction from 2D Images
1
Institute of AI for Health, Helmholtz Munich – German Research Centre for Environmental Health, Neuherberg, Germany
2
TUM School of Computation, Information and Technology, Technical University of Munich, Munich Germany
3
TUM School of Life Sciences, Technical University of Munich, Munich, Germany
4
Faculty of Engineering, Tel Aviv University, Tel Aviv, Israel
⋆
Current affiliation: AstraZeneca Computational Pathology, Oncology R&D, Munich, Germany
†
These authors share corresponding authorship
arXiv:2208.14125v3 [[Link]] 14 Mar 2023
ABSTRACT This is due to the fact that the sequential imaging and stacking of
slices of 2D images is time-consuming and toxic for cells. However,
Diffusion models are a special type of generative model, capable
the benefits of 3D microscopy are staggering: assessing morpholog-
of synthesising new data from a learnt distribution. We introduce
ical information of individual cells—such as their volume, shape or
DISPR, a diffusion-based model for solving the inverse problem of
surface—via 3D microscopy promises new insights into blood dis-
three-dimensional (3D) cell shape prediction from two-dimensional
orders such as sickle cell anemia [1]. Imaging a large number of
(2D) single cell microscopy images. Using the 2D microscopy im-
cells at high resolution in 3D is rather costly. Therefore, researchers
age as a prior, DISPR is conditioned to predict realistic 3D shape re-
have to find ways how they can optimally balance throughput and
constructions. To showcase the applicability of DISPR as a data aug-
resolution of 3D microscopy data.
mentation tool in a feature-based single cell classification task, we
extract morphological features from the red blood cells grouped into
six highly imbalanced classes. Adding features from the DISPR pre-
dictions to the three minority classes improved the macro F1 score
from F 1macro = 55.2 ± 4.6% to F 1macro = 72.2 ± 4.9%. We thus
demonstrate that diffusion models can be successfully applied to in-
verse biomedical problems, and that they learn to reconstruct 3D
shapes with realistic morphological features from 2D microscopy
images.
1. INTRODUCTION
Diffusion models are a class of generative models, showing supe- Fig. 2. DISPR is trained to denoise the 3D volume xb,t containing
rior performance as compared to other generative models in creating added stochastic Gaussian noise, to obtain xb,t−1 , thus reversing the
realistic images when trained on natural image datasets. We apply noising step q. In each forward pass pθ , we constrain our 3D model
a diffusion model to the reconstruction of three-dimensional single with one 2D image b containing a fluorecent image and a mask. Dur-
cell shapes (3D) from two-dimensional (2D) microscopy images, us- ing inference, the forward pass pθ is repeated T times to obtain the
ing the 2D image as a prior. prediction xb,0 (see section 2).
where I denotes the identity matrix. Note that we allow the variance
βt to increase with each step [20, 10]. The forward diffusion process
is repeated for a fixed, predefined number of steps T . In our case,
in line with the literature, we set T = 1000. Repeated application
of Eq. (1) to the original image x0 and setting αt = 1 − βt and
t
ᾱt = ∏i=1 αi yields
√
q(xt ∣x0 ) = N (xt ; ᾱt x0 , (1 − ᾱt )I). (2)
Fig. 3. Red blood cells exhibit similar morphological features be-
tween groundtruth (3rd column, yellow background) and DISPR Hence xt can be written in terms of x0 [20, 10] as
predictions (white background). A 2D microscopy image (with a √ √
xt = ᾱt x0 + 1 − ᾱt with ∼ N (0, I). (3)
fluorescence and segmented channel, dark background) is used as
the model’s input to predict the 3D shapes. The diffusion model is trained to reverse the forward process by re-
moving noise with each forward pass p through the model, trying to
predict xt−1 from the input xt (see Fig. 2 for a visualization of the
has recently been refined with a topological loss function [3]. Both diffusion process during inference). Wolleb et al. [13] used a U-Net
methods are based on an autoencoder that predicts one shape for model that in each step is trained to predict the probability density
each input image. By contrast, our method can be used to predict a function f (xt ) from xt for all t ∈ {1, ..., T }, where xt−1 serves as
distribution of 3D shape reconstructions for each input image. the ground truth. With the model parameters denoted by θ, we can
then write the reverse process pθ as
Diffusion models have gained much attention due to their as-
tonishing performance in generating realistically-looking images [9, pθ (xt−1 ∣xt ) = N (xt−1 ; µθ (xt , t), Σθ (xt , t)). (4)
10]. Denoising diffusion implicit models [11] have substantially im-
proved the noise sampling scheme by skipping multiple noise sam- Ho et al. [20] derive the formula for the forward pass of the model
pling steps. Denoising diffusion probabilistic models were further as
1 1 − αt
improved in their loss function by architecture changes and by clas- xt−1 = √ (xt √ θ (xt , t)) + σt z, (5)
sifier guidance during sampling, leading to improved image quality αt 1 − ᾱt
of the predictions [10, 12]. While most diffusion models are ap- with σt being the variance scheme the model can learn [10]. Com-
plied in the natural image domain, Wolleb et al. have used them ponent z in equation 5 reflects the√stochastic√sampling process. The
for segmentation of MRI images [13] and anomaly detection [14] model is trained with input xt = ᾱt x0 + 1 − ᾱt to subtract the
in multimodal brain images, showing their applicability in the med- noise scheme θ (xt , t) from xt according to equation 5.
ical domain for segmentation of 2D MRI images. Diffusion models
have been used of 2D MRI and CT image synthesis [15, 16, 17], to 2.1. DISPR
synthesise longitudinal MRI images [18] and 4D MRI images [19].
We go beyond previous work and propose a diffusion model, We use 2D images to constrain the 3D image generation. In each
2
1
hereafter called DIffusion based Shape PRediction, DISPR for pre- training and evaluation step the 2D image b ∈ R is concatenated to
3
dicting single cell shapes that are realistic 3D reconstructions from the noisy segmentation mask xb,t ∈ R . The groundtruth volume
3
2D microscopy images. for each input image is xb,0 ∈ R . This leads to
1 1 − αt
1
See [Link] xb,t−1 = √ (xb,t √ θ (xb,t ⊕ b, t)) + σt z. (6)
αt 1 − ᾱt
Relative
Model Median µ±σ
error
Cylinder fit 0.32 0.34 ± 0.22
Volume Ellipsoid fit 0.40 0.37 ± 0.23
SHAPR 0.15 0.20 ± 0.18
Topo SHAPR 0.26 0.29 ± 0.27
DISPR (ours) 0.15 0.20 ± 0.20
Cylinder fit 0.30 0.30 ± 0.19
Surface Ellipsoid fit 0.41 0.42 ± 0.19
area SHAPR 0.15 0.16 ± 0.11
Topo SHAPR 0.14 0.18 ± 0.16
DISPR (ours) 0.11 0.14 ± 0.15
Cylinder fit 0.26 0.29 ± 0.17
Surface
Ellipsoid fit 0.48 0.49 ± 0.19
roughness
SHAPR 0.32 0.31 ± 0.16
Topo SHAPR 0.25 0.29 ± 0.29
DISPR (ours) 0.15 0.23 ± 0.27
Cylinder fit 4.79 4.76 ± 1.36
Curvature Ellipsoid fit 0.38 0.39 ± 0.17
SHAPR 0.30 0.32 ± 0.21
Topo SHAPR 0.28 0.34 ± 0.24
DISPR (ours) 0.17 0.19 ± 0.12
5. DISCUSSION