Skip to content

conect2ai/EAIS2026-MMCloudCL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Conect2AI Logo

πŸš— Edge-based Incremental Clustering with Continual Learning for Real-Time Driver Behavior Analysis

Python Badge

PlatformIO Badge

MIT Badge

Reproducible Badge

πŸ“Œ Abstract

The increasing availability of vehicular telemetry through onboard sensors and the Internet of Things (IoT) has facilitated novel approaches to driver behavior analysis. Nevertheless, most existing methods depend on offline datasets and static clustering structures, which do not adequately capture the dynamic nature of driver behavior in streaming environments. This limitation often results in unstable clusters and inconsistent semantic labels. This study presents a continual learning framework for driver behavior analysis that incorporates soft-sensor feature representation, incremental clustering with plasticity control, and temporal semantic stabilization. The proposed methodology extends the MMCloud algorithm by improving feature stability and preserving structural consistency across multiple driving sessions, while maintaining compatibility with resource-constrained edge computing environments. Results from a case study using real-world vehicular telemetry indicate improvements in clustering compactness, structural stability, and temporal consistency. Additionally, embedded evaluations demonstrate that the proposed method processes each sample within a few milliseconds, confirming its suitability for real-time deployment in vehicular monitoring systems. These findings suggest that the proposed framework offers a computationally efficient solution for driver behavior modeling in streaming vehicular environments.

πŸ—‚οΈ Repository Structure

EAIS2026-MMCloudCL/
β”œβ”€β”€ README.md
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ raw/
β”‚   β”‚   └── merged_dataset.csv
β”‚   └── processed/
β”‚       └── freematics_csv/
β”‚           β”œβ”€β”€ 362_STRUCT.CSV
β”‚           β”œβ”€β”€ ...
β”‚           └── 374_STRUCT.CSV
β”œβ”€β”€ figures/
β”‚   β”œβ”€β”€ conecta_logo.png
β”‚   β”œβ”€β”€ platformio.png
β”‚   └── upload.png
β”œβ”€β”€ notebooks/
β”‚   β”œβ”€β”€ compare_mmcloud_original_vs_continual_learning_new_radar_area.ipynb
β”‚   β”œβ”€β”€ analysis_replay_performance.ipynb
β”‚   └── analysis_replay_article_metrics.ipynb
β”œβ”€β”€ results/
β”‚   β”œβ”€β”€ intermediate/
β”‚   β”‚   β”œβ”€β”€ freematics_replay/
β”‚   β”‚   └── new_radar_area/
β”‚   β”œβ”€β”€ tables/
β”‚   β”‚   β”œβ”€β”€ freematics_replay/
β”‚   β”‚   └── new_radar_area/
β”‚   └── figures/
β”‚       β”œβ”€β”€ freematics_replay/
β”‚       └── new_radar_area/
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ mmcloud_original.py
β”‚   β”œβ”€β”€ mmcloud_continual_learning.py
β”‚   └── mmcloud_continual_learning_window.py
└── embedded/
    └── freematics/
        β”œβ”€β”€ firmware_v5/
        β”‚   └── telelogger/
        └── libraries/

πŸš€ Quick Start

If your goal is simply to reproduce the main results, follow this order:

1. Clone the repository

git clone https://github.com/conect2ai/EAIS2026-MMCloudCL.git
cd EAIS2026-MMCloudCL

2. Open the main notebook

The primary entry point for offline reproducibility is:

notebooks/compare_mmcloud_original_vs_continual_learning_new_radar_area.ipynb

3. Check the dataset used by the notebook

The notebook loads the merged dataset from:

data/raw/merged_dataset.csv

4. Check the Python implementations

The notebook uses the following scripts:

scripts/mmcloud_original.py
scripts/mmcloud_continual_learning.py
scripts/mmcloud_continual_learning_window.py

5. Run the notebook and inspect the outputs

The generated outputs include comparison tables, quality summaries, WCSS summaries, and time-series figures for the evaluated vehicles.


πŸ”¬ Offline Reproducibility Guide

This section is meant for readers who want to reproduce the paper results in a more linear way.

Step 1. Start from the main notebook

Use:

This is the main notebook for comparing the original MMCloud pipeline against the continual learning variants.

Step 2. Understand the input data

The experiments rely on:

This file is the main offline input used to replay the vehicular telemetry data.

Step 3. Understand the core scripts

The notebook imports three main implementations:

Step 4. Inspect the generated outputs

The execution generates artifacts such as:

  • comparison tables for the evaluated configurations;
  • per-trip quality summaries;
  • WCSS summaries;
  • article-ready figures for selected vehicles.

Results are organized under the results/ directory.


🧭 Suggested Reproduction Path

For someone opening the repository for the first time, this is the recommended order:

  1. Read this README
  2. Open notebooks/compare_mmcloud_original_vs_continual_learning_new_radar_area.ipynb
  3. Identify where the dataset is loaded
  4. Inspect the scripts in scripts/
  5. Run the notebook end-to-end
  6. Review outputs in results/
  7. Explore the additional analysis notebooks

