PaddleDetection icon indicating copy to clipboard operation
PaddleDetection copied to clipboard

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

Open monkeycc opened this issue 2 years ago • 11 comments

问题确认 Search before asking

  • [X] 我已经搜索过问题,但是没有找到解答。I have searched the question and found no related answer.

请提出你的问题 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'

monkeycc avatar Sep 19 '22 14:09 monkeycc

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

nemonameless avatar Sep 19 '22 14:09 nemonameless

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

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

monkeycc avatar Sep 19 '22 14:09 monkeycc

请问怎么样了

Overtrued avatar Nov 04 '22 06:11 Overtrued

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

cr1127 avatar Nov 28 '22 08:11 cr1127

换了数据集,没解决

在 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: @.***>

Overtrued avatar Dec 09 '22 09:12 Overtrued

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

monkeycc avatar Dec 09 '22 09:12 monkeycc

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

aaaeric026 avatar Nov 12 '23 13:11 aaaeric026

@monkeycc 太强啦

LyraZeta avatar Nov 24 '23 12:11 LyraZeta

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

HuangJi1019 avatar Dec 12 '23 13:12 HuangJi1019

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

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

todesti2 avatar Dec 14 '23 08:12 todesti2

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

feifaxiaoming avatar Jul 02 '24 08:07 feifaxiaoming