A deep learning model to discern indoor from outdoor environments based on data recorded by a tri-axial digital magnetic sensor - Marcianò, V.; Bertuletti, S.; Bonci, T.; Mazzà, C.; Ireson, N.; Ciravegna, F.; Del Din, S.; Gazit, E.; Cereatti, A. (Gait & posture, 2022)
The increased use of wearable devices (WDs) for monitoring daily-life activities has led to the development of different location-driven applications. The first fundamental distinction is between indoor and outdoor environments. The most intuitive approach is the analysis of GPS coordinates or Wi-Fi signals [1] but both solutions are power consuming. In this study, we proposed and tested the use of deep learning techniques for indoor/outdoor discrimination based on local magnetic field properties of the specific environment during free-living activities. Eight participants were recruited in four different centres (Turin, Italy; Sheffield, UK; Newcastle upon Tyne, UK; Tel Aviv, Israel) and were equipped with the INDIP system [2] (including four magneto-inertial units attached to each foot, lower back, and non-dominant wrist), a smartphone (running the Aeqora mobile application) and were monitored during 2.5-hours of daily free-living activities. Magnetometer data was used to train a deep learning model, while indoor/outdoor probability based on GPS coordinates was provided by the Aeqora app and used as a reference. For each WD, the following features were extracted: x, y, z components and norm of the magnetometer and the 10-sample moving average (0.1s window) of the latter features as a “contextual” rating. A bi-layer long short-term memory structure with a linear layer as a tail and with a gaussian error linear unit as activation unit has been implemented [3]. To achieve a lower-bias training and a more robust model, the network has been validated by exploiting a leave one subject out validation approach. In addition, the classification is based on two different observation timeframes: windows of length equal to the magnetometer data acquisition period (0.01s) and 1s windows. The average accuracy of the model, across participants, in the classification of indoor/outdoor environments while using as input one WD at a time and all WDs together is reported in Table 1. Based on this preliminary analysis, the model seems suitable for discerning indoor from outdoor environments with an average accuracy score higher than 88.3% in participants spread through three countries (different morphology of the territory, culture, lifestyle, etc.). With this respect, considering a longer observation time (1s vs. 0.01s) has resulted in increasing of the accuracy for all conditions. Overall, the best performances were obtained by using the whole INDIP system, with a 94.1% score. However, very similar performances were obtained when only one WD is considered. The effect of the experimental setup (e.g., the number and position of the WDs) and the input of the model (e.g., the length of the time-observation window) on the performance metrics require further investigations.