Install
openclaw skills install @ruiduobao/geoskill-transfer-learning-rsopenclaw skills install @ruiduobao/geoskill-transfer-learning-rsExtracts features from imagery with a frozen feature extractor, fine-tunes a lightweight classification head on top, evaluates accuracy on a held-out validation set, and compares against a "raw-spectra-only" baseline to quantify the gain from transferred features.
This skill is an offline numpy-equivalent implementation of deep transfer learning (pretrained backbone + fine-tuned head): with no torch/tensorflow dependency, a fixed filter bank (raw spectra + Sobel gradients + local-mean texture) serves as the "frozen backbone", and an sklearn logistic regression / random forest serves as the "classification head"; the train/validation split, leak-free standardization, and transfer-gain comparison are all verified in unit tests.
pip install numpy rasterio scipy scikit-learn geopandas shapely
python geoskill-transfer-learning-rs.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-transfer-learning-rs.py --bbox 116.0 39.0 117.0 40.0 --synthetic --train-frac 0.6 --output-dir ./out
python geoskill-transfer-learning-rs.py --input scene.tif --n-classes 4 --output-dir ./out
python geoskill-transfer-learning-rs.py --bbox 116.0 39.0 117.0 40.0 --synthetic --model rf --output-dir ./out
| File | Format | Description |
|---|---|---|
classification.tif | GeoTIFF | Full-scene classification / clustering label map |
accuracy_report.json | JSON | Validation accuracy, baseline comparison, and transfer gain |
output-manifest.json | JSON | Run manifest (inputs/outputs/QA/exit code) |
Local multi-band GeoTIFF (unsupervised clustering in real mode), or a --synthetic three-class ground-truth scene (supervised evaluation).
--synthetic mode requires no network at all.MIT
用冻结的特征提取器从影像抽取特征,在其上微调轻量分类头,并在留出验证集上评估精度,同时与"仅用原始光谱"的基线对比,量化迁移特征的增益。
本 skill 是深度迁移学习(预训练主干 + fine-tune 头)的离线 numpy 等价实现:不依赖 torch/tensorflow,用固定滤波 bank(原始光谱 + Sobel 梯度 + 局部均值纹理)充当"冻结主干",sklearn 逻辑回归/随机森林充当"分类头";训练/验证划分、防泄漏标准化、迁移增益对比均在单元测试中验证。
pip install numpy rasterio scipy scikit-learn geopandas shapely
python geoskill-transfer-learning-rs.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-transfer-learning-rs.py --bbox 116.0 39.0 117.0 40.0 --synthetic --train-frac 0.6 --output-dir ./out
python geoskill-transfer-learning-rs.py --input scene.tif --n-classes 4 --output-dir ./out
python geoskill-transfer-learning-rs.py --bbox 116.0 39.0 117.0 40.0 --synthetic --model rf --output-dir ./out
| 文件 | 格式 | 说明 |
|---|---|---|
classification.tif | GeoTIFF | 全幅分类/聚类标签图 |
accuracy_report.json | JSON | 验证精度、基线对比与迁移增益 |
output-manifest.json | JSON | 运行清单(输入/输出/QA/退出码) |
本地多波段 GeoTIFF(真实模式无监督聚类),或 --synthetic 三类真值场景(有监督评估)。
--synthetic 模式完全无网络。MIT