People Counter
2
WHO AM I?
Gertjan van het Hof
IoT Solution Architect
IoT Enthusiast
Linkedin: linkedin.com/in/gertjanvanhethof
Twitter: @GertjanvhHof
Email: gertjan.van.het.hof@amis.nl
Phone: +31 (0)6 29540619
nlOUG Tech Experience 2018: People Counter
3
WHO AM I?
Kjettil Hennis
IoT Developer
IoT Enthusiast
Linkedin: linkedin.com/in/kjettil-hennis-059910138
Email: kjettil.hennis@amis.nl
Phone: +31 (0)6 23494454
nlOUG Tech Experience 2018: People Counter
AGENDA
• Introduction
• Use Cases
• Architecture & Design Decisions
• People Counter Hardware
• First approach
• Image recognition
• Final solution
• Oracle IoT Cloud
• Backend integration
4nlOUG Tech Experience 2018: People Counter
AMIS AS IOT IMPLEMENTATION PARTNER
• References:
• Smart Industry (Industry IoT)
• Condition monitoring
• Asset management
• Predictive maintenance
• Smart lubrication solution
• Smart Office Cleaning
nlOUG Tech Experience 2018: People Counter 5
USE CASES
6nlOUG Tech Experience 2018: People Counter
USE CASES
• (Waiting row) counting
• Festival
• Ticket desk
• Deposit desk
• Entrance
• Transportation
• Buildings
• Shops
• Wild detection
• Cattle density
• Traffic density
7
ARCHITECTURE & DESIGN DECISIONS
8nlOUG Tech Experience 2018: People Counter
GOAL
• Learn more about Oracle IoT Cloud.
• Learn more about Image detection.
• MVP:
• Counting people in front of AMIS Conference Stand and send this to the
Oracle IoT Cloud.
• Back-end integration to drive something in the physical world.
Titel van de presentatie 9
AMIS TECH EXPERIENCE CONFERENCE STAND
10nlOUG Tech Experience 2018: People Counter
PEOPLE COUNTER DESIGN DECISIONS
• Oracle IoT Cloud (because of this event)
• Security and privacy by Design
• Pictures are removed after object count is determined
• Only the count is send to the cloud
• Edge Computing
• Local image processing
• Cheap hardware (drawback is slow image detection)
• Programming Language: Fit for Purpose
• Image recognition library (Python)
• Oracle IoT Cloud SDK (JavaScript)
11nlOUG Tech Experience 2018: People Counter
PEOPLE COUNTER ARCHITECTURE
12
Oracle IoT CloudPeople Counter
nlOUG Tech Experience 2018: People Counter
HARDWARE
13nlOUG Tech Experience 2018: People Counter
RASPBERRY PI 3B+
14
• Broadcom BCM2837B0, Cortex-A53 (ARMv8) 64-bit SoC @ 1.4GHz
• 1GB LPDDR2 SDRAM
• 2.4GHz and 5GHz IEEE 802.11.b/g/n/ac wireless LAN, Bluetooth 4.2,
BLE
• Gigabit Ethernet over USB 2.0 (maximum throughput 300 Mbps)
• Extended 40-pin GPIO header
• Full-size HDMI
• 4 USB 2.0 ports
• CSI camera port for connecting a Raspberry Pi camera
• DSI display port for connecting a Raspberry Pi touchscreen display
• 4-pole stereo output and composite video port
• Micro SD port for loading your operating system and storing data
• 5V/2.5A DC power input
• Power-over-Ethernet (PoE) support (requires separate PoE HAT)
nlOUG Tech Experience 2018: People Counter
Titel van de presentatie 15
PEOPLE COUNTER
• Take a picture
• Analyze the picture
• Send the result of analysis to cloud
• If above a certain threshold something happens
16nlOUG Tech Experience 2018: People Counter
FIRST VERSION
• Processing
• OpenCV Library
• Performance issues
17nlOUG Tech Experience 2018: People Counter
18nlOUG Tech Experience 2018: People Counter
19nlOUG Tech Experience 2018: People Counter
PEOPLE COUNTER SOLUTION
20
People Counter
Oracle IoT CloudOracle IoT SDK
nlOUG Tech Experience 2018: People Counter
YOLO: YOU ONLY LOOK ONCE
• Object detection system
• Divides images into regions
• Predicts bounding boxes and probabilities
• Different versions of the library (normal and tiny)
• https://www.youtube.com/watch?v=MPU2HistivI4
21nlOUG Tech Experience 2018: People Counter
Titel van de presentatie 22
SCRIPTS
• Create a script with multiple commands according to idea
• To run more fluent: Python script.
23nlOUG Tech Experience 2018: People Counter
PEOPLE COUNTER TECHNICAL DETAILS
24
People Counter
Oracle IoT CloudOracle IoT SDK
nlOUG Tech Experience 2018: People Counter
NODE.JS
• Based on Javascript Oracle IoT Hub Client
Library (SDK)
• Customized for People Counter
• Reads file with count information and sends this
to Oracle IoT Cloud
• Put IoT Hub Provisioning file in program root
folder to communicate with Oracle IoT Cloud
• Activation in IoT Cloud is automatically done
when program is started
25nlOUG Tech Experience 2018: People Counter
PEOPLE COUNTER TECHNICAL DETAILS
26
People Counter
Oracle IoT CloudOracle IoT SDK
nlOUG Tech Experience 2018: People Counter
ORACLE IOT CLOUD
27nlOUG Tech Experience 2018: People Counter
PEOPLE COUNTER ARCHITECTURE
28
Oracle IoT CloudPeople Counter
nlOUG Tech Experience 2018: People Counter
ORACLE IOT CLOUD ARCHITECTURE
29nlOUG Tech Experience 2018: People Counter
ORACLE IOT CLOUD PROVISIONING
• Provisioning with Oracle Cloud Stack
• Provisioning is template based
• Choose for Oracle IoT Enterprise Template
• This results into:
• Oracle IoT Cloud
• Content Storage
• Backup Storage
• Java Cloud Service
• Database Cloud Service
30nlOUG Tech Experience 2018: People Counter
ORACLE IOT CLOUD AFTER PROVISIONING
31nlOUG Tech Experience 2018: People Counter
PEOPLE COUNTER CLOUD SERVICES DETAILS
32
Start & Stop
nlOUG Tech Experience 2018: People Counter
ORACLE IOT CLOUD
33
Device Management IoT Application
nlOUG Tech Experience 2018: People Counter
APPLICATION MANAGEMENT
34
Application
Device Model
Exploration
1..*
1..*
Integration
1..*
• Interface that lets any device communicate with Oracle IoT Cloud Service
regardless of its manufacturer or operating system.
• The message specification.
• A container for configuring an IoT Application.
• The data stream of a specific Device Model for the application.
• Configuration of aggregations and alerts.
• Integration to back office or other Oracle Cloud services.
nlOUG Tech Experience 2018: People Counter
DEMO Oracle IoT Cloud
35nlOUG Tech Experience 2018: People Counter
Device Model (1/2)
Titel van de presentatie 36
Device Model (2/2)
Titel van de presentatie 37
Application
Titel van de presentatie 38
Applications
Titel van de presentatie 39
Explorations (1/2)
Titel van de presentatie 40
Explorations (2/2)
Titel van de presentatie 41
Data
Titel van de presentatie 42
Exploration Data ON
Titel van de presentatie 43
Integrations
Titel van de presentatie 44
BACKEND INTEGRATION
45nlOUG Tech Experience 2018: People Counter
PEOPLE COUNTER ARCHITECTURE
46
Oracle IoT CloudPeople Counter
nlOUG Tech Experience 2018: People Counter
IFTTT
47nlOUG Tech Experience 2018: People Counter
Questions?
Titel van de presentatie 48
QUESTIONS?
REFERENCES
49
• Oracle IoT Cloud:
https://cloud.oracle.com/en_US/iot
• Oracle IoT Client Library:
http://www.oracle.com/technetwork/indexes/downloads/iot-client-libraries-2705514.html
• Yolo:
https://pjreddie.com/darknet/yolo/
• Yolo Python library (optimized for RPi):
https://github.com/digitalbrain79/darknet-nnpack
• IFTTT
https://ifttt.com/
nlOUG Tech Experience 2018: People Counter

IoT practical case using the people counter sensing traffic density build using Oracle IOT cloud

  • 1.
  • 2.
    2 WHO AM I? Gertjanvan het Hof IoT Solution Architect IoT Enthusiast Linkedin: linkedin.com/in/gertjanvanhethof Twitter: @GertjanvhHof Email: gertjan.van.het.hof@amis.nl Phone: +31 (0)6 29540619 nlOUG Tech Experience 2018: People Counter
  • 3.
    3 WHO AM I? KjettilHennis IoT Developer IoT Enthusiast Linkedin: linkedin.com/in/kjettil-hennis-059910138 Email: kjettil.hennis@amis.nl Phone: +31 (0)6 23494454 nlOUG Tech Experience 2018: People Counter
  • 4.
    AGENDA • Introduction • UseCases • Architecture & Design Decisions • People Counter Hardware • First approach • Image recognition • Final solution • Oracle IoT Cloud • Backend integration 4nlOUG Tech Experience 2018: People Counter
  • 5.
    AMIS AS IOTIMPLEMENTATION PARTNER • References: • Smart Industry (Industry IoT) • Condition monitoring • Asset management • Predictive maintenance • Smart lubrication solution • Smart Office Cleaning nlOUG Tech Experience 2018: People Counter 5
  • 6.
    USE CASES 6nlOUG TechExperience 2018: People Counter
  • 7.
    USE CASES • (Waitingrow) counting • Festival • Ticket desk • Deposit desk • Entrance • Transportation • Buildings • Shops • Wild detection • Cattle density • Traffic density 7
  • 8.
    ARCHITECTURE & DESIGNDECISIONS 8nlOUG Tech Experience 2018: People Counter
  • 9.
    GOAL • Learn moreabout Oracle IoT Cloud. • Learn more about Image detection. • MVP: • Counting people in front of AMIS Conference Stand and send this to the Oracle IoT Cloud. • Back-end integration to drive something in the physical world. Titel van de presentatie 9
  • 10.
    AMIS TECH EXPERIENCECONFERENCE STAND 10nlOUG Tech Experience 2018: People Counter
  • 11.
    PEOPLE COUNTER DESIGNDECISIONS • Oracle IoT Cloud (because of this event) • Security and privacy by Design • Pictures are removed after object count is determined • Only the count is send to the cloud • Edge Computing • Local image processing • Cheap hardware (drawback is slow image detection) • Programming Language: Fit for Purpose • Image recognition library (Python) • Oracle IoT Cloud SDK (JavaScript) 11nlOUG Tech Experience 2018: People Counter
  • 12.
    PEOPLE COUNTER ARCHITECTURE 12 OracleIoT CloudPeople Counter nlOUG Tech Experience 2018: People Counter
  • 13.
  • 14.
    RASPBERRY PI 3B+ 14 •Broadcom BCM2837B0, Cortex-A53 (ARMv8) 64-bit SoC @ 1.4GHz • 1GB LPDDR2 SDRAM • 2.4GHz and 5GHz IEEE 802.11.b/g/n/ac wireless LAN, Bluetooth 4.2, BLE • Gigabit Ethernet over USB 2.0 (maximum throughput 300 Mbps) • Extended 40-pin GPIO header • Full-size HDMI • 4 USB 2.0 ports • CSI camera port for connecting a Raspberry Pi camera • DSI display port for connecting a Raspberry Pi touchscreen display • 4-pole stereo output and composite video port • Micro SD port for loading your operating system and storing data • 5V/2.5A DC power input • Power-over-Ethernet (PoE) support (requires separate PoE HAT) nlOUG Tech Experience 2018: People Counter
  • 15.
    Titel van depresentatie 15
  • 16.
    PEOPLE COUNTER • Takea picture • Analyze the picture • Send the result of analysis to cloud • If above a certain threshold something happens 16nlOUG Tech Experience 2018: People Counter
  • 17.
    FIRST VERSION • Processing •OpenCV Library • Performance issues 17nlOUG Tech Experience 2018: People Counter
  • 18.
    18nlOUG Tech Experience2018: People Counter
  • 19.
    19nlOUG Tech Experience2018: People Counter
  • 20.
    PEOPLE COUNTER SOLUTION 20 PeopleCounter Oracle IoT CloudOracle IoT SDK nlOUG Tech Experience 2018: People Counter
  • 21.
    YOLO: YOU ONLYLOOK ONCE • Object detection system • Divides images into regions • Predicts bounding boxes and probabilities • Different versions of the library (normal and tiny) • https://www.youtube.com/watch?v=MPU2HistivI4 21nlOUG Tech Experience 2018: People Counter
  • 22.
    Titel van depresentatie 22
  • 23.
    SCRIPTS • Create ascript with multiple commands according to idea • To run more fluent: Python script. 23nlOUG Tech Experience 2018: People Counter
  • 24.
    PEOPLE COUNTER TECHNICALDETAILS 24 People Counter Oracle IoT CloudOracle IoT SDK nlOUG Tech Experience 2018: People Counter
  • 25.
    NODE.JS • Based onJavascript Oracle IoT Hub Client Library (SDK) • Customized for People Counter • Reads file with count information and sends this to Oracle IoT Cloud • Put IoT Hub Provisioning file in program root folder to communicate with Oracle IoT Cloud • Activation in IoT Cloud is automatically done when program is started 25nlOUG Tech Experience 2018: People Counter
  • 26.
    PEOPLE COUNTER TECHNICALDETAILS 26 People Counter Oracle IoT CloudOracle IoT SDK nlOUG Tech Experience 2018: People Counter
  • 27.
    ORACLE IOT CLOUD 27nlOUGTech Experience 2018: People Counter
  • 28.
    PEOPLE COUNTER ARCHITECTURE 28 OracleIoT CloudPeople Counter nlOUG Tech Experience 2018: People Counter
  • 29.
    ORACLE IOT CLOUDARCHITECTURE 29nlOUG Tech Experience 2018: People Counter
  • 30.
    ORACLE IOT CLOUDPROVISIONING • Provisioning with Oracle Cloud Stack • Provisioning is template based • Choose for Oracle IoT Enterprise Template • This results into: • Oracle IoT Cloud • Content Storage • Backup Storage • Java Cloud Service • Database Cloud Service 30nlOUG Tech Experience 2018: People Counter
  • 31.
    ORACLE IOT CLOUDAFTER PROVISIONING 31nlOUG Tech Experience 2018: People Counter
  • 32.
    PEOPLE COUNTER CLOUDSERVICES DETAILS 32 Start & Stop nlOUG Tech Experience 2018: People Counter
  • 33.
    ORACLE IOT CLOUD 33 DeviceManagement IoT Application nlOUG Tech Experience 2018: People Counter
  • 34.
    APPLICATION MANAGEMENT 34 Application Device Model Exploration 1..* 1..* Integration 1..* •Interface that lets any device communicate with Oracle IoT Cloud Service regardless of its manufacturer or operating system. • The message specification. • A container for configuring an IoT Application. • The data stream of a specific Device Model for the application. • Configuration of aggregations and alerts. • Integration to back office or other Oracle Cloud services. nlOUG Tech Experience 2018: People Counter
  • 35.
    DEMO Oracle IoTCloud 35nlOUG Tech Experience 2018: People Counter
  • 36.
    Device Model (1/2) Titelvan de presentatie 36
  • 37.
    Device Model (2/2) Titelvan de presentatie 37
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
    Data Titel van depresentatie 42
  • 43.
    Exploration Data ON Titelvan de presentatie 43
  • 44.
  • 45.
    BACKEND INTEGRATION 45nlOUG TechExperience 2018: People Counter
  • 46.
    PEOPLE COUNTER ARCHITECTURE 46 OracleIoT CloudPeople Counter nlOUG Tech Experience 2018: People Counter
  • 47.
    IFTTT 47nlOUG Tech Experience2018: People Counter
  • 48.
    Questions? Titel van depresentatie 48 QUESTIONS?
  • 49.
    REFERENCES 49 • Oracle IoTCloud: https://cloud.oracle.com/en_US/iot • Oracle IoT Client Library: http://www.oracle.com/technetwork/indexes/downloads/iot-client-libraries-2705514.html • Yolo: https://pjreddie.com/darknet/yolo/ • Yolo Python library (optimized for RPi): https://github.com/digitalbrain79/darknet-nnpack • IFTTT https://ifttt.com/ nlOUG Tech Experience 2018: People Counter

