HRNet / HigherHRNet-Human-Pose-Estimation

This is an official implementation of our CVPR 2020 paper "HigherHRNet: Scale-Aware Representation Learning for Bottom-Up Human Pose Estimation" (https://arxiv.org/abs/1908.10357)
MIT License
1.35k stars 272 forks source link

when i was training,i met the opencv errors #6

Closed yuechengyu0710 closed 5 years ago

yuechengyu0710 commented 5 years ago

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

bowenc0221 commented 5 years ago

Could you check the image path really contains image?

yuechengyu0710 commented 5 years ago

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

guaguazi1804918330 commented 1 year ago

在運行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 main() File "tools/valid.py", line 153, in main for i, (images, annos) in enumerate(data_loader): File "D:\anaconda\envs\pointnet\lib\site-packages\torch\utils\data\dataloader.py", line 435, in next data = self._next_data() File "D:\anaconda\envs\pointnet\lib\site-packages\torch\utils\data\dataloader.py", line 475, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "D:\anaconda\envs\pointnet\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "D:\anaconda\envs\pointnet\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "D:\kinect\HigherHRNet-Human-Pose-Estimation-master\HigherHRNet-Human-Pose-Estimation-master\tools..\lib\dataset\COCODataset.py", line 122, in getitem img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) cv2.error: OpenCV(4.7.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'