Prototype
GPR Spectral Reconstruction
Spectral sensing, Gaussian processes, real-time visualization
Machine-learning method to infer a continuous spectrum from AS7341 band data.
The AS7341 provides a limited number of discrete spectral bands, so a Gaussian Process Regression (GPR) model was built to infer a continuous spectrum from the 8-channel input over serial. The input vector was mapped to wavelength positions and reshaped for training, using a combined kernel to interpolate between points.
The model predicts intensity values at 1 nm intervals between 415 nm and 680 nm, then re-inserts known sensor values to preserve ground-truth points. Live visualization in Matplotlib shows both predicted and measured values, with CSV export for logging. Validation used liquid food dyes (0.15 ml in a water cuvette) and qualitative comparison against expected absorbance.
Highlights
- GPR-based spectral reconstruction at 1 nm resolution
- Live visualization with CSV logging for captured runs
- Validation using dye samples and basic colorimetry
What Matters
- Python
- Gaussian process regression
- AS7341 spectral sensor
- Serial communication
- Matplotlib
- CSV export