Skip to content

Plot the weight sensor data and moving average from csv files and mark the event detection.

License

Notifications You must be signed in to change notification settings

Rahul664/Weight-Sensor-and-Event-Detection_DataVizualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Data Vizualization DOI

Aifi Store is autonomus store for cashierless shopping experience this is achieved by multi modal sensing (Vision modality, weight modality and location modality).

This repository helps you plot and vizualize the weight sensor data and moving average from csv files from the AiFi store.

Note:

For complete dataset click on the DOI batch at the top to download from Zenodo open source dataset repository.


AIFI Nano store layout

Image Credits AIM3S paper

Overview

The store is organised in the gondola's and each gondola has shelfs that holds the products and each shelf has weight sensor plates. These weight sensor plates data is used to find the event trigger (pick up, put down or no event) from which we can find the weight of the product picked.

Gondola is similar to vertical fixture consisting of horizontal shelfs in any normal store and in this case there are 5 to 6 shelfs in a Gondola. Every shelf again is composed of weight sensing plates, weight sensing modalities, there are around 12 plates on each shelf.

Every plate has a sampling rate of **60Hz**, so there are 60 samples collected every second from each plate

The pick up event on the plate can be observed and marked when the weight sensor reading decreases with time and increases with time when the put down event happens.

Event Detection

The event is said to be detected if the moving varience calculated from the raw weight sensor reading exceeds a set threshold of (10000gm^2 or 0.01kg^2) over the siliding window length of 0.5 seconds, which is half of the sampling rate of sensors, i.e 1 second

Pick Up Event = Object being taken from the particular gondola and shelf from the customer


Example Pick Up Event Graph

Put Down Event = Object being placed back from the customer on that particular gondola and shelf

.
Example Put Down Event Graph

NO Event = No object being picked up from that shelf


Example No Event Graph

NOTE:

1.The python script must be in the same folder as of the weight.csv files and .csv files should not be placed in other subdirectories.
2.The videos for the corresponding weight sensor data can be found in the "Videos folder" in the repository and are named similar to their corresponding ".csv" files.
3.Each video files consists of video data from 13 different camera angles.

Details of the weight sensor files:

These weight.csv (Baseline cases) files are from the AIFI CPS IoT 2020 week.There are over 50 cases in total and each file has 5 columns (timestamp,reading(in grams),gondola,shelf,plate number)


Snapshot of weight.csv file

Each of these files have data of around 2 minutes or 120 seconds in the form of timestamp. In order to unpack date and time from timestamp use datetime module from python.

Instruction to run the script

To start analysing the weigh.csv files using the python script and plot the timeseries plot for corresponding files.

  1. Clone the repository
    $ git clone https://github.com/Rahul664/Analysis_plots.git
  2. Change the directory to cloned repository
    $ cd Analysis_plots
  3. Install the requirements
    $ pip3 install -r requirements.txt
  4. Run the python script Plot.py
    $ python3 Plot.py

After the script has run successfully you will find the corresponding folders of weight.csv files which contain the figures (weight vs timestamp) in the format

Instruction to run the Jupyter Notebook

Run the Plot.ipynb file using Jupyter Notebook by placing .csv files in the same directory as the Plot.ipynb script.
--------------------------------- --------------------------------- --------------------------------- ------

gondola_number,shelf_number.png

Ex: 1,1.png


Timeseries Graph

--------------------------------- --------------------------------- --------------------------------- ------

About

Plot the weight sensor data and moving average from csv files and mark the event detection.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published