The application of machine learning algorithms is explored to enhance magnetic localization systems, particularly for foot shape measurement. Traditional methods, such as plaster casting are long and prone to error [1]. On the other hand, optical 3D scanners, have limitations, especially for patients with significant foot deformations due to occlusions and manual corrections required by orthotists. Magnetic localization offers a promising alternative as it does not require a line of sight [2], making it suitable for various applications, including indoor navigation [3], surgical tracking [4], and motion capture [5].
The primary objective of this project was to assess the performance of machine learning algorithms, specifically Random Forest (RF) and K-Nearest Neighbors (KNN), in improving the accuracy of magnetic localization. Machine learning models can handle non-linearity and noise [6-8].
The experimental setup involved a magnetic field generator with four planar coils and a magnetic field camera featuring 64 magneto-resistive sensors [9]. Systematic scanning with the camera produced 4992 data points, each associated with the magnetic field vector at specific locations in a 40×40×40 cm³ volume. The camera's position was controlled with high precision using rulers and Lego bricks, ensuring accurate measurements.
In addition to experimental data, simulated data were generated using the Python Radia library, which relies on the Biot-Savart Law [10]. This simulation produced 400,221 data points, that were divided into training (80%) and testing (20%) datasets, with the experimental data serving as an additional test set to evaluate the algorithms' performance. RandomForestRegressor and KNeighborsRegressor modules from scikit-learn (v1.5.1) library [11] were implemented and trained with the simulation train dataset
Random Forest outperformed K-Nearest Neighbors in terms of accuracy. RF's ensemble approach effectively captured nonlinear relationships, resulting in a mean absolute error (MAE) of 0.71 mm on simulated data, compared to 1.48 mm for KNN. However, when tested on experimental data, RF's MAE increased to 1.16 mm, indicating a discrepancy between simulated and experimental datasets.
The spatial distribution of errors showed that most errors occurred at the edges and corners of the volume of interest. This is due to the limited number of neighbors available for averaging in these regions. Training in a larger simulation volume reduced edge-related errors in the prediction zone. This adjustment improved the overall accuracy of the localization system.
Despite these improvements, the precision of the algorithms was limited by the discrepancy between simulated and real magnetic field strengths. This discrepancy was particularly noticeable near the coils, where the magnetic field gradient is steep, leading to higher errors in distance calculations.
While Random Forest showed promise in enhancing magnetic localization accuracy, our study highlighted the need for further research to bridge the gap between simulated and experimental data. Future work could involve increasing the number of experimental measurements or refining simulation models to better match real-world conditions These findings support advances in medical and industrial magnetic localization. By addressing the challenges identified in this study, we can further advance the precision and reliability of magnetic localization technologies.
[1] « Le processus de fabrication d'une orthèse cheville-pied : traditionnel vs. imprimé en 3D ». Consulted on the: 23 avril 2024. [Online].: https://fr.spentys.com/blog/the-manufacturing-process-of-ankle-foot-orthosis-traditional-vs-3d-printed
[2] T. Ruepp, J. PASCAL, et R. Schumacher, « Device and method for detecting a surface shape on the human or animal body », WO2021110547A1, 10 juin 2021 Consulté le: 14 février 2025. [En ligne]. Disponible sur: https://patents.google.com/patent/WO2021110547A1/en
[3] H. Obeidat, W. Shuaieb, O. Obeidat, et R. Abd-Alhameed, « A Review of Indoor Localization Techniques and Wireless Technologies », Wireless Pers Commun, vol. 119, no 1, p. 289‑327, juill. 2021, doi: 10.1007/s11277-021-08209-5.
[4] I. Umay, B. Fidan, et B. Barshan, « Localization and Tracking of Implantable Biomedical Sensors », Sensors, vol. 17, no 3, Art. no 3, mars 2017, doi: 10.3390/s17030583.
[5] J. Yi, J. Liu, C. Zhang, et X. Lu, « Magnetic Motion Tracking for Natural Human Computer Interaction: A Review », IEEE Sensors J., vol. 22, no 23, p. 22356‑22367, déc. 2022, doi: 10.1109/JSEN.2022.3215285.
[6] A. Sasaki et E. Ohta, « Magnetic-Field-Based Position Sensing Using Machine Learning », IEEE Sensors Journal, vol. 20, no 13, p. 7292‑7302, juill. 2020, doi: 10.1109/JSEN.2020.2979071.
[7] G. James, D. Witten, T. Hastie, R. Tibshirani, et J. Taylor, « Linear Regression », in An Introduction to Statistical Learning: with Applications in Python, G. James, D. Witten, T. Hastie, R. Tibshirani, et J. Taylor, Éd., Cham: Springer International Publishing, 2023, p. 69‑134. doi: 10.1007/978-3-031-38747-0_3.
[8] G. James, D. Witten, T. Hastie, R. Tibshirani, et J. Taylor, « Tree-Based Methods », in An Introduction to Statistical Learning: with Applications in Python, G. James, D. Witten, T. Hastie, R. Tibshirani, et J. Taylor, Éd., Cham: Springer International Publishing, 2023, p. 331‑366. doi: 10.1007/978-3-031-38747-0_8.
[9] H. spaNicolas, T. Quirin, et J. Pascal, « FPGA-Based Magnetic Field Camera for Dynamic Magnetic Field Mapping », IEEE Sensors Letters, vol. 8, no 5, p. 1‑4, mai 2024, doi: 10.1109/LSENS.2024.3389099.
[10] P. Elleaume, O. Chubar, et J. Chavanne, « Computing 3D magnetic fields from insertion devices », in Proceedings of the 1997 Particle Accelerator Conference (Cat. No.97CH36167), mai 1997, p. 3509‑3511 vol.3. doi: 10.1109/PAC.1997.753258.
[11] F. Pedregosa et al., « Scikit-learn: Machine Learning in Python », MACHINE LEARNING IN PYTHON.