Skip to content

PaddleDetection train.py训练时,ppdet\modeling\backbones\mobilenet_v3.py", line 455, x = self.conv1(inputs['image']),KeyError: 'image', #9444

@yinhuGitHub

Description

@yinhuGitHub

问题确认 Search before asking

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

请提出你的问题 Please ask your question

按照官方文档https://www.paddleocr.ai/v2.9/applications/%E5%8D%B0%E7%AB%A0%E5%BC%AF%E6%9B%B2%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB.html#4,训练自定义VOC数据集报错:KeyError: 'image'

ppyolo_mbv3_large_voc.yml内容如下:

metric: VOC
map_type: 11point
num_classes: 1
use_gpu: gpu
save_dir: ./save_dir
worker_num: 1

architecture: YOLOv3
pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/MobileNetV3_large_x1_0_ssld_pretrained.pdparams
norm_type: sync_bn
use_ema: true
ema_decay: 0.9998

YOLOv3:
backbone: MobileNetV3
neck: PPYOLOFPN
yolo_head: YOLOv3Head
post_process: BBoxPostProcess

MobileNetV3:
model_name: large
scale: 1.
with_extra_blocks: false
extra_block_filters: []
feature_maps: [13, 16]

PPYOLOFPN:
in_channels: [160, 368]
coord_conv: true
conv_block_num: 0
spp: true
drop_block: true

YOLOv3Head:
anchors: [[11, 18], [34, 47], [51, 126],
[115, 71], [120, 195], [254, 235]]
anchor_masks: [[3, 4, 5], [0, 1, 2]]
loss: YOLOv3Loss

YOLOv3Loss:
ignore_thresh: 0.5
downsample: [32, 16]
label_smooth: false
scale_x_y: 1.05
iou_loss: IouLoss

IouLoss:
loss_weight: 2.5
loss_square: true

BBoxPostProcess:
decode:
name: YOLOBox
conf_thresh: 0.005
downsample_ratio: 32
clip_bbox: true
scale_x_y: 1.05
nms:
name: MultiClassNMS
keep_top_k: 100
nms_threshold: 0.45
nms_top_k: 1000
score_threshold: 0.005

TrainDataset:
!VOCDataSet
dataset_dir: PaddleDetection/dataset/voc/
anno_path: trainval.txt
label_list: label_list.txt
data_fields: ['image', 'gt_bbox', 'gt_class', 'difficult']

EvalDataset:
!VOCDataSet
dataset_dir: PaddleDetection/dataset/voc/
anno_path: test.txt
label_list: label_list.txt
data_fields: ['image', 'gt_bbox', 'gt_class', 'difficult']

TestDataset:
!ImageFolder
anno_path: PaddleDetection/dataset/voc/label_list.txt

BBoxPostProcess:
decode:
name: YOLOBox
conf_thresh: 0.005
downsample_ratio: 32
clip_bbox: true
scale_x_y: 1.05
nms:
name: MultiClassNMS
keep_top_k: 10 # 修改前100
nms_threshold: 0.45
nms_top_k: 100 # 修改前1000
score_threshold: 0.005

epoch: 270

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions