You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran the patch creator script to generate h5 files. I then ran the 'create_features_fp.py' script to obtain feature vectors.
However, I get the following error:
Traceback (most recent call last):
File "/rds/general/user/kp4718/home/RCS_help/CLAM/extract_features_fp.py", line 100, in
dataset = Whole_Slide_Bag_FP(file_path=h5_file_path,
File "/rds/general/user/kp4718/home/RCS_help/CLAM/dataset_modules/dataset_h5.py", line 65, in init
self.patch_level = f['coords'].attrs['patch_level']
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "/rds/general/user/kp4718/home/anaconda3/envs/clam_latest/lib/python3.10/site-packages/h5py/_hl/attrs.py", line 56, in getitem
attr = h5a.open(self._id, self._e(name))
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5a.pyx", line 80, in h5py.h5a.open
KeyError: "Unable to synchronously open attribute (can't locate attribute: 'patch_level')"
I checked the h5 files and I found that they do not have the attribute patch_level.
What options should I give to create_patches.py to avoid this error?
I ran it as follows: python create_patches.py --source surformerpat --save_dir surformertiles --patch_size 256 --patch_level 2 --seg --patch --stitch
The text was updated successfully, but these errors were encountered:
Hi,
I ran the patch creator script to generate h5 files. I then ran the 'create_features_fp.py' script to obtain feature vectors.
However, I get the following error:
Traceback (most recent call last):
File "/rds/general/user/kp4718/home/RCS_help/CLAM/extract_features_fp.py", line 100, in
dataset = Whole_Slide_Bag_FP(file_path=h5_file_path,
File "/rds/general/user/kp4718/home/RCS_help/CLAM/dataset_modules/dataset_h5.py", line 65, in init
self.patch_level = f['coords'].attrs['patch_level']
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "/rds/general/user/kp4718/home/anaconda3/envs/clam_latest/lib/python3.10/site-packages/h5py/_hl/attrs.py", line 56, in getitem
attr = h5a.open(self._id, self._e(name))
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5a.pyx", line 80, in h5py.h5a.open
KeyError: "Unable to synchronously open attribute (can't locate attribute: 'patch_level')"
I checked the h5 files and I found that they do not have the attribute patch_level.
What options should I give to create_patches.py to avoid this error?
I ran it as follows: python create_patches.py --source surformerpat --save_dir surformertiles --patch_size 256 --patch_level 2 --seg --patch --stitch
The text was updated successfully, but these errors were encountered: