background image

Press 2: Object Detection 

Press 3: Face Recognition 

Press 4: Speech Recognition 

Press 5: ARM NN Demo 

 

Select: (1/2/3/4/5)  

Welcome to Speech Recognition Demo 

This is a demo application using Python modules and Tensorflow to be run on embedded devices for 
recognition of spoken words. 

Which Speech Recognition Demo you want to run: 

Press 1: For Speech Recognition of custom words using tensorflow. - OFFLINE 

In this demo, our trained model will be able to detect following words: 

yes  no  up  down  left  right  on  off  stop  go 

Note: We need to speak near to mic and laud to detect these words. We will get few warning logs. 
Please ignore that. 

 

Press 2: For Google API speech to Text -  Need internet connectivity. 

In this demo we use Google api to convert speech to text. 

 

Please Select: (1/2)  

Speech Recognition of custom words using tensorflow. 

ImportError: No module named 'numpy.core._multiarray_umath' 

ImportError: No module named 'numpy.core._multiarray_umath' 

Expression 'alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames )' 
failed in '../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 922 

Expression 'alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames )' 
failed in '../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 922 

[16847.014464] usb 1-1.3: reset high-speed USB device number 3 using cdns-usb3 

Summary of Contents for iMX8XML

Page 1: ...by eInfochips and is eInfochips intellectual property including the copyrights in all countries in the world This document is provided under a license to use only with all other rights including owne...

Page 2: ...mo 21 4 Speech Recognition Demo 28 5 Basler Camera Demo 39 6 Face Recognition using Tensorflow Lite demo 42 7 Object Recognition using Arm NN Demo 45 Troubleshooting 51 HDMI 51 Camera 51 ML Demos refe...

Page 3: ...Viewer App display issue 41 Figure 19 Tensorflow based Face Recognition demo run screen 42 Figure 20 Tensorflow based Face Recognition demo output screen 43 Figure 21 Arm NN Object Recognition run sc...

Page 4: ...0 1 initial draft 0 2 Added EIQ support and demos Table 1 Documents History Definition Acronyms and Abbreviations Definition Acronym Abbreviation Description cd Change directory scp Secure copy over...

Page 5: ...ning experience Figure 1 iMX8XML RD Pre requisite x86 host system having Linux Ubuntu 16 04 LTS installed Basic understanding of Linux commands Flash the AIML firmware image to SD Card with all requir...

Page 6: ...Figure 2 Hardware Setup...

Page 7: ...der ARROW_DEMOS name Copy Demos to SD Card If we have constraint of size of board and want to copy demos to USB or another partition then only follow this steps otherwise no need to do these steps Our...

Page 8: ...ew after flashing firmware As shown in above figure in SD card partitions we can see unused partition 10 GB at last We can utilized it Now Click on sign to create new partition Please select file syst...

Page 9: ...Figure 4 Create New EXT4 partition It will take few times and create partition and we can able to mount that partition See beow Figure for reference...

Page 10: ...ation ls la run media mmcblk1p3 ARROW_DEMOS total 40 drwxrwxrwx 7 1000 tracing 4096 Apr 9 14 22 drwx 5 1000 tracing 4096 Apr 9 14 22 drwxrwxrwx 4 1000 tracing 4096 Apr 1 13 07 ai crowd_count drwxrwxrw...

Page 11: ...packages at home folder to setup python module on our board For that user need to run setup_ml_demo sh script using below commands sh setup_ml_demo sh This script takes approximately 15 20 minutes an...

Page 12: ...es for Crowd counting In this demo we count the heads persons in the crowd Therefore it is useful in human flow monitoring or traffic control This demo run on either pre captured Image mode or in Live...

Page 13: ...o sh Press y n n Script Started Setup is already completed No need to do anything Exiting Choose the option from following Press 1 AI Crowd Count Press 2 Object Detection Press 3 Face Recognition Sele...

