MST

GitHub
1.1k 88 中等 2 次阅读 昨天MIT语言模型图像
AI 解读 由 AI 自动生成,仅供参考

MST 是一套专注于光谱压缩成像重建的开源算法工具箱,由清华大学等团队开发,集成了 MST、CST、DAUHST、BiSCI、HDNet、MST++ 等 15 余种前沿算法。这些模型均发表于 CVPR、NeurIPS、ECCV 等顶级会议,其中 MST++ 更是荣获 NTIRE 2022 光谱重建挑战赛冠军。

光谱压缩成像是一种"用更少数据捕捉更丰富光谱信息"的成像技术,但原始数据往往是严重压缩的二维测量结果,需要复杂的算法才能还原为高分辨率三维光谱图像。MST 正是解决这一从压缩测量中高精度重建高光谱图像的难题,让普通 RGB 相机也能"看"到远超人眼的光谱细节。

这套工具主要面向计算机视觉研究人员、光学成像工程师和遥感图像处理开发者。无论是研究新型重建网络架构,还是需要为光谱相机配套后端算法,MST 都提供了即插即用的基准实现和预训练模型。技术亮点包括:基于 Transformer 的谱间注意力机制、从粗到精的多阶段重建策略,以及针对硬件退化特性的自适应展开网络设计,兼顾重建精度与计算效率。

使用场景

某农业科技公司正在开发一套无人机高光谱作物健康监测系统,用于精准识别农田中的病虫害早期迹象。团队需要从无人机搭载的压缩高光谱相机采集的原始数据中,快速重建出完整的高光谱图像,以便后续分析作物叶绿素含量、水分胁迫等指标。

没有 MST 时

  • 算法选型困难:团队成员需要逐一调研 CVPR/NeurIPS 等顶会论文,手动复现 MST、CST、DAUHST 等 10 余种算法,每个算法代码风格迥异,环境配置冲突频发,两周过去还没跑通 baseline
  • 性能对比混乱:不同论文的实验设置不统一,有的用仿真数据、有的用真实数据,团队无法公平评估哪个算法最适合自己的无人机场景(需要轻量化+实时性)
  • 部署成本高昂:好不容易选定的模型在边缘设备上推理速度不达标,但缺乏针对二值化压缩感知的优化方案,被迫牺牲精度换速度,监测准确率大幅下降
  • 复现结果存疑:某篇论文的开源代码存在 bug,团队调参一个月后发现指标对不上原文,项目进度严重滞后,错过春耕监测窗口期

使用 MST 后

  • 开箱即用的算法库:MST 将 15+ 种 SOTA 算法统一封装,一行命令切换 MST++/CST/DAUHST 等模型,标准化数据接口让团队 3 天内完成全部算法初筛
  • 公平高效的基准测试:工具箱内置统一的仿真/真实数据集划分和评估指标,团队快速验证发现 BiSCI 的二值化设计在保持 38dB PSNR 的同时,推理速度提升 4 倍,完美匹配无人机边缘计算需求
  • 即插即用的优化方案:直接调用 MST 中的二值化重建模块(BiSCI),模型体积压缩至 1MB 以内,Jetson Nano 上实现 15fps 实时处理,无需牺牲精度
  • 可复现的可靠结果:NTIRE 2022 冠军方案 MST++ 的预训练模型和训练日志全公开,团队复现指标与论文误差 <0.1dB,两周内完成模型选型并进入部署阶段

核心价值:MST 将分散的学术研究转化为工程可用的标准化工具,让团队从"重复造轮子"转向"专注业务创新",显著缩短高光谱成像技术从论文到农田的落地周期。

运行环境要求

操作系统
  • Linux
  • Windows
GPU

需要 NVIDIA GPU,显存未明确说明,CUDA 11.0+

内存

未说明

依赖
notes建议使用 conda 创建虚拟环境,安装命令:conda create -n MST python=3.8;支持 15+ 种算法包括 MST、MST++、CST、DAUHST、BiSRNet 等;提供预训练模型和测试数据下载;包含传统方法 TwIST、GAP-TV、DeSCI 的实现;支持模拟数据和真实实验数据
python3.8
torch>=1.11.0
torchvision>=0.12.0
scikit-image
opencv-python
h5py
einops
timm
thop
MST hero image

快速开始

