使用关键点检测human_pose_estimation模型时val和test脚本报数据方面的错误
Created by: lidingke
环境:
https://aistudio.baidu.com/aistudio/projectDetail/122271这里提供的数据集
Ubuntu18.04 CUDA Capability: 75, Driver API Version: 10.2, Runtime API Version: 10.0 cuDNN Version: 7.3 RTX2080TI paddle.1.6.1 python3.7 paddel.models版本为develop 数据集用的问题1
将mpii的标注下载下来后只有.mat文件,如何转换成lib/mpii_reader.py支持的格式。
问题2
使用上述数据集执行test.py和val.py报错。
执行val.py
CUDA_VISIBLE_DEVICES=1 python val.py --dataset coco --checkpoint output/simplebase-coco/90 --data_root data/coco
报错
`----------- Configuration Arguments ----------- batch_size: 128 checkpoint: output/simplebase-coco/90 data_root: data/coco dataset: coco flip_test: True kp_dim: 17 lr: 0.001 lr_strategy: piecewise_decay num_epochs: 140 post_process: True pretrained_model: None shift_heatmap: True total_images: 6108 use_gpu: True
W0320 02:40:14.122923 20034 device_context.cc:235] Please NOTE: device: 0, CUDA Capability: 75, Driver API Version: 10.2, Runtime API Version: 10.0 W0320 02:40:14.125887 20034 device_context.cc:243] device: 0, cuDNN Version: 7.3. W0320 02:40:14.125910 20034 device_context.cc:269] WARNING: device: 0. The installed Paddle is compiled with CUDNN 7.4, but CUDNN version in your machine is 7.3, which may cause serious incompatible bug. Please recompile or reinstall Paddle with compatible CUDNN version. loading annotations into memory... Done (t=0.02s) creating index... index created! => classes: ['background', 'person'] => num_images: 500 generating coco gt_db... => num db: 430 => num selected db: 416 Traceback (most recent call last): File "val.py", line 229, in valid(args) File "val.py", line 135, in valid for batch_id, meta in enumerate(valid_reader()): File "/home/ldk/anaconda3/envs/paddle/lib/python3.7/site-packages/paddle/batch.py", line 58, in batch_reader for instance in r: File "/home/ldk/myProjects/human_pose_estimation/lib/coco_reader.py", line 352, in pop yield mapper(x) File "/home/ldk/myProjects/human_pose_estimation/lib/coco_reader.py", line 255, in data_augmentation flags=cv2.INTER_LINEAR) cv2.error: OpenCV(3.4.2) /tmp/build/80754af9/opencv-suite_1535558553474/work/modules/imgproc/src/imgwarp.cpp:2610: error: (-215:Assertion failed) src.cols > 0 && src.rows > 0 in function 'warpAffine'`
执行test.py
CUDA_VISIBLE_DEVICES=1 python test.py --dataset coco --checkpoint output/simplebase-coco/90
报错
`----------- Configuration Arguments ----------- batch_size: 32 checkpoint: output/simplebase-coco/90 dataset: coco flip_test: True kp_dim: 17 shift_heatmap: True use_gpu: True
W0320 02:44:44.987195 21398 device_context.cc:235] Please NOTE: device: 0, CUDA Capability: 75, Driver API Version: 10.2, Runtime API Version: 10.0 W0320 02:44:44.990037 21398 device_context.cc:243] device: 0, cuDNN Version: 7.3. W0320 02:44:44.990063 21398 device_context.cc:269] WARNING: device: 0. The installed Paddle is compiled with CUDNN 7.4, but CUDNN version in your machine is 7.3, which may cause serious incompatible bug. Please recompile or reinstall Paddle with compatible CUDNN version. loading annotations into memory... Traceback (most recent call last): File "test.py", line 132, in test(args) File "test.py", line 94, in test for batch_id, data in enumerate(test_reader()): File "/home/ldk/anaconda3/envs/paddle/lib/python3.7/site-packages/paddle/batch.py", line 58, in batch_reader for instance in r: File "/home/ldk/myProjects/human_pose_estimation/lib/coco_reader.py", line 362, in pop for i, x in enumerate(reader()): File "/home/ldk/myProjects/human_pose_estimation/lib/coco_reader.py", line 297, in reader coco = COCO(file_name) File "/home/ldk/.local/lib/python3.7/site-packages/pycocotools-2.0-py3.7-linux-x86_64.egg/pycocotools/coco.py", line 84, in init dataset = json.load(open(annotation_file, 'r')) FileNotFoundError: [Errno 2] No such file or directory: 'data/coco/annotations/image_info_test2017.json'`