Closed lvxuanxuan123 closed 2 years ago
Hi, It happens when the image is not loaded correctly. Please check out the path you pass to cv2.imread at https://github.com/liuruijin17/LSTR/blob/7e4e4f1ad5844be492007cf89e81e574c764d307/sample/custom.py#L30
Hi, It happens when the image is not loaded correctly. Please check out the path you pass to cv2.imread at
hello, I know the problem is in this line, but the print path shows that it seems to be fine. My dataset is stored in raws. And the error still exists.
@liuruijin17 Dear author, I solved this problem by converting the image format from .png to .jpg.
Hi I have the same issue. My files are in jpg only. But I am still getting the error
Hi I have the same issue. My files are in jpg only. But I am still getting the error
You can print the path as what I did.
Traceback (most recent call last): File "/home/anaconda3/envs/lstr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/home/anaconda3/envs/lstr/lib/python3.6/multiprocessing/process.py", line 93, in run self._target(*self._args, **self._kwargs) File "train.py", line 54, in prefetch_data raise e File "train.py", line 50, in prefetch_data data, ind = sample_data(db, ind) File "/home/LSTR/LSTR-custom/sample/custom.py", line 71, in sample_data return globals()[system_configs.sampling_function](db, k_ind) File "/home/LSTR/LSTR-custom/sample/custom.py", line 31, in kp_detection mask = np.ones((1, img.shape[0], img.shape[1], 1), dtype=np.bool) AttributeError: 'NoneType' object has no attribute 'shape'