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 合成)
Additional Information
| Field | Value |
|---|---|
| Data last updated | November 10, 2025 |
| Metadata last updated | November 10, 2025 |
| Created | November 10, 2025 |
| Format | unknown |
| License | No License Provided |
| created | 12 days ago |
| id | b4806699-4d90-41e0-8b5e-6de55cdbe560 |
| metadata modified | 12 days ago |
| nchu ddl resource filetype | 基礎工具 |
| package id | 3952eb27-7fa5-4948-a53d-81199938ec9d |
| revision id | 183c00f9-89b0-454b-807b-9b9e686ba43e |
| state | active |
推薦資料集:

