erturklab / delivr_cfos

End-to-end light-sheet image analysis for mouse brains, with DL training data generated in VR
https://www.discotechnologies.org/DELiVR/
MIT License
28 stars 3 forks source link

ERROR (Downsampled list empty!): #7

Open cosmo71 opened 5 months ago

cosmo71 commented 5 months ago

Our testing setup utilizes the raw data provided. We found that each .tif file contains one frame and the downsampling expects multiple frames as it has a for loop to run through each of the frames in a .tif file. Clarification on the downsampling process or any potential configuration adjustments needed would be highly beneficial.

We are getting this "IndexError: cannot do a non-empty take from an empty axes." which can be traced back to the downsample list being empty.

Output: Loading config.json

Transformed paths in config file.

Making /data/output/04_atlas_alignment/collection/

HOOK:OVERALL:6

Masking

HOOK:1:6:0:717

2024-05-16 16:08:20.035569 : Defining downsampling folders

2024-05-16 16:08:20.035569 : Downsampling

2024-05-16 16:08:25.995693 : Saving downsampled stacks

Downsampled list empty!

C:\ProgramData\anaconda3\envs\DELIVR\lib\site-packages\tifffile\tifffile.py:2151: UserWarning: <tifffile.TiffWriter 'stack_resampled.tif'> writing zero-size array to nonconformant TIFF

warnings.warn(

Traceback (most recent call last):

File "main.py", line 95, in

downsample_mask(settings, brain)  

File "[PATH NAME]\downsample_and_mask.py", line 671, in downsample_mask

downsampled_stack_8bit = histogram_equalization_8b(downsampled_stack)  

File "[PATH NAME]\downsample_and_mask.py", line 571, in histogram_equalization_8b

minval = round(np.percentile(stack.ravel(),1))  

File "<__array_function__ internals>", line 200, in percentile

File "[PATH NAME]\function_base.py", line 4205, in percentile

return _quantile_unchecked(  

File "[PATH NAME]\function_base.py", line 4473, in _quantile_unchecked

return _ureduce(a,  

File "[PATH NAME]\function_base.py", line 3752, in _ureduce

r = func(a, **kwargs)  

File "[PATH NAME]\function_base.py", line 4639, in _quantile_ureduce_func

result = _quantile(arr,  

File "[PATH NAME]\function_base.py", line 4745, in _quantile

take(arr, indices=-1, axis=DATA_AXIS)  

File "<__array_function__ internals>", line 200, in take

File "[PATH NAME]\fromnumeric.py", line 190, in take

return _wrapfunc(a, 'take', indices, axis=axis, out=out, mode=mode)  

File "[PATH NAME]\fromnumeric.py", line 57, in _wrapfunc

return bound(*args, **kwds)  

IndexError: cannot do a non-empty take from an empty axes.

Eddymorphling commented 3 months ago

@cosmo71 Having similar issues when using the test dataset. Were you able to fix the issue? Any other advise??