Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

average_3d_ffd segmentation fault error #13

Open
vt232 opened this issue Nov 17, 2021 · 11 comments
Open

average_3d_ffd segmentation fault error #13

vt232 opened this issue Nov 17, 2021 · 11 comments

Comments

@vt232
Copy link

vt232 commented Nov 17, 2021

Hi,
I tried running the code both on MacOS and Ubuntu, using the official MIRTK docker image as base image. In both cases I get a seg fault error during execution of the average_3d_ffd program. Seems like the issue is in the nested loop in average_3d_ffd.cc. X, Y and Z are 1 (single control point) for every forward / backward transformation pair except for the very first and the very last pairs. In particular, for the first example, the very first forward transformation from fr00 to fr01 has 29 control points, while the corresponding backward transformation has a single control point, which causes the seg fault error. What is the correct way to fix this issue?

@iimog
Copy link

iimog commented Aug 8, 2022

This is probably related to an issue in mirtk (BioMedIA/MIRTK#782). You can work around it by removing the -approximate option in the call to mirtk compose-dofs and add a call to mirtk convert-dof to combine the multiple transformations into a single one. Once the issue is solved in mirtk no workaround (except for updating mirtk) should be necessary.

iimog added a commit to BioMeDS/ukbb_cardiac that referenced this issue Sep 1, 2022
@fymobo
Copy link

fymobo commented Jul 11, 2023

This is probably related to an issue in mirtk (BioMedIA/MIRTK#782). You can work around it by removing the -approximate option in the call to mirtk compose-dofs and add a call to mirtk convert-dof to combine the multiple transformations into a single one. Once the issue is solved in mirtk no workaround (except for updating mirtk) should be necessary.

Hello there, thanks very much for your contribution. I modified the code in as you did and it works well for most of ukb data. However, I still got errors in strain analysis by MIRTK for several participants' data as follows:

MatrixToAffineParameters: Matrix is singular or very close to singular!. Error: convert-dof command returned non-zero exit status 1

Could you please help me with this issue? Thanks very much!

@iimog
Copy link

iimog commented Jul 11, 2023

I have the same problem as well in roughly 3-5% of the participants. I tried several things but was unable to fix it so far. This issue seems to be related: BioMedIA/MIRTK#758
but increasing the tolerance also did not fix it.
If you have any ideas, I'm happy to hear them.

@fymobo
Copy link

fymobo commented Jul 11, 2023

I have the same problem as well in roughly 3-5% of the participants. I tried several things but was unable to fix it so far. This issue seems to be related: BioMedIA/MIRTK#758 but increasing the tolerance also did not fix it. If you have any ideas, I'm happy to hear them.

Thanks for your reply! The strain analysis pipeline will be interrupted and no tabular result will be written when this problem is raised. Is it convenient for you to share the modified code in eval_strain_lax.py and eval_strain_sax.py to fix this problem? I really appreciate your kind help!

@iimog
Copy link

iimog commented Jul 14, 2023

Ah yes, I did not change anything there. Instead, I'm now running each participant individually. So if one fails, that does not affect the others. It also allows better parallelization. But I have to aggregate the results manually in the end.

@fymobo
Copy link

fymobo commented Jul 15, 2023

I used try-expection code block and it also worked. Thank you!!!

@Janner125
Copy link

Ah yes, I did not change anything there. Instead, I'm now running each participant individually. So if one fails, that does not affect the others. It also allows better parallelization. But I have to aggregate the results manually in the end.
hello,teacher iimog!when i run python3 .\ukbb_cardia\common\deploy_network.py --seq_name la_4ch --data_dir {0} '
'--seg4 --model_path .\ukbb_cardia\trained_model\FCN_la_4ch_seg4 ,many results show ED and ES frame =0 ,I do not sure what it mean
image

@Janner125
Copy link

image
help! I donot no why

@iimog
Copy link

iimog commented Sep 12, 2024

Hi @Janner125, I'm not sure what's going on there. I also no longer have access to the UK Biobank data. In the case of ED and ES both being 0: if I remember correctly, ED is hard coded to be 0 while ES is the frame with the smallest LV volume. I would suggest to check if the segmentation worked at all in these cases, probably it failed so LV volume is 0 in all frames (just my guess). I have no idea why AAO area is always 0, this requires debugging that I can't do. I hope you find solutions to your problems.

@Janner125
Copy link

Hi @Janner125, I'm not sure what's going on there. I also no longer have access to the UK Biobank data. In the case of ED and ES both being 0: if I remember correctly, ED is hard coded to be 0 while ES is the frame with the smallest LV volume. I would suggest to check if the segmentation worked at all in these cases, probably it failed so LV volume is 0 in all frames (just my guess). I have no idea why AAO area is always 0, this requires debugging that I can't do. I hope you find solutions to your problems.
thanks for your reply!!I used BAI's model to segment my own data. The data I used was ukbb heart mri data, which should overlap with BAI's data. I guess the reason why AAO is 0 at the tie frame 0 is that the segmentation result is not good.

@Janner125
Copy link

image help! I donot no why

pass the quality control.
1315496
../temp_data/dataset/1315496/seg4_la_4ch_ED.nii.gz: The segmentation for class LA is smaller than 10 pixels. It does not pass the quality control.
1315539
../temp_data/dataset/1315539/seg4_la_4ch_ED.nii.gz: The segmentation for class LA is smaller than 10 pixels. It does not pass the quality control.
1315630
../temp_data/dataset/1315630/seg4_la_4ch_ED.nii.gz: The segmentation for class LA is smaller than 10 pixels. It does not pass the quality control.
1315669
../temp_data/dataset/1315669/seg4_la_4ch_ED.nii.gz: The segmentation for class LA is smaller than 10 pixels. It does not pass the quality control.
1315846
../temp_data/dataset/1315846/seg4_la_4ch_ED.nii.gz: The segmentation for class LA is smaller than 10 pixels. It does not pass the quality control.
1315850
../temp_data/dataset/1315850/seg4_la_4ch_ED.nii.gz: The segmentation for class LA is smaller than 10 pixels. It does not pass the quality control.
1315916
../temp_data/dataset/1315916/seg4_la_4ch_ED.nii.gz: The segmentation for class LA is smaller than 10 pixels. It does not pass the quality control.
1315968
../temp_data/dataset/1315968/seg4_la_4ch_ED.nii.gz: The segmentation for class LA is smaller than 10 pixels. It does not pass the quality control.
1316089
../temp_data/dataset/1316089/seg4_la_4ch_ED.nii.gz: The segmentation for class LA is smaller than 10 pixels. It does not pass the quality control.
1316188

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants