AttributeError: 'bytes' object has no attribute 'shape'
问题确认 Search before asking
Bug组件 Bug Component
No response
Bug描述 Describe the Bug
Exception in thread Thread-3: Traceback (most recent call last): File "C:\D_installation_packet\Anaconda\installion_package\envs\ppyolo\lib\threading.py", line 932, in _bootstrap_inner self.run() File "C:\D_installation_packet\Anaconda\installion_package\envs\ppyolo\lib\threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "C:\D_installation_packet\Anaconda\installion_package\envs\ppyolo\lib\site-packages\paddle\fluid\dataloader\dataloader_iter.py", line 217, in _thread_loop batch = self._dataset_fetcher.fetch(indices, File "C:\D_installation_packet\Anaconda\installion_package\envs\ppyolo\lib\site-packages\paddle\fluid\dataloader\fetcher.py", line 125, in fetch data.append(self.dataset[idx]) File "E:\executable_code\YOLO\ppyolo\PaddleDetection-release-2.6\ppdet\data\source\dataset.py", line 102, in getitem return self.transform(roidb) File "E:\executable_code\YOLO\ppyolo\PaddleDetection-release-2.6\ppdet\data\reader.py", line 65, in call raise e File "E:\executable_code\YOLO\ppyolo\PaddleDetection-release-2.6\ppdet\data\reader.py", line 59, in call data = f(data) File "E:\executable_code\YOLO\ppyolo\PaddleDetection-release-2.6\ppdet\data\transform\operators.py", line 105, in call sample = self.apply(sample, context) File "E:\executable_code\YOLO\ppyolo\PaddleDetection-release-2.6\ppdet\data\transform\operators.py", line 139, in apply elif sample['h'] != im.shape[0]: AttributeError: 'bytes' object has no attribute 'shape'
复现环境 Environment
Exception in thread Thread-3: Traceback (most recent call last): File "C:\D_installation_packet\Anaconda\installion_package\envs\ppyolo\lib\threading.py", line 932, in _bootstrap_inner self.run() File "C:\D_installation_packet\Anaconda\installion_package\envs\ppyolo\lib\threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "C:\D_installation_packet\Anaconda\installion_package\envs\ppyolo\lib\site-packages\paddle\fluid\dataloader\dataloader_iter.py", line 217, in _thread_loop batch = self._dataset_fetcher.fetch(indices, File "C:\D_installation_packet\Anaconda\installion_package\envs\ppyolo\lib\site-packages\paddle\fluid\dataloader\fetcher.py", line 125, in fetch data.append(self.dataset[idx]) File "E:\executable_code\YOLO\ppyolo\PaddleDetection-release-2.6\ppdet\data\source\dataset.py", line 102, in getitem return self.transform(roidb) File "E:\executable_code\YOLO\ppyolo\PaddleDetection-release-2.6\ppdet\data\reader.py", line 65, in call raise e File "E:\executable_code\YOLO\ppyolo\PaddleDetection-release-2.6\ppdet\data\reader.py", line 59, in call data = f(data) File "E:\executable_code\YOLO\ppyolo\PaddleDetection-release-2.6\ppdet\data\transform\operators.py", line 105, in call sample = self.apply(sample, context) File "E:\executable_code\YOLO\ppyolo\PaddleDetection-release-2.6\ppdet\data\transform\operators.py", line 139, in apply elif sample['h'] != im.shape[0]: AttributeError: 'bytes' object has no attribute 'shape'
Bug描述确认 Bug description confirmation
- [X] 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息,确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.
是否愿意提交PR? Are you willing to submit a PR?
- [X] 我愿意提交PR!I'd like to help by submitting a PR!
我也存在这样的问题,请问您解决了吗
我也存在这样的问题,请问您解决了吗
Since this issue has not been updated for more than three months, it will be closed, if it is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up. It is recommended to pull and try the latest code first. 由于该问题超过三个月未更新,将会被关闭,若问题未解决或有后续问题,请随时重新打开(建议先拉取最新代码进行尝试),我们会继续跟进。