Mohinta2892 / catena

Neuron Segmentation, Synaptic Partner Detection and Microtubule tracking for vEM with EM-2-EM translation. Codebase built upon Funke lab's algorithms.
7 stars 1 forks source link

Code replication errors in a different machine - AssertionError: The provided ROI offset is not a multiple of voxel_size #26

Closed Mohinta2892 closed 3 months ago

Mohinta2892 commented 3 months ago

Error:

Traceback (most recent call last):
  File "/home/tom/Documents/Internship/Samia/catena/local_shape_descriptors/predicter.py", line 109, in <module>
    predict(cfg)
  File "/home/tom/Documents/Internship/Samia/catena/local_shape_descriptors/engine/predict/predict_3d.py", line 107, in predict
    prepare_predict_datasets(cfg, dtype=np.uint8, voxel_size=voxel_size, ds_key=out_raw, ds_size=input_size,
  File "/home/tom/Documents/Internship/Samia/catena/local_shape_descriptors/add_ons/funlib_persistence/persistence_utils.py", line 21, in prepare_predict_datasets
    prepare_ds(
  File "/home/tom/ENTER/envs/funkelsd_2/lib/python3.10/site-packages/funlib/persistence/arrays/datasets.py", line 246, in prepare_ds
    assert total_roi.begin.is_multiple_of(
AssertionError: The provided ROI offset is not a multiple of voxel_size

Solution:

Check your input zarr file, it should be 3D in (z,y,x) and it should atleast be a multiple of the voxel_size. Example: if your voxel_size is (8,8,8), make sure your zarr has a shape (256,256,256) and the input_shape in config is (196,196,196), w/o GROW_INPUT set. (GROW_INPUT can be a multiple of voxel_size within the dimensions of original shape of input or can be set to (0,0,0). It is for giving the model additional context during inference.)

Your input data must be larger than the input_shape set in config.