วันจันทร์ที่ 6 เมษายน พ.ศ. 2563

Raspberry pi Object Detection with Intel AI Stick


Raspberry pi Object Detection with Intel AI Stick

This project showcases Object Detection with SSD and new Async API. Async API usage can improve overall frame-rate of the application, because rather than wait for inference to complete, the app can continue doing things on the host, while accelerator is busy. 

Specifically, this demo keeps two parallel infer requests and while the current is processed, the input frame for the next is being captured. This essentially hides the latency of capturing, so that the overall framerate is rather determined by the MAXIMUM(detection time, input capturing time) and not the SUM(detection time, input capturing time).

The technique can be generalized to any available parallel slack, for example, doing inference and simultaneously encoding the resulting (previous) frames or running further inference,
This and other performance implications and tips for the Async API are covered in the Optimization Guide
Other demo objectives are:
  • Video as input support via OpenCV
  • Visualization of the resulting bounding boxes and text labels (from the .labels file) or class number (if no file is provided)
  • OpenCV is used to draw resulting bounding boxes, labels, so you can copy paste this code without need to pull Open Model Zoo demos helpers to your app
  • Demonstration of the Async API in action, so the demo features two modes (toggled by the Tab key)
    • Old-style "Sync" way, where the frame capturing with OpenCV executes back to back with the Detection
    • "Truly Async" way when the Detection performed on the current frame, while the OpenCV captures the next one.

System Requirements

Hardware

·     Raspberry Pi Board (4B , 3B+)
·     Intel Neural Compute Stick ( V1 or V2 )
·     Pi Camera ( V1 or V2 ) or USB cam
·     SD Card 32GB
·     5V DC. 2A Power Supply

Software

·     OS Raspbien 10 ( Buster )
·     Python 3.7.3
·     OpenVINO Toolkit 2019.R3
·     OpenCV 4.0.0

Machine Learning Object Detection Model : Mobilenet SSD V2


Output Detection

he demo uses OpenCV to display the resulting frame with detections (rendered as bounding boxes and labels, if provided). In the default mode the demo reports
  • OpenCV time: frame decoding + time to render the bounding boxes, labels, and displaying the results.
  • Detection time: inference time for the (object detection) network. It is reported in the "SYNC" mode only.
  • Wallclock time, which is combined (application level) performance.


Compare with Raspberry pi 3B+ , 4 and Intel AI Stick 1 ,2

Raspberry pi 4 + Intel AI stick 2 
Frame rate 25 fps

Raspberry pi 4 + Intel AI stick 1
Frame rate 8 fps



Raspberry pi 3B+ and Intel AI stick 2
Frame rate 14 fps



Raspberry pi 3B+ and Intel AI stick 1
Frame rate 25 fps


Summary



Retrain Model with your own dataset. 


https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10

Reference

Install OpenVINO™ toolkit for Raspbian* OS

Object Detection SSD Python* Demo, Async API performance showcase
https://docs.openvinotoolkit.org/latest/_demos_python_demos_object_detection_demo_ssd_async_README.html




  •  Watch 
https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10

ไม่มีความคิดเห็น:

แสดงความคิดเห็น