This order keeps the repository easier to understand and reduces the amount of file-hopping needed during reproduction.


πŸ““ Additional Notebooks

After reproducing the main pipeline, you can inspect the complementary notebooks:

  • notebooks/analysis_replay_performance.ipynb
  • notebooks/analysis_replay_article_metrics.ipynb

These notebooks are useful for deeper analysis, but they are best explored after the main comparison notebook.


🚘 Freematics Vehicle Mapping

The following table links each vehicle to its identifier and corresponding structured CSV file.

Vehicle Vehicle ID Structured CSV
Eclipse E-1 data/processed/freematics_csv/362_STRUCT.CSV
Etios ET-1 data/processed/freematics_csv/364_STRUCT.CSV
Fastback FB-1 data/processed/freematics_csv/365_STRUCT.CSV
HB-20 HB-1 data/processed/freematics_csv/366_STRUCT.CSV
Fit F-1 data/processed/freematics_csv/367_STRUCT.CSV
Hilux H-1 data/processed/freematics_csv/368_STRUCT.CSV
Polo Branco P-1 data/processed/freematics_csv/370_STRUCT.CSV
Polo Prata P-2 data/processed/freematics_csv/372_STRUCT.CSV
Renegade R-1 data/processed/freematics_csv/373_STRUCT.CSV
T-Cross TC-1 data/processed/freematics_csv/374_STRUCT.CSV

πŸ› οΈ Embedded Setup

If you want to reproduce the embedded part of the project, follow the steps below.

1. Install the required tools

2. Open the firmware project

Open the following folder in PlatformIO:

./embedded/freematics/firmware_v5/telelogger

PlatformIO setup

3. Connect the Freematics hardware

Connect the Freematics One+ to your computer and power it on, either:

  • through the Freematics Emulator; or
  • directly in the vehicle.

4. Compile, upload, and monitor

Use the PlatformIO controls to:

  1. compile the firmware;
  2. upload it to the device;
  3. open the serial monitor.

Upload process


🌐 Network Configuration

The device can send collected information to a server and also store data locally on the SD card. Communication can be configured through Wi-Fi or 4G, depending on your setup.

The main configuration file is:

Typical parameters include:

  • Wi-Fi SSID and password
  • server host
  • server port
  • protocol type
  • APN for mobile connectivity

Example configuration:

/**************************************
* Configuration Definitions
**************************************/
// ...

// define your email
#define USER_EMAIL "email@email.com"

/**************************************
* Networking configurations
**************************************/
#ifndef ENABLE_WIFI
#define ENABLE_WIFI 0
// WiFi settings
#define WIFI_SSID "FREEMATICS"
#define WIFI_PASSWORD "PASSWORD"
#endif 

#ifndef SERVER_HOST
// cellular network settings
#define CELL_APN "claro.com.br"
// Freematics Hub server settings
#define SERVER_HOST "serverconect2ai.dca.ufrn.br"
#define SERVER_PROTOCOL PROTOCOL_HTTP
#endif

// SIM card setting
#define SIM_CARD_PIN ""

// HTTPS settings
#define SERVER_METHOD PROTOCOL_METHOD_POST
#define SERVER_PATH "/freematics"

#if !SERVER_PORT
#undef SERVER_PORT
#if SERVER_PROTOCOL == PROTOCOL_UDP
#define SERVER_PORT 8081
#elif SERVER_PROTOCOL == PROTOCOL_HTTP
#define SERVER_PORT 1880
#elif SERVER_PROTOCOL == PROTOCOL_HTTPS
#define SERVER_PORT 443
#endif
#endif

πŸ“Ά Notes for mobile connectivity

If you want to use mobile data instead of Wi-Fi:

  • set ENABLE_WIFI to 0;
  • configure CELL_APN according to your carrier.

Examples of Brazilian carrier APNs:

  • TIM: timbrasil.br
  • Claro: claro.com.br
  • Oi: gprs.oi.com.br
  • Vivo: zap.vivo.com.br

πŸ“ Results Organization

The results/ directory is organized to make analysis easier:

  • results/intermediate/: intermediate artifacts and replay outputs
  • results/tables/: tables ready for inspection or paper writing
  • results/figures/: plots and article-ready visual outputs

This structure helps separate temporary artifacts from final visual results.

πŸ“„ License

This project is licensed under the MIT License. See the LICENSE file for details.

About us

The Conect2AI research group is composed of undergraduate and graduate students from the Federal University of Rio Grande do Norte (UFRN). The group develops Artificial Intelligence and Machine Learning solutions in emerging domains, with emphasis on Embedded Intelligence, IoT, energy efficiency, and sustainable mobility.

About

This repository contains the MMCloud-CL implementation published in the 2026 IEEE Conference on Evolving and Adaptive Intelligent Systems (IEEE EAIS 2026) paper.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors