view?usp=drive_link
模型執行說明
此模型為以 PyTorch 2.2.0 架構訓練之生成式神經網路(Spectral Generative Network, SGN),可將一般 RGB 影像轉換為模擬多光譜影像。
模型主要用於無多光譜相機環境下之資料擴增與光譜重建,支援單張影像與批次推論。
- 環境需求
- Python 版本:3.10
- PyTorch 版本:2.2.0
- CUDA 版本:12.4
-
其他套件:numpy、opencv-python、scikit-image、matplotlib、torchvision
-
模型載入 ```python import torch from model import SGN model = SGN() model.load_state_dict(torch.load('model_SGN_bands12_feat31_20250825_172824.pth')) model.eval() 影像輸入與推論
輸入:RGB 影像(3-channel, 512×512 或以上)
輸出:生成多光譜影像(12-band synthetic)
推論範例:
from utils import rgb_to_tensor rgb_img = rgb_to_tensor('input.jpg') with torch.no_grad(): output = model(rgb_img) torch.save(output, 'output_multispectral.pt')
可選輸出格式
.pt 或 .npy:多波段光譜資料矩陣
.tif:可視化波段疊合影像(NDVI / NIR 合成)
其他資訊
| 欄位 | 值 |
|---|---|
| 最後更新資料 | 2025年11月10日 |
| 最後更新的後設資料 | 2025年11月10日 |
| 建立 | 2025年11月10日 |
| 格式 | 未知的 |
| Id | b4806699-4d90-41e0-8b5e-6de55cdbe560 |
| Nchu ddl resource filetype | 基礎工具 |
| Package id | 3952eb27-7fa5-4948-a53d-81199938ec9d |
| State | active |
