ZauggGroup / DeePiCt

Pipeline for the automatic detection and segmentation of particles and cellular structures in 3D Cryo-ET data, based on deep learning (convolutional neural networks).
Apache License 2.0
29 stars 8 forks source link

Null segmentation results #15

Closed cyanching closed 5 months ago

cyanching commented 1 year ago

Hey Frosina!

I hope everything's going well with all your projects and life in general! :)

I just downloaded a tomogram from the following dataset: https://www.ebi.ac.uk/empiar/EMPIAR-10989/, 00004_sq_df_sorted.rec from the 'tilt series stacks and metadata of cryo-electron tomograms acquired on RPE1 cryo-FIB lamellae' section. I suppose this tomogram and its segmentation results were used to train DeePiCt?

Though after directly plugging it into the DeePiCt_predict3d Colab script with default parameters, the post-processing step returns the following instead of generating clustered and cleaned results:

Processing tomo test file in .mrc format Region mask: no_mask masking_file: nan No intersecting mask available of the type no_mask for tomo test. /content/DeePiCt/3d_cnn/src/tomogram_utils/coordinates_toolbox/clustering.py:21: FutureWarning: input is a deprecated argument name for label. It will be removed in version 1.0. Please use label_image instead. labeled_clusters, num = morph.label(input=dataset, ^C

Though after converting this 4-binned tomogram into 8-binned (binvol in IMOD), the post-processing step went through but the segmentation results are null or far-off (no microtubules, or other structures were segmented throughout the slices or the segmentation appear as random blobs):

Processing tomo filtered file in .mrc format Region mask: no_mask masking_file: nan No intersecting mask available of the type no_mask for tomo filtered. /content/DeePiCt/3d_cnn/src/tomogram_utils/coordinates_toolbox/clustering.py:21: FutureWarning: input is a deprecated argument name for label. It will be removed in version 1.0. Please use label_image instead. labeled_clusters, num = morph.label(input=dataset, cluster_sizes: [ 119 4 52 105 803 10 3 24 5 38 61 1 2 2 112 4786 2 14 85 2 14 1 7 1 1 5 10 3 3 1276 235 14 2 9 1 2 1 3 530 2 5 458 58 1 2 1 4 3 102 4 1 1 1 138 2 3 1 84 5 4 1 2 40 87 1 73 2 1 7 2 3 12 3 1 68 7 1 2 2789 12 6 850 14 4 3434 17 270 4 126 1 66 1556 6 34 1334 2 1 1 56 11 20 25 430 55 7 96 1 1 105 2687 228 1 1 1 4 3 2 5 1 1 882 17 2 66 1 39 5 1 1 3264 1 2 922 6911 1 1 1 16 128 44 1 513 946 32 57 1 27 64 159 9 6 1 3819 22 305 1 23 2157 1518 429 5 8 12 9 2 1 8 1 1 107 5 10 328 3 3225 3 3207 2632 2 37 1 1 1 1 1302 2 34 108 1 1 1 91 3 2 4 1 10 39 1 63 36 1 9 17 1 4 3 6 9 16 1 3 1 5 11 1 2 7 1297 1 10 5 1 2 107 5 2 8 1 1 2 1 2 2 1157 2 2 6 1 103 1 2 1 2 2 1 2 2 468 1 2 1 1112 1 1 63 156 1 3 1 6 11 8 4] number of clusters before size filtering = 264 size range before size filtering: 1 to 6911 clusters_output_path /content/gdrive/MyDrive/DeePiCt_3d/predictions/model_weights/filtered/microtubule/post_processed_prediction.mrc Dataset saved in /content/gdrive/MyDrive/DeePiCt_3d/predictions/model_weights/filtered/microtubule/post_processed_prediction.mrc motl_name: motl_26.csv Motive list saved in /content/gdrive/MyDrive/DeePiCt_3d/predictions/model_weights/filtered/microtubule/motl_26.csv Creating snakemake pattern /content/gdrive/MyDrive/DeePiCt_3d//predictions/model_weights/filtered/microtubule/.None.post_processed_prediction.mrc

I also played with threshold and minimum cluster size in the post-processing step, but the results did not change. And I replicated the same error with two of our own tomograms. Do you maybe have a solution around this issue? Are there additional processing steps (I made sure to denoise and perform spectrum filtering on the tomogram) or parameters to tune to get correct segmentation with the models?

An additional note: when I plugged in binned tomogram generated using Dynamo, DeePiCt complained the file was not in mrc format and could be corrupted.

Thank you so much!

Cheers,

Cyan

frosinastojanovska commented 9 months ago

Hi @cyanching did you manage to solve this, or is this still an issue?

cyanching commented 5 months ago

Hey Frosina, I hope you have been doing well! :)

I am very sorry for the late reply, I have yet to test DeePiCT again when we will have new imaging data containing microtubules. Then I will let you know how it'd go! And after updating mrcfile to the latest version, it reads cryoCARE-generated headers without any complaint.

Cheers,

Cyan