Open wwp-max opened 2 years ago
数据格式不对
不是数据格式不对,是你的util里面的get_datalist写错了:line = line.strip('\n').replace('.jpg ', '.jpg\t').split('\t') 。train.txt 的格式是img \t gt 的话replace之后就有两个\t。作者改一下源码把replace去掉或者把train.txt 的格式改一下
@KKjiaming 改完还是不太对
debug看看哦,很简单的
Traceback (most recent call last): File "C:/Users/Lenovo/DBNet.pytorch/tools/train.py", line 79, in
main(config)
File "C:/Users/Lenovo/DBNet.pytorch/tools/train.py", line 41, in main
validate_loader = get_dataloader(config['dataset']['validate'], False)
File "C:\Users\Lenovo\DBNet.pytorch\data_loader__init__.py", line 84, in get_dataloader
_dataset = get_dataset(data_path=data_path, module_name=dataset_name, transform=img_transfroms, dataset_args=dataset_args)
File "C:\Users\Lenovo\DBNet.pytorch\data_loader__init.py", line 23, in get_dataset
s_dataset = getattr(dataset, module_name)(transform=transform, data_path=data_path,
File "C:\Users\Lenovo\DBNet.pytorch\data_loader\dataset.py", line 17, in init
super().init(data_path, img_mode, pre_processes, filter_keys, ignore_tags, transform)
File "C:\Users\Lenovo\DBNet.pytorch\base\base_dataset.py", line 18, in init__
assert item in self.data_list[0], 'data_list from load_data must contains {}'.format(item_keys)
IndexError: list index out of range
配置文件修改成功后,运行train.py就报了这个错误,请问有人知道是什么原因吗?