DOI: 10.5281/zenodo.15554711
title: MSMDF: Motion Sensor Fingerprinting Dataset with 1,200 Annotated Samples from 42 Smartphones Across Diverse Conditions

description: # Motion Sensor-Based Mobile Device Fingerprinting (MSMDF)

This database was collected by Carlos **Sulbaran Fandino** under the supervision of **Anne Josiane Kouam** and **Konrad Rieck**.
The database is divided in 2 directories: *raw data*, and *fingerprints*. Along with it the *figures* directory provides different visualizations of the different fingerprinting-datasets.

## Raw data
This repository contains the sensor data collected for our experiments. The repository is divided in 4 sub-repositories:
  1. **Example recordings:** This directory contains 1 recording representing a full data collection session and 2 motivational recordings representing two devices placed side by side on a desk. 
  2. **Original recordings:** This repository contains *340 two-minutes* recordings each named *"Device ID - Recording Instance"*. Each recording instance contains a *Metadata.csv* file (device name, platform, device id) together with 4 csv files corresponding to the different sensors: *Accelerometer.csv* , *Gravity.csv* , *Gyroscope.csv* , *Orientation.csv*. 
  3. **Separated by setting:** This repository contains 6 sub-repositories each corresponding to a different data collection setting (environmental condition). The sensor data in this directory is the result of the pre-processing stage of our MSMDF evaluation, therefore additional data streams have been added to each csv file and the *Orientation.csv* file is not included. 
  4. **Protected data - reduced:** This repository contains a reduced version of *separated by setting*, for each of the parameters used to evaluate the countermeasures. To produce a full version use: [CountermeasureApplier.py](https://github.com/carlossulba/MSMDF-Study/blob/main/Code/CountermeasureApplier.py) 


Each recording corresponds to a data collection session where the user: **1.** Holds its phone in hand for 10 seconds, **2.** Places it on a desk for 10 seconds, **3.** Holds it again in hand for 10 seconds but with inaudible audio stimulation, **4.** Again places the phone on a desk but with inaudible audio stimulation, **5.** Holds the phone on hand with extended arm while taking 10 steps in a straight line, and finally **6.** Repeats step five.


## Fingerprints
This repository contains a fingerprint-dataset for each fingerprint design. For each fingerprint design parameter you can find a respective sub-directory.

The following directories contain the fingerprint-datasets for each design parameter:  
  1. Sensor selection
  2. DC conditions
  3. Data stream set
  4. Feature set
  5. Window length (s)
  6. Sampling rate (Hz)
  7. Default
  8. Min FPs per device 

Inside them you will find 1 pickle file (.pkl) for each fingerprint design.

The following directories contain the fingerprint-dataset for each countermeasure parameter:
  1. Countermeasure strength
  2. Countermeasure resampling frequency

These were extracted after applying an anonimization step to the raw sensor data before extracting the fingerprints with the default fingerprint design.



## Using a fingerprint-dataset
The following data-structure describes the fingerprint-datasets. You can use them for training your own models or evaluating their distribution in the space.
```python
{
    'fingerprints': dict
    'config': FingerprintConfig
}
```

For opening a fingerprint-dataset you can use the following example code: [open fingerprint.py]()

The following data-structure describes the *fingerprints* dictionary.
```python
{
    'Setting 1': {
        'Device-01': [
            Fingerprint_01,
            Fingerprint_02
            ],
        'Device-02': [
            Fingerprint_01,
            Fingerprint_02,
            ],
    },
    'Setting 2': {
        'Device-01': [
            Fingerprint_01,
            Fingerprint_02,
            ],
    }
}
```

The following data-structure describes the *FingerprintConfig*.
```python
{
    "data_location": string,
    "fingerprint_length": int,
    "sampling_rate": int,
    "enabled_settings": list,
    "enabled_sensors": list,
    "enabled_streams": list,
    "enabled_features": list,
    "min_recordings": int,
    "repositioning": bool,
    "spectral_brightness_threshold": int,
    "spectral_rolloff_threshold": float,
    "frame_duration": float
}
```

# License
This database is open-source and available under the [GNU General Public License (GPL)](https://www.gnu.org/licenses/gpl-3.0.en.html). By using this database, you agree to the following conditions:
- Use responsibly and ethically.
- Cite this repository in your work or research.
- Ensure that any derivative works or modifications are open-sourced under the same license.