Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Activity Recognition

54 views

Published on

Team:
Andrea Napoletani
Alessandro Giannetti
Riccardo Pattuglia

Published in: Engineering
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Activity Recognition

  1. 1. Activity Recognition Internet of Things 2019
  2. 2. OUR TEAM Alessandro Giannetti | Andrea Napoletani Riccardo Pattuglia
  3. 3. Activity ML algorithm PredictionAccelerometer Data visualization Idea Cloud
  4. 4. Technologies Cloud Technologies Visualization Technologyhw/sw Technologies
  5. 5. Project workflow Visualize on RedashTrain Genuino 101 and classify the activities Send data through BLE to Android Store messages in AWS DynamoDB Send MQTT messages to AWS IoT
  6. 6. Genuino 101 Technical Specification ● Microcontroller Intel Curie ● Flash Memory 196 kB ● SRAM 24 kB ● Clock Speed 32MHz ● I/0 communication Bluetooth LE ● Sensors 6-axis accelerometer/gyro
  7. 7. Genuino 101 ● Low-Power Consumption ● Onboard Bluetooth LE and a 6-axis accelerometer/gyro. ● Dedicated core for pattern matching capabilities. PRO CONS ● The memory is very low ● The Pattern Matching Engine has some limitations
  8. 8. Arduino IDE ● Simple (sometimes too much!) ● C/C++ support ● Many libraries implementing the most used features (BLE, Curie Module, …)
  9. 9. Setup function BLEPeripheral blePeripheral; BLEService fitnessService("19B10000-E8F***"); BLEUnsignedCharCharacteristic fitnessTypeChar("19B1****", BLERead | BLENotify); void setup() { CurieIMU.begin(); CuriePME.begin(); CurieIMU.setAccelerometerRate(sampleRateHZ); CurieIMU.setAccelerometerRange(1); // CuriePME.setClassifierMode(CuriePME.KNN_Mode); blePeripheral.setLocalName("Activity"); blePeripheral.setAdvertisedServiceUuid(fitnessService.uuid() ); // add service and characteristic blePeripheral.addAttribute(fitnessService); blePeripheral.addAttribute(fitnessTypeChar); // advertise the service blePeripheral.begin(); }
  10. 10. Loop function BLECentral central = blePeripheral.central(); byte vector[120]; unsigned int category; if (central) { while (central.connected()) { readVectorFromIMU(vector); category = CuriePME.classify(vector, 120); switch (category) { case 1: Serial.println(F("Still")); break; case 2: Serial.println(F("Sit")); break; case 3: Serial.println(F("Walk")); break; case 4: Serial.println(F("Run")); break; default:Serial.println(F("Unknown")); break; } fitnessTypeChar.setValue((byte) category); Serial.println(fitnessTypeChar.value()); } } void readVectorFromIMU(byte vector[]){ byte accel[250]; int raw[3]; unsigned int samples = 0; unsigned int i = 0; while (samples < 250) { if (CurieIMU.dataReady()) { CurieIMU.readAccelerometer(raw[0], raw[1], raw[2]); /* Map raw values to 0-255, only z axis taken */ accel[i] = (byte) map(raw[0], IMULow, IMUHigh, 0, 255); i += 1; ++samples; } } undersample(accel, samples, vector); }
  11. 11. Train Genuino 101 Run Sit Walk Stand Solved Problems ● Progmem to load training data at startup ● Training Datasets not working ● Manual training Genuino 101 position ● Pocket ● Chest (discarded)
  12. 12. Train Genuino 101 Walk Still
  13. 13. Bluetooth Low Energy (BLE) ● 2.4 GHz radio frequencies ● Simpler modulation system ● Data rate <1 Mbit/S ● No pairing required
  14. 14. How can we store this data? Amazon Cognito Rule Amazon DynamoDB AWS IoT
  15. 15. MQTT protocol MQTT Broker Topic Message Message Subscribe
  16. 16. JSON Format Messages
  17. 17. Authentication with Amazon Cognito ● Create an Identity Pool with an unauthenticated role in Amazon Cognito ● Allows the application to perform all operation on the Amazon IoT service granting AWSIoTFullAcess permission ● Allow access from your Android App to this Identity in the awsconfiguration.json file
  18. 18. Configure AWS IoT ● Create a policy on AWS IoT Console to allow connecting to AWS IoT as well as allowing publishing, subscribing and receiving messages A policy ARN uniquely identifies a policy in AWS.
  19. 19. AWS IoT - Console
  20. 20. Store data on AWS DynamoDB Store our messages in a table We need a rule that allows us to take information from an incoming MQTT message and write it to a DynamoDB table
  21. 21. Create the rule ● Create a table in DynamoDB ● Create a rule to read messages from our topic and store them in our new table
  22. 22. Data visualization - Mango Display PROBLEMS WITH MANGO DISPLAY/MIRROR ● Apple device + Android device. ● The software is not Open Source ● Limited Data Sources (Apple health and Fitbit)
  23. 23. Data visualization - REDASH STRENGTHS ● Flexible, Powerful and Easy to Use ● Popular Open Source Project ● +50 Data Sources (including dynamoDB)
  24. 24. Add DynamoDB to Redash ● Name: DynamoDB table ● Access Key / Secret Key : AIM Panel
  25. 25. How Querying the Data Sources
  26. 26. Querying DynamoDB PROBLEM WITH DYNAMODB ● The QL of DynamoDB don’t support the aggregation functions like SUM(), AVG(), complex COUNT() and specific operation for the dates like FORMAT(). SOLUTION TO THE PROBLEM ● Redash allows you to query results from other queries
  27. 27. Querying on Queries results ● Add the Data Source Query Results ● Each queries constitutes its own "table" to SQLite. The table name is the string query_ concatenated with the Query ID.
  28. 28. Parameterizing Queries Query Parameters let you insert values at run time without editing your base query. ● Redash recognizes any string between double curly braces {{ }} as a Query Parameter. ● By clicking on the “{{}}” button, you can enter the parameters.
  29. 29. HOURS FILTERING SELECT substr(activity_number,11,19), activity_type FROM query_188916 WHERE substr(activity_number,0,11) == "{{ day }}" ALL DAY SELECT substr(activity_number,0,11) FROM query_188916 GROUP BY substr(activity_number,0,11) ALL DATA (on DynamoDB) SCAN activity_type, activity_number FROM activity_recognition NUMBER OF OCCURRENCES SELECT activity_type,count(activity_type), FROM query_188916 WHERE substr(activity_number,0,11) == "{{day}}" GROUP BY activity_type Our Queries
  30. 30. Data visualization
  31. 31. Dashboard
  32. 32. Plan & Subscription ● 25 Gb storage ● 200 million requests per month ● 50.000 Monthly Active User ● 10 Gb storage ● 1 million operations of synchronization ● 250.000 messages per month
  33. 33. References ● GITHUB: https://github.com/riccardo97p/IoT_ActivityRecognition ● HACKSTER : https://www.hackster.io/andreanapoletani/activity-recognition-using-genuino-101-and-aws- iot-fbeea2 ● PROJECT PRESENTATION: https://www.slideshare.net/AndreaNapoletani/activity-recognition-137479240 ● REDASH GIFs: https://redash.io/ ● IMGs: https://www.vectorstock.com/ ● ALESSANDRO GIANNETTI: https://www.linkedin.com/in/alessandro-giannetti-2b1864b4/ ● ANDREA NAPOLETANI: https://www.linkedin.com/in/andrea-napoletani-aa0b87166/ ● RICCARDO PATTUGLIA: https://www.linkedin.com/in/riccardo-pattuglia-3a09ab182/
  34. 34. DEMO

×