WARNING: Dataset not found, nonexistent paths: ['/home/sensestudy/work/current/yolov5/datasets/VOC/val.txt'] --------------------------------------------------------------------------- Exception Traceback (most recent call last) ~/work/current/答案代码/train.py in <module> 614 if name == "main": 615 opt = parse_opt() --> 616 main(opt) ~/work/current/答案代码/train.py in main(opt) 512 # Train 513 if not opt.evolve: --> 514 train(opt.hyp, opt, device) 515 if WORLD_SIZE > 1 and RANK == 0: 516 _ = [print('Destroying process group... ', end=''), dist.destroy_process_group(), print('Done.')] ~/work/current/答案代码/train.py in train(hyp, opt, device, callbacks) 97 init_seeds(1 + RANK) 98 with torch_distributed_zero_first(RANK): ---> 99 data_dict = data_dict or check_dataset(data) # check if None 100 train_path, val_path = data_dict['train'], data_dict['val'] 101 nc = 1 if single_cls else int(data_dict['nc']) # number of classes ~/work/current/答案代码/utils/general.py in check_dataset(data, autodownload) 298 print('Dataset autodownload %s\n' % ('success' if r in (0, None) else 'failure')) # print result 299 else: --> 300 raise Exception('Dataset not found.') 301 302 return data # dictionary Exception: Dataset not found.
时间: 2023-09-26 15:07:33 浏览: 181
根据你的错误提示,看起来代码无法找到数据集。你需要检查一下数据集的路径是否正确,并且确保数据集中包含 `val.txt` 文件。如果数据集不存在,则需要下载或创建一个新的数据集。你可以使用以下命令来下载 PASCAL VOC 数据集:
```
python3 manage.py download_voc_dataset
```
这将下载并提取 PASCAL VOC 数据集。确保在你的代码中使用正确的数据集路径,并且数据集中包含 `val.txt` 文件。如果问题仍然存在,请检查代码中的数据集加载部分,并确保路径和文件名正确。
阅读全文