光谱压缩成像工具箱

winner zhihu zhihu zhihu

作者

Yuanhao Cai*, Jing Lin*, Xiaowan Hu, Haoqian Wang, Xin Yuan, Yulun Zhang, Radu Timofte, and Luc Van Gool

论文

奖项

简介

这是一个用于光谱压缩成像重建的基线和工具箱。本仓库支持 超过 15 种 算法。我们的方法 MST++ 赢得了 NTIRE 2022 RGB 图像光谱恢复挑战赛冠军。如果您觉得这个仓库有用,请给它一个星标 ⭐ 并考虑在您的研究中引用我们的论文。谢谢。

最新动态

  • 2025.02.10: NTIRE 2025 低光图像增强挑战赛 已启动。欢迎使用我们的 Retinexformer 和 MST 参加此次挑战赛。😄
  • 2024.04.09: 我们发布了三种传统基于模型的方法的结果,即 TwISTGAP-TVDeSCI,以方便您开展研究。请随意使用。😄
  • 2024.03.21: 我们的方法 RetinexformerMST++(NTIRE 2022 光谱重建挑战赛冠军)在 NTIRE 2024 低光增强挑战赛 中排名前二。代码、预训练模型、训练日志和增强结果将在 Retinexformer 仓库 中发布。敬请期待!🚀
  • 2024.02.15: NTIRE 2024 低光增强挑战赛 开始。欢迎使用我们的 RetinexformerMST++(NTIRE 2022 光谱重建挑战赛冠军)参加此次挑战赛!:trophy:
  • 2023.12.02: 真实实验的代码已更新。欢迎查看和使用。🥳
  • 2023.11.24: BiSRNet(NeurIPS 2023)的代码、模型和结果已在本仓库发布。我们还开发了一个用于二值化 SCI 重建的工具箱 BiSCI。欢迎查看和使用。🌟
  • 2023.11.02: MST、MST++、CST 和 DAUHST 已被添加到 Awesome-Transformer-Attention 集合中。💫
  • 2023.09.21: 我们的新工作 BiSRNet 被 NeurIPS 23 接收。代码将在本仓库和 BiSCI 发布
  • 2023.02.26: 我们发布了 五个真实场景十个模拟场景 的 RGB 图像。请随意查看和使用。🌟
  • 2022.11.02: 我们提供了更多最先进方法的视觉结果,以及评估模型参数和计算复杂度的功能。请随意查看和使用。:high_brightness:
  • 2022.10.23: DAUHST 的代码、模型和重建 HSI(高光谱图像, Hyperspectral Image)结果已发布。🔥
  • 2022.09.15: 我们的 DAUHST 已被 NeurIPS 2022 接收,代码和模型即将发布。:rocket:
  • 2022.07.20: CST 的代码、模型和重建 HSI 结果已发布。🔥
  • 2022.07.04: 我们的论文 CST 已被 ECCV 2022 接收,代码和模型即将发布。:rocket:
  • 2022.06.14: MSTMST++ 的代码和模型已发布。本仓库支持 12 种基于学习的方法,作为光谱压缩成像的工具箱。模型库将会扩大。🔥
  • 2022.05.20: 我们的工作 DAUHST 已发布在 arxiv 上。:dizzy:
  • 2022.04.02: 后续工作 MST++ 赢得了 NTIRE 2022 光谱重建挑战赛冠军。:trophy:
  • 2022.03.09: 我们的工作 CST 已发布在 arxiv 上。:dizzy:
  • 2022.03.02: 我们的论文 MST 已被 CVPR 2022 接收,代码和模型即将发布。:rocket:
场景 2 场景 3 场景 4 场景 7

 

1. 与最先进方法的比较

支持 12 种基于学习(learning-based)的算法和 3 种基于模型(model-based)的方法。

支持的算法:

我们计划在未来扩充模型库(model zoo)。

| MST 与 SOTA 对比 | CST 与 MST 对比 | | :--------------------------------------------------: : :---------------------------------------------: | | | | | MST++ 与 SOTA 对比 | DAUHST 与 SOTA 对比 | | | |

BiSRNet 与 SOTA BNNs 对比

仿真数据集上的定量比较

方法(Method) 参数量 (M) 计算量 (G) PSNR SSIM 模型仓库(Model Zoo) 仿真结果(Simulation Result) 真实场景结果(Real Result)
TwIST - - 23.12 0.669 - Google Drive / 百度网盘 Google Drive / 百度网盘
GAP-TV - - 24.36 0.669 - Google Drive / 百度网盘 Google Drive / 百度网盘
DeSCI - - 25.27 0.721 - Google Drive / 百度网盘 Google Drive / 百度网盘
λ-Net 62.64 117.98 28.53 0.841 Google Drive / 百度网盘 Google Drive / 百度网盘 Google Drive / 百度网盘
TSA-Net 44.25 110.06 31.46 0.894 Google Drive / 百度网盘 Google Drive / 百度网盘 Google Drive / 百度网盘
DGSMP 3.76 646.65 32.63 0.917 Google Drive / 百度网盘 Google Drive / 百度网盘 Google Drive / 百度网盘
GAP-Net 4.27 78.58 33.26 0.917 Google Drive / 百度网盘 Google Drive / 百度网盘 Google Drive / 百度网盘
ADMM-Net 4.27 78.58 33.58 0.918 Google Drive / 百度网盘 Google Drive / 百度网盘 Google Drive / 百度网盘
BIRNAT 4.40 2122.66 37.58 0.960 Google Drive / 百度网盘 Google Drive / 百度网盘 Google Drive / 百度网盘
HDNet 2.37 154.76 34.97 0.943 Google Drive / 百度网盘 Google Drive / 百度网盘 Google Drive / 百度网盘
MST-S 0.93 12.96 34.26 0.935 Google Drive / 百度网盘 Google Drive / 百度网盘 Google Drive / 百度网盘
MST-M 1.50 18.07 34.94 0.943 Google Drive / 百度网盘 Google Drive / 百度网盘 Google Drive / 百度网盘
MST-L 2.03 28.15 35.18 0.948 Google Drive / 百度网盘 Google Drive / 百度网盘 Google Drive / 百度网盘
MST++ 1.33 19.42 35.99 0.951 Google Drive / 百度网盘 Google Drive / 百度网盘 Google Drive / 百度网盘
CST-S 1.20 11.67 34.71 0.940 Google Drive / 百度网盘 Google Drive / 百度网盘 Google Drive / 百度网盘
CST-M 1.36 16.91 35.31 0.947 Google Drive / 百度网盘 Google Drive / 百度网盘 Google Drive / 百度网盘
CST-L 3.00 27.81 35.85 0.954 Google Drive / 百度网盘 Google Drive / 百度网盘 Google Drive / 百度网盘
CST-L-Plus 3.00 40.10 36.12 0.957 Google Drive / 百度网盘 Google Drive / 百度网盘 Google Drive / 百度网盘
DAUHST-2stg 1.40 18.44 36.34 0.952 Google Drive / 百度网盘 Google Drive /百度网盘 Google Drive / 百度网盘
DAUHST-3stg 2.08 27.17 37.21 0.959 Google Drive / 百度网盘 Google Drive / 百度网盘 Google Drive / 百度网盘
DAUHST-5stg 3.44 44.61 37.75 0.962 Google Drive / 百度网盘 Google Drive / 百度网盘 Google Drive / 百度网盘
DAUHST-9stg 6.15 79.50 38.36 0.967 Google Drive / 百度网盘 Google Drive / 百度网盘 Google Drive / 百度网盘
BiSRNet 0.036 1.18 29.76 0.837 Google Drive / 百度网盘 Google Drive / 百度网盘 Google Drive / 百度网盘

性能报告基于 KAIST 数据集的 10 个场景。FLOPS 的测试尺寸为 256 x 256。

我们还提供了 五个真实场景十个模拟场景 的 RGB 图像,方便您绘制图表。

注意:百度网盘 的提取码为 mst1

 