Page 14: ...ed in demo Press 1 For USB Web Cam Press 2 For D3 Mazzanine Camera 1 USB Web Camera is used for demo Enter Camera device node entry e g dev video4 dev video7 Here dev video7 is webcam camera node by w...

Page 15: ...Figure 7 Crowd Count Pre Captured Mode Figure 8 Crowd Count Live Mode...

Page 16: ...n credentials and apply it on the entire frame it read from Camera Thus Camera output is smooth but object detection take 2 to 3 secs to give actual real time output In Slow Object detection we have s...

Page 17: ...ia mmcblk1p3 ARROW_DEMOS run_ml_demos sh Welcome to ML Demos AI Corowd Count Object detection Face Recognition Speech Recognition Arm NN Prerequisite Have you run setup_ml_demo sh Press y n y Choose t...

Page 18: ...ct detection Demo you want to run Press 1 For Fast Object Detection Here Video Output is smooth Because we randomly sample only few frames from camera and applied same object detections on the rest of...

Page 19: ...available outside environment However to test model we don t need actual object We can simply provide good image of object instead of real object to verify our model Input image must be provided with...

Page 20: ...e in output image dog is not detected as it is not in good angle and exposure Due to that model detect that with very low percentage and we ignore that due to low confidence Also model confused train...

Page 21: ...n on each frame and video output is choppy However here we got real time output and No delay Due to that this demo is perfect to identify board s capabilities Both the demo have capability to retrain...

Page 22: ...SB ports HDMI Display having minimum 1080p resolution Steps to run Demo Run run media mmcblk1p3 ARROW_DEMOS run_ml_demos sh script and select option 3 Figure 13 Face Recognition Demo Testing See below...

Page 23: ...to be run on embedded devices for recognition of faces We already train model using given images But can retrain model with new images and can increase accuracy of model Please choose type of camera...

Page 24: ...ut So video output is very choppy But get real time detection here Please Select 1 2 2 Real time face recognition demo Please choose mode of operation for demo Press 1 Test Model Press 2 Train Model 1...

Page 25: ...ss 1 Test Model Press 2 Train Model 2 Face recognition Training Please provide new label e g Joshua With this label we will create new training dataset and will our retrain model If you don t want to...

Page 26: ...faces 0 detected faces 0 detected faces 0 125 440 254 311 detected faces 1 new training image anil_0_20190409 143240 png saved detected faces 0 detected faces 0 36 366 222 180 detected faces 1 new tra...

Page 27: ...which are already provided inside training_data folder Here we create new training directory anil or copy new images inside existing directory if already have directory with same name Therefore if we...

Page 28: ...fy correct keyword compare to image where we easily get accuracy more than 90 by CNN convolutional neural network Steps to run Demo Run run media mmcblk1p3 ARROW_DEMOS run_ml_demos sh script and selec...

Page 29: ...to detect these words We will get few warning logs Please ignore that Press 2 For Google API speech to Text Need internet connectivity In this demo we use Google api to convert speech to text Please S...

Page 30: ...c 4554 _snd_config_evaluate function snd_func_refer returned error No such file or directory ALSA lib alsa lib 1 1 5 src conf c 5033 snd_config_expand Evaluate error No such file or directory ALSA lib...

Page 31: ..._config_expand Evaluate error No such file or directory ALSA lib alsa lib 1 1 5 src pcm pcm c 2552 snd_pcm_open_noupdate Unknown PCM surround50 ALSA lib alsa lib 1 1 5 src confmisc c 1281 snd_func_ref...

Page 32: ...snd_func_refer Unable to find definition cards imx spdif pcm iec958 0 CARD 0 AES0 4 AES1 130 AES2 0 AES3 2 ALSA lib alsa lib 1 1 5 src conf c 4554 _snd_config_evaluate function snd_func_refer returned...

Page 33: ...connect PulseAudio Unable to connect Connection refused ALSA lib alsa lib 1 1 5 src pcm pcm_dmix c 1035 snd_pcm_dmix_open The dmix plugin supports only playback stream ALSA lib alsa lib 1 1 5 src pcm...

Page 34: ...1 5 src pcm pcm_dsnoop c 575 snd_pcm_dsnoop_open The dsnoop plugin supports only capture stream 16848 449914 fsl esai dai 59010000 esai ASoC can t set 59010000 esai hw params 22 ALSA lib alsa lib 1 1...

Page 35: ...in portaudio src hostapi alsa pa_linux_alsa c line 922 SAME ERROR AS ABOVE Cannot connect to server socket err No such file or directory Cannot connect to server request channel jack server is not ru...

Page 36: ...re 97 46 down prediction score 27 49 stop prediction score 20 01 yes prediction score 93 53 no prediction score 50 74 go prediction score 51 61 up prediction score 51 55 no prediction score 50 00 go p...

Page 37: ...default DMIC then also we got better performance As in external USB MIC we have good feature like noise and echo cancellation Due to that audio data input is much accurate and valid If we want to tes...

Page 38: ...etected Speech Recognition thinks you said Anil open YouTube Main Keyword detected Opening YouTube in browser Speech Recognition thinks you said Anil open YouTube search latest song Main Keyword detec...

Page 39: ...mera preview user need to select appropriate input i e 5 Figure 16 Basler Camera logs This demo setup for Basler camera and run pylon viewer app see figure 17 App features See rectangle box in attache...

Page 40: ...ure 17 Basler Pylon Viewer App Note If We run App in maximize mode then on left side we observed background display overlay This is pylon app issue and it is observed on Linux as well as on board prev...

Page 41: ...Figure 18 Pylon Viewer App display issue...

Page 42: ...loaded as a source file in this demo Steps to run Tf_based Face Recognition Demo Run run media mmcblk1p3 ARROW_DEMOS run_ml_demos sh script and select appropriate option then select Node Entry e g 0...

Page 43: ...Arm NN demo Select 1 2 3 4 5 6 7 8 7 Welcome to Face Recognition using TensorFlow Lite demo Detecting Biggest Face in Real Time Pleae provide Camera Node Entry Node entry e g dev video4 so enter 4 as...

Page 44: ...ght of GUI to input the new person s name Then click Add new person to add the face to data set In brief 1 Detect face 2 Input new person s name 3 Click Add new person Note Once new faces are added it...

Page 45: ...camera input object Steps to run File_Based Demo Run run media mmcblk1p3 ARROW_DEMOS run_ml_demos sh script and select option 8 then select option 1 sh run media mmcblk1p3 ARROW_DEMOS run_ml_demos sh...

Page 46: ...tity No List of Images with their identity is provided at https github com ARM software armnn blob branches armnn_18_11 tests TfLiteMobilenetQuantized Armnn labels txt Please choose type of example me...

Page 47: ...434935 Top 4 prediction is 134 with confidence 0 0408567 Top 5 prediction is 133 with confidence 0 0339192 Prediction for test case 1 282 is incorrect should be 283 Prediction values for test 2 Top 1...

Page 48: ...ARROW_DEMOS run_ml_demos sh script and select option 8 then select option 2 sh run media mmcblk1p3 ARROW_DEMOS run_ml_demos sh Welcome to ML Demos AI Corowd Count Object detection Face Recognition Spe...

Page 49: ...identity is provided at https github com ARM software armnn blob branches armnn_18_11 tests TfLiteMobilenetQuantized Armnn labels txt Please choose type of example method used in demo Press 1 For File...

Page 50: ...ct not only the three expected types of animals Show the provided flash cards to the camera and wait for the detection message Image captured wait The flash cards should not be twisted or curved on th...

Page 51: ...error we must connect HDMI and have to do reboot to work it Camera If we not connected any camera and start demo to capture frame then we might got error as shown in below attached figure To resolve...

Page 52: ...Figure 26 No Camera connected error...

Page 53: ...s github com jrosebr1 imutils https www pyimagesearch com 2018 06 18 face recognition with opencv python and deep learning https github com chuanqi305 MobileNet SSD https github com Uberi speech_recog...

Reviews: