1. Error message:
Loading trainer: ALVLM
Loading dataset: Caltech101
Image directory:C:\Users\86187\Desktop\source\py\CV\DA\pcb\configs\datasets\caltech-101
Splitting into 50% train, 20% val, and 30% test
Checking image path:C:\Users\86187\Desktop\source\py\CV\DA\pcb\configs\datasets\caltech-101\101_ObjectCategories\panda
C:\Users\86187\Desktop\source\py\CV\DA\pcb\dassl\utils\tools.py:55: UserWarning: No file found at "C:\Users\86187\Desktop\source\py\CV\DA\pcb\configs\datasets\caltech-101\101_ObjectCategories\panda"
warnings.warn('No file found at "{}"'.format(fpath))
Traceback (most recent call last):
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\train.py", line 213, in
main(args)
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\train.py", line 148, in main
trainer = build_trainer(cfg)
^^^^^^^^^^^^^^^^^^
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\dassl\engine\build.py", line 11, in build_trainer
return TRAINER_REGISTRY.get(cfg.TRAINER.NAME)(cfg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\trainers\alvlm.py", line 293, in init
super().init(cfg)
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\dassl\engine\trainer.py", line 324, in init
self.build_data_loader()
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\dassl\engine\trainer.py", line 347, in build_data_loader
dm = DataManager(self.cfg)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\dassl\data\data_manager.py", line 61, in init
dataset = build_dataset(cfg)
^^^^^^^^^^^^^^^^^^
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\dassl\data\datasets\build.py", line 11, in build_dataset
return DATASET_REGISTRY.get(cfg.DATASET.NAME)(cfg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\datasets\caltech101.py", line 42, in init
train, val, test = DTD.read_and_split_data(self.image_dir, ignored=IGNORED, new_cnames=NEW_CNAMES)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\datasets\dtd.py", line 91, in read_and_split_data
train.extend(_collate(images[:n_train], label, category))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\datasets\dtd.py", line 72, in _collate
item = Datum(impath=im, label=y, classname=c) # is already 0-based
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\dassl\data\datasets\base_dataset.py", line 26, in init
assert check_isfile(impath)
^^^^^^^^^^^^^^^^^^^^
AssertionError
2.I ran the following command under git-bash :sudo CUDA_VISIBLE_DEVICES=0 sh ./scripts/alvlm/main.sh caltech-101 vit_32 random 0 AS
The cloned library is the latest commit
3.I've changed the location
In the process of recoding,I put the101_ObjectCategories and split_zhou_Caltech101.json in caltech-101 as requested,then I put caltech-101 into configs/datasets/,I add the PATH: "C:\\Users\\86187\\Desktop\\source\\py\\CV\\DA\\pcb\\configs\\datasets\\caltech-101"
in DATASET of caltech-101.yaml.
In caltech101.py,I changed this line of code self.image_dir = os.path.join(self.dataset_dir, "101_ObjectCategories") to something like this: self.image_dir = cfg.DATASET.PATH.
In main.sh,I changed this line of code DATA=/go/to/data # YOU NEED TO FIX IT to something like this: DATA=C:/Users/86187/Desktop/source/py/CV/DA/pcb/configs/datasets/caltech-101
4. I think possible bugs
Some files or subdirectories in the caltech-101 dataset may be missing or paths misconfigured or self.image_dir may be configured as an invalid or non-existent path, causing problems with dataset loading.
1. Error message:
Loading trainer: ALVLM
Loading dataset: Caltech101
Image directory:C:\Users\86187\Desktop\source\py\CV\DA\pcb\configs\datasets\caltech-101
Splitting into 50% train, 20% val, and 30% test
Checking image path:C:\Users\86187\Desktop\source\py\CV\DA\pcb\configs\datasets\caltech-101\101_ObjectCategories\panda
C:\Users\86187\Desktop\source\py\CV\DA\pcb\dassl\utils\tools.py:55: UserWarning: No file found at "C:\Users\86187\Desktop\source\py\CV\DA\pcb\configs\datasets\caltech-101\101_ObjectCategories\panda"
warnings.warn('No file found at "{}"'.format(fpath))
Traceback (most recent call last):
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\train.py", line 213, in
main(args)
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\train.py", line 148, in main
trainer = build_trainer(cfg)
^^^^^^^^^^^^^^^^^^
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\dassl\engine\build.py", line 11, in build_trainer
return TRAINER_REGISTRY.get(cfg.TRAINER.NAME)(cfg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\trainers\alvlm.py", line 293, in init
super().init(cfg)
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\dassl\engine\trainer.py", line 324, in init
self.build_data_loader()
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\dassl\engine\trainer.py", line 347, in build_data_loader
dm = DataManager(self.cfg)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\dassl\data\data_manager.py", line 61, in init
dataset = build_dataset(cfg)
^^^^^^^^^^^^^^^^^^
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\dassl\data\datasets\build.py", line 11, in build_dataset
return DATASET_REGISTRY.get(cfg.DATASET.NAME)(cfg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\datasets\caltech101.py", line 42, in init
train, val, test = DTD.read_and_split_data(self.image_dir, ignored=IGNORED, new_cnames=NEW_CNAMES)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\datasets\dtd.py", line 91, in read_and_split_data
train.extend(_collate(images[:n_train], label, category))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\datasets\dtd.py", line 72, in _collate
item = Datum(impath=im, label=y, classname=c) # is already 0-based
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86187\Desktop\source\py\CV\DA\pcb\dassl\data\datasets\base_dataset.py", line 26, in init
assert check_isfile(impath)
^^^^^^^^^^^^^^^^^^^^
AssertionError
2.I ran the following command under git-bash :sudo CUDA_VISIBLE_DEVICES=0 sh ./scripts/alvlm/main.sh caltech-101 vit_32 random 0 AS
The cloned library is the latest commit
3.I've changed the location
In the process of recoding,I put the101_ObjectCategories and split_zhou_Caltech101.json in caltech-101 as requested,then I put caltech-101 into configs/datasets/,I add the
PATH: "C:\\Users\\86187\\Desktop\\source\\py\\CV\\DA\\pcb\\configs\\datasets\\caltech-101"in DATASET of caltech-101.yaml.
In caltech101.py,I changed this line of code
self.image_dir = os.path.join(self.dataset_dir, "101_ObjectCategories")to something like this:self.image_dir = cfg.DATASET.PATH.In main.sh,I changed this line of code
DATA=/go/to/data # YOU NEED TO FIX ITto something like this:DATA=C:/Users/86187/Desktop/source/py/CV/DA/pcb/configs/datasets/caltech-1014. I think possible bugs
Some files or subdirectories in the caltech-101 dataset may be missing or paths misconfigured or self.image_dir may be configured as an invalid or non-existent path, causing problems with dataset loading.