I am working on some mri images that have .nii.gz form, and their respective masks that are .nrrd type. I ziped the folders containing the images and the masks and uploaded them on kaggle. The masks work file, but the the notebook does not seem to recognize the patient files, but you can see them on the file explorer on the right of the notebook, as empty folders instead of files. My guess is that kaggle tries to unzip the .gz resulting in empty directories.
here are the images in the file explore
and here you can see the masks
when i copy file path for masks this works fine
os.path.isfile('/kaggle/input/arcin-data/resampled_masks/resampled_masks/segmentation101.nrrd')
True
but this prints out false
os.path.isdir('/kaggle/input/arcin-data/Acrin_data/Acrin_data')
False
even thought I can see that the folder at least exists
Finally, this is from the description of the dataset



I found the answer, the problem was that .nii files are actually compressed, they were .nii.gz so kaggle thought they were separate directories and not the actual files, so it tried to decompress them but found nothing inside. I solved it by reading them locally and creating a new dataset with .pt files for the images and read them as such.