moria5161 commited on
Commit
4ee85d4
·
verified ·
1 Parent(s): 4c45c0c

Add historical SMAE benchmark checkpoint and document available models

Browse files
README.md CHANGED
@@ -10,11 +10,19 @@ tags:
10
 
11
  # Fast2Peak: Model Weights and Configurations
12
 
13
- This repository is reserved for the Fast2Peak (F2P) model weights and the matching configurations. **Checkpoint upload is pending; this is currently a repository framework, not a runnable model release.**
 
 
 
 
 
 
 
 
14
 
15
  ## Layout
16
 
17
- Each model should have its own directory under `checkpoints/`, with the selected `.pth` file and its adjacent `config.yaml`. The main pretrained F2P is reserved under `checkpoints/f2p/`. Additional fine-tuned models should use separate, clearly identified directories rather than overwrite the pretrained model.
18
 
19
  ## Related Resources
20
 
 
10
 
11
  # Fast2Peak: Model Weights and Configurations
12
 
13
+ This repository hosts the pretrained Fast2Peak (F2P) checkpoint and the ResUNet and SMAE baseline checkpoints used in the project.
14
+
15
+ | Directory | Weights | Configuration |
16
+ |---|---|---|
17
+ | [F2P](checkpoints/f2p) | `best_checkpoint.pth` | Original `config.yaml` |
18
+ | [ResUNet](checkpoints/resunet) | `best_checkpoint.pth` | Original `config.yaml` |
19
+ | [SMAE](checkpoints/smae) | `epoch_300_final.pth` | Reconstructed evaluation-only `config.yaml`; not an original training configuration |
20
+
21
+ The uploaded checkpoint files are unchanged. See each directory's README for source paths and usage notes. Download these assets alongside the [project code](https://github.com/moria5161/fast2peak); this is not a standalone Transformers model package.
22
 
23
  ## Layout
24
 
25
+ Each model should have its own directory under `checkpoints/`, with the selected `.pth` file and its adjacent `config.yaml`. The main pretrained F2P is available under `checkpoints/f2p/`. SMAE retains its historical checkpoint filename and uses its separate project evaluation entry point. Additional fine-tuned models should use separate, clearly identified directories rather than overwrite the pretrained model.
26
 
27
  ## Related Resources
28
 
checkpoints/f2p/README.md CHANGED
@@ -1,3 +1,10 @@
1
  # Pretrained F2P
2
 
3
- Checkpoint upload pending. Keep the selected `.pth` weights and matching `config.yaml` together in this directory. Checkpoint provenance and checksums will be recorded when the files are uploaded.
 
 
 
 
 
 
 
 
1
  # Pretrained F2P
2
 
3
+ - Weights: `best_checkpoint.pth`.
4
+ - Original configuration: `config.yaml`, uploaded without modification.
5
+ - Project source: `experiments/training f2p rpe/checkpoints/`.
6
+ - Spectrum length: 1600; patch size: 16; embedding dimension: 256; depth: 8; attention heads: 8; training mask ratio: 0.05.
7
+
8
+ The configuration retains the historical model name `Fast2PeakRPE`. The current project entry point maps this name to `F2P`. Keep the weights and configuration together when using `main.py --test --test_model_path ... --test_datapath ...`.
9
+
10
+ Checkpoint SHA-256: `965cec230ea52a7094a068629b9f32a2ef3efeb6342729d47e7f7a02c7899293`.
checkpoints/resunet/README.md ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # ResUNet baseline
2
+
3
+ - Weights: `best_checkpoint.pth`.
4
+ - Original configuration: `config.yaml`, uploaded without modification.
5
+ - Project source: `experiments/training resunet/checkpoints/`.
6
+ - Model name: `ResUNet`; spectrum length: 1600.
7
+
8
+ Keep the weights and configuration together when using the project's `main.py --test --test_model_path ... --test_datapath ...` entry point.
9
+
10
+ Checkpoint SHA-256: `595467a9fe48aaf6c309cc1d8aa180eae102d5ecc2cc396c0711663447b15991`.
checkpoints/smae/README.md ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SMAE historical benchmark checkpoint
2
+
3
+ Source: `othermethods/smae/outputs/experiments/smae with train.h5 ss1600 ps1/epoch_300_final.pth`.
4
+
5
+ This is **not** the `ss1600 ps1 mr0.1/epoch_400.pth` experiment and is not the current patch-4 retraining default.
6
+
7
+ ## Identification
8
+
9
+ The manuscript notebook reads results from `experiments/smae raw ps1/`. The historical `othermethods/smae/test.sh` and `smae_test.py` at project revision `d71c0b0` select `ss1600 ps1/epoch_300_final.pth` for this output directory, with architecture `spectraMAE_base_ss1600_ps1` and inference mask ratio 0.5. The active Simu evaluation command uses batch size 24; the evaluator defaults to seed 615. The historical Simu log reports SNR 29.12 dB, RMSE 0.0118 and SSS 0.9553 on 1024 spectra.
10
+
11
+ This association is based on the retained scripts and result paths. The historical metric log did not record a checkpoint hash; no inference was rerun during upload.
12
+
13
+ ## Configuration and evaluation
14
+
15
+ No original training YAML accompanies this checkpoint. The supplied `config.yaml` reconstructs only the documented Simu evaluation command; it must not be interpreted as the original training configuration. Use the project-adapted SMAE code, not the F2P main entry point. After downloading this directory under `checkpoints/smae/` in the project root:
16
+
17
+ ```bash
18
+ python othermethods/smae/main.py evaluate \
19
+ --checkpoint checkpoints/smae/epoch_300_final.pth \
20
+ --input-path datasets/test/Simu.h5 \
21
+ --arch spectraMAE_base_ss1600_ps1 \
22
+ --mask-ratio 0.5 --batch-size 24 --seed 615 --device cuda:0 \
23
+ --output-dir experiments/smae_benchmark_reproduction
24
+ ```
25
+
26
+ The config's paths are relative to `othermethods/smae`, matching the project's YAML loader. Inference uses one stochastic masking pass; batch size, seed and runtime can affect numerical results.
27
+
28
+ ## Attribution
29
+
30
+ Project-adapted implementation of Ren, Zhou and Li, *A Self-supervised Learning Method for Raman Spectroscopy based on Masked Autoencoders* (2025). Original code: [SpectraMAENet](https://github.com/pengjuRen99/SpectraMAENet). See the project's `othermethods/smae/docs/provenance.md`. This upload does not assign a new license to the upstream method or code; weight licensing remains pending.
31
+
32
+ Checkpoint SHA-256: `f0b0b5e02c1a8f730259974b5c0dabf50b0c0d28c1ccebcc3a3d8ae254a8c818`.
checkpoints/smae/config.yaml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Reconstructed historical evaluation settings, not an original training config.
2
+ # Paths resolve relative to othermethods/smae in the project checkout.
3
+ evaluate:
4
+ input_path: ../../datasets/test/Simu.h5
5
+ chkpt_dir: ../../checkpoints/smae/epoch_300_final.pth
6
+ output_dir: ../../experiments/smae_benchmark_reproduction
7
+ arch: spectraMAE_base_ss1600_ps1
8
+ device: cuda:0
9
+ batch_size: 24
10
+ seed: 615
11
+ mask_ratio: 0.5
checkpoints/smae/epoch_300_final.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f0b0b5e02c1a8f730259974b5c0dabf50b0c0d28c1ccebcc3a3d8ae254a8c818
3
+ size 17816021