Closed yuechengyu0710 closed 5 years ago
Could you check the image path really contains image?
Could you check the image path really contains image?
Thank you for your reply. I'd checked my data set which missed some of the pictures. Now the problem has been solved. Thanks
在運行python tools/valid.py \
--cfg experiments/coco/higher_hrnet/w32_512_adam_lr1e-3.yaml \
TEST.MODEL_FILE models/pytorch/pose_coco/pose_higher_hrnet_w32512.pth
出現了[ WARN:0@18.131] global loadsave.cpp:244 cv::findDecoder imread('data/coco\images\val2017\000000397133.jpg'): can't open/read file: check file path/integrity
Traceback (most recent call last):
File "tools/valid.py", line 220, in
Traceback (most recent call last): File "/media/ysy/0ba6c187-2e6e-4b2e-b6af-f98d1ff3acee/ychengyu/anaconda3/envs/py36/lib/python3.6/site-packages/torch/multiprocessing/spawn.py", line 19, in _wrap fn(i, *args) File "/media/ysy/0ba6c187-2e6e-4b2e-b6af-f98d1ff3acee/ychengyu/code/Higher-HR/tools/dist_train.py", line 278, in main_worker final_output_dir, tb_log_dir, writer_dict, fp16=cfg.FP16.ENABLED) File "/media/ysy/0ba6c187-2e6e-4b2e-b6af-f98d1ff3acee/ychengyu/code/Higher-HR/tools/../lib/core/trainer.py", line 35, in do_train for i, (images, heatmaps, masks, joints) in enumerate(data_loader): File "/media/ysy/0ba6c187-2e6e-4b2e-b6af-f98d1ff3acee/ychengyu/anaconda3/envs/py36/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 637, in next return self._process_next_batch(batch) File "/media/ysy/0ba6c187-2e6e-4b2e-b6af-f98d1ff3acee/ychengyu/anaconda3/envs/py36/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 658, in _process_next_batch raise batch.exc_type(batch.exc_msg) cv2.error: Traceback (most recent call last): File "/media/ysy/0ba6c187-2e6e-4b2e-b6af-f98d1ff3acee/ychengyu/anaconda3/envs/py36/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 138, in _worker_loop samples = collate_fn([dataset[i] for i in batch_indices]) File "/media/ysy/0ba6c187-2e6e-4b2e-b6af-f98d1ff3acee/ychengyu/anaconda3/envs/py36/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 138, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/media/ysy/0ba6c187-2e6e-4b2e-b6af-f98d1ff3acee/ychengyu/code/Higher-HR/tools/../lib/dataset/COCOKeypoints.py", line 64, in getitem
img, anno = super().getitem(idx)
File "/media/ysy/0ba6c187-2e6e-4b2e-b6af-f98d1ff3acee/ychengyu/code/Higher-HR/tools/../lib/dataset/COCODataset.py", line 121, in getitem
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
cv2.error: OpenCV(3.4.1) /io/opencv/modules/imgproc/src/color.cpp:11115: error: (-215) scn == 3 || scn == 4 in function cvtColor
This is an error report. How can I solve it?thanks