PaddleDetection icon indicating copy to clipboard operation
PaddleDetection copied to clipboard

RTDETR用SAHI切图拼图评估报错

Open leechenggg opened this issue 2 years ago • 4 comments

问题确认 Search before asking

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

请提出你的问题 Please ask your question

项目链接 https://aistudio.baidu.com/aistudio/projectdetail/6092017

报错信息: /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/matplotlib/init.py:107: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import MutableMapping /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/matplotlib/rcsetup.py:20: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import Iterable, Mapping /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/matplotlib/colors.py:53: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import Sized W0505 10:40:56.459722 895 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 11.2, Runtime API Version: 11.2 W0505 10:40:56.464571 895 gpu_resources.cc:91] device: 0, cuDNN Version: 8.2. loading annotations into memory... Done (t=0.40s) creating index... index created! [05/05 10:41:09] ppdet.data.source.coco INFO: 548 samples and slice to 2842 sub_samples in file /home/aistudio/MyDataset/val.json [05/05 10:41:11] ppdet.utils.checkpoint INFO: Finish loading model weights: output/rtdetr_r101vd_6x_coco/best_model.pdparams Traceback (most recent call last): File "tools/eval.py", line 208, in main() File "tools/eval.py", line 204, in main run(FLAGS, cfg) File "tools/eval.py", line 157, in run match_metric=FLAGS.match_metric) File "/home/aistudio/PaddleDetection/ppdet/engine/trainer.py", line 764, in evaluate_slice match_metric) File "/home/aistudio/PaddleDetection/ppdet/engine/trainer.py", line 708, in _eval_with_loader_slice outs['bbox'][:, 2:4] = outs['bbox'][:, 2:4] + shift_amount File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dygraph/math_op_patch.py", line 304, in impl return math_op(self, other_var, -1) ValueError: (InvalidArgument) Broadcast dimension mismatch. Operands could not be broadcast together with the shape of X = [1200, 2] and the shape of Y = [4, 2]. Received [1200] in X is not equal to [4] in Y at i:0. [Hint: Expected x_dims_array[i] == y_dims_array[i] || x_dims_array[i] <= 1 || y_dims_array[i] <= 1 == true, but received x_dims_array[i] == y_dims_array[i] || x_dims_array[i] <= 1 || y_dims_array[i] <= 1:0 != true:1.] (at /paddle/paddle/phi/kernels/funcs/common_shape.h:84)

leechenggg avatar May 08 '23 09:05 leechenggg

暂时还没有适配

lyuwenyu avatar May 11 '23 09:05 lyuwenyu

期待

leechenggg avatar May 12 '23 01:05 leechenggg

额,我的感觉是这个sahi策略只支持batch_size=1

FiresWorker avatar Nov 21 '23 02:11 FiresWorker

我也遇到这个问题,eval batch_size>1出现shape不匹配

piupuer avatar Dec 18 '24 01:12 piupuer