BiaPy icon indicating copy to clipboard operation
BiaPy copied to clipboard

Error when loading data from directory using load_data_from_dir method

Open iarganda opened this issue 7 months ago • 0 comments

I'm trying to load some images from a directory using this code:

# load data
X_test, *_ = load_data_from_dir(cfg.DATA.TEST.PATH, is_3d=True)
Y_test, *_ = load_data_from_dir(cfg.DATA.TEST.GT_PATH, is_3d=True)

And I get the following error:

/usr/local/lib/python3.11/dist-packages/biapy/data/data_manipulation.py in load_data_from_dir(data_path, is_3d, **kwargs)
   1188             fname = samples_from_image_list
   1189 
-> 1190         data_samples = fname(list_of_data=list_of_images, **kwargs)
   1191 
   1192     print(f"Loading images from {data_path}")

TypeError: samples_from_image_list() missing 5 required positional arguments: 'data_path', 'crop_shape', 'ov', 'padding', and 'norm_module'

iarganda avatar Mar 27 '25 12:03 iarganda