A webpage application that can detect motion in the environment using Wi-Fi signal. This application provides basic tools for data collection, model generation and model application. Using ESP32 module, Wi-Fi CSI data can be collected and process in real-time. Data collection can be done conveniently in Windows OS and perform real-time motion detection using webapp. It is a great startup to understanding Wi-Fi signal that can lead to other potential applications.
- Monitor Movement - Detect movement in real-time using the model prediction.
- Visualize Signal - Visualize the changes in signal in real-time for better signal understanding.
- Signal Sensitivity - Adjust the amount of signal to plot based on standard deviation.
- Record Signal - Record Wi-Fi signal for 2.5 seconds/250 packet each recording.
- CSV Files Selection - Visualize the selected CSV file.
- Class Selection - Set the class of Wi-Fi signal recording.
- Activity Selection - Set the activity of Wi-Fi signal recording.
- Movement Detection State - Display 'Movement Detected' if movement is detected.
- Signal Packet Counter - Display the amount of packet received.
Note
In monitoring mode, the system prediction is based on 3 seconds/300 packets, divided into 2 prediction with 200 combined packet each ([0:200], [100:300]).
Note
Visualizer displays a 3D plot chart of amplitude, phase and subcarrier.
Data Collection Setup
- Perform the data collection in a controlled environment with no any movement and less Wi-Fi activity to maintain high quality dataset.
- Performing the data collection for 'no movement' at night where there is no moving person, pet and appliances is recommended.
- Place the ESP32 module in a mid to high open place with proper distancing and minimal obstruction to the station.
- Immediately perform the movement even before the recording starts.
- Plan or keep a note of range of files that contains 'no movement and 'movement' for better dataset quantity control.
- Keep the type of movement the same for consistent number of times for easier recording process and avoid potential mislabeled dataset.
- Use the ESP32 blue LED blinking state as queue if the recording already complete.
The collected Channel State Information (CSI) from ESP32 is composed of 306 subcarriers. Subcarrier 66 to 123 was selected for having the highest performance while reducing the dataset into 57 subcarrier. Moving average and phase unwrapping was perform in the dataset to reduce the noise and subcarrier to 23. Finally, the amplitudes and phase standard deviation, phases 75th percentile count, and phases entropy was calculated for every 200 packets. With 23 subcarrier for each calculation, there is a total of 92 features in the dataset.
According to evaluation of different models, Extra Trees Classifier produced the best performance in different metrics. The Extra Trees Classifier is then trained, tuned and evaluate using the dataset to achieve the best performance. Producing the highest score with lowest margin between training, testing and cross-validation score was the main focus of the evaluation to be able for the model to perform close to the real-life application.
- Download the latest version of Wriple.
- Install Wriple-1.0.0-Beta.exe.
- Make sure to include
pip
during Python installation. - Open 127.0.0.3:3000 using browser to access the web application.
This project is licensed under the MIT License - see the LICENSE file for details.
- Visual Studio Code: For development environment.
- Draw.io: For generating diagrams and visual workflows.
- Advanced Installer: For installer.
- Jupyter Notebook: For prototyping, testing, and visualizing machine learning models.
- ESP-IDF: For development framework on the ESP32 microcontroller.
- D3.js: For JavaScript library for 3D visualization.
- css.gg: For icons.
- Flask-CORS: For handling resource sharing between Python and JavaScript.
- waitress: For production-ready WSGI server.
- NumPy: For handling different types of arrays.
- Pandas: For data manipulation and analysis of Excel data.
- Matplotlib : For generating scatter-plot chart.
- Scikit-learn: For machine learning and statistical modeling.
- SciPy: For scientific computation library.
- Scapy: For packet manipulation library.
- Npcap: For packet capturing.