Bobholamovic / CDLab

Yet another repository for developing and benchmarking deep learning-based change detection methods.
The Unlicense
196 stars 30 forks source link

关于WHU-CD数据集 #14

Open TingFinn opened 1 year ago

TingFinn commented 1 year ago

您好!我在使用WHU-CD数据集进行训练时产生了以下问题: File "/home/PycharmProjects/My_CD/CDLab/src/core/factories.py", line 225, in data_factory return single_data_factory(dataset_names, phase, C) File "/home/PycharmProjects/My_CD/CDLab/src/core/factories.py", line 183, in single_data_factory return DATAbuilder_name File "/home/PycharmProjects/My_CD/CDLab/src/impl/builders/data_builders.py", line 106, in build_whu_train_dataset return build_train_dataloader(WHUDataset, configs, C) File "/home/PycharmProjects/My_CD/CDLab/src/core/data.py", line 18, in build_train_dataloader drop_last=True File "/home/anaconda3/envs/CDLab/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 344, in init sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type] File "/home/anaconda3/envs/CDLab/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 108, in init "value, but got num_samples={}".format(self.num_samples)) ValueError: num_samples should be a positive integer value, but got num_samples=0

能否请您解答一下?

Bobholamovic commented 1 year ago

看起来可能是数据集路径或者格式有误,程序没能正确读到样本

Kent-xiong commented 1 year ago

@Bobholamovic 你好!很感谢你开源优秀的代码,我想请教一个whu数据集的问题。我按代码尝试了script中的两个whu的预处理,但我在训练时得到的效果都不太理想,recall和F1值都很低很低。这里关于参数我采用默认的配置,请问是需要做额外的处理吗

Bobholamovic commented 1 year ago

@Bobholamovic 你好!很感谢你开源优秀的代码,我想请教一个whu数据集的问题。我按代码尝试了script中的两个whu的预处理,但我在训练时得到的效果都不太理想,recall和F1值都很低很低。这里关于参数我采用默认的配置,请问是需要做额外的处理吗

不需要做额外的处理,使用仓库里提供的默认配置应该就可以复现论文里的指标。如果出现精度『很低很低』的情况是不太正常的,可能需要考虑数据和代码是否有问题,建议如果必要的话可以断点调试看看。另外,WHU数据集的训练样本相对较少,容易出现精度波动的现象,但波动幅度一般也不会很大。