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

[paddlepaddle-gpu==2.4.2 在windows平台推理文件结果出错] #142

Open
Linlp opened this issue Apr 24, 2023 · 3 comments
Open

[paddlepaddle-gpu==2.4.2 在windows平台推理文件结果出错] #142

Linlp opened this issue Apr 24, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Linlp
Copy link

Linlp commented Apr 24, 2023

Thanks for your issue. To help us better solve the issue, please provide the following information:

  1. PaddleRS version: (PaddleRS develop)
  2. PaddlePaddle version: (paddlepaddle==2.4.2)
  3. Operation system: (Windows 10)
  4. Python version: (Python3.7)
  5. CUDA/cuDNN version: (e.g. CUDA11.7/cuDNN v8.4.1)
  6. Additional context: (add any other context about the problem)

欢迎您的提问。辛苦您提供以下信息,以方便我们快速定位和解决问题:

  1. PaddleRS版本:(PaddleRS develop)
  2. PaddlePaddle版本:(paddlepaddle==2.4.2)
  3. 操作系统信息:(Windows10)
  4. Python版本号:(Python3.7)
  5. CUDA/cuDNN版本:( CUDA11.7/cuDNN v8.4.1)
  6. 其他内容: (增加其他与问题相关的内容)
    问题:
    工作流程是:通过滑动窗口推理得到tiff,使用mask2shape生成shape文件;
    目前问题:
    cpu跑出来的两期影像生成的正确和shp矢量文件是正确的,
    而gpu跑出来则是错误跟预期不一样,也即是paddlers-gpu运行结果出错
    代码:
predictor = Predictor("./inference_model", use_gpu=True, gpu_id=args.gpu_id)
res = predictor.slider_predict((‘ref.tif’, 'comp.tiff'), args.save_path, block_size=2048, batch_size=args.batch_number, overlap=args.overlap, merge_strategy='accum')
ms.mask2shape(args.image0_path, mask_path, output_shp)

结果:
cpu结果:
image

cpu生成shape文件:
image

cpu运行情况:
Warning: Unable to use OC-SORT, please install filterpy, for example: pip install filterpy, see https://github.com/rlabbe/filterpy
2023-04-24 17:17:08,635-WARNING: post-quant-hpo is not support in system other than linux
Image1 size is 5912 x 3858 pixels.
Image2 size is 5912 x 3858 pixels.
2023-04-24 17:17:08 [WARNING] Cannot find raw_params. Default arguments will be used to construct the model.
2023-04-24 17:17:08 [INFO] Model[BIT] loaded.
cpu

0%| | 0/6 [00:00<?, ?it/s]
2 out of 6 blocks processed.: 33%|███▎ | 2/6 [00:12<00:24, 6.10s/it]
6 out of 6 blocks processed.: 100%|██████████| 6/6 [00:35<00:00, 5.70s/it]2023-04-24 17:17:45 [INFO] GeoTiff file saved in output\ref.tif.
6 out of 6 blocks processed.: 100%|██████████| 6/6 [00:35<00:00, 5.85s/it]
Total time consumed: 1.2861473560333252.

gpu生成shape文件:
image

gpu运行情况:
Warning: Unable to use OC-SORT, please install filterpy, for example: pip install filterpy, see https://github.com/rlabbe/filterpy
2023-04-24 17:12:26,120-WARNING: post-quant-hpo is not support in system other than linux
Image1 size is 5912 x 3858 pixels.
Image2 size is 5912 x 3858 pixels.
2023-04-24 17:12:26 [WARNING] Cannot find raw_params. Default arguments will be used to construct the model.
2023-04-24 17:12:26 [INFO] Model[BIT] loaded.
gpu

6 out of 6 blocks processed.: 100%|██████████| 6/6 [00:09<00:00, 1.52s/it]
2023-04-24 17:12:49 [INFO] GeoTiff file saved in output\ref.tif.
Total time consumed: 81.71551060676575.

解决方案:
采用paddlepaddle==2.3.2,paddlepaddle-gpu==2.3.2,cuda 11.2,cudnn 8.2.1,paddlers成功安装后,gpu能够跑出正确结果。

@Linlp Linlp added the question Further information is requested label Apr 24, 2023
@github-actions github-actions bot added the triage new issue/PR waiting to be dealed label Apr 24, 2023
@Bobholamovic Bobholamovic self-assigned this Apr 24, 2023
@github-actions github-actions bot removed the triage new issue/PR waiting to be dealed label Apr 24, 2023
@Bobholamovic
Copy link
Member

感谢反馈bug,我们将对此问题进行确认和排查。如果方便的话,请问可以在issue中贴出使用paddlepaddle-gpu 2.4版本得到的错误结果吗?

@Linlp
Copy link
Author

Linlp commented Apr 25, 2023

image

因为生成的结果图不正确,导致mask2shape生成shape文件,GPU运行时间为81.71551060676575,而CPU运行时间为1.2861473560333252。

是不是CUDA和cudnn版本影响结果的呢?降低版本他们版本可以跑出正确结果的。

@Bobholamovic
Copy link
Member

综合你提供的结果和我这边的测试情况来看,这个问题和PaddlePaddle框架版本应该关系不大,最有可能是CUDA版本造成的影响。看起来PaddleRS目前暂时无法支持CUDA 11.7,建议尝试降级CUDA版本到11.2及以下后使用~

@Bobholamovic Bobholamovic added bug Something isn't working and removed question Further information is requested labels Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants