lung-cancer-detection
lung-cancer-detection copied to clipboard
AttributeError: 'tuple' object has no attribute 'endswith'
- Hello! i'm using this code: "lung-cancer-detection/nbs/08_Image_Reader.ipynb"
data_dict = {"image": "images/LIDC-IDRI-0133.npy", "label": "masks/LIDC-IDRI-0133.npy"} print(data_dict) loader = LoadImaged(keys=("image", "label")) loader.register(LIDCReader(DATA_DIR)) data_dict = loader(data_dict)
- but jupyter warning like this "AttributeError: 'tuple' object has no attribute 'endswith'" and jupyter warning it in "lung-cancer-detection/lung_cancer_detection/data/reader.py"
def verify_suffix(self, filename: str) -> bool: """ Verify whether the specified file format is supported by LIDCReader. Args: filename (Union[Sequence[str], str]): file name or a list of file names to read (should always be one file for LIDC dataset) Returns: bool: if file format is supported """ if isinstance(filename, list): raise ValueError( "LIDCReader only supports individual files to be loaded.") return filename.endswith(".npy")
- How can i fix it?