Registration failures and crashes

38 views
Skip to first unread message

Jeremy Lim

unread,
Apr 18, 2023, 11:42:12 PM4/18/23
to Plastimatch
Hi,

I have been doing lung registrations while varying the DIR regularisation term λ and was wondering if you could provide some insight to the behaviour of Plastimatch below: 

Registration failure
There was one case where using λ = 0.1 resulted in a deformed image that was completely uniform (zero everywhere) and 100% negative Jacobian within the lungs. The output as the registration completed is shown below.

Registration failure.png
However, varying λ slightly to 0.1001 resulted in a successful registration with less than 1% negative Jacobian within the lungs.

Plastimatch crash
There was another case where Plastimatch would crash at stage 5 of the registration and it would still crash despite changing the value of λ. The registration was repeated several times and the crash always occured at the same iteration with the same SCORE, MSE, etc. This was expected as my experience with Plastimatch thus far was that it was deterministic and results can be reproduced exactly.
However, when I ran the registration repeatedly any changes, there were some occasions, about 15% of attempts, where the registration would continue, that may result in a failure or success (all 6 stages of DIR completed). When it failed, it had the following output and deformed image:
Output.png
Output.png
The registration was successful twice in around 40 attempts. However, the MSE after the registrations were slightly different (27765.7 vs. 27738.1) and very slight differences could be seen in the deformed images. Is there some randomness introduced somewhere in the registration process that could explain this behaviour? 

Another thing I observed with this patient was that the crash could be avoided if the pixel dimensions and offset of the MHAs were rounded up (e.g. to the 3rd decimal place). What could be the reason for this?

Kind regards,
Jeremy

Jeremy Lim

unread,
Apr 18, 2023, 11:48:30 PM4/18/23
to Plastimatch
Some minor fixes to my original post.

The second image I was trying to show was the pop-up that comes up when Plastimatch crashes:
Popup.png
and the sentence underneath it was supposed to read:
'However, when I ran the registration repeatedly without any changes, there were some occasions, ...'

Cheers,
Jeremy

Paolo Zaffino

unread,
Apr 19, 2023, 5:50:30 AM4/19/23
to plast...@googlegroups.com
Hi,
in my opinion a lambda value equal to 0.1 it is too much.
Plastimatch quits because it doesn't find any suitable solution, due to the too strong penalization.

Let's try some smaller value (0.0001 maybe?).
It's a trade-off: you have to penalize but not too much.

Best,
Paolo
--
You received this message because you are subscribed to the Google Groups "Plastimatch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plastimatch...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/d3971eb5-8e7c-4173-87fc-a1f98ea85e94n%40googlegroups.com.


Sharp, Gregory C.

unread,
Apr 19, 2023, 2:22:15 PM4/19/23
to plast...@googlegroups.com
Hi Jeremy,

It is also true that plastimatch shouldn't crash. And the scores you showed in the screen capture look like nonsense, those values are way too high. So there appears to be a bug somewhere. Would you be able to share your images and command file?

Greg

________________________________________
From: 'Paolo Zaffino' via Plastimatch <plast...@googlegroups.com>
Sent: Wednesday, April 19, 2023 5:50 AM
To: plast...@googlegroups.com
Subject: Re: [Plastimatch] Registration failures and crashes

External Email - Use Caution

Hi,
in my opinion a lambda value equal to 0.1 it is too much.
Plastimatch quits because it doesn't find any suitable solution, due to the too strong penalization.

Let's try some smaller value (0.0001 maybe?).
It's a trade-off: you have to penalize but not too much.

Best,
Paolo


On 4/19/23 05:42, Jeremy Lim wrote:
Hi,

I have been doing lung registrations while varying the DIR regularisation term λ and was wondering if you could provide some insight to the behaviour of Plastimatch below:

Registration failure
There was one case where using λ = 0.1 resulted in a deformed image that was completely uniform (zero everywhere) and 100% negative Jacobian within the lungs. The output as the registration completed is shown below.

[Registration failure.png]


However, varying λ slightly to 0.1001 resulted in a successful registration with less than 1% negative Jacobian within the lungs.

Plastimatch crash
There was another case where Plastimatch would crash at stage 5 of the registration and it would still crash despite changing the value of λ. The registration was repeated several times and the crash always occured at the same iteration with the same SCORE, MSE, etc. This was expected as my experience with Plastimatch thus far was that it was deterministic and results can be reproduced exactly.

[X]


However, when I ran the registration repeatedly any changes, there were some occasions, about 15% of attempts, where the registration would continue, that may result in a failure or success (all 6 stages of DIR completed). When it failed, it had the following output and deformed image:

[Output.png]
[Output.png]


The registration was successful twice in around 40 attempts. However, the MSE after the registrations were slightly different (27765.7 vs. 27738.1) and very slight differences could be seen in the deformed images. Is there some randomness introduced somewhere in the registration process that could explain this behaviour?

Another thing I observed with this patient was that the crash could be avoided if the pixel dimensions and offset of the MHAs were rounded up (e.g. to the 3rd decimal place). What could be the reason for this?

Kind regards,
Jeremy
--
You received this message because you are subscribed to the Google Groups "Plastimatch" group.

To unsubscribe from this group and stop receiving emails from it, send an email to plastimatch...@googlegroups.com<mailto:plastimatch...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/d3971eb5-8e7c-4173-87fc-a1f98ea85e94n%40googlegroups.com<https://secure-web.cisco.com/1sI-7hIf2Nm_qATZUqddWLUpKI9Ch0ok6_tSXf48-IG0mdQY8S4ap7rbWMXMYQZSF7i7Folb0x1talFb7FYpaQJk4v8s7iDgCTuep47nJvt4ydAaQLIq33GONYRpq4lxaRoLlvoqgzlhMWXFJhs5Es-MbyTUZ2W8-mOQHmXaggiCZtGiXX6MQcINamss4Im44j7HGDCVvBXTQsVwJ7gfgm8_0h2CmCYBeff0yAWCy-BbLRVQDuehQdFV1ZDaN1NPGTvnd2nB6FYsoEGzoAsKGdtqNC6PUHo4TMU4NSJm7R-dTRJS4uJVcIf-ZsyfucdbRx8PqhriM9Qbem9YMaPd5PA/https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fplastimatch%2Fd3971eb5-8e7c-4173-87fc-a1f98ea85e94n%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter>.


--
You received this message because you are subscribed to the Google Groups "Plastimatch" group.

To unsubscribe from this group and stop receiving emails from it, send an email to plastimatch...@googlegroups.com<mailto:plastimatch...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/6fa14c72-0fa7-9e31-bb93-f82b335509c5%40yahoo.it<https://secure-web.cisco.com/1MZLrlQEbSf_HHMfv882xV91mEVjKo_xF_6s5IyP-GQtX-aejNkCKQYPoslVn4vMzRIt8eq2Eax6dGbmXULyNNfHxfjma2QVQovjZDLGfn_L0qWAjeNUqGfCW5PSaNgfE2Z3Rq_34pRcsj2kwvd89bpl2J2iS6PqnR2G-0wzvOC7_w_TAFTe7drjNd7xkj6TOf9JHR-YjwJQ24vsL3ORij719hjGjUjVMAeIGwYgow84unVY1-tUVVpUJnPuyhmVfErQm1qxgz86rI4T3XPh9V5tYTKkFgwGr4iy0Gw-e_yrGCnAHIwJxpIql0GLfVxeq6Hj-9CzY9FGxeHiMXeRrmw/https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fplastimatch%2F6fa14c72-0fa7-9e31-bb93-f82b335509c5%2540yahoo.it%3Futm_medium%3Demail%26utm_source%3Dfooter>.
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline <https://www.massgeneralbrigham.org/complianceline> .
Please note that this e-mail is not secure (encrypted). If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately. Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail.

Jeremy Lim

unread,
Apr 20, 2023, 9:51:07 PM4/20/23
to Plastimatch
Thanks for your replies Paolo and Greg. 

It makes sense that Plastimatch quits as it can't find a suitable solution. However, from my experience λ = 0.1 isn't too high and shouldn't be what is causing the failure in this particular case as I have been testing λ values up to 100 without failure (although the MSE becomes worse). In fact, I found  λ = 1 to be most suitable for my dataset (high image similarity and zero negative Jacobian determinants). 

I can share the images that caused the crash. DIR0102.txt is the command file. 

Many thanks,
Jeremy

Jeremy Lim

unread,
Apr 21, 2023, 1:07:31 AM4/21/23
to Plastimatch
I have also shared the images that only failed to register at λ = 0.1 but was successful at other values of λ I tested (up to  λ = 100) in the DropBox link above (Failure.zip).

Cheers,
Jeremy
Reply all
Reply to author
Forward
0 new messages