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.61k stars 2.86k forks source link

利用export_model导出模型,infer_cfg.yml参数有问题 #2425

Closed Huihuihh closed 2 years ago

Huihuihh commented 3 years ago

利用自己制作的数据集进行训练,训练后保存的模型,通过export_model导出,生成__model__,__params__infer_cfg.yml三个文件。但是是生成的infer_cfg.yml文件中label_list的值与我时间训练时的值不符,导致利用这个模型进行推理时,识别到的图片标识有误

label_list:
- person
- bicycle
- car
- motorcycle
- airplane
- bus
- train
- truck
- boat
- traffic light
- fire hydrant
- stop sign
- parking meter
- bench
- bird
- cat
- dog
- horse
- sheep
- cow
- elephant
- bear
- zebra
- giraffe
- backpack
- umbrella
- handbag
- tie
- suitcase
- frisbee
- skis
- snowboard
- sports ball
- kite
- baseball bat
- baseball glove
- skateboard
- surfboard
- tennis racket
- bottle
- wine glass
- cup
- fork
- knife
- spoon
- bowl
- banana
- apple
- sandwich
- orange
- broccoli
- carrot
- hot dog
- pizza
- donut
- cake
- chair
- couch
- potted plant
- bed
- dining table
- toilet
- tv
- laptop
- mouse
- remote
- keyboard
- cell phone
- microwave
- oven
- toaster
- sink
- refrigerator
- book
- clock
- vase
- scissors
- teddy bear
- hair drier
- toothbrush
wangxinxin08 commented 3 years ago

应该是没有指定TestReader的anno_path导致加载了默认的coco的label_list

Huihuihh commented 3 years ago

应该是没有指定TestReader的anno_path导致加载了默认的coco的label_list

我TestReader的anno_path指定的是验证集的annotations/valid.json,这里是需要指定label_list吗。但是我看示例里面这里都是填的json文件

wangxinxin08 commented 3 years ago

应该是没有指定TestReader的anno_path导致加载了默认的coco的label_list

我TestReader的anno_path指定的是验证集的annotations/valid.json,这里是需要指定label_list吗。但是我看示例里面这里都是填的json文件

你是coco格式的数据集,不需要指定label_lis,anno_path的路径没有写全,导致找不到文件,anno_path填写示例dataset/coco/annotations/valid.json

Huihuihh commented 3 years ago

应该是没有指定TestReader的anno_path导致加载了默认的coco的label_list

我TestReader的anno_path指定的是验证集的annotations/valid.json,这里是需要指定label_list吗。但是我看示例里面这里都是填的json文件

你是coco格式的数据集,不需要指定label_lis,anno_path的路径没有写全,导致找不到文件,anno_path填写示例dataset/coco/annotations/valid.json

确实是路径没写全,解决了

akingyin1987 commented 3 years ago

我问下这个导出的模型,如何转成使用的model.nb 格式

xiegegege commented 3 years ago

@akingyin1987 可以参考 https://paddle-lite.readthedocs.io/zh/latest/user_guides/opt/opt_python.html 这个文档来转成.nb格式,在https://github.com/PaddlePaddle/Paddle-Lite 这个repo里

1220985305 commented 3 years ago

model.pdmodel,model.pdiparams如何转成nb模型?

paddle-bot-old[bot] commented 2 years ago

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. 由于该问题超过三个月未更新,将会被关闭,若问题未解决或有后续问题,请随时重新打开(建议先拉取最新代码进行尝试),我们会继续跟进。