PaddleDetection icon indicating copy to clipboard operation
PaddleDetection copied to clipboard

picodet 模型inference batch_size > 1时,postprocess报错

Open bo-ke opened this issue 2 years ago • 2 comments

问题确认 Search before asking

  • [X] 我已经查询历史issue,没有发现相似的bug。I have searched the issues and found no similar bug report.

Bug组件 Bug Component

No response

Bug描述 Describe the Bug

python deploy/python/infer.py --model_dir=./picodet_lcnet_x1_0_layout_infer/ --image_dir=./test_images/ --batch_size=2

error-msg

Traceback (most recent call last):
  File "deploy/python/infer.py", line 1036, in <module>
    main()
  File "deploy/python/infer.py", line 1009, in main
    save_results=FLAGS.save_results)
  File "deploy/python/infer.py", line 398, in predict_image
    result = self.postprocess(inputs, result)
  File "deploy/python/infer.py", line 654, in postprocess
    np_boxes, np_boxes_num = postprocessor(np_score_list, np_boxes_list)
  File "./PaddleDetection/deploy/python/picodet_postprocess.py", line 166, in __call__
    center = center[topk_idx]
IndexError: index 8873 is out of bounds for axis 0 with size 7600

复现环境 Environment

  • OS: linux
  • paddlepaddle: 2.3.2
  • paddledetection:2.5

Bug描述确认 Bug description confirmation

  • [X] 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息,确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.

是否愿意提交PR? Are you willing to submit a PR?

  • [ ] 我愿意提交PR!I'd like to help by submitting a PR!

bo-ke avatar Feb 09 '23 11:02 bo-ke

用的是那个模型 是官方提供的嘛

lyuwenyu avatar Feb 09 '23 12:02 lyuwenyu

解决了吗 我也遇到了 ,用的picodet_lcnet_x1_0_fgd_layout_cdla_infer模型,一张图片可以,batch_size设置为2就报错了

black-zyp avatar Aug 08 '23 09:08 black-zyp