Hi there,
I encountered errors when running the following lines:
inside the single_dataset_pathlib.py
dataset_directory = Path("/data001/data")
active_zone_mod_path = Path("/data001/data")
vesicle_mod_path = Path("/data001/data")
pl2 = cryovesnet.Pipeline(dataset_directory,pattern='*.mrc')
pl2.setup_cryovesnet_dir(initialize=False, make_masks=True)
pl2.run_deep(force_run=False,augmentation_level=4,rescale=None, weight_path=None)
pl2.rescale(force_run=False,slice_range=[10,130])
WARNING:tensorflow:From /home/software/anaconda3/envs/CryoVesNet/lib/python3.9/site-packages/tensorflow/python/compat/v2_compat.py:107: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
Instructions for updating:
non-resource variables are not supported in the long term
CryoVesNet Pipeline: the pipeline is created for /data001/data
*.mrc
Pixel size: 1.2119999885559083
CryoVesNet Pipeline: setting up cryovesnet directory
/data001/data/cryovesnet
Painting section 140
Painting section 140
Rescale Factor: 0.550909085707231
CryoVesNet pipeline: Running unet segmentation if there are less than 4 file in ./deep directory
(?, 32, 32, 32, 1)
5
ROI: 24
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [03:14<00:00, 48.54s/it]
(78, 564, 564)
(78, 564, 564)
ROI: 24
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [03:12<00:00, 48.06s/it]
(78, 564, 564)
(78, 564, 564)
ROI: 24
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [03:05<00:00, 46.45s/it]
(78, 564, 564)
(78, 564, 564)
ROI: 24
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [03:05<00:00, 46.38s/it]
(78, 564, 564)
(78, 564, 564)
CryoVesNet Pipeline: zooming the unet mask
(141, 1024, 1024)
last output array name: deep_mask
last mrc file saved : cryovesnet/PFC_935_8-148_zoomed_mask.mrc
CryoVesNet Pipeline: running label_vesicles
CryoVesNet Pipeline: restricting labels to segmentation region
last output array name: deep_mask
last mrc file saved : cryovesnet/PFC_935_8-148_zoomed_mask.mrc
Threshold: 0.002
last output array name: deep_labels
last mrc file saved : cryovesnet/PFC_935_8-148_deep_labels.mrc
CryoVesNet Pipeline: running label_vesicles_adaptive
Tabel computed!
Collision vesicles:
Empty DataFrame
Columns: [label, area, centroid-0, centroid-1, centroid-2, bbox-0, bbox-1, bbox-2, bbox-3, bbox-4, bbox-5, extent, area_zscore, extent_zscore]
Index: []
Tabel computed!
Vesicles to remove:
Empty DataFrame
Columns: [area, centroid-0, centroid-1, centroid-2, bbox-0, bbox-1, bbox-2, bbox-3, bbox-4, bbox-5, extent, area_zscore, extent_zscore]
Index: []
Tabel computed!
last output array name: clean_deep_labels
last mrc file saved : cryovesnet/PFC_935_8-148_clean_deep_labels.mrc
CryoVesNet Pipeline: Making vesicles spherical.
fitting sphere to vesicles: 0%| | 0/1 [00:00<?, ?it/s]get_shift_between_images failed, shift set to 0,0,0
fitting sphere to vesicles: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 302.16it/s]
0
Traceback (most recent call last):
File "/data001/scripts/single_dataset_pathlib.py", line 45, in
df = pl2.make_spheres(tight=True, keep_ellipsoid=False)
File "/home/software/CryoVesNet/cryovesnet/pipeline.py", line 621, in make_spheres
_ , ellipsoid_tags = self.compute_sphere_dataframe(input_array_name, tight= tight,keep_ellipsoid=keep_ellipsoid)
File "/home/software/CryoVesNet/cryovesnet/pipeline.py", line 597, in compute_sphere_dataframe
sphere_df['p'] = 1 - chi2.cdf(sphere_df['mahalanobis'], 2)
File "/home/software/anaconda3/envs/CryoVesNet/lib/python3.9/site-packages/scipy/stats/_distn_infrastructure.py", line 2077, in cdf
place(output, (1-cond0)+np.isnan(x), self.badvalue)
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
end of error message.
I tried to change multiple variables, such as with or without mod files, or specifying the weight path, or using different augmentation 1 or 4, etc. None of them generates reasonable segmentations of the vesicles.
Did I miss something when following your protocols?
Thanks in advance
Bob
Hi there,
I encountered errors when running the following lines:
inside the single_dataset_pathlib.py
dataset_directory = Path("/data001/data")
active_zone_mod_path = Path("/data001/data")
vesicle_mod_path = Path("/data001/data")
pl2 = cryovesnet.Pipeline(dataset_directory,pattern='*.mrc')
pl2.setup_cryovesnet_dir(initialize=False, make_masks=True)
pl2.run_deep(force_run=False,augmentation_level=4,rescale=None, weight_path=None)
pl2.rescale(force_run=False,slice_range=[10,130])
WARNING:tensorflow:From /home/software/anaconda3/envs/CryoVesNet/lib/python3.9/site-packages/tensorflow/python/compat/v2_compat.py:107: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
Instructions for updating:
non-resource variables are not supported in the long term
CryoVesNet Pipeline: the pipeline is created for /data001/data
*.mrc
Pixel size: 1.2119999885559083
CryoVesNet Pipeline: setting up cryovesnet directory
/data001/data/cryovesnet
Painting section 140
Painting section 140
Rescale Factor: 0.550909085707231
CryoVesNet pipeline: Running unet segmentation if there are less than 4 file in ./deep directory
(?, 32, 32, 32, 1)
5
ROI: 24
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [03:14<00:00, 48.54s/it]
(78, 564, 564)
(78, 564, 564)
ROI: 24
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [03:12<00:00, 48.06s/it]
(78, 564, 564)
(78, 564, 564)
ROI: 24
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [03:05<00:00, 46.45s/it]
(78, 564, 564)
(78, 564, 564)
ROI: 24
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [03:05<00:00, 46.38s/it]
(78, 564, 564)
(78, 564, 564)
CryoVesNet Pipeline: zooming the unet mask
(141, 1024, 1024)
last output array name: deep_mask
last mrc file saved : cryovesnet/PFC_935_8-148_zoomed_mask.mrc
CryoVesNet Pipeline: running label_vesicles
CryoVesNet Pipeline: restricting labels to segmentation region
last output array name: deep_mask
last mrc file saved : cryovesnet/PFC_935_8-148_zoomed_mask.mrc
Threshold: 0.002
last output array name: deep_labels
last mrc file saved : cryovesnet/PFC_935_8-148_deep_labels.mrc
CryoVesNet Pipeline: running label_vesicles_adaptive
Tabel computed!
Collision vesicles:
Empty DataFrame
Columns: [label, area, centroid-0, centroid-1, centroid-2, bbox-0, bbox-1, bbox-2, bbox-3, bbox-4, bbox-5, extent, area_zscore, extent_zscore]
Index: []
Tabel computed!
Vesicles to remove:
Empty DataFrame
Columns: [area, centroid-0, centroid-1, centroid-2, bbox-0, bbox-1, bbox-2, bbox-3, bbox-4, bbox-5, extent, area_zscore, extent_zscore]
Index: []
Tabel computed!
last output array name: clean_deep_labels
last mrc file saved : cryovesnet/PFC_935_8-148_clean_deep_labels.mrc
CryoVesNet Pipeline: Making vesicles spherical.
fitting sphere to vesicles: 0%| | 0/1 [00:00<?, ?it/s]get_shift_between_images failed, shift set to 0,0,0
fitting sphere to vesicles: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 302.16it/s]
0
Traceback (most recent call last):
File "/data001/scripts/single_dataset_pathlib.py", line 45, in
df = pl2.make_spheres(tight=True, keep_ellipsoid=False)
File "/home/software/CryoVesNet/cryovesnet/pipeline.py", line 621, in make_spheres
_ , ellipsoid_tags = self.compute_sphere_dataframe(input_array_name, tight= tight,keep_ellipsoid=keep_ellipsoid)
File "/home/software/CryoVesNet/cryovesnet/pipeline.py", line 597, in compute_sphere_dataframe
sphere_df['p'] = 1 - chi2.cdf(sphere_df['mahalanobis'], 2)
File "/home/software/anaconda3/envs/CryoVesNet/lib/python3.9/site-packages/scipy/stats/_distn_infrastructure.py", line 2077, in cdf
place(output, (1-cond0)+np.isnan(x), self.badvalue)
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
end of error message.
I tried to change multiple variables, such as with or without mod files, or specifying the weight path, or using different augmentation 1 or 4, etc. None of them generates reasonable segmentations of the vesicles.
Did I miss something when following your protocols?
Thanks in advance
Bob