🧑 Step 3: Monitoring the Metrics on the Lens AI Server.Lens AI server is used for monitoring the data and model drift and access the sampled data.
Lens AI server requires data in the following format. Data need to be aggregated from the sensors in the given directory format. The next release includes support to HTTP/MQTT with a DB. Current version is built using Streamlit.
The format required for the server to visualize the model and data drift.
Step 1 : Transfer the lensai directory from the sensor to the server using your own customized method , next releases will support synchronization.
Copy lensai_sensor1
│ ├── imagestats/
│ │ ├── BRIGHTNESS_<timestamp>.png
│ │ ├── NOISE_<timestamp>.png
│ │ ├── SHARPNESS_<timestamp>.png
│ │ ├── MEAN_<metric>_<timestamp>.png
│ │ ├── BRIGHTNESS.bin
│ │ ├── NOISE.bin
│ │ ├── SHARPNESS.bin
│ │ ├── MEAN_<metric>.bin
│ ├── modelstats/
│ │ ├── model_<metric>_<timestamp>.bin
│ │ ├── model_<metric>_<timestamp>.png
│ ├── samples/
│ │ ├── model_<metric>_<timestamp>.bin
│ │ ├── model_<metric>_<timestamp>.png
│ │ ├── model_<metric>_<timestamp>.bin
│ │ ├── model_<metric>_<timestamp>.png
lensai_sensor2
.....
Step 2 : Create a directory for every sensor using a sensor Id for example sensor 1 , sensor 2.
Copy mkdir data
cd data
mkdir sensor1
mkdir sensor2
....
Step 3 : Create a directory under the sensor directory using the following cmd
Copy cd sensor1
mkdir "$( date +%s )"
cd sensor2
mkdir "$( date +%s )"
Step 4 : Copy the lensai directory content in to it.
Copy cp -r lensai_sensor1/* data/sensor1/ < timestam p > /
cp -r lensai_sensor2/* data/sensor2/ < timestam p > /
cp -r lensai_sensor3/* data/sensor3/ < timestam p > /
after the above step the data folder will have the following structure
Copy data
├── sensor1
│ ├── <timestamp>
│ │ ├── imagestats/
│ │ │ ├── BRIGHTNESS_<timestamp>.png
│ │ │ ├── NOISE_<timestamp>.png
│ │ │ ├── SHARPNESS_<timestamp>.png
│ │ │ ├── MEAN_<metric>_<timestamp>.png
│ │ │ ├── BRIGHTNESS.bin
│ │ │ ├── NOISE.bin
│ │ │ ├── SHARPNESS.bin
│ │ │ ├── MEAN_<metric>.bin
│ │ ├── modelstats/
│ │ │ ├── model_<metric>_<timestamp>.bin
│ │ │ ├── model_<metric>_<timestamp>.png
│ │ ├── samples/
│ │ │ ├── model_<metric>_<timestamp>.bin
│ │ │ ├── model_<metric>_<timestamp>.png
│ │ │ ├── model_<metric>_<timestamp>.bin
│ │ │ ├── model_<metric>_<timestamp>.png
├── sensor2
│ ├── <timestamp>
│ │ ├── imagestats/
│ │ │ ├── BRIGHTNESS_<timestamp>.png
│ │ │ ├── NOISE_<timestamp>.png
│ │ │ ├── SHARPNESS_<timestamp>.png
│ │ │ ├── MEAN_<metric>_<timestamp>.png
│ │ │ ├── BRIGHTNESS.bin
│ │ │ ├── NOISE.bin
│ │ │ ├── SHARPNESS.bin
│ │ │ ├── MEAN_<metric>.bin
│ │ ├── modelstats/
│ │ │ ├── model_<metric>_<timestamp>.bin
│ │ │ ├── model_<metric>_<timestamp>.png
│ │ ├── samples/
│ │ │ ├── model_<metric>_<timestamp>.bin
│ │ │ ├── model_<metric>_<timestamp>.png
│ │ │ ├── model_<metric>_<timestamp>.bin
│ │ │ ├── model_<metric>_<timestamp>.png
│── sensor3
download the LensAI monitoring server from the following repository
Copy git clone https://github.com/lens-ai/lensai_server
Install the requirements
Copy pip install -r requirements.txt
Run the streamlit server by passing the data folder as an argument
Copy streamlit run lensai_sever.py -- /data
Last updated 2 months ago