IoT and AI-Based Application for Automatic Interpretation of the Affective State of Children Diagnosed with Autism
<p>Number of trained images per class.</p> "> Figure 2
<p>Drawing without the augmentation.</p> "> Figure 3
<p>Drawing with Keras augmentation.</p> "> Figure 4
<p>VGG16 model accuracy.</p> "> Figure 5
<p>VGG16 model loss.</p> "> Figure 6
<p>Vgg16 classification report.</p> "> Figure 7
<p>Last layer model summary.</p> "> Figure 8
<p>MobileNet model accuracy.</p> "> Figure 9
<p>MobileNet model loss.</p> "> Figure 10
<p>MobileNet classification report.</p> "> Figure 11
<p>PandaSays drawing interpretation.</p> "> Figure 12
<p>ResNet50 model accuracy.</p> "> Figure 13
<p>ResNet50 model loss.</p> "> Figure 14
<p>ResNet50 classification report.</p> "> Figure 15
<p>Server–client communication.</p> "> Figure 16
<p>Message sending to robot through SPP android application.</p> "> Figure 17
<p>Response of the robot.</p> "> Figure 18
<p>BlueSPP app execution time of action for Alpha 1P robot.</p> "> Figure 19
<p>Raspberry Pi connection to Alpha 1P Robot.</p> "> Figure 20
<p>Execution time for Alpha 1P robot with Raspberry Pi.</p> ">
Abstract
:1. Introduction
2. Description of “PandaSays” Mobile Application and Performance Tests Presentation Using Deep Convolutional Neural Networks and Residual Neural Networks
- rotation_range = 40
- width_shift_range = 0.1
- height_shift_range = 0.1
- shear_range = 0.2
- zoom_range = 0.3
- horizontal_flip = True
- fill_mode = ‘nearest’
- brightness_range = [0.7, 1.2]
- CIE Lab (color space determined by the International Commission on Illumination)
- HSV (hue, saturation, value)
- HIS (hue, intensity, saturation)
- HSL (hue, saturation, kightness)
- YCbCr (green (Y), blue (Cb), red (Cr)) [21]
3. Alpha 1 Pro Server–Client Connection and Bluetooth Communication Protocol
- Handshake (Read): FB BF 06 01 00 08 ED
- Obtaining an action list (Read): FB BF 06 02 00 08 ED
- Implementing an action list (Write): FB BF 06 03 00 09 ED
- Sound switch (Write): FB BF 06 06 00 08 ED
- Play control (Write): FB BF 06 07 00 08 ED-pause
- Heartbeat packet (Write): FB BF 06 08 00 08 ED
- Reading robot state (Write): FB BF 06 0A 00 10 ED
- Volume adjustment (Write): FB BF 06 0B 09 08 ED
- Powering off all servos (Write): FB BF 06 0C 00 12 ED
- Controlling all servo indicators (Write): FB BF 06 0D 00 08 ED
- Clock calibration (Write): FB BF 06 0E 08 ED
- Reading clock parameters (Read): FB BF 11 0F 06 18 ED
- Setting clock parameters (Write): FB BF 12 10 07 20 ED
- Reading the software version number of the robot (Read)
- Reading battery capacity of the robot (Read): FB BF 06 11 00 08 ED
- Controlling the motion of a single servo (Write): FB BF 08 23 03 13 ED
- Controlling the motion of multiple servos (Write): FB BF 08 23 03 12 ED
- Setting offset value of a single servo (Write): FB BF 08 26 03 12 ED
- Setting offset value of multiple servos (Write): FB BF 07 27 02 09 ED
- Play completion (Automatic report of BT): FB BF 05 31 00 05 ED
- Allowing change during play (Write/Automatic report of BT): FB BF 06 32 01 08 ED
- Completing action list sending (Automatic report of BT): FB BF 05 81 00 05 ED
3.1. Establishing Bluetooth Communication with Python
3.2. Establishing Bluetooth Serial Communication between Raspberry Pi and Alpha 1P Robot Using a SPP Application
- FB BF 07 0A 00 01 12 ED (Speaker)
- FB BF 07 0A 01 00 12 ED (Play)
- FB BF 07 0A 02 80 93 ED (Volume)
- FB BF 07 0A 03 01 15 ED (Servo LEDs)
4. Comparison of the Communication Times from Candidate Devices
5. Conclusions
- In this paper, it was shown that the best trained model was the one trained with MobileNet, because of its highest accuracy—56.25%. MobileNet is the least complex neural network, with 13 million parameters, in comparison with VGG16 and ResNet50. Because of its low complexity and small size, MobileNet is more suitable for mobile applications. Those are the reasons why the MobileNet model was chosen to be used in PandaSays mobile application.
- Establishment of a control methodology for connecting the robot Alpha 1 Pro with PandaSays application, using Bluetooth communication protocol.
- Development of a robot module that includes the communication protocols with the app PandaSays, which will be used further to control the robot and send the machine learning output to it, in order to perform a specific action.
- Python module implementation for setting the client–server communication.
- The configuration setup of the Raspberry Pi and robot’s Bluetooth communication protocol, used to measure latency and connectivity time.
- The efficiency of using Raspberry Pi with PyBluez to create a client–server connection, represented by the lowest latency—3.66 s and by the connectivity time—3.23 s, which was faster than other devices (Android Device, BlueSPP app).
- Emphasis of the importance of the humanoid robots in helping children diagnosed with autism.
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
BLE | Bluetooth Low Energy |
EDR | Enhanced Data Rate |
LE | Low Energy |
MAC | media access control |
RFCOMM | Radio frequency communication |
RS-232 | Recommended Standard 232 |
TCP | Transmission Control Protocol |
References
- Autism and Health: A Special Report by Autism Speaks. Available online: https://www.autismspeaks.org/science-news/autism-and-health-special-report-autism-speaks (accessed on 5 June 2020).
- Villano, M.; Crowell, C.R.; Wier, K.; Tang, K.; Thomas, B.; Shea, N.; Schmitt, L.M.; Diehl, J.J. DOMER: A Wizard of Oz interface for using interactive robots to scaffold social skills for children with Autism Spectrum Disorders. In Proceedings of the 2011 6th ACM/IEEE International Conference on Human-Robot Interaction (HRI), Lausanne, Switzerland, 8–11 March 2011; pp. 279–280. [Google Scholar] [CrossRef]
- Shamsuddin, S.; Yussof, H.; Ismail, L.; Hanapiah, F.A.; Mohamed, S.; Piah, H.A.; Zahari, N.I. Initial response of autistic children in human-robot interaction therapy with humanoid robot NAO. In Proceedings of the 2012 IEEE 8th International Colloquium on Signal Processing and Its Applications, Malacca, Malaysia, 23–25 March 2012; pp. 188–193. [Google Scholar] [CrossRef]
- Krithiga, R. Socially Assistive Robot for children with Autism Spectrum Disorder. In Proceedings of the 2019 IEEE International WIE Conference on Electrical and Computer Engineering (WIECON-ECE), Bangalore, India, 15–16 November 2019; pp. 1–4. [Google Scholar] [CrossRef]
- Alcorn, A.M.; Ainger, E.; Charisi, V.; Mantinioti, S.; Petrović, S.; Schadenberg, B.R.; Tavassoli, T.; Pellicano, E. Views on Using Humanoid Robots with Autistic Learners in Special Education Settings in England. Front. Robot. AI 2019, 6, 107. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Documentation Regarding Robots Used for Helping Children with Autism. Available online: https://www.robokind.com/robots4autism (accessed on 10 September 2021).
- Research Regarding Humanoid Robots. Available online: https://www.csiro.au/en/research/technology-space/ai/social-robots-support-children-with-autism (accessed on 28 September 2021).
- Documentation Regarding KASPAR Robot. Available online: https://www.herts.ac.uk/kaspar/impact-of-kaspar (accessed on 30 September 2021).
- Miskam, M.A.; Shamsuddin, S.; Samat, M.R.A.; Yussof, H.; Ainudin, H.A.; Omar, A.R. Humanoid robot NAO as a teaching tool of emotion recognition for children with autism using the Android app. In Proceedings of the 2014 International Symposium on Micro-NanoMechatronics and Human Science (MHS), Nagoya, Japan, 10–12 November 2014; pp. 1–5. [Google Scholar] [CrossRef]
- Beer, J.M.; Boren, M.; Liles, K.R. Robot assisted music therapy a case study with children diagnosed with autism. In Proceedings of the 2016 11th ACM/IEEE International Conference on Human-Robot Interaction (HRI), Christchurch, New Zealand, 7–10 March 2016; pp. 419–420. [Google Scholar] [CrossRef]
- Juslin, N.P. Cue utilization in communication of emotion in music performance: Relating performance to perception. J. Exp. Psychol. Hum. Percept. Perform. 2000, 26, 1797–1813. [Google Scholar] [CrossRef]
- Rigg, M.G. The mood effects of music: A comparison of data from four investigators. J. Psychol. 1964, 57, 427–438. [Google Scholar] [CrossRef]
- Sloboda, A.J. Music structure and emotional response: Some empirical findings. Psychol. Music. 1991, 19, 110–120. [Google Scholar] [CrossRef]
- Farhan, S.A.; Khan, M.N.R.; Swaron, M.R.; Shukhon, R.N.S.; Islam, M.M.; Razzak, M.A. Improvement of Verbal and Non-Verbal Communication Skills of Children with Autism Spectrum Disorder using Human Robot Interaction. In Proceedings of the 2021 IEEE World AI IoT Congress (AIIoT), Seattle, WA, USA, 10–13 May 2021; pp. 356–359. [Google Scholar] [CrossRef]
- Lee, J.; Obinata, G. Developing therapeutic robot for children with autism: A study on exploring colour feedback. In Proceedings of the 2013 8th ACM/IEEE International Conference on Human-Robot Interaction (HRI), Tokyo, Japan, 3–6 March 2013; pp. 173–174. [Google Scholar] [CrossRef]
- Popescu, A.L.; Popescu, N. Machine Learning based Solution for Predicting the Affective State of Children with Autism. In Proceedings of the 2020 International Conference on e-Health and Bioengineering (EHB), Iasi, Romania, 29–30 October 2020; pp. 1–4. [Google Scholar] [CrossRef]
- Alpha 1 Pro Robot. Available online: https://www.ubtrobot.com/products/alpha-1p?ls=en (accessed on 10 January 2022).
- Popescu, A.-L.; Popescu, N. Neural networks-based solutions for predicting the affective state of children with autism. In Proceedings of the 2021 23rd International Conference on Control Systems and Computer Science (CSCS), Bucharest, Romania, 26–28 May 2021; pp. 93–97. [Google Scholar] [CrossRef]
- Image Data Processing. Available online: https://keras.io/api/preprocessing/image/ (accessed on 10 January 2022).
- ImageNet Description. Available online: https://www.image-net.org (accessed on 14 January 2022).
- Kim, H.K.; Park, J.H.; Jung, H.Y. An Efficient Color Space for Deep-Learning Based Traffic Light Recognition. J. Adv. Transp. 2018, 2018, 2365414. [Google Scholar] [CrossRef] [Green Version]
- F1-Score Explained. Available online: https://scikit-learn.org/stable/modules/generated/sklearn.metrics.f1_score.html (accessed on 10 February 2022).
- VGG16 Architecture. Available online: https://viso.ai/deep-learning/vgg-very-deep-convolutional-networks/ (accessed on 24 February 2022).
- ResNet50 Architecture. Available online: https://towardsdatascience.com/understanding-and-coding-a-resnet-in-keras-446d7ff84d33 (accessed on 24 February 2022).
- Howard, A.G.; Zhu, M.; Chen, B.; Kalenichenko, D.; Wang, W.; Weyand, T.; Andreetto, M.; Adam, H. MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications. arXiv 2017, arXiv:1704.04861. [Google Scholar]
- Alpha1 Series Bluetooth Communication Protocol. Available online: https://www.robotshop.com/community/forum/uploads/default/original/3X/8/e/8e7299b1389b4526389fb02278b7ba27e40d3135.pdf (accessed on 21 August 2021).
- Types of Bluetooth Technology. Available online: https://www.bluetooth.com/blog/wireless-connectivity-options-for-iot-applications-technology-comparison/ (accessed on 15 July 2021).
- Rfcomm Tutorial. Available online: https://www.btframework.com/rfcomm.htm (accessed on 20 September 2021).
- Rfcomm Client Code. Available online: https://gist.github.com/AuraLoredana/7533a48cb4e4c80e4cc0e84b68d1112e (accessed on 24 February 2022).
- Rfcomm Server Code. Available online: https://gist.github.com/AuraLoredana/a95427ffd87d7f49b52c43973bfbcf8f (accessed on 24 February 2022).
- Huang, A.S.; Rudolph, L. Bluetooth. Essentials for Programmers; Cambridge University Press: Cambridge, UK, 2009. [Google Scholar] [CrossRef] [Green Version]
- Alpha Robot Specifications. Available online: https://downloads.ubtrobot.com/ (accessed on 20 September 2021).
- Robert Triggs. Android’s Bluetooth Latency Needs a Serious Overhaul. 2021. Available online: https://www.soundguys.com/android-bluetooth-latency-22732/ (accessed on 20 September 2021).
Vgg16 Model Summary |
---|
Total params: 16,816,965 |
Trainable params: 16,816,965 |
Non-trainable params: 0 |
Vgg16 Model Summary—First 20 Layers Non-Trainable |
---|
Total params: 16,816,965 |
Trainable params: 2,102,277 |
Non-trainable params: 14,714,688 |
MobileNet Model Summary | |
---|---|
Total params | 4,253,864 |
Trainable params | 16,816,965 |
Non-trainable params | 21,888 |
ResNet50 Model Summary | |
---|---|
Total params | 49,722,757 |
Trainable params | 49,468,037 |
Non-trainable params | 254,720 |
Neural Network | Testing Accuracy (%) | Training Accuracy (%) | Loss (Double Data Type) |
---|---|---|---|
MobileNet | 56.25 | 70.56 | 1.5260 |
VGG16 | 50.93 | 73.93 | 1.8508 |
ResNet50 | 47.65 | 57.53 | 1.5041 |
Neural Network | Complexity (Number of Parameters) | FLOPs (Floating-Point Operations) | Latency (s) | Time of Convergence (s) |
---|---|---|---|---|
MobileNet | 13 million | 16.89 million | 0.01689 | 422,074 |
VGG16 | 138 million | 16.81 million | 0.01681 | 364,129 |
ResNet50 | >23 million | 49.90 million | 0.04990 | 151.33 |
Device/Application | Raspberry Pi/PyBluez Library | Alpha 1 Android App | BlueSPP Android App |
---|---|---|---|
Connectivity time (seconds) to Alpha 1P Robot | 3.23 | 28.18 | 3.8 |
Bluetooth version | Bluetooth 2.0 | Bluetooth 5.0 | Bluetooth 5.0 |
Bluetooth version of Alpha 1P robot | Bluetooth 3.0/4.0 BLE + EDR |
Device/Application | Raspberry Pi/PyBluez library | Alpha 1 Android App | BlueSPP Android App |
---|---|---|---|
Latency time (seconds) representing executing an action by Alpha 1P Robot | 3.66 | 31.22 | 5.0 |
Bluetooth version | Bluetooth 2.0 | Bluetooth 5.0 | Bluetooth 5.0 |
Bluetooth version of Alpha 1P robot | Bluetooth 3.0/4.0 BLE + EDR |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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
Popescu, A.-L.; Popescu, N.; Dobre, C.; Apostol, E.-S.; Popescu, D. IoT and AI-Based Application for Automatic Interpretation of the Affective State of Children Diagnosed with Autism. Sensors 2022, 22, 2528. https://doi.org/10.3390/s22072528
Popescu A-L, Popescu N, Dobre C, Apostol E-S, Popescu D. IoT and AI-Based Application for Automatic Interpretation of the Affective State of Children Diagnosed with Autism. Sensors. 2022; 22(7):2528. https://doi.org/10.3390/s22072528
Chicago/Turabian StylePopescu, Aura-Loredana, Nirvana Popescu, Ciprian Dobre, Elena-Simona Apostol, and Decebal Popescu. 2022. "IoT and AI-Based Application for Automatic Interpretation of the Affective State of Children Diagnosed with Autism" Sensors 22, no. 7: 2528. https://doi.org/10.3390/s22072528
APA StylePopescu, A.-L., Popescu, N., Dobre, C., Apostol, E.-S., & Popescu, D. (2022). IoT and AI-Based Application for Automatic Interpretation of the Affective State of Children Diagnosed with Autism. Sensors, 22(7), 2528. https://doi.org/10.3390/s22072528