Porting Rulex Software to the Raspberry Pi for Machine Learning Applications on the Edge †
<p>Dependencies file structure [<a href="#B3-sensors-21-06526" class="html-bibr">3</a>].</p> "> Figure 2
<p>Rulex processing blocks: consisting of (<b>a</b>) excel1 which imports data, (<b>b</b>) dataman1 for viewing and data mining, (<b>c</b>) split1 for splitting dataset, (<b>d</b>) lm1 which performs the machine learning algorithm, (<b>e</b>) app1 to apply the model, and finally (<b>f</b>) confmatrix1 and (<b>g</b>) featrank1 which visually display results [<a href="#B3-sensors-21-06526" class="html-bibr">3</a>].</p> "> Figure 3
<p>Radar training forecast [<a href="#B3-sensors-21-06526" class="html-bibr">3</a>].</p> "> Figure 4
<p>Radar testing forecast [<a href="#B3-sensors-21-06526" class="html-bibr">3</a>].</p> "> Figure 5
<p>Low class skewness for the Human Activity Detection dataset.</p> "> Figure 6
<p>Distribution of frequency-based feature values vs. class labels.</p> "> Figure 7
<p>Distribution of mean-based feature value vs. class labels.</p> "> Figure 8
<p>Taking sensor measurements using Smartphones to classify the state of a Dumper in an earth-moving site [<a href="#B32-sensors-21-06526" class="html-bibr">32</a>].</p> "> Figure 9
<p>High class skewness for the Vehicle Activity Recognition dataset.</p> "> Figure 10
<p>Testing Accuracy for Vehicle Activity Recognition using KNN.</p> "> Figure 11
<p>Six random images of women with varying ages, ethnicities, image background, dimensions, poses, and zoom level taken from the dataset found in [<a href="#B41-sensors-21-06526" class="html-bibr">41</a>].</p> ">
Abstract
:1. Introduction
2. Literature Review
2.1. Hardware Platform
2.2. Machine Learning Platform
2.3. Machine Learning and IoT Systems
3. Porting Techniques and Tools
4. Forecast Results
4.1. Radar Classification
- R: The spread in the range-FFT spectrum caused by the target.
- R1: Variance of the range-FFT spectrum.
- R2: Standard deviation of the range-FFT spectrum.
- R3: Average of the range-FFT spectrum.
- V: The spread in the Doppler-FFT spectrum caused by the target movement.
- V1: Variance of the Doppler-FFT spectrum.
- V2: Standard deviation of the Doppler-FFT spectrum.
- V3: Average of the Doppler-FFT spectrum.
- RCS: Radar Cross-Section, that gives a measure for the reflectivity of the target.
- Vest: The estimated speed of the target.
4.2. Human Activity Detection Using Smartphones
4.3. Brainwave Mental State Classification
4.4. Vehicle Activity Recognition
4.5. Gender Classification
Algorithm 1: Extracting center points from sobel filter output | ||||
Input:image dataset | ||||
Output:arrays sx, sy, centerx, centery | ||||
1. | fori in all imagesdo: | |||
2. | sobel = sobel(current image) | |||
3. | sx [i], sy [i] = shape of sobel | |||
4. | forpositions of all horizontal points: | |||
5. | sumx = sum of points where (pixel > threshold) | |||
6. | ifsumx > 0then: | |||
7. | meanx = meanx + position | |||
8. | countx++ | |||
9. | end if | |||
10. | end for | |||
11 | centerx [i] = meanx/countx | |||
12. | forpositions of all vertical points: | |||
13. | sumy = sum of points where (pixel > threshold) | |||
14. | ifsumy > 0then: | |||
15. | meany = meany + position | |||
16. | county++ | |||
17. | end if | |||
18. | end for | |||
10. | centery [i] = meany/county | |||
20. | end for | |||
21. | Returnsx, sy, centerx, centery |
4.5.1. Image-to-Time Series Using Statistical Radial Scanning and Sobel Filters
Algorithm 2: Statistical radial scanning of images | |||||||
Input:image dataset and arrays sx, sy, centerx, cenetry | |||||||
Output:pre-processed dataset | |||||||
1. | fori in all imagesdo: | ||||||
2. | forevery angle y in sobel (0–90°)do: | ||||||
3. | if2nd iteration in loop or morethen: | ||||||
4. | rotate sobel by 90° | ||||||
5. | end if | ||||||
6. | ify < 45°then: | ||||||
7. | ratio = y/45 | ||||||
8. | end if | ||||||
9. | ify > 45°then: | ||||||
10. | ratio = 45/(90.01 − y) | ||||||
11. | end if | ||||||
12. | fork = centery[i]; k < sy[i]; k = k + 1do: | ||||||
13. | for j = centerx[i]; j < sx[i]; j = j + 1 do: | ||||||
14. | if k > (j * ratio) * 0.9 and k < (j * ratio) * 1.1 then: | ||||||
15. | if sobel(j, k) > treshsold then: | ||||||
16. | append to D | ||||||
17. | end if | ||||||
18. | end if | ||||||
19. | end for | ||||||
20. | end for | ||||||
21. | “Add mean, median, STD, variance, maximum, and minimum of D to a Times-series” | ||||||
22. | end for | ||||||
23. | end for | ||||||
24. | task: Interpolate all six Time-series such that every unit (record) is expanded till the max length before grouping them into a dataset to apply ML forecasts. |
4.5.2. Gender Classification Experimental Results
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Premsankar, G.; Di Francesco, M.; Taleb, T. Edge Computing for the Internet of Things: A Case Study. IEEE Internet Things J. 2018, 5, 1275–1284. [Google Scholar] [CrossRef] [Green Version]
- Yu, W.; Liang, F.; He, X.; Hatcher, W.G.; Lu, C.; Lin, J.; Yang, X. A Survey on the Edge Computing for the Internet of Things. IEEE Access 2017, 6, 6900–6919. [Google Scholar] [CrossRef]
- Daher, A.W.; Rizik, A.; Muselli, M.; Chible, H.; Caviglia, D.D. Porting Rulex Machine Learning Software to the Raspberry Pi as an Edge Computing Device. In Applications in Electronics Pervading Industry, Environment and Society; Springer: Cham, Switzerland, 2021; pp. 273–279. [Google Scholar] [CrossRef]
- Vujovic, V.; Maksimovic, M. Raspberry Pi as a Wireless Sensor node: Performances and constraints. In Proceedings of the 2014 37th International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO), Opatija, Croatia, 26–30 May 2014; pp. 1013–1018. [Google Scholar] [CrossRef]
- Maksimovic, M.; Vujovic, V.; Davidović, N.; Milosevic, V.; Perisic, B. Raspberry Pi as Internet of Things hardware: Performances and Constraints. In Proceedings of the IcETRAN, Vrnjacka Banja, Serbia, 2–5 June 2014. [Google Scholar]
- Muselli, M. Extracting knowledge from biomedical data through Logic Learning Machines and Rulex. EMBnet J. 2012, 18, 56. [Google Scholar] [CrossRef]
- Rulex AI. Rulex, the Platform for Data-Driven Decisions. Available online: https://www.rulex.ai/ (accessed on 16 September 2021).
- Hajdarevic, K.; Konjicija, S.; Subasi, A. A low energy APRS-IS client-server infrastructure implementation using Raspberry Pi. In Proceedings of the 2014 22nd Telecommunications Forum Telfor (TELFOR), Belgrade, Serbia, 25–27 November 2014; pp. 296–299. [Google Scholar] [CrossRef]
- Parodi, S.; Manneschi, C.; Verda, D.; Ferrari, E.; Muselli, M. Logic Learning Machine and standard supervised methods for Hodgkin’s lymphoma prognosis using gene expression data and clinical variables. Health Inform. J. 2016, 24, 54–65. [Google Scholar] [CrossRef] [PubMed]
- Muselli, M. Switching Neural Networks: A New Connectionist Model for Classification. In Neural Nets; Springer: Berlin, Germany, 2006; pp. 23–30. [Google Scholar] [CrossRef]
- Muselli, M.; Quarati, A. Reconstructing positive Boolean functions with shadow clustering. In Proceedings of the 2005 European Conference on Circuit Theory and Design, Cork, Ireland, 29 August–1 September 2005. [Google Scholar] [CrossRef]
- Muselli, M.; Ferrari, E. Coupling Logical Analysis of Data and Shadow Clustering for Partially Defined Positive Boolean Function Reconstruction. IEEE Trans. Knowl. Data Eng. 2009, 23, 37–50. [Google Scholar] [CrossRef]
- Al-Khafajiy, M.; Webster, L.; Baker, T.; Waraich, A. Towards fog driven IoT healthcare: Challenges and framework of fog computing in healthcare. In Proceedings of the ICFNDS’18: International Conference on Future Networks and Distributed Systems, Amman, Jordan, 26–27 June 2018; Volume 9, pp. 1–7. [Google Scholar] [CrossRef]
- Cecilia, J.; Cano, J.-C.; Morales-García, J.; Llanes, A.; Imbernón, B. Evaluation of Clustering Algorithms on GPU-Based Edge Computing Platforms. Sensors 2020, 20, 6335. [Google Scholar] [CrossRef] [PubMed]
- Lapegna, M.; Balzano, W.; Meyer, N.; Romano, D. Clustering Algorithms on Low-Power and High-Performance Devices for Edge Computing Environments. Sensors 2021, 21, 5395. [Google Scholar] [CrossRef] [PubMed]
- Novac, P.-E.; Hacene, G.B.; Pegatoquet, A.; Miramond, B.; Gripon, V. Quantization and Deployment of Deep Neural Networks on Microcontrollers. Sensors 2021, 21, 2984. [Google Scholar] [CrossRef] [PubMed]
- Classification of Indoor Environments for IoT Applications: A Machine Learning Approach. Available online: https://ieeexplore.ieee.org/abstract/document/8458184 (accessed on 9 September 2021).
- Kanawaday, A.; Sane, A. Machine learning for predictive maintenance of industrial machines using IoT sensor data. In Proceedings of the 2017 8th IEEE International Conference on Software Engineering and Service Science (ICSESS), Beijing, China, 24–36 November 2017; pp. 87–90. [Google Scholar] [CrossRef]
- Canedo, J.; Skjellum, A. Using machine learning to secure IoT systems. In Proceedings of the 2016 14th Annual Conference on Privacy, Security and Trust (PST), Auckland, New Zealand, 12–14 December 2016; pp. 219–222. [Google Scholar] [CrossRef]
- Hodo, E.; Bellekens, X.; Hamilton, A.; Dubouilh, P.-L.; Iorkyase, E.; Tachtatzis, C.; Atkinson, R. Threat analysis of IoT networks using artificial neural network intrusion detection system. In Proceedings of the 2016 International Symposium on Networks, Computers and Communications (ISNCC), Yasmine Hammamet, Tunisia, 11–13 May 2016; pp. 1–6. [Google Scholar] [CrossRef] [Green Version]
- Clemencic, M.; Mato, P. A CMake-based build and configuration framework. J. Phys. Conf. Ser. 2012, 396, 052021. [Google Scholar] [CrossRef]
- Fober, D.; Orlarey, Y.; Letz, S. Building Faust with CMake. Available online: https://hal.archives-ouvertes.fr/hal-02158978 (accessed on 16 September 2021).
- Linux Journal. Eleven SSH Tricks. Available online: https://dl.acm.org/doi/abs/10.5555/860397.860402 (accessed on 11 May 2021).
- Bellavista, P.; Zanni, A. Feasibility of Fog Computing Deployment based on Docker Containerization over RaspberryPi. In Proceedings of the 18th International Conference on Distributed Computing and Networking, Hyderabad, India, 5–7 January 2017. [Google Scholar] [CrossRef]
- Infineon Technologies. BGT24MTR11. Available online: https://www.infineon.com/cms/en/product/sensor/radar-sensors/radar-sensors-for-iot/24ghz-radar/bgt24mtr11/ (accessed on 11 May 2021).
- Infineon Technologies. DEMO DISTANCE2GO. Available online: https://www.infineon.com/cms/en/product/evaluation-boards/demo-distance2go/ (accessed on 11 May 2021).
- Daher, A.W.; Rizik, A.; Randazzo, A.; Tavanti, E.; Chible, H.; Muselli, M.; Caviglia, D.D. Pedestrian and Multi-Class Vehicle Classification in Radar Systems Using Rulex Software on the Raspberry Pi. Appl. Sci. 2020, 10, 9113. [Google Scholar] [CrossRef]
- Rizik, A.; Randazzo, A.; Vio, R.; Delucchi, A.; Chible, H.; Caviglia, D.D. Feature Extraction for Human-Vehicle Classification in FMCW Radar. In Proceedings of the 2019 26th IEEE International Conference on Electronics, Circuits and Systems (ICECS), Genova, Italy, 27–39 November 2019; pp. 131–132. [Google Scholar] [CrossRef]
- Rizik, A.; Tavanti, E.; Chible, H.; Caviglia, D.D.; Randazzo, A. Cost-Efficient FMCW Radar for Multi-Target Classification in Security Gate Monitoring. IEEE Sens. J. 2021, 21, 20447–20461. [Google Scholar] [CrossRef]
- Anguita, D.; Ghio, A.; Oneto, L.; Parra, X.; Reyes-Ortiz, J.L. Public Domain Dataset for Human Activity Recognition Using Smartphones. In Proceedings of the 21st European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning, Bruges, Belgium, 24–36 April 2013. [Google Scholar]
- Bird, J.J.; Manso, L.J.; Ribeiro, E.P.; Ekart, A.; Faria, D.R. A Study on Mental State Classification using EEG-based Brain-Machine Interface. In Proceedings of the 2018 International Conference on Intelligent Systems (IS), Funchal, Portugal, 25–27 September 2018; pp. 795–800. [Google Scholar] [CrossRef]
- Axelsson, H.; Wass, D. Machine Learning for Activity Recognition of Dumpers 2019. Available online: http://urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-260256 (accessed on 14 May 2021).
- Karimi, F.; Wagner, C.; Lemmerich, F.; Jadidi, M.; Strohmaier, M. Inferring Gender from Names on the Web: A Comparative Evaluation of Gender Detection Methods. In Proceedings of the 25th International Conference Companion on World Wide Web, Republic and Canton of Geneva, CHE, Montréal, QC, Canada, 11–15 April 2016; pp. 53–54. [Google Scholar] [CrossRef] [Green Version]
- Yang, Z.; Li, M.; Ai, H. An Experimental Study on Automatic Face Gender Classification. In Proceedings of the 18th International Conference on Pattern Recognition (ICPR’06), Hong Kong, China, 20–24 August 2006; Volume 3, pp. 1099–1102. [Google Scholar] [CrossRef]
- Moghaddam, B.; Yang, M.-H. Gender classification with support vector machines. In Proceedings of the Fourth IEEE International Conference on Automatic Face and Gesture Recognition (Cat. No. PR00580), Grenoble, France, 26–30 March 2002. [Google Scholar] [CrossRef]
- Eidinger, E.; Enbar, R.; Hassner, T. Age and Gender Estimation of Unfiltered Faces. IEEE Trans. Inf. Forensics Secur. 2014, 9, 2170–2179. [Google Scholar] [CrossRef]
- Converting Images into Time Series for Data Mining. Available online: https://izbicki.me/blog/converting-images-into-time-series-for-data-mining (accessed on 24 July 2021).
- Bora, D. A Novel Approach for Color Image Edge Detection Using Multidirectional Sobel Filter on HSV Color Space. Int. J. Comput. Sci. Eng. 2017, 5, 154–159. [Google Scholar]
- Levi, G.; Hassner, T. Age and Gender Classification Using Convolutional Neural Networks. Available online: https://www.cv-foundation.org/openaccess/content_cvpr_workshops_2015/W08/html/Levi_Age_and_Gender_2015_CVPR_paper.html (accessed on 22 July 2021).
- Albawi, S.; Mohammed, T.A.; Al-Zawi, S. Understanding of a convolutional neural network. In Proceedings of the 2017 International Conference on Engineering and Technology (ICET), Antalya, Turkey, 21–23 August 2017; pp. 1–6. [Google Scholar] [CrossRef]
- Male and Female Faces Dataset. Available online: https://kaggle.com/ashwingupta3012/male-and-female-faces-dataset (accessed on 1 August 2021).
Human Activity Classification with Rulex | |||
---|---|---|---|
Algorithm | LLM | KNN | SVM |
Laying | 100% | 100% | 100% |
Standing | 86.8% | 94.4% | 98.4% |
Sitting | 88.48% | 91.86% | 97.63% |
Walking | 94.74% | 100% | 100% |
Walking Upstairs | 89.89% | 99.47% | 100% |
Walking Downstairs | 82.93% | 100% | 100% |
Mental State Classification with Rulex | |||
---|---|---|---|
Algorithm | LLM | KNN | SVM |
Relaxed | 92.77% | 94.78% | 96.39% |
Neutral | 76.02% | 83.74% | 89.84% |
Concentrating | 97.19% | 100% | 99.60% |
Mental State Classification with Rulex Power Consumption | ||
---|---|---|
Station | LLM | SVM |
Time taken | 0.27 min. | 0.22 min. |
Energy (70 Watts) | 1120 J. | 6230 J. |
Mental State Classification with Rulex Power Consumption | ||
---|---|---|
Station | LLM | SVM |
Time taken | 3.33 min. | 0.98 min. |
Energy (4 Watts) | 800 J. | 356 J. |
Gender Detection with Rulex | ||
---|---|---|
Algorithm | KNN | SVM |
Female | 98.72% | 95.60% |
Male | 94.24% | 88.29% |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Daher, A.W.; Rizik, A.; Muselli, M.; Chible, H.; Caviglia, D.D. Porting Rulex Software to the Raspberry Pi for Machine Learning Applications on the Edge. Sensors 2021, 21, 6526. https://doi.org/10.3390/s21196526
Daher AW, Rizik A, Muselli M, Chible H, Caviglia DD. Porting Rulex Software to the Raspberry Pi for Machine Learning Applications on the Edge. Sensors. 2021; 21(19):6526. https://doi.org/10.3390/s21196526
Chicago/Turabian StyleDaher, Ali Walid, Ali Rizik, Marco Muselli, Hussein Chible, and Daniele D. Caviglia. 2021. "Porting Rulex Software to the Raspberry Pi for Machine Learning Applications on the Edge" Sensors 21, no. 19: 6526. https://doi.org/10.3390/s21196526
APA StyleDaher, A. W., Rizik, A., Muselli, M., Chible, H., & Caviglia, D. D. (2021). Porting Rulex Software to the Raspberry Pi for Machine Learning Applications on the Edge. Sensors, 21(19), 6526. https://doi.org/10.3390/s21196526