spectranet / README.md
kookil's picture
Update README.md
ea52d82 verified
---
license: other
task_categories:
- image-to-text
language:
- en
tags:
- spectroscopy
- materials-science
- multimodal
- benchmark
- raman
- xrd
- ftir
- mass-spectrometry
- scientific-reasoning
- foundation-models
pretty_name: SpectraNet
size_categories:
- 10K<n<100K
---
# SpectraNet
SpectraNet is a multimodal spectroscopy benchmark for evaluating scientific reasoning in foundation models.
The benchmark contains curated experimental spectra across Raman, X-ray diffraction (XRD), Fourier-transform infrared spectroscopy (FTIR), and mass spectrometry (MS), together with metadata, spectrum images, processed spectral arrays, peak annotations, and evaluation-related outputs.
SpectraNet is designed to evaluate whether foundation models can perceive plotted experimental spectra, extract characteristic peaks, and support downstream scientific reasoning over spectroscopic evidence.
## Dataset Structure
The dataset is released in sharded form because the full image directory contains a large number of files.
```text
spectranet/
├── public_shards/
│ ├── public_part_0000.zip
│ ├── public_part_0001.zip
│ └── public_part_0002.zip
├── splits/
│ └── data.csv
└── manifest.json
```
After extracting all ZIP files in `public_shards/`, the original public dataset structure will be restored as:
```text
public/
├── data/
│ └── shards/
│ ├── 00.parquet
│ ├── 01.parquet
│ └── ...
└── images/
├── *.png
└── ...
```
## Files
### `public_shards/`
The full `public/` folder is provided as multiple ZIP shards. Each ZIP file preserves the original folder structure, including:
```text
public/data/
public/images/
```
To reconstruct the full dataset, download all ZIP files under `public_shards/` and extract them into the same directory.
### `public/data/`
This folder contains Parquet shards storing the processed spectral arrays and compact metadata.
Each Parquet record includes fields such as:
```text
sample_id
mid
modality
subkey
x
y
x_unit
y_unit
x_min
x_max
y_min
y_max
n_points
```
The `x` and `y` fields store the processed spectral coordinates and intensities.
### `public/images/`
This folder contains PNG spectrum previews generated from the processed spectral arrays.
The image filenames correspond to the `sample_id` field used in the metadata table.
### `splits/data.csv`
`data.csv` is the main post-processed metadata table. It contains one row per processed sample and includes both metadata fields and file pointers.
Important columns include:
```text
sample_id
mid
modality
subkey
image_path
data_path
x_min
x_max
y_min
y_max
n_points
x_unit
y_unit
method
measurement_condition
crystal_system
material_name
phase_label
classification
preferred_chemical_formula
source_format
file_path
```
The `image_path` column points to the corresponding PNG image under `public/images/`.
The `data_path` column points to the corresponding Parquet shard under `public/data/shards/`.
## Reconstructing the Dataset
Download all ZIP files in `public_shards/`, then extract them into the same output directory:
```python
from pathlib import Path
import zipfile
root = Path("spectranet")
shard_dir = root / "public_shards"
out_dir = root / "extracted"
out_dir.mkdir(parents=True, exist_ok=True)
for zip_path in sorted(shard_dir.glob("public_part_*.zip")):
print("Extracting", zip_path.name)
with zipfile.ZipFile(zip_path, "r") as zf:
zf.extractall(out_dir)
print("Done.")
```
After extraction, the reconstructed dataset should contain:
```text
extracted/public/data/
extracted/public/images/
```
## Loading Metadata
```python
import pandas as pd
df = pd.read_csv("splits/data.csv")
print(df.head())
```
## Loading a Parquet Shard
```python
import pandas as pd
parquet_path = "public/data/shards/00.parquet"
data = pd.read_parquet(parquet_path)
print(data.head())
```
## Linking Images and Data
Each row in `splits/data.csv` contains an `image_path` and a `data_path`.
```python
import pandas as pd
from pathlib import Path
df = pd.read_csv("splits/data.csv")
row = df.iloc[0]
image_path = Path(row["image_path"])
data_path = Path(row["data_path"])
print("Image:", image_path)
print("Parquet shard:", data_path)
```
## License
This dataset is released for research use.
Please refer to the original data sources for source-specific licensing terms.
## Citation
If you use SpectraNet, please cite the associated paper:
```bibtex
@article{spectranet2026,
title={SpectraNet: A Multimodal Spectroscopy Benchmark for Evaluating Scientific Reasoning in Foundation Models},
author={Gu, Yijun and Yang, Jingyun and Liu, Yongtao and Wang, Haozhe},
year={2026}
}
```
## Notes
This repository is currently under active release preparation.
Dataset files are uploaded in segmented batches because of repository file-count and upload-rate limitations.