PaddleCV/human_pose_estimation/val.py 报错operands could not be broadcast together with shapes
Created by: greatyang
OS:ubuntu 16.04 Paddle: 1.7.0 GPU:Nvidia V100 16GB Python:3.7
aistudio@jupyter-78894-555912:~/work/models/PaddleCV/human_pose_estimation$ python val_squidtap.py --dataset 'coco' --checkpoint 'output/simplebase-coco/0' --data_root 'data/squidtap'
----------- Configuration Arguments -----------
batch_size: 128
checkpoint: output/simplebase-coco/0
data_root: data/squidtap
dataset: coco
flip_test: True
kp_dim: 7
lr: 0.001
lr_strategy: piecewise_decay
num_epochs: 140
post_process: True
pretrained_model: None
shift_heatmap: True
total_images: 112
use_gpu: True
------------------------------------------------
W0730 09:00:24.715301 3899 device_context.cc:237] Please NOTE: device: 0, CUDA Capability: 70, Driver API Version: 9.2, Runtime API Version: 9.0
W0730 09:00:24.719609 3899 device_context.cc:245] device: 0, cuDNN Version: 7.3.
loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
=> classes: ['__background__', 'bottle']
=> num_images: 112
generating coco gt_db...
=> num db: 112
=> num selected db: 112
I0730 09:00:27.523710 3899 parallel_executor.cc:440] The Program will be executed on CUDA using ParallelExecutor, 1 cards are used, so 1 programs are executed in parallel.
I0730 09:00:27.532135 3899 build_strategy.cc:365] SeqOnlyAllReduceOps:0, num_trainers:1
I0730 09:00:27.539041 3899 parallel_executor.cc:307] Inplace strategy is enabled, when build_strategy.enable_inplace = True
I0730 09:00:27.544224 3899 parallel_executor.cc:375] Garbage collection strategy is enabled, when FLAGS_eager_delete_tensor_gb = 0
Epoch [ 0] Loss = 0.25711 Acc = 0.00000
kp_dim 7
loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
./results/keypoints_coco_results.json ./results
Loading and preparing results...
DONE (t=0.00s)
creating index...
index created!
Running per image evaluation...
Evaluate annotation type *keypoints*
Traceback (most recent call last):
File "val_squidtap.py", line 229, in <module>
valid(args)
File "val_squidtap.py", line 222, in valid
name_values, perf_indicator = evaluator.evaluate(all_preds, output_dir, all_boxes, image_path)
File "/home/aistudio/work/models/PaddleCV/human_pose_estimation/utils/coco_evaluator.py", line 114, in evaluate
info_str = self._do_python_keypoint_eval(res_file, res_folder)
File "/home/aistudio/work/models/PaddleCV/human_pose_estimation/utils/coco_evaluator.py", line 177, in _do_python_keypoint_eval
coco_eval.evaluate()
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/pycocotools-2.0-py3.7-linux-x86_64.egg/pycocotools/cocoeval.py", line 149, in evaluate
for imgId in p.imgIds
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/pycocotools-2.0-py3.7-linux-x86_64.egg/pycocotools/cocoeval.py", line 150, in <dictcomp>
for catId in catIds}
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/pycocotools-2.0-py3.7-linux-x86_64.egg/pycocotools/cocoeval.py", line 229, in computeOks
e = (dx**2 + dy**2) / vars / (gt['area']+np.spacing(1)) / 2
ValueError: operands could not be broadcast together with shapes (7,) (17,)