A hyperspectral data investigation
Two public spectral libraries (USGS SPLIB07 and ECOSTRESS), taken apart, cleaned, enriched with text, and put back together for contrastive spectrum-text learning. Below: the raw mess, 3,746 spectra, the duplicate and split problems in the data, and a searchable explorer.
Mumtaz Ali, Mitacs Globalink Research Internship, Visual Computing Lab, Ontario Tech University, supervised by Prof. Faisal Qureshi
Sources
Nothing here is our own measurement: both libraries carry our processing on top, never a replacement for the original.
What the raw data actually looks like
Example filename from the raw ECOSTRESS archive: mineral.silicate.phyllosilicate.fine.tir.sepiolite_1.jhu.nicolet.spectrum.txt. Taxonomy, grain size, spectral range, sample ID, institution, and instrument: all packed into the filename.
distributed as thousands of individual per-spectrum .txt files, not one table
roughly half the files are __MACOSX/._<name> resource-fork artifacts left over from how the archive was zipped on a Mac: no spectral data, pure overhead
the actual reflectance values and the metadata are split across separate files per sample
400 to 2500 nm in 10 nm steps. Native resolution is far finer and inconsistent between SPLIB07 and ECOSTRESS, which is why a shared grid is necessary before any cross-library comparison
where a spectrum does not cover the full 400 to 2500 nm range, the uncovered bands at the edges are filled, zero by default. Filled edges are not measured data
3,746 combined, on the shared 211-band grid
Duplicates, and how to split this data
Before using either library for a train/test split, check for two problems first: near-duplicate spectra, and material names that hide siblings of the same sample.
an early random 80/20 split on SPLIB07 (1,799 spectra) put 340 of 360 test spectra within cosine similarity 0.99 of a training spectrum
groups 1,736 of the 1,799 spectra into clusters of two or more, the largest holding 1,676 spectra, only 63 spectra on their own
near-duplicates also occur across different material names: 70% of same-material pairs are above 0.99 similarity, but so are many cross-name pairs
for most pairs, the difference between the two spectra is spread across many bands, not localized to one region
removes the leakage, but leaves too few test spectra to be useful on its own
spread over 31 sets, across the combined SPLIB07 and ECOSTRESS data
ECOSTRESS names siblings of the same plant “Abies concolor 1”, “2”, “3”. Grouping by the exact, lower-cased name put those siblings on both sides of a split: 17.4% of held-out ECOSTRESS spectra had a same-material sibling in training. Stripping the trailing sample number from the name merges 542 ECOSTRESS names into 508 groups. Limitation: grouping is by base name, so two different spellings of the same material still count as separate groups.
Conclusion for anyone using this data: split by material group, not by individual sample.
Making material names usable as text
Both libraries needed their material metadata turned into real text for contrastive spectrum-text learning, but for opposite reasons, and the fix differs accordingly.
Sparse labels like sepiolite_1 had nothing else attached, so every one of the 633 material names gets a short factual description instead: category, color, texture, composition, generated cleanly across the whole set.
Already ships real curated descriptions, keyed by filename, since 420 of 752 material names cover samples with genuinely different write-ups. All 3,451 records carry one. The 1,947 with reflectance data are paired one to one with the 1,947 processed spectra, matched by comparing each spectrum's fraction of missing values against its record's stored reflectance coverage value: largest difference 4.9e-17.
Click a category to zoom in, then click a sample name.
Licences and credits
Both libraries are the work of other groups: this is what each states about its own use, and what to cite.
Terms. The USGS data release page marks the data CC0 1.0 Universal (a public domain dedication) and lists no use constraints.
Reference. Kokaly, R.F., Clark, R.N., Swayze, G.A., Livo, K.E., Hoefen, T.M., Pearson, N.C., Wise, R.A., Benzel, W.M., Lowers, H.A., Driscoll, R.L., and Klein, A.J., 2017, USGS Spectral Library Version 7: U.S. Geological Survey Data Series 1035, 61 p., https://doi.org/10.3133/ds1035. Data release: https://doi.org/10.5066/F7RR1WDJ.
Terms. The library’s website carries the notice “Copyright © 2017, California Institute of Technology. ALL RIGHTS RESERVED.” and asks that publications using its data reference the two articles below. It does not state terms for redistribution, so this site provides ECOSTRESS files on request only. The library itself includes data from the Johns Hopkins University, Jet Propulsion Laboratory and USGS (Reston) libraries.
Credit line. Reproduced from the ECOSTRESS Spectral Library through the courtesy of the Jet Propulsion Laboratory, California Institute of Technology.
References. Meerdink, S.K., Hook, S.J., Roberts, D.A., and Abbott, E.A., 2019, The ECOSTRESS spectral library version 1.0: Remote Sensing of Environment, v. 230, article 111196, https://doi.org/10.1016/j.rse.2019.05.015. Baldridge, A.M., Hook, S.J., Grove, C.I., and Rivera, G., 2009, The ASTER Spectral Library Version 2.0: Remote Sensing of Environment, v. 113, p. 711–715 (PDF).
The processed and enriched files are derived by us from these libraries (common band grid, cleaning, text descriptions). They carry the terms of the library they come from, and the references above apply to them.
Download
What exists at each stage of the pipeline. This build doesn't serve files directly.
The original USGS distribution, as cited above.
Common 211-band grid, cleaned, paired with generated text. 2.1 MB.
Common 211-band grid, cleaned. 1.4 MB.
SPE-generated SPLIB07 material descriptions (JSON). 236 KB.
ECOSTRESS files aren't redistributed here (its licence doesn't state redistribution terms). See the original at speclib.jpl.nasa.gov.