最新版本paddleDetection(release/0.2)训练自己类别的时候出错(旧版本可以)
Created by: TianyouChen
最新版本paddleDetection训练自己类别的时候出错,而旧版本是可以换成自己的标签数据训练的
背景:最近用paddleDetecion做量化,而旧版版本有些api不支持,就把paddle、paddleslim、paddleDetection全部换成最新版,最后成功跑起VOC 21类目标检测检测量化训练,但是当我改标签跑自己数据时候出错了: 指令: python3 slim/quantization/train.py --not_quant_pattern slim_output --eval --c ./configs/ssd/ssd_mobilenet_v1_Headshoulder.yml -o max_iters=30000 save_dir=./output/mobilenetv1_slim LearningRate.base_lr=0.0001 LearningRate.schedulers="[!PiecewiseDecay {gamma: 0.1, milestones: [10000]}]" pretrain_weights=/home/chenchaocun/PaddleDetection_slim/best_model 错误信息: pretrain_weights: /home/chenchaocun/PaddleDetection_slim/best_model save_dir: ./output/mobilenetv1_slim snapshot_iter: 2000 test_feed: SSDTestFeed train_feed: SSDTrainFeed use_gpu: true weights: output/ssd_mobilenet_v1_Headshoulder_slim/model_final/
Traceback (most recent call last): File "slim/quantization/train.py", line 314, in main() File "slim/quantization/train.py", line 111, in main inputs_def = cfg['TrainReader']['inputs_def'] KeyError: 'TrainReader'
然后我不做量化训练,直接训练自己数据,发现只要我把PaddleDetection_slim/tools/ppdet/data/source/voc.py这里的标签改成自己的数据标签加载自己的数据,训练就出现错误: pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/ssd_mobilenet_v1_coco_pretrained.tar save_dir: output snapshot_iter: 2000 test_feed: SSDTestFeed train_feed: SSDTrainFeed use_gpu: true weights: output/ssd_mobilenet_v1_Headshoulder_slim/model_final/
Traceback (most recent call last): File "tools/train.py", line 323, in main() File "tools/train.py", line 114, in main inputs_def = cfg['TrainReader']['inputs_def'] KeyError: 'TrainReader'
而之前旧版本的PaddleDetection是可以训练自己数据的,请问下这个怎么解决?