KMnP / vpt

❄️🔥 Visual Prompt Tuning [ECCV 2022] https://arxiv.org/abs/2203.12119

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AssertionError: Datasets/Stanford_Dogs/train.json dir not found

JiuqingDong opened this issue · comments

I run this command and got an Error:

Tune CUB with VPT:

python tune_fgvc.py
--train-type "prompt"
--config-file configs/prompt/dogs.yaml
MODEL.TYPE "vit"
DATA.BATCH_SIZE "16"
MODEL.PROMPT.DEEP "True"
MODEL.PROMPT.DROPOUT "0.1"
MODEL.PROMPT.NUM_TOKENS "10"
DATA.FEATURE "sup_vitb16_imagenet21k"
DATA.DATAPATH "Datasets/Stanford_Dogs"
MODEL.MODEL_ROOT "models/"
OUTPUT_DIR "./output/"

[06/22 15:18:50 visual_prompt]: Loading training data (final training data for vtab)...
[06/22 15:18:50 visual_prompt]: Constructing StanfordDogs dataset train...
anno_path Datasets/Stanford_Dogs/train.json
Traceback (most recent call last):
File "tune_fgvc.py", line 208, in
main(args)
File "tune_fgvc.py", line 199, in main
prompt_main(args)
File "tune_fgvc.py", line 165, in prompt_main
train_main(cfg, args)
File "/home/multiai3/Jiuqing/VPT/train.py", line 102, in train
train_loader, val_loader, test_loader = get_loaders(cfg, logger)
File "/home/multiai3/Jiuqing/VPT/train.py", line 71, in get_loaders
train_loader = data_loader.construct_train_loader(cfg)
File "/home/multiai3/Jiuqing/VPT/src/data/loader.py", line 64, in construct_train_loader
drop_last=drop_last,
File "/home/multiai3/Jiuqing/VPT/src/data/loader.py", line 36, in _construct_loader
dataset = _DATASET_CATALOG[dataset_name](cfg, split)
File "/home/multiai3/Jiuqing/VPT/src/data/datasets/json_dataset.py", line 151, in init
super(DogsDataset, self).init(cfg, split)
File "/home/multiai3/Jiuqing/VPT/src/data/datasets/json_dataset.py", line 34, in init
self._construct_imdb(cfg)
File "/home/multiai3/Jiuqing/VPT/src/data/datasets/json_dataset.py", line 59, in _construct_imdb
anno = self.get_anno()
File "/home/multiai3/Jiuqing/VPT/src/data/datasets/json_dataset.py", line 46, in get_anno
assert os.path.exists(anno_path), "{} dir not found".format(anno_path)
AssertionError: Datasets/Stanford_Dogs/train.json dir not found

I search for this Error in Issues but no result. If you are available, could you tell me why I get this Error?

I get the same error,could you tell me why I get this Error?

I get the same error,could you tell me why I get this Error?

I forgot about this, but I guess you can generate a JSON file like this:
image
The example is Food101 dataset.

I get the same error,could you tell me why I get this Error?

I forgot about this, but I guess you can generate a JSON file like this: image The example is Food101 dataset.

Could you provide the train.json you generated, for you have done this experiment, ready-made json files can save my time and errors. Thanks.