Editor's Notes

  • #15 Buying hardware and other necessities: To do analysis on: Use of Raspberry 3B+ best specs of all Pi’s Most important specs are the CPU and RAM memory Which has a camera interface to connect a pi camera module
  • #16 Bought a case to protect and encase the Pi and its camera module Included a wall mount
  • #17 To show affinity and practice with IoT AMIS decided to something with IoT. Mention idea: Picture Analyze picture Send result Something happens
  • #18 Processing is an IDE to create computational visualizations; Java Based (Contains) OpenCV Library: library used for computer visioning Background removal Movement detection Blob calculation (first idea to use) Early on perfomance issues Show Photos of possibilities
  • #19 Right to you: Background Subtraction Left: Face Detection More possibilities
  • #20 Own test of implementation of the opencv library Resolution was very low to run more smoothly
  • #21 Our Solution Yolo Python Save NodeJS
  • #22 Normal accurate, but slow Tiny less accurate but fast More Pixels more time Used a Pi optimized version.
  • #23 This is an example. Yolo library can identify many kind of objects (like people, dog, truck, aeroplane, etc.) In our solution we count the number of occurrences of people.
  • #24 Pipe Output of analysis through reader which stores number occurences of certain object Only run analysis and print number of certain object, it runs smoothly Kind of loop, which also takes a photo and send input Python We also have created a local web page showing the foto with boxes. Technical Details: Come to the AMIS stand
  • #26 Provisioning file is used for activation of the device in Oracle IoT Cloud. Provisioning file is for securing communication between Oracle IoT Cloud and the device.
  • #27 Summary of the hardware solution.