PaddleDetection icon indicating copy to clipboard operation
PaddleDetection copied to clipboard

使用create_list生成trainval.txt和test.txt文件出错

Open wyh669 opened this issue 5 years ago • 2 comments

aistudio@jupyter-879124-2205815:~/work/PaddleDetection$ python dataset/voc/create_list.py -d ~/fire_dataset

Traceback (most recent call last):
  File "dataset/voc/create_list.py", line 45, in <module>
    main(config)
  File "dataset/voc/create_list.py", line 31, in main
    create_voc_list(voc_path)
  File "/home/aistudio/work/PaddleDetection/ppdet/utils/download.py", line 157, in create_voc_list
    create_list(year_dirs, data_dir)
  File "/home/aistudio/work/PaddleDetection/ppdet/utils/voc_utils.py", line 37, in create_list
    trainval, test = _walk_voc_dir(year_dir, output_dir)
  File "/home/aistudio/work/PaddleDetection/ppdet/utils/voc_utils.py", line 84, in _walk_voc_dir
    osp.relpath(img_dir, output_dir), img_dict[name_prefix])
KeyError: 'img'

wyh669 avatar Jul 20 '21 08:07 wyh669

确保VOC数据格式没问题吧。代码里没有 img 变量,建议voc_utils.py:84行debug看下。

https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.1/ppdet/utils/voc_utils.py#L84

qingqing01 avatar Jul 22 '21 05:07 qingqing01

Since this issue has not been updated for more than three months, it will be closed, if it is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up. It is recommended to pull and try the latest code first. 由于该问题超过三个月未更新,将会被关闭,若问题未解决或有后续问题,请随时重新打开(建议先拉取最新代码进行尝试),我们会继续跟进。

paddle-bot-old avatar Mar 16 '22 06:03 paddle-bot-old