PaddleDetection icon indicating copy to clipboard operation
PaddleDetection copied to clipboard

AttributeError: 'bytes' object has no attribute 'shape'

Open Wisdom2wisdom opened this issue 2 years ago • 2 comments

问题确认 Search before asking

  • [X] 我已经查询历史issue,没有发现相似的bug。I have searched the issues and found no similar bug report.

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!

Wisdom2wisdom avatar Jun 11 '23 10:06 Wisdom2wisdom

我也存在这样的问题,请问您解决了吗

todesti2 avatar Jul 09 '23 11:07 todesti2

我也存在这样的问题,请问您解决了吗

syriacus99 avatar Jun 25 '24 06:06 syriacus99

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. 由于该问题超过三个月未更新,将会被关闭,若问题未解决或有后续问题,请随时重新打开(建议先拉取最新代码进行尝试),我们会继续跟进。

paddle-bot[bot] avatar Jul 01 '25 06:07 paddle-bot[bot]