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

[Feature] remote sensing inference #3131

Merged
merged 14 commits into from
Aug 31, 2023

Conversation

Zoulinx
Copy link
Contributor

@Zoulinx Zoulinx commented Jun 23, 2023

Motivation

Supports inference for ultra-large-scale remote sensing images.

Modification

Add RSImageInference.py in demo.

Use cases

Taking the inference of Vaihingen dataset images using PSPNet as an example, the following settings are required:

img: Specify the path of the image.
model: Provide the configuration file for the model.
checkpoint: Specify the weight file for the model.
out: Set the output path for the results.
batch_size: Determine the batch size used during inference.
win_size: Specify the width and height(512x512) of the sliding window.
stride: Set the stride(400x400) for sliding the window.
thread(default: 1): Specify the number of threads to be used for inference.
Inference device (default: cuda:0): Specify the device for inference (e.g., cuda:0 for CPU).

python demo/rs_image_inference.py demo/demo.png projects/pp_mobileseg/configs/pp_mobileseg/pp_mobileseg_mobilenetv3_2x16_80k_ade20k_512x512_tiny.py pp_mobileseg_mobilenetv3_2xb16_3rdparty-tiny_512x512-ade20k-a351ebf5.pth --batch-size 8 --device cpu --thread 1

@xiexinch xiexinch changed the title Feature/remote sensing inference [Feature] remote sensing inference Jul 12, 2023
demo/RSImageInference.py Outdated Show resolved Hide resolved
demo/RSImageInference.py Outdated Show resolved Hide resolved
demo/RSImageInference.py Outdated Show resolved Hide resolved
demo/RSImageInference.py Outdated Show resolved Hide resolved
demo/RSImageInference.py Outdated Show resolved Hide resolved
@xiexinch xiexinch merged commit 72e20a8 into open-mmlab:dev-1.x Aug 31, 2023
8 of 10 checks passed
emily-lin pushed a commit to emily-lin/mmsegmentation that referenced this pull request Nov 18, 2023
## Motivation

Supports inference for ultra-large-scale remote sensing images.

## Modification

Add RSImageInference.py in demo.

## Use cases

Taking the inference of Vaihingen dataset images using PSPNet as an
example, the following settings are required:

**img**: Specify the path of the image.
**model**: Provide the configuration file for the model.
**checkpoint**: Specify the weight file for the model.
**out**: Set the output path for the results.
**batch_size**: Determine the batch size used during inference.
**win_size**: Specify the width and height(512x512) of the sliding
window.
**stride**: Set the stride(400x400) for sliding the window.
**thread(default: 1)**: Specify the number of threads to be used for
inference.
**Inference device (default: cuda:0)**: Specify the device for inference
(e.g., cuda:0 for CPU).

```shell
python demo/rs_image_inference.py demo/demo.png projects/pp_mobileseg/configs/pp_mobileseg/pp_mobileseg_mobilenetv3_2x16_80k_ade20k_512x512_tiny.py pp_mobileseg_mobilenetv3_2xb16_3rdparty-tiny_512x512-ade20k-a351ebf5.pth --batch-size 8 --device cpu --thread 2
```

---------

Co-authored-by: xiexinch <xiexinch@outlook.com>
nahidnazifi87 pushed a commit to nahidnazifi87/mmsegmentation_playground that referenced this pull request Apr 5, 2024
## Motivation

Supports inference for ultra-large-scale remote sensing images.

## Modification

Add RSImageInference.py in demo.

## Use cases

Taking the inference of Vaihingen dataset images using PSPNet as an
example, the following settings are required:

**img**: Specify the path of the image.
**model**: Provide the configuration file for the model.
**checkpoint**: Specify the weight file for the model.
**out**: Set the output path for the results.
**batch_size**: Determine the batch size used during inference.
**win_size**: Specify the width and height(512x512) of the sliding
window.
**stride**: Set the stride(400x400) for sliding the window.
**thread(default: 1)**: Specify the number of threads to be used for
inference.
**Inference device (default: cuda:0)**: Specify the device for inference
(e.g., cuda:0 for CPU).

```shell
python demo/rs_image_inference.py demo/demo.png projects/pp_mobileseg/configs/pp_mobileseg/pp_mobileseg_mobilenetv3_2x16_80k_ade20k_512x512_tiny.py pp_mobileseg_mobilenetv3_2xb16_3rdparty-tiny_512x512-ade20k-a351ebf5.pth --batch-size 8 --device cpu --thread 2
```

---------

Co-authored-by: xiexinch <xiexinch@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants