Skip to content

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

@Linlp

Description

@Linlp

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能够跑出正确结果。

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions