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

Run your own dataset #213

Open
Tanhongyun opened this issue Nov 29, 2023 · 2 comments
Open

Run your own dataset #213

Tanhongyun opened this issue Nov 29, 2023 · 2 comments

Comments

@Tanhongyun
Copy link

Hello, it seems like you're encountering an error while trying to convert your dataset from NIfTI format (nii.gz) to TIFF format (tif). The error message you provided indicates a problem with the code or data you are working with. Here's a translation of the error message and an explanation of the issue:
progress: 0.00, 0/1
processing PD_175.tiff
Traceback (most recent call last):
File "/home/chenwj/anaconda3/envs/clam/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 1432, in squeeze
squeeze = a.squeeze
AttributeError: 'NoneType' object has no attribute 'squeeze'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "create_patches_fp.py", line 309, in
process_list=process_list, auto_skip=args.no_auto_skip)
File "create_patches_fp.py", line 185, in seg_and_patch
WSI_object, seg_time_elapsed = segment(WSI_object, current_seg_params, current_filter_params)
File "create_patches_fp.py", line 30, in segment
WSI_object.segmentTissue(**seg_params, filter_params=filter_params)
File "/home/chenwj/clam/CLAM/wsi_core/WholeSlideImage.py", line 169, in segmentTissue
hierarchy = np.squeeze(hierarchy, axis=(0,))[:, 2:]
File "<array_function internals>", line 6, in squeeze
File "/home/chenwj/anaconda3/envs/clam/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 1434, in squeeze
return _wrapit(a, 'squeeze', axis=axis)
File "/home/chenwj/anaconda3/envs/clam/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 47, in _wrapit
result = getattr(asarray(obj), method)(*args, **kwds)
numpy.AxisError: axis 0 is out of bounds for array of dimension 0

@XNN19
Copy link

XNN19 commented Jan 22, 2024

Hi, did you solve this problem? I meet the same one :(

@siemdejong
Copy link

I experienced this issue too. For me this happened, because I tried to use binary masks as a proxy and use those to get opencv contours. This didn't work, as the binary rgb images were converted to hsv color space internally, resulting in only zeros in the saturation channel. The saturation channel is used to compute contours on, resulting in no contours. Since there was no contour/hierarchy, hierarchy = np.squeeze(hierarchy, axis=(0,))[:, 2:] failed.

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

3 participants