Record the odour data
I used Wekinator to collect seven types of odor data, namely air, lemon, coffee, perfume, mint, whiskey and smoke. Then save it as an arff format file.




Collect the ARFF file related to odours
The first batch of collected odor data had some missing information for certain odors, such as mint and coffee. The data for these odors was not abundant and not very accurate. Therefore, after repeated testing of the model, additional data collection was carried out.
Machine Learning
by using python in VScode


Three machine learning methods were attempted
KNN Classifier
Sequence CNN
Sequence RNN






KNN Training Pipeline








KNN pipeline






KNN pipeline Advanced






Sequence CNN






Sequence RNN






Comparison among models
Best Configuration:k=3, distance-weighted Euclidean KNN5-fold CV accuracy = 94.90%
CNN Result
RNN Result








Comparison of accuracy rates
Comparison among models


The CNN and RNN were promising —
they learnt more complex patterns —
but they also introduced delays and instability.The CNN and RNN were promising —
they learnt more complex patterns —
but they also introduced delays and instability.
In the end, the KNN pipeline gave the best balance:
the highest stability,
the lowest latency,
and the most reliable performance for real-time generation.
Connect the entire process


Diffusion Model Overview
This project uses Stable Diffusion Turbo (SDXL series models) as the real-time visual generation engine.
Image generation is triggered by the real-time olfactory classification output to achieve the goal:
To generate visually clear and stable results with distinct categories
To ensure a real-time output within 300-550 ms Support exhibition-level interactive experiences, audience participation and artistic presentation
Real-Time Triggering & Stability
The system employs a stability window judgment mechanism during real-time generation:
Image generation is triggered only when the classifier consistently classifies for a consecutive number of frames.
Filtering:
Short fluctuations
Noise / Transitional errors
A 0.5 - 1 second olfactory delay
The generated output includes:
final image
class & seed metadata
full prompt & system log
Result:
The image does not flicker or jump rapidly. Instead, it presents a smooth and continuous flow of artistic behavior.


Structural flowchart
This figure illustrates the full end-to-end architecture of the olfactory–visual generative system, comprising a sensing frontend implemented on a Raspberry Pi e-nose and a host-side computational backend operating on macOS. The pipeline integrates sensor acquisition, feature extraction, odour classification, prompt construction, and diffusion-based image generation into a continuous real-time loop.


Generate presentation
















