-
Notifications
You must be signed in to change notification settings - Fork 233
Add satellite time-series panoptic segmentation example with ConvTemporalAttentionNet #1210
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
Open
xiaoshenlong17
wants to merge
3
commits into
PaddlePaddle:develop
Choose a base branch
from
xiaoshenlong17:feat/satellite_panoptic
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,48 @@ | ||||
|
|
||||
| # Satellite Time-Series Panoptic Segmentation | ||||
| 基于 **ConvTemporalAttentionNet** 的 PaddleScience 官方示例。 | ||||
|
|
||||
| ## 数据集 | ||||
| - Sentinel-2 12 期影像 | ||||
| - 下载地址:[Google Drive](https://drive.google.com/xxx) | ||||
| - 目录结构 | ||||
| ```plaintext | ||||
| data/satellite_panoptic/ | ||||
| ├── images/ # (T, C, H, W) | ||||
| └── labels/ # (T, H, W) | ||||
| ``` | ||||
|
|
||||
| ## 快速开始 | ||||
| ```bash | ||||
| # 1. 安装依赖 | ||||
| pip install -r requirements.txt | ||||
|
|
||||
| # 2. 训练 | ||||
| python train.py | ||||
|
|
||||
| # 3. 验证 | ||||
| python validate.py --pretrained ./pretrained/model.pdparams | ||||
| ``` | ||||
|
|
||||
| ## 性能 | ||||
| | 指标 | 值 | | ||||
| | ---- | --- | | ||||
| | SQ | 0.806 | | ||||
| | RQ | 0.494 | | ||||
| | PQ | 0.403 | | ||||
|
|
||||
| ## 文件说明 | ||||
| | 文件 | 作用 | | ||||
| | ---- | ---- | | ||||
| | pretrained/model.pdparams | 训练好的权重 | | ||||
| | src/model_paddle.py | ConvTemporalAttentionNet 网络 | | ||||
| | src/dataset_paddle.py | 数据加载 | | ||||
| | src/utils_paddle.py | 工具函数 | | ||||
| | train.py | 训练脚本 | | ||||
| | validate.py | 验证脚本 | | ||||
| | conf/satellite_panoptic.yaml | 超参配置 | | ||||
|
|
||||
| ## 参考 | ||||
| 原始 PyTorch 实现:[GitHub Link](https://github.com/xxx) | ||||
|
|
||||
| --- | ||||
|
||||
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
|
|
||
| # satellite_panoptic.yaml | ||
|
|
||
| # 数据集相关配置 | ||
| dataset: | ||
| train_data_path: "./data/satellite_panoptic/images/train" | ||
| val_data_path: "./data/satellite_panoptic/images/val" | ||
| label_data_path: "./data/satellite_panoptic/labels" | ||
| batch_size: 16 | ||
| num_workers: 4 | ||
| shuffle: true | ||
| image_size: [256, 256] | ||
|
|
||
| # 模型相关配置 | ||
| model: | ||
| name: "ConvTemporalAttentionNet" | ||
| input_channels: 3 # RGB 图像 | ||
| output_channels: 21 # 例如,21个类别 | ||
| pretrained_weights: "./pretrained/model.pdparams" | ||
|
|
||
| # 训练相关配置 | ||
| training: | ||
| epochs: 100 | ||
| learning_rate: 0.001 | ||
| weight_decay: 0.0001 | ||
| optimizer: "Adam" | ||
| scheduler: | ||
| name: "StepLR" | ||
| step_size: 10 | ||
| gamma: 0.5 | ||
| loss: "CrossEntropyLoss" | ||
|
|
||
| # 验证相关配置 | ||
| validation: | ||
| save_best_model: true | ||
| validation_interval: 1 # 每训练1个epoch进行一次验证 | ||
|
|
||
| # 日志和检查点 | ||
| logging: | ||
| log_dir: "./logs" | ||
| checkpoint_dir: "./checkpoints" | ||
|
|
||
| # 其他超参数 | ||
| other: | ||
| seed: 42 | ||
| device: "cuda" # 使用GPU训练,如果没有GPU,则改为 'cpu' |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请在mkdocs.yml、README.md和index.md里新增案例链接