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

当我运行tools/infer.py时报错 #8739

Open chengzihencai opened 9 months ago

chengzihencai commented 9 months ago

问题确认 Search before asking

Bug组件 Bug Component

No response

Bug描述 Describe the Bug

“”“ Warning: Unable to use numba in PP-Tracking, please install numba, for example(python3.7): pip install numba==0.56.4 Warning: Unable to use numba in PP-Tracking, please install numba, for example(python3.7): pip install numba==0.56.4 W1205 08:22:47.242758 16668 gpu_resources.cc:96] The GPU architecture in your current machine is Pascal, which is not compatible with Paddle installation with arch: 70 75 80 86 , it is recommended to install the corresponding wheel package according to the installation information on the official Paddle website. W1205 08:22:47.242758 16668 gpu_resources.cc:119] Please NOTE: device: 0, GPU Compute Capability: 6.1, Driver API Version: 12.2, Runtime API Version: 11.7 W1205 08:22:47.247745 16668 gpu_resources.cc:149] device: 0, cuDNN Version: 8.9. [12/05 08:22:49] ppdet.utils.checkpoint INFO: Finish loading model weights: C:\Users\orange/.cache/paddle/weights\rtdetr_r50vd_6x_coco.pdparams [12/05 08:22:49] ppdet.data.source.category WARNING: anno_file 'dataset/coco\annotations/instances_val2017.json' is None or not set or not exist, please recheck TrainDataset/EvalDataset/TestDataset.anno_path, otherwise the default categories will be used by metric_type. [12/05 08:22:49] ppdet.data.source.category WARNING: metric_type: COCO, load default categories of COCO. 0%| | 0/1 [00:00<?, ?it/s] Traceback (most recent call last): File "tools/infer.py", line 237, in main() File "tools/infer.py", line 233, in main run(FLAGS, cfg) File "tools/infer.py", line 183, in run trainer.predict( File "C:\Users\orange\Desktop\PP\PaddleDetection-2.7.0\ppdet\engine\trainer.py", line 1026, in predict outs = self.model(data) File "C:\Users\orange.conda\envs\paddlepaddle\lib\site-packages\paddle\nn\layer\layers.py", line 1254, in call return self.forward(*inputs, kwargs) File "C:\Users\orange\Desktop\PP\PaddleDetection-2.7.0\ppdet\modeling\architectures\meta_arch.py", line 76, in forward outs.append(self.get_pred()) File "C:\Users\orange\Desktop\PP\PaddleDetection-2.7.0\ppdet\modeling\architectures\detr.py", line 118, in get_pred return self._forward() File "C:\Users\orange\Desktop\PP\PaddleDetection-2.7.0\ppdet\modeling\architectures\detr.py", line 89, in _forward out_transformer = self.transformer(body_feats, pad_mask, self.inputs) File "C:\Users\orange.conda\envs\paddlepaddle\lib\site-packages\paddle\nn\layer\layers.py", line 1254, in call return self.forward(*inputs, *kwargs) File "C:\Users\orange\Desktop\PP\PaddleDetection-2.7.0\ppdet\modeling\transformers\rtdetr_transformer.py", line 465, in forward out_bboxes, out_logits = self.decoder( File "C:\Users\orange.conda\envs\paddlepaddle\lib\site-packages\paddle\nn\layer\layers.py", line 1254, in call return self.forward(inputs, kwargs) File "C:\Users\orange\Desktop\PP\PaddleDetection-2.7.0\ppdet\modeling\transformers\rtdetr_transformer.py", line 235, in forward output = layer(output, ref_points_input, memory, File "C:\Users\orange.conda\envs\paddlepaddle\lib\site-packages\paddle\nn\layer\layers.py", line 1254, in call return self.forward(*inputs, *kwargs) File "C:\Users\orange\Desktop\PP\PaddleDetection-2.7.0\ppdet\modeling\transformers\rtdetr_transformer.py", line 189, in forward tgt2 = self.cross_attn( File "C:\Users\orange.conda\envs\paddlepaddle\lib\site-packages\paddle\nn\layer\layers.py", line 1254, in call return self.forward(inputs, **kwargs) File "C:\Users\orange\Desktop\PP\PaddleDetection-2.7.0\ppdet\modeling\transformers\rtdetr_transformer.py", line 104, in forward output = self.ms_deformable_attn_core( File "C:\Users\orange\Desktop\PP\PaddleDetection-2.7.0\ppdet\modeling\transformers\utils.py", line 89, in deformable_attention_core_func value_list = value.split(split_shape, axis=1) File "C:\Users\orange.conda\envs\paddlepaddle\lib\site-packages\paddle\tensor\manipulation.py", line 1974, in split return _C_ops.split(input, num_or_sections, dim) ValueError: (InvalidArgument) Sum of Attr(num_or_sections) must be equal to the input's size along the split dimension. But received Attr(num_or_sections) = [4434370547370991860, 4442060881718942192, 4512889462289796760], input(X)'s shape = [1, 8400, 8, 32], Attr(dim) = 1. [Hint: Expected sum_of_section == input_axis_dim, but received sum_of_section:979880316 != input_axis_dim:8400.] (at ..\paddle\phi\infermeta\unary.cc:3693) ”“”

复现环境 Environment

windows10 CUDA 11.7 python 3.8 paddlepaddle2.5

Bug描述确认 Bug description confirmation

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

LokeZhou commented 6 months ago

运行官方教程是否报错