justchenhao / STANet

official implementation of the spatial-temporal attention neural network (STANet) for remote sensing image change detection
BSD 2-Clause "Simplified" License
417 stars 110 forks source link

AssertionError: ./LEVIR-CD\A is not a valid directory #69

Open AntiYH opened 3 years ago

AntiYH commented 3 years ago

运行train.py时出现这个错误AssertionError: ./LEVIR-CD\A is not a valid directory

lm-ZHAO98 commented 3 years ago

你解决了么,应该是路径问题

chikchen123123 commented 2 years ago

麻烦问一下怎么解决的啊

nehcux commented 1 year ago

alter the dataroot default value to your disk path of LEVIR dataset located at base_options file,here's my options: parser.add_argument('--dataroot', type=str, default=r'F:\change_detection\LEVIR-CD\train'……

121zzy commented 1 year ago

AssertionError: path-to-LEVIR-CD-train/A is not a valid directory 出现这样的问题是修改哪里呢

121zzy commented 1 year ago

alter the dataroot default value to your disk path of LEVIR dataset located at base_options file,here's my options: parser.add_argument('--dataroot', type=str, default=r'F:\change_detection\LEVIR-CD\train'……

你好,运行这个时出来这个结果 python ./train.py --save_epoch_freq 1 --angle 15 --dataroot path-to-LEVIR-CD-train --val_dataroot path-to-LEVIR-CD-val --name LEVIR-CDF0 --lr 0.001 --model CDF0 --batch_size 8 --load_size 256 --crop_size 256 --preprocess rotate_and_crop changedetection 怎么修改路径,在哪里修改呀

Traceback (most recent call last): File "./train.py", line 108, in dataset = create_dataset(opt) # create a dataset given opt.dataset_mode and other options File "/media/disk1/li.tang/zhangzhongyu/STANet/data/init.py", line 48, in create_dataset data_loader = CustomDatasetDataLoader(opt) File "/media/disk1/li.tang/zhangzhongyu/STANet/data/init.py", line 86, in init self.dataset = dataset_class(opt) File "/media/disk1/li.tang/zhangzhongyu/STANet/data/changedetection_dataset.py", line 26, in init self.A_paths = sorted(make_dataset(os.path.join(opt.dataroot, folder_A), opt.max_dataset_size)) File "/media/disk1/li.tang/zhangzhongyu/STANet/data/image_folder.py", line 25, in make_dataset assert os.path.isdir(dir), '%s is not a valid directory' % dir AssertionError: path-to-LEVIR-CD-train/A is not a valid directory

Tgw2070 commented 1 year ago

在base_options dataroot', type=str, default='./LEVIR-CD/train'