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.76k stars 2.88k forks source link

rtdetr模型在部署推理时报错,而其他模型不会,报错如下: #9156

Open gyx210 opened 3 weeks ago

gyx210 commented 3 weeks ago

问题确认 Search before asking

请提出你的问题 Please ask your question

使用官方给出的deploy\python\infer.py进行推理,其他模型都没有问题,但redert有问题,加载模型时报错内存未分配。

File "D:\python\PaddleDetection-v2.7.0\deploy\python\infer.py", line 107, in init self.predictor, self.config = load_predictor( ^^^^^^^^^^^^^^^ File "D:\python\PaddleDetection-v2.7.0\deploy\python\infer.py", line 1060, in load_predictor predictor = create_predictor(config) ^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: (PreconditionNotMet) Tensor's dimension is out of bound.Tensor's dimension must be equal or less than the size of its memory.But received Tensor's dimension is 8, memory's size is 0. [Hint: Expected numel() SizeOf(dtype()) <= memory_size(), but received numel() SizeOf(dtype()):8 > memory_size():0.] (at ..\paddle\phi\core\dense_tensor_impl.cc:55) [operator < cast > error]

TingquanGao commented 2 weeks ago

目前PaddleX支持了RT-DETR系列模型的训练、推理、部署等功能,推荐尝试PaddleX使用,具体可参考文档,如遇到任何问题,欢迎继续提问~

https://github.com/PaddlePaddle/PaddleX/blob/release/3.0-beta1/docs/module_usage/tutorials/cv_modules/object_detection.md