2. 创建环境:

  • Python 3(推荐使用 Anaconda

  • NVIDIA GPU + CUDA

  • Python 包:

  pip install -r requirements.txt

 

3. 准备数据集:

下载 cave_1024_28(百度网盘,提取码:fo0q | One Drive)、CAVE_512_28(百度网盘,提取码:ixoe | One Drive)、KAIST_CVPR2021(百度网盘,提取码:5mmn | One Drive)、TSA_simu_data(百度网盘,提取码:efu8 | One Drive)、TSA_real_data(百度网盘,提取码:eaqe | One Drive),然后将其放入 datasets/ 的相应文件夹中,并按以下形式重新整理:

|--MST
    |--real
    	|-- test_code
    	|-- train_code
    |--simulation
    	|-- test_code
    	|-- train_code
    |--visualization
    |--datasets
        |--cave_1024_28
            |--scene1.mat
            |--scene2.mat
            :  
            |--scene205.mat
        |--CAVE_512_28
            |--scene1.mat
            |--scene2.mat
            :  
            |--scene30.mat
        |--KAIST_CVPR2021  
            |--1.mat
            |--2.mat
            : 
            |--30.mat
        |--TSA_simu_data  
            |--mask.mat   
            |--Truth
                |--scene01.mat
                |--scene02.mat
                : 
                |--scene10.mat
        |--TSA_real_data  
            |--mask.mat   
            |--Measurements
                |--scene1.mat
                |--scene2.mat
                : 
                |--scene5.mat

遵循 TSA-Net 和 DGSMP 的方法,我们使用 CAVE 数据集(cave_1024_28)作为模拟训练集。CAVE(CAVE_512_28)和 KAIST(KAIST_CVPR2021)数据集均用作真实训练集。

 

4. 模拟实验:

4.1 训练

cd MST/simulation/train_code/

# MST_S
python train.py --template mst_s --outf ./exp/mst_s/ --method mst_s 

# MST_M
python train.py --template mst_m --outf ./exp/mst_m/ --method mst_m  

# MST_L
python train.py --template mst_l --outf ./exp/mst_l/ --method mst_l 

# CST_S
python train.py --template cst_s --outf ./exp/cst_s/ --method cst_s 

# CST_M
python train.py --template cst_m --outf ./exp/cst_m/ --method cst_m  

# CST_L
python train.py --template cst_l --outf ./exp/cst_l/ --method cst_l

# CST_L_Plus
python train.py --template cst_l_plus --outf ./exp/cst_l_plus/ --method cst_l_plus

# GAP-Net
python train.py --template gap_net --outf ./exp/gap_net/ --method gap_net 

# ADMM-Net
python train.py --template admm_net --outf ./exp/admm_net/ --method admm_net 

# TSA-Net
python train.py --template tsa_net --outf ./exp/tsa_net/ --method tsa_net 

# HDNet
python train.py --template hdnet --outf ./exp/hdnet/ --method hdnet 

# DGSMP
python train.py --template dgsmp --outf ./exp/dgsmp/ --method dgsmp 

# BIRNAT
python train.py --template birnat --outf ./exp/birnat/ --method birnat 

# MST_Plus_Plus
python train.py --template mst_plus_plus --outf ./exp/mst_plus_plus/ --method mst_plus_plus 

# λ-Net
python train.py --template lambda_net --outf ./exp/lambda_net/ --method lambda_net

# DAUHST-2stg
python train.py --template dauhst_2stg --outf ./exp/dauhst_2stg/ --method dauhst_2stg

# DAUHST-3stg
python train.py --template dauhst_3stg --outf ./exp/dauhst_3stg/ --method dauhst_3stg

# DAUHST-5stg
python train.py --template dauhst_5stg --outf ./exp/dauhst_5stg/ --method dauhst_5stg

# DAUHST-9stg
python train.py --template dauhst_9stg --outf ./exp/dauhst_9stg/ --method dauhst_9stg

# BiSRNet
python train.py --template bisrnet --outf ./exp/bisrnet/ --method bisrnet
  • 训练日志、训练好的模型和重建的高光谱图像(HSI, Hyperspectral Image)将保存在 MST/simulation/train_code/exp/

4.2 测试

从(Google Drive / 百度网盘,提取码:mst1)下载预训练模型库,并将其放置到 MST/simulation/test_code/model_zoo/

运行以下命令在模拟数据集上测试模型。

cd MST/simulation/test_code/

# MST_S
python test.py --template mst_s --outf ./exp/mst_s/ --method mst_s --pretrained_model_path ./model_zoo/mst/mst_s.pth

# MST_M
python test.py --template mst_m --outf ./exp/mst_m/ --method mst_m --pretrained_model_path ./model_zoo/mst/mst_m.pth

# MST_L
python test.py --template mst_l --outf ./exp/mst_l/ --method mst_l --pretrained_model_path ./model_zoo/mst/mst_l.pth

# CST_S
python test.py --template cst_s --outf ./exp/cst_s/ --method cst_s --pretrained_model_path ./model_zoo/cst/cst_s.pth

# CST_M
python test.py --template cst_m --outf ./exp/cst_m/ --method cst_m --pretrained_model_path ./model_zoo/cst/cst_m.pth

# CST_L
python test.py --template cst_l --outf ./exp/cst_l/ --method cst_l --pretrained_model_path ./model_zoo/cst/cst_l.pth

# CST_L_Plus
python test.py --template cst_l_plus --outf ./exp/cst_l_plus/ --method cst_l_plus --pretrained_model_path ./model_zoo/cst/cst_l_plus.pth

# GAP_Net
python test.py --template gap_net --outf ./exp/gap_net/ --method gap_net --pretrained_model_path ./model_zoo/gap_net/gap_net.pth

# ADMM_Net
python test.py --template admm_net --outf ./exp/admm_net/ --method admm_net --pretrained_model_path ./model_zoo/admm_net/admm_net.pth

# TSA_Net
python test.py --template tsa_net --outf ./exp/tsa_net/ --method tsa_net --pretrained_model_path ./model_zoo/tsa_net/tsa_net.pth

# HDNet
python test.py --template hdnet --outf ./exp/hdnet/ --method hdnet --pretrained_model_path ./model_zoo/hdnet/hdnet.pth

# DGSMP
python test.py --template dgsmp --outf ./exp/dgsmp/ --method dgsmp --pretrained_model_path ./model_zoo/dgsmp/dgsmp.pth

# BIRNAT
python test.py --template birnat --outf ./exp/birnat/ --method birnat --pretrained_model_path ./model_zoo/birnat/birnat.pth

# MST_Plus_Plus
python test.py --template mst_plus_plus --outf ./exp/mst_plus_plus/ --method mst_plus_plus --pretrained_model_path ./model_zoo/mst_plus_plus/mst_plus_plus.pth

# λ-Net
python test.py --template lambda_net --outf ./exp/lambda_net/ --method lambda_net --pretrained_model_path ./model_zoo/lambda_net/lambda_net.pth

# DAUHST-2stg
python test.py --template dauhst_2stg --outf ./exp/dauhst_2stg/ --method dauhst_2stg --pretrained_model_path ./model_zoo/dauhst_2stg/dauhst_2stg.pth

# DAUHST-3stg
python test.py --template dauhst_3stg --outf ./exp/dauhst_3stg/ --method dauhst_3stg --pretrained_model_path ./model_zoo/dauhst_3stg/dauhst_3stg.pth

# DAUHST-5stg
python test.py --template dauhst_5stg --outf ./exp/dauhst_5stg/ --method dauhst_5stg --pretrained_model_path ./model_zoo/dauhst_5stg/dauhst_5stg.pth

# DAUHST-9stg
python test.py --template dauhst_9stg --outf ./exp/dauhst_9stg/ --method dauhst_9stg --pretrained_model_path ./model_zoo/dauhst_9stg/dauhst_9stg.pth

# BiSRNet
python test.py --template bisrnet --outf ./exp/bisrnet/ --method bisrnet --pretrained_model_path ./model_zoo/bisrnet/bisrnet.pth
  • 重建的高光谱图像(HSI, Hyperspectral Image)将输出到 MST/simulation/test_code/exp/。然后将重建结果放入 MST/simulation/test_code/Quality_Metrics/results,并运行以下 MATLAB 命令来计算重建高光谱图像的 PSNR(峰值信噪比)和 SSIM(结构相似性指数)。
Run cal_quality_assessment.m
  • 评估模型的参数量(Params)和浮点运算量(FLOPS)

    我们在 simulation/test_code/utils.py 中提供了两个函数 my_summary()my_summary_bnn()。使用它们来评估全精度模型和二值化模型的参数量和 FLOPS。
from utils import my_summary, my_summary_bnn
my_summary(MST(), 256, 256, 28, 1)
my_summary_bnn(BiSRNet(), 256, 256, 28, 1)

4.3 可视化

  • 将重建的高光谱图像放入 MST/visualization/simulation_results/results,并将其重命名为 method.mat,例如 mst_s.mat。

  • 生成重建高光谱图像的 RGB 图像

 cd MST/visualization/
 Run show_simulation.m 
  • 绘制光谱密度曲线
cd MST/visualization/
Run show_line.m

 

5. 真实实验:

5.1 训练

cd MST/real/train_code/

# MST_S
python train.py --template mst_s --outf ./exp/mst_s/ --method mst_s 

# MST_M
python train.py --template mst_m --outf ./exp/mst_m/ --method mst_m  

# MST_L
python train.py --template mst_l --outf ./exp/mst_l/ --method mst_l 

# CST_S
python train.py --template cst_s --outf ./exp/cst_s/ --method cst_s 

# CST_M
python train.py --template cst_m --outf ./exp/cst_m/ --method cst_m  

# CST_L
python train.py --template cst_l --outf ./exp/cst_l/ --method cst_l

# CST_L_Plus
python train.py --template cst_l_plus --outf ./exp/cst_l_plus/ --method cst_l_plus

# GAP-Net
python train.py --template gap_net --outf ./exp/gap_net/ --method gap_net 

# ADMM-Net
python train.py --template admm_net --outf ./exp/admm_net/ --method admm_net 

# TSA-Net
python train.py --template tsa_net --outf ./exp/tsa_net/ --method tsa_net 

# HDNet
python train.py --template hdnet --outf ./exp/hdnet/ --method hdnet 

# DGSMP
python train.py --template dgsmp --outf ./exp/dgsmp/ --method dgsmp 

# BIRNAT
python train.py --template birnat --outf ./exp/birnat/ --method birnat 

# MST_Plus_Plus
python train.py --template mst_plus_plus --outf ./exp/mst_plus_plus/ --method mst_plus_plus 

# λ-Net
python train.py --template lambda_net --outf ./exp/lambda_net/ --method lambda_net

# DAUHST-2stg
python train.py --template dauhst_2stg --outf ./exp/dauhst_2stg/ --method dauhst_2stg

# DAUHST-3stg
python train.py --template dauhst_3stg --outf ./exp/dauhst_3stg/ --method dauhst_3stg

# DAUHST-5stg
python train.py --template dauhst_5stg --outf ./exp/dauhst_5stg/ --method dauhst_5stg

# DAUHST-9stg
python train.py --template dauhst_9stg --outf ./exp/dauhst_9stg/ --method dauhst_9stg

# BiSRNet
python train_s.py --outf ./exp/bisrnet/ --method bisrnet
  • 如果没有大显存 GPU,请添加 --size 128 以使用较小的图像块尺寸。

  • 训练日志、训练好的模型和重建的高光谱图像将保存在 MST/real/train_code/exp/

  • 注意:如果无法获取掩码数据或 GPU 资源有限,除 BiSRNet 外的其他方法可以使用 train_s.py 进行训练。此时需要替换上述命令中的 --method 参数,并进行一些修改。

5.2 测试

BiSRNet 的预训练模型可以从 (Google Drive / 百度网盘,提取码:mst1) 下载,并将其放置到 MST/real/test_code/model_zoo/

cd MST/real/test_code/

# MST_S
python test.py --outf ./exp/mst_s/ --pretrained_model_path ./model_zoo/mst/mst_s.pth

# MST_M
python test.py --outf ./exp/mst_m/ --pretrained_model_path ./model_zoo/mst/mst_m.pth

# MST_L
python test.py  --outf ./exp/mst_l/ --pretrained_model_path ./model_zoo/mst/mst_l.pth

# CST_S
python test.py --outf ./exp/cst_s/ --pretrained_model_path ./model_zoo/cst/cst_s.pth

# CST_M
python test.py --outf ./exp/cst_m/ --pretrained_model_path ./model_zoo/cst/cst_m.pth

# CST_L
python test.py --outf ./exp/cst_l/ --pretrained_model_path ./model_zoo/cst/cst_l.pth

# CST_L_Plus
python test.py --outf ./exp/cst_l_plus/ --pretrained_model_path ./model_zoo/cst/cst_l_plus.pth

# GAP_Net
python test.py --outf ./exp/gap_net/ --pretrained_model_path ./model_zoo/gap_net/gap_net.pth

# ADMM_Net
python test.py --outf ./exp/admm_net/ --pretrained_model_path ./model_zoo/admm_net/admm_net.pth

# TSA_Net
python test.py --outf ./exp/tsa_net/ --pretrained_model_path ./model_zoo/tsa_net/tsa_net.pth

# HDNet
python test.py --template hdnet --outf ./exp/hdnet/ --method hdnet --pretrained_model_path ./model_zoo/hdnet/hdnet.pth

# DGSMP
python test.py --outf ./exp/dgsmp/ --pretrained_model_path ./model_zoo/dgsmp/dgsmp.pth

# BIRNAT
python test.py --outf ./exp/birnat/ --pretrained_model_path ./model_zoo/birnat/birnat.pth

# MST_Plus_Plus
python test.py --outf ./exp/mst_plus_plus/ --pretrained_model_path ./model_zoo/mst_plus_plus/mst_plus_plus.pth

# λ-Net
python test.py --outf ./exp/lambda_net/ --pretrained_model_path ./model_zoo/lambda_net/lambda_net.pth

# DAUHST_2stg
python test.py --outf ./exp/dauhst_2stg/ --pretrained_model_path ./model_zoo/dauhst/dauhst_2stg.pth

# DAUHST_3stg
python test.py --outf ./exp/dauhst_3stg/ --pretrained_model_path ./model_zoo/dauhst/dauhst_3stg.pth

# DAUHST_5stg
python test.py --outf ./exp/dauhst_5stg/ --pretrained_model_path ./model_zoo/dauhst/dauhst_5stg.pth

# DAUHST_9stg
python test.py --outf ./exp/dauhst_9stg/ --pretrained_model_path ./model_zoo/dauhst/dauhst_9stg.pth

# BiSRNet
python test.py --outf ./exp/bisrnet  --pretrained_model_path ./model_zoo/bisrnet/bisrnet.pth --method bisrnet
  • 重建的高光谱图像(HSI, Hyperspectral Image)将输出到 MST/real/test_code/exp/

5.3 可视化

  • 将重建的 HSI 放入 MST/visualization/real_results/results 并重命名为 method.mat,例如 mst_plus_plus.mat。

  • 生成重建 HSI 的 RGB 图像

cd MST/visualization/
Run show_real.m

 

6. 引用

如果本仓库对您有帮助,请考虑引用我们的工作:



# MST
@inproceedings{mst,
  title={Mask-guided Spectral-wise Transformer for Efficient Hyperspectral Image Reconstruction},
  author={Yuanhao Cai and Jing Lin and Xiaowan Hu and Haoqian Wang and Xin Yuan and Yulun Zhang and Radu Timofte and Luc Van Gool},
  booktitle={CVPR},
  year={2022}
}


# CST
@inproceedings{cst,
  title={Coarse-to-Fine Sparse Transformer for Hyperspectral Image Reconstruction},
  author={Yuanhao Cai and Jing Lin and Xiaowan Hu and Haoqian Wang and Xin Yuan and Yulun Zhang and Radu Timofte and Luc Van Gool},
  booktitle={ECCV},
  year={2022}
}


# DAUHST
@inproceedings{dauhst,
  title={Degradation-Aware Unfolding Half-Shuffle Transformer for Spectral Compressive Imaging},
  author={Yuanhao Cai and Jing Lin and Haoqian Wang and Xin Yuan and Henghui Ding and Yulun Zhang and Radu Timofte and Luc Van Gool},
  booktitle={NeurIPS}, 
  year={2022}
}


# BiSCI
@inproceedings{bisci,
  title={Binarized Spectral Compressive Imaging},
  author={Yuanhao Cai and Yuxin Zheng and Jing Lin and Xin Yuan and Yulun Zhang and Haoqian Wang},
  booktitle={NeurIPS},
  year={2023}
}


# MST++
@inproceedings{mst_pp,
  title={MST++: Multi-stage Spectral-wise Transformer for Efficient Spectral Reconstruction},
  author={Yuanhao Cai and Jing Lin and Zudi Lin and Haoqian Wang and Yulun Zhang and Hanspeter Pfister and Radu Timofte and Luc Van Gool},
  booktitle={CVPRW},
  year={2022}
}


# HDNet
@inproceedings{hdnet,
  title={HDNet: High-resolution Dual-domain Learning for Spectral Compressive Imaging},
  author={Xiaowan Hu and Yuanhao Cai and Jing Lin and  Haoqian Wang and Xin Yuan and Yulun Zhang and Radu Timofte and Luc Van Gool},
  booktitle={CVPR},
  year={2022}
}

常见问题

相似工具推荐

stable-diffusion-webui

stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面,旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点,将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。 无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师,还是想要深入探索模型潜力的开发者与研究人员,都能从中获益。其核心亮点在于极高的功能丰富度:不仅支持文生图、图生图、局部重绘(Inpainting)和外绘(Outpainting)等基础模式,还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外,它内置了 GFPGAN 和 CodeFormer 等人脸修复工具,支持多种神经网络放大算法,并允许用户通过插件系统无限扩展能力。即使是显存有限的设备,stable-diffusion-webui 也提供了相应的优化选项,让高质量的 AI 艺术创作变得触手可及。

162.1k|★★★☆☆|今天
开发框架图像Agent

everything-claude-code

everything-claude-code 是一套专为 AI 编程助手(如 Claude Code、Codex、Cursor 等)打造的高性能优化系统。它不仅仅是一组配置文件,而是一个经过长期实战打磨的完整框架,旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。 通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能,everything-claude-code 能显著提升 AI 在复杂任务中的表现,帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略,使得模型响应更快、成本更低,同时有效防御潜在的攻击向量。 这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库,还是需要 AI 协助进行安全审计与自动化测试,everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目,它融合了多语言支持与丰富的实战钩子(hooks),让 AI 真正成长为懂上

139k|★★☆☆☆|今天
开发框架Agent语言模型

ComfyUI

ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎,专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式,采用直观的节点式流程图界面,让用户通过连接不同的功能模块即可构建个性化的生成管线。 这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景,也能自由组合模型、调整参数并实时预览效果,轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性,不仅支持 Windows、macOS 和 Linux 全平台,还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构,并率先支持 SDXL、Flux、SD3 等前沿模型。 无论是希望深入探索算法潜力的研究人员和开发者,还是追求极致创作自由度的设计师与资深 AI 绘画爱好者,ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能,使其成为当前最灵活、生态最丰富的开源扩散模型工具之一,帮助用户将创意高效转化为现实。

107.7k|★★☆☆☆|2天前
开发框架图像Agent

NextChat

NextChat 是一款轻量且极速的 AI 助手,旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性,以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发,NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。 这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言,它也提供了便捷的自托管方案,支持一键部署到 Vercel 或 Zeabur 等平台。 NextChat 的核心亮点在于其广泛的模型兼容性,原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型,让用户在一个界面即可自由切换不同 AI 能力。此外,它还率先支持 MCP(Model Context Protocol)协议,增强了上下文处理能力。针对企业用户,NextChat 提供专业版解决方案,具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能,满足公司对数据隐私和个性化管理的高标准要求。

87.6k|★★☆☆☆|今天
开发框架语言模型

ML-For-Beginners

ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程,旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周,包含 26 节精炼课程和 52 道配套测验,内容涵盖从基础概念到实际应用的完整流程,有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。 无论是希望转型的开发者、需要补充算法背景的研究人员,还是对人工智能充满好奇的普通爱好者,都能从中受益。课程不仅提供了清晰的理论讲解,还强调动手实践,让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持,通过自动化机制提供了包括简体中文在内的 50 多种语言版本,极大地降低了全球不同背景用户的学习门槛。此外,项目采用开源协作模式,社区活跃且内容持续更新,确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路,ML-For-Beginners 将是理想的起点。

85k|★★☆☆☆|今天
图像数据工具视频

ragflow

RAGFlow 是一款领先的开源检索增强生成(RAG)引擎,旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体(Agent)能力相结合,不仅支持从各类文档中高效提取知识,还能让模型基于这些知识进行逻辑推理和任务执行。 在大模型应用中,幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构(如表格、图表及混合排版),显著提升了信息检索的准确度,从而有效减少模型“胡编乱造”的现象,确保回答既有据可依又具备时效性。其内置的智能体机制更进一步,使系统不仅能回答问题,还能自主规划步骤解决复杂问题。 这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统,还是致力于探索大模型在垂直领域落地的创新者,都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口,既降低了非算法背景用户的上手门槛,也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目,它正成为连接通用大模型与行业专有知识之间的重要桥梁。

77.1k|★★★☆☆|2天前
Agent图像开发框架