Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions examples/satellite_panoptic/README.md
Copy link
Collaborator

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里新增案例链接

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)

---
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除该行

Suggested change
---

46 changes: 46 additions & 0 deletions examples/satellite_panoptic/conf/satellite_panoptic.yaml
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.
1 change: 1 addition & 0 deletions examples/satellite_panoptic/src/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading