PaddleSeg icon indicating copy to clipboard operation
PaddleSeg copied to clipboard

[Enhance] Enhance slide_inference

Open Dawn-bin opened this issue 3 years ago • 2 comments

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

  1. PaddleSeg version: master

hi, I have met a Bug, when I use paddle to inference a very very big aerial picture.

The situation is that: I use small crop to train a model, and do referece on a big origin pic with predict.py. That is the bug coming in silde_reference

final_logit = paddle.to_tensor(final_logit)

Here, L130, transform final_logit to CUDA, which lead to GPU momery out. This may use to calculate loss in Validation Mode with GT. But in this situation, we just need the reference results to be saved.

Some Suggestion:

  1. to move this code afterward, to where It really needed.
  2. add a judgement, when we just need the result. (note: the later argmax maybe time-consuming on cpu)

Dawn-bin avatar Aug 04 '22 07:08 Dawn-bin

Thanks for pointing out this problem. We will consider adding this feature in the future.

Currently, I would recommend PaddleRS as an alternative. PaddleRS provides the functionality of lazy loading, which significantly saves both CPU and GPU memories when doing inference on large aerial images.

Bobholamovic avatar Aug 04 '22 08:08 Bobholamovic

Thanks for pointing out this problem. We will consider adding this feature in the future.

Currently, I would recommend PaddleRS as an alternative. PaddleRS provides the functionality of lazy loading, which significantly saves both CPU and GPU memories when doing inference on large aerial images.

Good job! I am looking forward it to be more powerful and comprehensive.

Dawn-bin avatar Aug 04 '22 08:08 Dawn-bin