Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[General Issue]图像复原ESRGAN模块运行报错 #188

Closed
SandDeco opened this issue Mar 9, 2024 · 0 comments
Closed

[General Issue]图像复原ESRGAN模块运行报错 #188

SandDeco opened this issue Mar 9, 2024 · 0 comments
Assignees
Labels
question Further information is requested

Comments

@SandDeco
Copy link

SandDeco commented Mar 9, 2024

  1. PaddleRS版本:PaddleRS 最新版本
  2. PaddlePaddle版本:PaddlePaddle 2.6.0 post120
  3. 操作系统信息:Windows 11 ×64
  4. Python版本号:Python3.8.18
  5. CUDA/cuDNN版本:CUDA12.0/cuDNN 8.9
  6. Pillow版本:10.2.0;opencv-contrib-python版本:4.2.0.34;Opencv-python版本4.6.0.66
    运行图像复原时,自带样本数据集可以正常运行,导入自定义的数据集(按照示例样本数据集的规格对数据文件进行了转换与采样等处理)至“tutorials/train/image_restoration/esrgan.py”运行后报错,下列错误信息出现后并未停止终端运行,但也未出现训练进度等信息:
    Exception in thread Thread-2:
    Traceback (most recent call last):
    File "C:\Users\anaconda3\envs\paddlepaddle\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
    File "C:\Users\anaconda3\envs\paddlepaddle\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
    File "C:\Users\anaconda3\envs\paddlepaddle\lib\site-packages\paddle\io\dataloader\dataloader_iter.py", line 235, in _thread_loop
    batch = self._dataset_fetcher.fetch(
    File "C:\Users\anaconda3\envs\paddlepaddle\lib\site-packages\paddle\io\dataloader\fetcher.py", line 77, in fetch
    data.append(self.dataset[idx])
    File "C:\Users\anaconda3\envs\paddlepaddle\lib\site-packages\paddlers\datasets\base.py", line 55, in getitem
    sample, trans_info = self.transforms(sample)
    File "C:\Users\anaconda3\envs\paddlepaddle\lib\site-packages\paddlers\transforms\operators.py", line 149, in call
    sample = self.apply_transforms(sample)
    File "C:\Users\anaconda3\envs\paddlepaddle\lib\site-packages\paddlers\transforms\operators.py", line 168, in apply_transforms
    sample = op(sample)
    File "C:\Users\anaconda3\envs\paddlepaddle\lib\site-packages\paddlers\transforms\operators.py", line 216, in call
    sample = self.apply(sample)
    File "C:\Users\anaconda3\envs\paddlepaddle\lib\site-packages\paddlers\transforms\operators.py", line 1276, in apply
    sample = Resize(self.crop_size)(sample)
    File "C:\Users\anaconda3\envs\paddlepaddle\lib\site-packages\paddlers\transforms\operators.py", line 216, in call
    sample = self.apply(sample)
    File "C:\Users\anaconda3\envs\paddlepaddle\lib\site-packages\paddlers\transforms\operators.py", line 533, in apply
    sample['target'] = self.apply_im(
    File "C:\Users\anaconda3\envs\paddlepaddle\lib\site-packages\paddlers\transforms\operators.py", line 459, in apply_im
    image = cv2.resize(image, target_size, interpolation=interp)
    cv2.error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:4045: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'

已解决,原因是:数据列表生成时格式错误。

@SandDeco SandDeco added the question Further information is requested label Mar 9, 2024
@github-actions github-actions bot added triage new issue/PR waiting to be dealed and removed triage new issue/PR waiting to be dealed labels Mar 9, 2024
@SandDeco SandDeco changed the title [General Issue] [General Issue]图像复原ESRGAN模块运行报错 Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants