BAAI / Brainmu-Spike

huggingface.co
Total runs: 10.4K
24-hour runs: 11
7-day runs: 89
30-day runs: 10.4K
Model's Last Updated: September 16 2026

Introduction of Brainmu-Spike

Model Details of Brainmu-Spike

Brainμ-Spike

Brainμ-Spike:脉冲相机影像重建

北京大学余肇飞团队与北京智源人工智能研究院(BAAI)联合开展面向 Brainmu 模型微调的脉冲相机影像重建研究。

目录说明
config.json         小网络结构、输入规格及推理参数
model.safetensors   小网络权重
README.md           项目说明
src/
├── code/           训练、条件图像导出与微调代码
├── scripts/        安装、推理和网页入口
├── ui/             网页界面与多 GPU 调度
├── vendor/Brainmu/  适配后的上游模型代码
├── configs/        配置示例
├── tests/          单元测试
├── assets/         标识图片
├── requirements.txt
├── LICENSE
└── NOTICE

根目录权重对应脉冲重建卷积模块。基础大模型和 LoRA 权重暂未发布;完整生成流程需要另行准备这两部分权重。代码来源与许可见 LICENSE 和 NOTICE 。

环境安装

需要 Linux、NVIDIA GPU 和 uv。安装脚本使用 Python 3.12、PyTorch 2.11.0、torchvision 0.26.0、CUDA 13.0 对应的 PyTorch 构建,以及 FlashAttention 2.8.3.post1;请准备兼容的 NVIDIA 驱动及用于编译扩展的 CUDA 工具链。其余依赖见 src/requirements.txt 。

在仓库根目录执行:

bash src/scripts/setup_uv.sh

脚本创建 src/.venv 并安装依赖,不覆盖已有环境。若已有兼容环境,可在评测时设置 BRAINMU_ENV=/path/to/environment ;命令行评测启动脚本仍需要 uv。

小网络推理

在仓库根目录执行;本入口读取根目录的配置和 safetensors 权重,不加载大模型。只运行此入口可按 轻量环境说明 安装 CPU 依赖。

python src/scripts/infer_frontend.py \
  --spike-dir /path/to/test/spike \
  --gt-dir /path/to/test/gt \
  --output-dir outputs/frontend_test \
  --device cpu

输入 DAT 为 41 × 250 × 400 的二值序列,little-bit 打包,共 512,500 字节;读取时沿高度翻转。GT 为同名 400 × 250 PNG。 --gt-dir 可省略;提供 GT 时输出逐图 PSNR/SSIM 与平均指标。 --limit 3 可用于小规模验证;GPU 环境可选择 --device cuda:0 。

完整流程推理与评测

准备好基础模型、LoRA 和数据,并激活 src/.venv 后,从仓库根目录执行:

CUDA_VISIBLE_DEVICES=0 bash src/scripts/test.sh \
  --model-path /path/to/base_model \
  --adapter /path/to/adapter.safetensors \
  --frontend "$PWD/model.safetensors" \
  --spike-dir /path/to/test/spike \
  --gt-dir /path/to/test/gt \
  --output-dir "$PWD/outputs/test1000"

默认检查并评测 1,000 对数据,固定提示词为 Restore the clean image. 。可通过 --prompt 自定义提示词。常用选项:

  • --check-only :只检查文件与数据,不执行模型推理;仍需提供权重文件路径。
  • --expected-count N :调整要求的数据数量。
  • --expected-count 0 --limit 3 :仅对排序后的前三张进行小规模试运行。

每次使用新的输出目录。输出包括:

文件或目录 内容
condition/ 卷积模块生成的条件图像
prediction/ 重建 RGB 图像
metrics.csv 逐样本指标
metrics.json 已完成数量、平均指标和运行状态
dataset_manifest.json 输入文件清单及内容哈希
run_config.json 推理设置与运行环境信息

评测将预测图像转换为灰度、归一化到 [0,1] ,逐图计算 PSNR 后取平均;SSIM 使用 11 × 11 高斯窗口、σ=1.5,不裁剪边界。GT 会按预测尺寸调整。只有 status=complete 且完成数量等于请求数量才表示评测结束。请使用独立测试数据;程序不会自动检测训练与测试集重叠。

网页演示
source src/.venv/bin/activate
bash src/scripts/start_ui.sh

打开 http://127.0.0.1:8997 ,依次指定权重路径、加载模型、加载测试数据并开始评测。界面支持 1/2/4/8 卡,默认 8 卡;请在加载前按可用 GPU 数量选择。网页入口预期 1,000 对 DAT/GT,其他数量请使用命令行入口。

远程部署时,在本地建立两个端口转发:

ssh -N -L 8997:127.0.0.1:8997 -L 8998:127.0.0.1:8998 USER@HOST

界面没有用户认证,请通过 SSH 转发访问,不要直接暴露到公网。在启动终端按 Ctrl+C 停止服务。

Runs of BAAI Brainmu-Spike on huggingface.co

10.4K
Total runs
11
24-hour runs
39
3-day runs
89
7-day runs
10.4K
30-day runs

More Information About Brainmu-Spike huggingface.co Model

More Brainmu-Spike license Visit here:

https://choosealicense.com/licenses/apache-2.0

Brainmu-Spike huggingface.co

Brainmu-Spike huggingface.co is an AI model on huggingface.co that provides Brainmu-Spike's model effect (), which can be used instantly with this BAAI Brainmu-Spike model. huggingface.co supports a free trial of the Brainmu-Spike model, and also provides paid use of the Brainmu-Spike. Support call Brainmu-Spike model through api, including Node.js, Python, http.

Brainmu-Spike huggingface.co Url

https://huggingface.co/BAAI/Brainmu-Spike

BAAI Brainmu-Spike online free

Brainmu-Spike huggingface.co is an online trial and call api platform, which integrates Brainmu-Spike's modeling effects, including api services, and provides a free online trial of Brainmu-Spike, you can try Brainmu-Spike online for free by clicking the link below.

BAAI Brainmu-Spike online free url in huggingface.co:

https://huggingface.co/BAAI/Brainmu-Spike

Brainmu-Spike install

Brainmu-Spike is an open source model from GitHub that offers a free installation service, and any user can find Brainmu-Spike on GitHub to install. At the same time, huggingface.co provides the effect of Brainmu-Spike install, users can directly use Brainmu-Spike installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

Brainmu-Spike install url in huggingface.co:

https://huggingface.co/BAAI/Brainmu-Spike

Url of Brainmu-Spike

Brainmu-Spike huggingface.co Url

Provider of Brainmu-Spike huggingface.co

BAAI
ORGANIZATIONS

Other API from BAAI

huggingface.co

Total runs: 63.4M
Run Growth: -4.4M
Growth Rate: -6.93%
Updated:February 22 2024
huggingface.co

Total runs: 35.7M
Run Growth: -1.8M
Growth Rate: -5.08%
Updated:July 03 2024
huggingface.co

Total runs: 10.4M
Run Growth: -1.5M
Growth Rate: -14.18%
Updated:February 21 2024
huggingface.co

Total runs: 9.8M
Run Growth: -3.9M
Growth Rate: -39.71%
Updated:February 21 2024
huggingface.co

Total runs: 1.9M
Run Growth: 300.5K
Growth Rate: 15.69%
Updated:April 17 2024
huggingface.co

Total runs: 779.2K
Run Growth: -398.4K
Growth Rate: -51.12%
Updated:April 02 2024
huggingface.co

Total runs: 669.4K
Run Growth: -406.7K
Growth Rate: -60.76%
Updated:October 12 2023
huggingface.co

Total runs: 202.4K
Run Growth: -528.9K
Growth Rate: -261.31%
Updated:December 13 2023
huggingface.co

Total runs: 66.0K
Run Growth: 51.6K
Growth Rate: 78.19%
Updated:October 12 2023
huggingface.co

Total runs: 59.7K
Run Growth: -15.8K
Growth Rate: -26.57%
Updated:July 13 2026
huggingface.co

Total runs: 53.6K
Run Growth: -28.6K
Growth Rate: -53.28%
Updated:October 12 2023
huggingface.co

Total runs: 52.1K
Run Growth: 2.6K
Growth Rate: 4.98%
Updated:October 12 2023
huggingface.co

Total runs: 41.2K
Run Growth: -474
Growth Rate: -1.15%
Updated:January 15 2025
huggingface.co

Total runs: 40.6K
Run Growth: 2.1K
Growth Rate: 5.25%
Updated:November 14 2023
huggingface.co

Total runs: 15.8K
Run Growth: -650
Growth Rate: -4.11%
Updated:April 16 2025
huggingface.co

Total runs: 8.8K
Run Growth: -9.4K
Growth Rate: -105.96%
Updated:October 12 2023
huggingface.co

Total runs: 5.9K
Run Growth: 1.9K
Growth Rate: 33.03%
Updated:May 20 2025
huggingface.co

Total runs: 4.7K
Run Growth: 3.2K
Growth Rate: 67.93%
Updated:April 19 2024
huggingface.co

Total runs: 2.4K
Run Growth: 1.1K
Growth Rate: 45.64%
Updated:April 10 2026
huggingface.co

Total runs: 2.3K
Run Growth: 155
Growth Rate: 6.66%
Updated:September 11 2026
huggingface.co

Total runs: 1.8K
Run Growth: 973
Growth Rate: 53.26%
Updated:November 28 2024
huggingface.co

Total runs: 1.8K
Run Growth: -13.8K
Growth Rate: -775.56%
Updated:January 15 2025
huggingface.co

Total runs: 1.7K
Run Growth: 161
Growth Rate: 9.59%
Updated:April 10 2026
huggingface.co

Total runs: 1.5K
Run Growth: 123
Growth Rate: 8.47%
Updated:December 31 2022
huggingface.co

Total runs: 1.3K
Run Growth: 971
Growth Rate: 73.84%
Updated:September 11 2026
huggingface.co

Total runs: 774
Run Growth: -13
Growth Rate: -1.68%
Updated:May 23 2025
huggingface.co

Total runs: 700
Run Growth: -843
Growth Rate: -119.41%
Updated:February 07 2024
huggingface.co

Total runs: 657
Run Growth: -469
Growth Rate: -71.39%
Updated:October 23 2024
huggingface.co

Total runs: 657
Run Growth: -113
Growth Rate: -17.20%
Updated:October 24 2024
huggingface.co

Total runs: 513
Run Growth: -362
Growth Rate: -70.57%
Updated:April 18 2023
huggingface.co

Total runs: 480
Run Growth: -222
Growth Rate: -46.25%
Updated:July 13 2026
huggingface.co

Total runs: 451
Run Growth: 299
Growth Rate: 66.30%
Updated:April 02 2024
huggingface.co

Total runs: 419
Run Growth: -99
Growth Rate: -23.08%
Updated:August 11 2026
huggingface.co

Total runs: 413
Run Growth: -27
Growth Rate: -6.54%
Updated:April 10 2026
huggingface.co

Total runs: 398
Run Growth: 62
Growth Rate: 15.58%
Updated:July 13 2026
huggingface.co

Total runs: 393
Run Growth: -8
Growth Rate: -2.04%
Updated:December 25 2025
huggingface.co

Total runs: 378
Run Growth: -173
Growth Rate: -45.77%
Updated:July 13 2026
huggingface.co

Total runs: 369
Run Growth: -373
Growth Rate: -99.47%
Updated:August 11 2026
huggingface.co

Total runs: 314
Run Growth: 71
Growth Rate: 22.61%
Updated:July 13 2026
huggingface.co

Total runs: 291
Run Growth: -359
Growth Rate: -123.37%
Updated:December 25 2025
huggingface.co

Total runs: 290
Run Growth: -125
Growth Rate: -43.10%
Updated:July 13 2026
huggingface.co

Total runs: 286
Run Growth: 11
Growth Rate: 3.85%
Updated:July 13 2026
huggingface.co

Total runs: 280
Run Growth: 66
Growth Rate: 23.57%
Updated:August 18 2026
huggingface.co

Total runs: 276
Run Growth: -190
Growth Rate: -68.84%
Updated:October 27 2023
huggingface.co

Total runs: 273
Run Growth: -158
Growth Rate: -58.52%
Updated:March 07 2024
huggingface.co

Total runs: 258
Run Growth: 249
Growth Rate: 100.00%
Updated:September 05 2026
huggingface.co

Total runs: 248
Run Growth: 25
Growth Rate: 10.08%
Updated:July 13 2026
huggingface.co

Total runs: 234
Run Growth: 19
Growth Rate: 8.52%
Updated:July 17 2026
huggingface.co

Total runs: 233
Run Growth: -10
Growth Rate: -4.29%
Updated:June 06 2025
huggingface.co

Total runs: 221
Run Growth: 26
Growth Rate: 11.76%
Updated:July 13 2026
huggingface.co

Total runs: 220
Run Growth: -2.0K
Growth Rate: -911.36%
Updated:April 10 2026
huggingface.co

Total runs: 218
Run Growth: 127
Growth Rate: 58.26%
Updated:November 28 2023
huggingface.co

Total runs: 207
Run Growth: 95
Growth Rate: 45.89%
Updated:July 13 2026
huggingface.co

Total runs: 204
Run Growth: -191
Growth Rate: -93.63%
Updated:April 10 2026
huggingface.co

Total runs: 201
Run Growth: 87
Growth Rate: 43.28%
Updated:July 13 2026
huggingface.co

Total runs: 192
Run Growth: 94
Growth Rate: 48.96%
Updated:March 13 2026
huggingface.co

Total runs: 185
Run Growth: -33
Growth Rate: -17.84%
Updated:October 23 2024
huggingface.co

Total runs: 183
Run Growth: -18
Growth Rate: -9.84%
Updated:May 13 2024
huggingface.co

Total runs: 183
Run Growth: 34
Growth Rate: 18.58%
Updated:June 24 2024
huggingface.co

Total runs: 182
Run Growth: 10
Growth Rate: 5.49%
Updated:May 13 2024
huggingface.co

Total runs: 180
Run Growth: 31
Growth Rate: 17.22%
Updated:June 24 2024
huggingface.co

Total runs: 178
Run Growth: 76
Growth Rate: 42.70%
Updated:December 21 2023
huggingface.co

Total runs: 178
Run Growth: 5
Growth Rate: 2.81%
Updated:May 13 2024