PaddlePaddle / PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Apache License 2.0
12.43k stars 2.85k forks source link

assert ct > 0, 'not found any coco record in %s' % (anno_path) #6972

Open monkeycc opened 1 year ago

monkeycc commented 1 year ago

问题确认 Search before asking

请提出你的问题 Please ask your question

[09/19 22:12:31] ppdet.data.source.coco WARNING: Illegal image file: I:\2022\MsCOCO_dataset\Train\MM_3_A_22.jpg, and it will be ignored [09/19 22:12:31] ppdet.data.source.coco WARNING: Illegal image file: I:\2022\MsCOCO_dataset\Train\MM_3_A_23.jpg, and it will be ignored [09/19 22:12:31] ppdet.data.source.coco WARNING: Illegal image file: I:\2022\MsCOCO_dataset\Train\MM_3_A_24.jpg, and it will be ignored [09/19 22:12:31] ppdet.data.source.coco WARNING: Illegal image file: I:\2022\MsCOCO_dataset\Train\MM_3_A_25.jpg, and it will be ignored [09/19 22:12:31] ppdet.data.source.coco WARNING: Illegal image file: I:\2022\MsCOCO_dataset\Train\MM_3_A_26.jpg, and it will be ignored [09/19 22:12:31] ppdet.data.source.coco WARNING: Illegal image file: I:\2022\MsCOCO_dataset\Train\MM_3_A_27.jpg, and it will be ignored [09/19 22:12:31] ppdet.data.source.coco WARNING: Illegal image file: I:\2022\MsCOCO_dataset\Train\MM_3_A_28.jpg, and it will be ignored [09/19 22:12:31] ppdet.data.source.coco WARNING: Illegal image file: I:\2022\MsCOCO_dataset\Train\MM_3_A_29.jpg, and it will be ignored [09/19 22:12:31] ppdet.data.source.coco WARNING: Illegal image file: I:\2022\MsCOCO_dataset\Train\MM_3_A_30.jpg, and it will be ignored Traceback (most recent call last): File "tools/train.py", line 172, in main() File "tools/train.py", line 168, in main run(FLAGS, cfg) File "tools/train.py", line 123, in run trainer = Trainer(cfg, mode='train') File "I:\Paddle\PaddleDetection\ppdet\engine\trainer.py", line 94, in init self.loader = create('{}Reader'.format(capital_mode))( File "I:\Paddle\PaddleDetection\ppdet\data\reader.py", line 163, in call self.dataset.parse_dataset() File "I:\Paddle\PaddleDetection\ppdet\data\source\coco.py", line 225, in parse_dataset assert ct > 0, 'not found any coco record in %s' % (anno_path) AssertionError: not found any coco record in I:\2022\MsCOCO_dataset\Annotation\Train.json

metric: COCO num_classes: 1

TrainDataset: !COCODataSet image_dir: Train anno_path: I:\2022\MsCOCO_dataset\Annotation\Train.json dataset_dir: I:\2022\MsCOCO_dataset\ data_fields: ['image', 'gt_bbox', 'gt_class', 'gt_poly', 'is_crowd']

EvalDataset: !COCODataSet image_dir: Val anno_path: I:\2022\MsCOCO_dataset\Annotation\Val.json dataset_dir: I:\2022\MsCOCO_dataset\Val

TestDataset: !ImageFolder anno_path: I:\2022\MsCOCO_dataset\Annotation\Test.json # also support txt (like VOC's label_list.txt) dataset_dir: I:\2022\MsCOCO_dataset\Test # if set, anno_path will be 'dataset_dir/anno_path'

nemonameless commented 1 year ago

数据集路径没配置对,请自查路径I:\2022\MsCOCO_dataset\Train\。 自定义数据集请先自查制作和可视化gt,确保没问题后再训练。

monkeycc commented 1 year ago

怎么自查 PaddleDetection是否有脚本提供

可视化gt是什么 PaddleDetection自带有吗

Overtrued commented 1 year ago

请问怎么样了

cr1127 commented 1 year ago

@monkeycc 请问,您这个问题解决了吗

Overtrued commented 1 year ago

换了数据集,没解决

在 2022-11-28 16:10:54,"cr1127" @.***> 写道:

@monkeycc 请问,您这个问题解决了吗

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

monkeycc commented 1 year ago

1.文件名有问题 2. 标注的文件 框大于图片的尺寸 导致图片 没有框 @cr1127 @Overtrued

aaaeric026 commented 8 months ago

我和你有一摸一样的问题,请问您解决了吗

LyraZeta commented 8 months ago

@monkeycc 太强啦

HuangJi1019 commented 7 months ago

路径有问题,修改后正常运行

todesti2 commented 7 months ago

路径有问题,修改后正常运行

你好,我的也有这个问题,但是我仔细检查了路径,并没有错误

feifaxiaoming commented 2 weeks ago

123 把coco.py中的对应位置,修改成截图右边的就好了