วันศุกร์ที่ 24 มกราคม พ.ศ. 2563

Raspberry pi TensorFlow-lite Object detection




Raspberry pi TensorFlow-lite Object detection

How to use TensorFlow Lite object detection models on the Raspberry Pi.



TensorFlow Lite is an optimized framework for deploying lightweight deep learning models on resource-constrained edge devices. TensorFlow Lite models have faster inference time and require less processing power, so they can be used to obtain faster performance in realtime applications.


  

System Requirements

Hardware
·     Raspberry Pi Board (4B , 3B+)
·     IP Camera, USB Camera or Pi Camera
·     SD Card 32GB
·     5V DC. 2A Power Supply

Software
·     OS Raspbien 10 ( buster )
·     Python 3.7.2
·     Tensorflow lite 1.14.0
·     OpenCV 4.0.0

Machine Learning Model : MobileNet SSD V2 Quantised


 

Source Code
https://github.com/EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi


Reference

Install Tensorflow on Raspberry pi
https://www.tensorflow.org/install/source_rpi

Tensorflow Model Zoo
https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md


How to Run TensorFlow Lite Object Detection

วันอังคารที่ 10 กันยายน พ.ศ. 2562

People tracking and counting with Raspberry pi 4 and Intel neural compute stick



People tracking and counting with Raspberry pi 4 and Intel neural compute stick

or Pedestrian Tracker


Hardware

 Raspberry pi 4B ( 1GB )
 Intel Neural Compute Stick 2
 32GB SD card

Software

 Raspbien 10 ( buster )
 OpenVINO toolkit 2019 R1
 OpenCV 4.0.0
 Code C/C++
 Model : Person-detection-retail-0013
 Model : Person-reidentification-0031
 Video MP4 768 x 432 12 fps


 


What is Intel Neural Compute Stick and OpenVINO?


Pedestrian Tracker C++ Demo
This demo showcases Pedestrian Tracking scenario: it reads frames from an input video sequence, detects pedestrians in the frames, and builds trajectories of movement of the pedestrians in a frame-by-frame manner. You can use a set of the following pre-trained models with the demo:
  • person-detection-retail-0013, which is the primary detection network for finding pedestrians
  • person-reidentification-retail-0031, which is the network that is executed on top of the results from inference of the first network and makes reidentification of the pedestrians
Source Code



Reference

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

Pretrained Models

Inference Engine Samples 

OpenVINO, OpenCV, and Movidius NCS on the Raspberry Pi



วันพุธที่ 17 กรกฎาคม พ.ศ. 2562

Car Detection with Raspberry pi 4 + Intel Neural Compute Stick

Car Detection with Raspberry pi 4 + Intel Neural Compute Stick

System Requirements
Hardware:
  • Raspberry Pi 4B board or 3B+ 
  • 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 10 ( Buster )
    • OpenVINO for Raspberry pi ( 2019.1.094 )
    • OpenCV 4.0.0
    • Python 3.7.3

    Machine Learning

    Model : SSD MobileNet V2



    Video Test
    MP4 960x540 Resolution


    Run Code


    Test 1 Raspberry pi 4B  NCS2



    Test 2 Raspberry pi 4B  NCS1



    Test 3 Raspberry pi 3B+  NCS2




    Test 4 Raspberry pi 3B+  NCS1 



    Test Result



    Raspberry Pi 4 vs Raspberry pi 3B+




    Reference

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

    Pretrained Models

    Inference Engine Samples 

    OpenVINO, OpenCV, and Movidius NCS on the Raspberry Pi


    วันจันทร์ที่ 15 กรกฎาคม พ.ศ. 2562

    Raspberry pi 4 TensorFlow Face Recognition


    Raspberry pi 4 TensorFlow Face Recognition


    Hardware
    Raspberry pi 4B - 1GB , Raspberry pi 3B+
    SD card 32 GB.

    Software
    Raspbien 10 ( buster )
    TensorFlow 1.13.1
    OpenCV 4.0.0
    Python 3.7.3

    Machine Learning 
    Model : Facenet Inception Resnet V1

    Source Code
    FaceRec.  A simple working facial recognition program.
    https://github.com/vudung45/FaceRec 

    Recognition Dataset





    Run Code on Raspberry pi 4 , 3B+ in Image


    Recognise with no dataset


    Run Code on Macbook Pro 2.3 GHz Intel Core i7 ( 2012 )





    Reference

    FaceRec.  A simple working facial recognition program.
    https://github.com/vudung45/FaceRec

    Pretrained models from: https://github.com/davidsandberg/facenet

    Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Networks
    https://kpzhang93.github.io/MTCNN_face_detection_alignment/

    Face recognition with OpenCV, Python, and deep learning
    https://www.pyimagesearch.com/2018/06/18/face-recognition-with-opencv-python-and-deep-learning/