Install
openclaw skills install @ruiduobao/geoskill-generative-adversarial-rsGAN (U-Net + PatchGAN) 云去除 / 影像增强,torch+CUDA GPU 训练与推理
openclaw skills install @ruiduobao/geoskill-generative-adversarial-rsRepairs and enhances imagery with a "generative" approach: in cloud removal mode, a cloud mask is detected and the contaminated pixels are reconstructed with a U-Net Generator; in enhancement mode, the same generator acts as a denoising autoencoder to improve contrast/quality.
This skill is a true deep-learning implementation of GAN-based cloud inpainting / image enhancement (pix2pix style, Isola et al. 2017):
Pretrained weights gan_cloudremoval_weights.pt ship with the skill (synthetic cloud-removal pairs, 1.5 MB, Generator 329K + Discriminator 42K parameters); if the weights are missing, they are automatically trained on the GPU and saved at first run. The original numpy operators (detect_cloud_mask / inpaint_masked / histogram_match / contrast_stretch / remove_clouds) are kept as a baseline reference and unit-test entry points.
pip install numpy rasterio scipy torch
python geoskill-generative-adversarial-rs.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-generative-adversarial-rs.py --bbox 116.0 39.0 117.0 40.0 --synthetic --mode cloud-removal --output-dir ./out
python geoskill-generative-adversarial-rs.py --input cloudy.tif --percentile 88 --output-dir ./out
python geoskill-generative-adversarial-rs.py --input dim.tif --mode enhance --plow 2 --phigh 98 --output-dir ./out
| File | Format | Description |
|---|---|---|
cloud_removed.tif / enhanced.tif | GeoTIFF | Reconstructed or enhanced image (depending on mode) |
cloud_mask.tif | GeoTIFF | Cloud mask (cloud-removal mode) |
metrics.json | JSON | Metrics: cloud fraction, PSNR before/after, std before/after, backend/device/weights, etc. |
output-manifest.json | JSON | Run manifest (inputs/outputs/QA/exit code) |
Local single-band GeoTIFF, or --synthetic (ground-truth scene + Gaussian cloud patches, with ground truth retained for evaluation).
--synthetic mode requires no network at all.MIT
用"生成式"思想修复与增强影像:云去除模式检测云掩膜并用 U-Net Generator 重建被污染像元;增强模式用同一个 Generator 作 denoising autoencoder 做对比度/质量提升。
本 skill 是 GAN 云修复/影像增强(pix2pix 风格,Isola et al. 2017) 的真 DL 实现:
随 skill 附带预训练权重 gan_cloudremoval_weights.pt(合成云去除对,1.5MB,Generator 329K + Discriminator 42K 参数);若权重缺失则在首次运行时自动用 GPU 训练并落盘。原始 numpy 算子(detect_cloud_mask / inpaint_masked / histogram_match / contrast_stretch / remove_clouds)保留为对照基线与单元测试入口。
pip install numpy rasterio scipy torch
python geoskill-generative-adversarial-rs.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-generative-adversarial-rs.py --bbox 116.0 39.0 117.0 40.0 --synthetic --mode cloud-removal --output-dir ./out
python geoskill-generative-adversarial-rs.py --input cloudy.tif --percentile 88 --output-dir ./out
python geoskill-generative-adversarial-rs.py --input dim.tif --mode enhance --plow 2 --phigh 98 --output-dir ./out
| 文件 | 格式 | 说明 |
|---|---|---|
cloud_removed.tif / enhanced.tif | GeoTIFF | 重建或增强后的影像(按模式) |
cloud_mask.tif | GeoTIFF | 云掩膜(云去除模式) |
metrics.json | JSON | 云占比、PSNR 前后、std 前后、backend/device/weights 等指标 |
output-manifest.json | JSON | 运行清单(输入/输出/QA/退出码) |
本地单波段 GeoTIFF,或 --synthetic(真值场景 + 高斯云斑块,真值留存评估)。
--synthetic 模式完全无网络。MIT