• Raspberry Pi Projects

    Raspberry Pi Projects

    Raspberry pi4 Tensorflow object detection




    Raspberry pi 4 TensorFlow Object Detection


    On June 2019 Raspberry pi announce new version of raspberry pi board.
    Now we have a new raspberry pi 4 model B 1GB So try to run TensorFlow object detection and then compare with Raspberry pi3B+ also.



    Install TensorFlow on Raspberry pi4

    Add some dependency

    sudo pip3 install grpcio


    sudo pip3 install h5py

    Then Download tensorFlow
    https://www.piwheels.org/simple/tensorflow/tensorflow-1.13.1-cp37-none-linux_armv7l.whl#sha256=25f4ff027beec1e568baf8e90a07bad59d354560533d6b37318b9efeb70beeb1


    sudo pip3 install tensorflow-1.13.1-cp37-none-linux_armv7l.whl



    Summary Software for test.
    Rasbien 10 ( Buster )
    Python 3.7.3
    OpenCV 4.0.0
    Tensorflow 1.13.1



    Run Tensorflow Object Detection

    Model SSDlite Mobilenet V2
    Video MP4 768x432 12 fps

    run on the same img os in same sd-card.





    Raspberry pi 4 is 2.xx fps .
    Raspberry pi 3 is less than 1 fps.

    So, only Raspberry pi Board is not faster enough for tensorFlow object detection application.
    Then next we use raspberry pi with intel neural compute stick for better performance.

    Raspberry pi 4 vs Raspberry pi3 specification


    Raspberry pi OpenVINO with Intel Movidius ( Neural Compute Stick )

    Raspberry pi OpenVINO with Intel Movidius  

    ( Neural Compute Stick )


    What is OpenVINO?

    The Intel® Distribution of OpenVINO™ toolkit quickly deploys applications and solutions that emulate human vision. Based on Convolutional Neural Networks (CNN), the toolkit extends computer vision (CV) workloads across Intel® hardware, maximizing performance. The Intel Distribution of OpenVINO toolkit includes the Intel® Deep Learning Deployment Toolkit (Intel® DLDT).


    OpenVINO™ toolkit, short for Open Visual Inference and Neural network Optimization toolkit, provides developers with improved neural network performance on a variety of Intel® processors and helps them further unlock cost-effective, real-time vision applications.The toolkit enables deep learning inference and easy heterogeneous execution across multiple Intel® platforms (CPU, Intel® Processor Graphics)—providing implementations across cloud architectures to edge devices. This open source distribution provides flexibility and availability to the developer community to innovate deep learning and AI solutions.
    OpenVINO™ toolkit contains:
           •      Deep Learning Deployment Toolkit
           •      Open Model Zoo

    The Intel® Distribution of OpenVINO™ toolkit  is also available with additional, proprietary support for Intel® FPGAs, Intel® Movidius™ Neural Compute Stick, Intel® Gaussian Mixture Model - Neural Network Accelerator (Intel® GMM-GNA) and provides optimized traditional computer vision libraries (OpenCV*, OpenVX*), and media encode/decode functions. To learn more and download this free commercial product, visit: https://software.intel.com/en-us/openvino-toolkit


    What is Intel Movidius ( Neural Compute Stick )?

    The Intel® Movidius™ Neural Compute Stick (NCS) is a tiny fanless deep learning device that you can use to learn AI programming at the edge. NCS is powered by the same low power high performance Intel Movidius Vision Processing Unit (VPU) that can be found in millions of smart security cameras, gesture controlled drones, industrial machine vision equipment, and more.

    more detail
    http://raspberrypi4u.blogspot.com/2018/10/raspberry-pi-movidius-neural-compute-stick.html


    Samples Code Demo

    Face Detection , Object Detection  ( Object Detection C++ Sample SSD )

    Identify faces for a variety of uses, such as observing if passengers are in a vehicle or counting indoor pedestrian traffic. Combine it with a person detector to identify who is coming and going.




      

    Pre-trained Face Detection model

    https://download.01.org/openvinotoolkit/2018_R4/open_model_zoo/face-detection-adas-0001/FP16/face-detection-adas-0001.bin

    https://download.01.org/openvinotoolkit/2018_R4/open_model_zoo/face-detection-adas-0001/FP16/face-detection-adas-0001.xml

    To validate OpenCV* installation, you may try to run OpenCV's deep learning module with Inference Engine backend. Here is a Python* sample, which works with Face Detection model.

    Face Detect Python Code on Github



    Interactive Face Detection C++ Demo








    Age & Gender Recognition

    This neural network-based model provides age and gender estimates with enough accuracy to help you focus your marketing efforts.






    Emotion Recognition

    Identify neutral, happy, sad, surprised, and angry emotions.



    This model shows the position of the head and provides guidance on what caught the subject's attention.


     
    This demo showcases Object Detection task applied for face recognition using sequence of neural networks. Async API can improve overall frame-rate of the application, because rather than wait for inference to complete, the application can continue operating on the host while accelerator is busy. This demo executes four parallel infer requests for the Age/Gender Recognition, Head Pose Estimation, Emotions Recognition, and Facial Landmarks Detection networks that run simultaneously. You can use a set of the following pre-trained models with the demo:
    • face-detection-adas-0001, which is a primary detection network for finding faces
    • age-gender-recognition-retail-0013, which is executed on top of the results of the first model and reports estimated age and gender for each detected face
    • head-pose-estimation-adas-0001, which is executed on top of the results of the first model and reports estimated head pose in Tait-Bryan angles
    • emotions-recognition-retail-0003, which is executed on top of the results of the first model and reports an emotion for each detected face
    • facial-landmarks-35-adas-0002, which is executed on top of the results of the first model and reports normed coordinates of estimated facial landmarks
    For more information about the pre-trained models, refer to the https://github.com/opencv/open_model_zoo/blob/master/intel_models/index.md "Open Model Zoo" repository on GitHub*.
    This code sample showcases vehicle detection, vehicle attributes, and license plate recognition.

    The demo uses OpenCV to display the resulting frame with detections rendered as bounding boxes and text.





      
    This demo showcases Vehicle and License Plate Detection network followed by the Vehicle Attributes Recognition and License Plate Recognition networks applied on top of the detection results. You can use a set of the following pre-trained models with the demo:
    • vehicle-license-plate-detection-barrier-0106, which is a primary detection network to find the vehicles and license plates
    • vehicle-attributes-recognition-barrier-0039, which is executed on top of the results from the first network and reports general vehicle attributes, for example, vehicle type (car/van/bus/track) and color
    • license-plate-recognition-barrier-0001, which is executed on top of the results from the first network and reports a string per recognized license plate
    For more information about the pre-trained models, refer to the https://github.com/opencv/open_model_zoo/blob/master/intel_models/index.md "Open Model Zoo" repository on GitHub*.

    Install OpenVINO on Raspberry Pi

    System Requirements
    Hardware:
    • Raspberry Pi* board with ARMv7-A CPU architecture
    • 32GB microSD card
    • One of Intel® Movidius™ Visual Processing Units (VPU):
    Intel® Movidius™ Neural Compute Stick or Intel® Neural Compute Stick 2

      Operating Systems:
      • Raspbian* Stretch, 32-bit

      Your installation is complete when these are all completed:
      1. Install the Intel® Distribution of OpenVINO™ toolkit.
      2. Set the environment variables.
      3. Add USB rules.
      4. Run the Object Detection Sample and the Face Detection Model (for OpenCV*) to validate your installation.

      Reference

      Install the Intel® Distribution of OpenVINO™ Toolkit for Raspbian* OS

      Pretrained Models
      https://software.intel.com/en-us/openvino-toolkit/documentation/pretrained-models

      Inference Engine Samples 
      http://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html

      OpenVINO, OpenCV, and Movidius NCS on the Raspberry Pi
      https://www.pyimagesearch.com/2019/04/08/openvino-opencv-and-movidius-ncs-on-the-raspberry-pi/


      วันอาทิตย์ที่ 24 มีนาคม พ.ศ. 2562

      Raspberry pi DIY Smart Security Camera System

      Raspberry pi DIY Smart Security Camera System

      with Intel Movidius ( Neural Compute Stick )

       

      Features

      • Detect's a 'Person' in real time
      • Person detected and  notify user
      • Saved Detect Person Image
      • Set Duration time to Notify
      • Low-cost Hardware requirements.
      • Low-power consumption.


      Hardware

      • Raspberry pi 3B+ with accessories
      • 32 GB SD card
      • Picam or USB Webcam
      • Intel Movidius ( Neural Compute Stick )

      if you want Raspberry pi Development kits. pls contact us.

      Software

      • Raspbien OS 
      • Python 3.5.3
      • OpenCV 3.3.0
      • TensorFlow 1.12
      • NCSDK 
      if you want SD card with pre-install software. pls contact us.


      System Diagram



      Machine Learning Object Detection with Intel Movidius










      Source Code



      Notification
      update soon ! we've plan to set notify with firebase.


      Applications
      Detect your children come back home


      Reference

      MobileNets on Intel® Movidius™ Neural Compute Stick and Raspberry Pi 3   https://movidius.github.io/blog/ncs-rpi3-mobilenets/
      https://github.com/cagbal/ros_people_object_detection_tensorflow

      https://www.intel.ai/practical-applications-of-deep-learning-build-a-diy-smart-security-camera-using-the-intel-movidius-neural-compute-stick/#gs.28b37z

      How to make a smart security camera system

      https://www.hackster.io/hackershack/smart-security-camera-90d7bd



      My Website

      email : info@softpowergroup.net  ,amphancm@gmail.com  Tel .+6681-6452400






















































    • 0 comments:

      Post a Comment

      New Research

      Attention Mechanism Based Multi Feature Fusion Forest for Hyperspectral Image Classification.

      CBS-GAN: A Band Selection Based Generative Adversarial Net for Hyperspectral Sample Generation.

      Multi-feature Fusion based Deep Forest for Hyperspectral Image Classification.

      ADDRESS

      388 Lumo Rd, Hongshan, Wuhan, Hubei, China

      EMAIL

      contact-m.zamanb@yahoo.com
      mostofa.zaman@cug.edu.cn

      TELEPHONE

      #
      #

      MOBILE

      +8615527370302,
      +8807171546477