Deformetrica 4: an open- source software for statistical shape analysis · 2020-06-08 · 2 =1 𝑛...

Post on 12-Jul-2020

2 views 0 download

Transcript of Deformetrica 4: an open- source software for statistical shape analysis · 2020-06-08 · 2 =1 𝑛...

ShapeMI workshop

MICCAI conference

20 September 2018

Granada, Spain

Alexandre BÎne, Maxime Louis, Benoît Martin, Stanley Durrleman

Deformetrica 4: an open-source software for statistical shape analysis

I. Registration

II. Atlas

III.Regression

Deformetrica 4: an open-source software for statistical shape analysis

demo

Registration

𝚜𝒄,𝜶𝝈

𝑆 𝑇

Registration

𝚜𝒄,𝜶𝝈

𝑆 𝑇

Registration

cost

functionregularization

cost

attachment

cost

𝐞 𝑐, 𝛌 =1

𝜎𝜀2 Ί𝑐,𝛌

𝜎 ⋆ 𝑆 − 𝑇ℰ

2+𝑅(𝑐, 𝛌)

𝚜𝒄,𝜶𝝈

𝑆 𝑇

Registration

𝐞 𝑐, 𝛌 =1

𝜎𝜀2 Ί𝑐,𝛌

𝜎 ⋆ 𝑆 − 𝑇ℰ

2+𝑅(𝑐, 𝛌)

𝚜𝒄,𝜶𝝈

𝑆 𝑇

inputs

Registration

𝐞 𝑐, 𝛌 =1

𝜎𝜀2 Ί𝑐,𝛌

𝜎 ⋆ 𝑆 − 𝑇ℰ

2+𝑅(𝑐, 𝛌)

𝚜𝒄,𝜶𝝈

𝑆 𝑇

outputsinputs

Registration

𝐞 𝑐, 𝛌 =1

𝜎𝜀2 Ί𝑐,𝛌

𝜎 ⋆ 𝑆 − 𝑇ℰ

2+𝑅(𝑐, 𝛌)

𝑆 𝑇

Hyper-

parametersoutputsinputs

𝚜𝒄,𝜶𝝈

Registration

𝐞 𝑐, 𝛌 =1

𝜎𝜀2 Ί𝑐,𝛌

𝜎 ⋆ 𝑆 − 𝑇ℰ

2+𝑅(𝑐, 𝛌)

𝑆 𝑇

Hyper-

parametersoutputsinputs

𝚜𝒄,𝜶𝝈

133

190

Registration

𝐞 𝑐, 𝛌 =1

𝜎𝜀2 Ί𝑐,𝛌

𝜎 ⋆ 𝑆 − 𝑇ℰ

2+𝑅(𝑐, 𝛌)

𝑆 𝑇

Hyper-

parametersoutputsinputs

𝚜𝒄,𝜶𝝈

133

190

Registration

𝐞 𝑐, 𝛌 =1

𝜎𝜀2 Ί𝑐,𝛌

𝜎 ⋆ 𝑆 − 𝑇ℰ

2+𝑅(𝑐, 𝛌)

Hyper-

parametersoutputsinputs

Registration

𝐞 𝑐, 𝛌 =1

𝜎𝜀2 Ί𝑐,𝛌

𝜎 ⋆ 𝑆 − 𝑇ℰ

2+𝑅(𝑐, 𝛌)

Hyper-

parametersoutputsinputs

Registration

𝑇 𝑆

Registration

𝑇 𝑆

Registration

𝑇 𝑆

Registration

𝑇 𝑆

Registration

𝑇 𝑆

>> deformetrica estimate

model.xml data_set.xml –p

optimization_parameters.xml

Registration

𝑇 𝑆

I. Registration

II. Atlas

III.Regression

Deformetrica 4: an open-source software for statistical shape analysis

demo

Deterministic atlas

Deterministic atlas

Deterministic atlas

𝐞 𝑆, 𝑐, (𝛌𝑖)𝑖 =1

𝜎𝜀2

𝑖=1

𝑛

Ί𝑐,𝛌𝑖𝜎 ⋆ 𝑆 − 𝑇𝑖 ℰ

2+ 𝑅(𝑐, 𝛌𝑖)

Hyper-

parametersoutputsinputs

𝐞 𝑆, 𝑐, (𝛌𝑖)𝑖 =1

𝜎𝜀2

𝑖=1

𝑛

Ί𝑐,𝛌𝑖𝜎 ⋆ 𝑆 − 𝑇𝑖 ℰ

2+ 𝑅(𝑐, 𝛌𝑖)

Deterministic atlas

Hyper-

parametersoutputsinputs

𝐞 𝑆, 𝑐, (𝛌𝑖)𝑖 =1

𝜎𝜀2

𝑖=1

𝑛

Ί𝑐,𝛌𝑖𝜎 ⋆ 𝑆 − 𝑇𝑖 ℰ

2+ 𝑅(𝑐, 𝛌𝑖)

Deterministic atlas

Hyper-

parametersoutputsinputs

𝐞 𝑆, 𝑐, (𝛌𝑖)𝑖 =1

𝜎𝜀2

𝑖=1

𝑛

Ί𝑐,𝛌𝑖𝜎 ⋆ 𝑆 − 𝑇𝑖 ℰ

2+ 𝑅(𝑐, 𝛌𝑖)

Deterministic atlas

Hyper-

parametersoutputsinputs

𝐞 𝑆, 𝑐, (𝛌𝑖)𝑖 =1

𝜎𝜀2

𝑖=1

𝑛

Ί𝑐,𝛌𝑖𝜎 ⋆ 𝑆 − 𝑇𝑖 ℰ

2+ 𝑅(𝑐, 𝛌𝑖)

Deterministic atlas

Hyper-

parametersoutputsinputs

>> deformetrica estimate

model.xml data_set.xml –p

optimization_parameters.xml

Deterministic atlas

Deterministic atlas

Deterministic atlas

I. Registration

II. Atlas

III.Regression

Deformetrica 4: an open-source software for statistical shape analysis

demo

Geodesic regression

𝑡1 = 5 𝑡2 = 15 𝑡3 = 25 𝑡4 = 35Yin et al. 2008, “A High- Resolution 3D Dynamic Facial Expression Database”

Geodesic regression

𝐞 𝑆, 𝑐, 𝛌 =1

𝜎𝜀2

𝑗=1

𝑝

Ί𝑐,𝑡𝑗∙𝛌𝜎 ⋆ 𝑆 − 𝑇𝑗

ℰ

2+ 𝑅(𝑐, 𝛌)

Hyper-

parametersoutputsinputs

𝑡1 = 5 𝑡2 = 15 𝑡3 = 25 𝑡4 = 35Yin et al. 2008, “A High- Resolution 3D Dynamic Facial Expression Database”

𝑡1 = 5 𝑡2 = 15 𝑡3 = 25 𝑡4 = 35Yin et al. 2008, “A High- Resolution 3D Dynamic Facial Expression Database”

Geodesic regression

𝑡1 = 5 𝑡2 = 15 𝑡3 = 25 𝑡4 = 35Yin et al. 2008, “A High- Resolution 3D Dynamic Facial Expression Database”

Geodesic regression

Geodesic regression

>> deformetrica estimate

model.xml data_set.xml

𝑡1 = 5 𝑡2 = 15 𝑡3 = 25 𝑡4 = 35Yin et al. 2008, “A High- Resolution 3D Dynamic Facial Expression Database”

𝑡1 = 5 𝑡2 = 15 𝑡3 = 25 𝑡4 = 35Yin et al. 2008, “A High- Resolution 3D Dynamic Facial Expression Database”

Geodesic regression

Parallel transport

Transfer a reference temporal evolution towards a new target geometry

Data courtesy of Paolo Piras, Sapienza Università di Roma, Italy

MR image registration performance

Registration of full-resolution MR images (7 millions voxels) in 2-3 minutes, with low GPU memory usage

Teaser: graphical user interface alpha

Teaser: python API beta

PyTorch

• Auto-differentiation, without memory

overflows

• Seamless CUDA code

PyTorch + PyKeops

• Auto-differentiation, without memory

overflows

• Seamless CUDA code

Thanks to Benjamin Charlier, Jean Feydy & Joan GlaunÚs

Conclusion

Implements many statistical shape analysis tasks ...

• Registration

• Deterministic atlas

• Bayesian atlas

• Geodesic regression

• Parallel transport

• Longitudinal atlas

• Principal geodesic

analysis

beta

alpha

Conclusion

Implements many statistical shape analysis tasks ...

• Registration

• Deterministic atlas

• Bayesian atlas

• Geodesic regression

• Parallel transport

• Longitudinal atlas

• Principal geodesic

analysis

beta

alpha

... with very few requirements about the data

• Image

• Meshes

• No required point

correspondence

• Multi-object

• Cross-sectional or

longitudinal datasets

• Linux or Mac

• Anaconda 3

Requirements

Thanks!

Install

conda install -c pytorch -c conda-

forge

-c anaconda -c aramislab deformetrica

www.deformetrica.org

Come see us at the lunch & demo session!

Future work

Grow the pool of users

• Graphical user

interface (GUI)

• Python API

• Windows platform

Add functionalities

• Longitudinal atlas

• Principal geodesic

analysis

• MCMC-SAEM

estimation algorithm

Improve performance

• Achieve massive parallelization on large clusters

• Emphasis on GPU-specific optimizations

A decade of development

Deformetrica 1 C++

Deformetrica 3 C++

Deformetrica 4 PythonDeformetrica 2

C++

2011 2013 2017 2018

Deterministic atlas: landmark/2d/skulls

Deterministic atlas: landmark/2d/skulls

Deterministic atlas: landmark/2d/skulls

A note on the Bayesian atlas

𝐶 𝑇, (𝜇𝑖)𝑖, 𝜎𝜀2 =

1

𝜎𝜀2

𝑖=1

𝑛

Ί𝜇𝑖 ⋆ 𝑇 − 𝑆𝑖 ℰ

2+𝑅(𝜇𝑖 , 𝜎𝜀

2)

cost

functionregularization

cost

attachment

cost

A note on the Bayesian atlas

𝐶 𝑇, (𝜇𝑖)𝑖, 𝜎𝜀2 =

1

𝜎𝜀2

𝑖=1

𝑛

Ί𝜇𝑖 ⋆ 𝑇 − 𝑆𝑖 ℰ

2+𝑅(𝜇𝑖 , 𝜎𝜀

2)

Gives a statistical interpretation of the regularization term, which arises from assumed underlying random

structures on the momenta and residuals

In practice, no need to specify 𝝈𝜺𝟐 anymore!

The optimal tradeoff between attachment and

regularity terms is estimated from the data

Bayesian atlas

𝐶 𝑇, (𝜇𝑖)𝑖, 𝜎𝜀2 =

1

𝜎𝜀2

𝑖=1

𝑛

Ί𝜇𝑖 ⋆ 𝑇 − 𝑆𝑖 ℰ

2+𝑅(𝜇𝑖 , 𝜎𝜀

2)

cost

functionregularization

cost

attachment

cost

Statistical interpretation of the regularization term, which arises from assumed underlying random structures on

the momenta and residuals

In practice, no need to specify 𝝈𝜺𝟐 anymore!

Bayesian atlas

Registration

𝑇 𝑆

Registration

𝑇 𝑆

Registration

𝑇 𝑆

Registration

𝑇 𝑆

Registration

𝑇 𝑆

>> deformetrica estimate model.xml

data_set.xml –p

optimization_parameters.xml