แสดงบทความที่มีป้ายกำกับ raspberry pi yolo แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ raspberry pi yolo แสดงบทความทั้งหมด

วันอังคารที่ 2 สิงหาคม พ.ศ. 2565

Raspberry pi YOLO Object detection with Intel Neural compute stick and OpenVINO

Raspberry pi YOLO Object detection with Intel Neural compute stick and OpenVINO 

Hardware · Raspberry Pi Board (4B ) · Intel Neural Compute Stick 2 · SD Card 32GB · 5V DC. 2A Power Supply Software · OS Raspbian 10 ( Buster ) · Python 3.7.3 · OpenVINO Toolkit 2020.3 · OpenCV 4.0.0

What is a YOLO object detector?

When it comes to deep learning-based object detection, there are three primary object detectors you’ll encounter:

  • R-CNN and their variants, including the original R-CNN, Fast R- CNN, and Faster R-CNN
  • Single Shot Detector (SSDs)
  • YOLO
First introduced in 2015 by Redmon et al., their paper, You Only Look Once: Unified, Real-Time Object Detection, details an object detector capable of super real-time object detection, obtaining 45 FPS on a GPU.

You Only Look Once: Unified, Real-Time Object Detection

https://arxiv.org/pdf/1506.02640v3.pdf


YOLOv3 improved on the YOLOv2 paper and both Joseph Redmon and Ali Farhadi, the original authors, contributed.
Together they published YOLOv3: An Incremental Improvement

The original YOLO papers were are hosted here

Author: Joseph Redmon and Ali Farhadi
Released: 8 Apr 2018

We’ll be using YOLOv3 in this blog post, in particular, YOLO trained on the COCO dataset.

The COCO dataset consists of 80 labels.

YOLOv3-416


Video Inference Performance    3 FPS.




YOLOv3-tiny-416


Video Inference Performance    7 FPS.




Compare Performance



Reference

Raspberry pi OpenVINO with Intel Movidius ( Neural Compute Stick )


Install OpenVINO™ toolkit for Raspbian* OS https://docs.openvino.ai/latest/openvino_docs_install_guides_installing_openvino_raspbian.html


Adun Nantakaew อดุลย์ นันทะแก้ว 081-6452400
LINE : adunnan

วันอาทิตย์ที่ 28 ตุลาคม พ.ศ. 2561

Raspberry pi YOLO Real-time Object Detection





Raspberry pi YOLO Real-time Object Detection

You only look once (YOLO) is a state-of-the-art, real-time object detection system.

How It Works

Prior detection systems repurpose classifiers or localizers to perform detection. They apply the model to an image at multiple locations and scales. High scoring regions of the image are considered detections.
We use a totally different approach. We apply a single neural network to the full image. This network divides the image into regions and predicts bounding boxes and probabilities for each region. These bounding boxes are weighted by the predicted probabilities.
Our model has several advantages over classifier-based systems. It looks at the whole image at test time so its predictions are informed by global context in the image. It also makes predictions with a single network evaluation unlike systems like R-CNN which require thousands for a single image. This makes it extremely fast, more than 1000x faster than R-CNN and 100x faster than Fast R-CNN. See our paper for more details on the full system.

What's New in Version 2?

YOLOv2 uses a few tricks to improve training and increase performance. Like Overfeat and SSD we use a fully-convolutional model, but we still train on whole images, not hard negatives. Like Faster R-CNN we adjust priors on bounding boxes instead of predicting the width and height outright. However, we still predict the x and y coordinates directly. The full details are in our paper.!


So,we've test run Yolov2 on 

  1. Raspberry pi only 
  2. Raspberry pi with intel movidius ( Neural Compute Stick )




Run on Raspberry pi


Install darknet yolov2

git clone https://github.com/pjreddie/darknet
cd darknet
make


Download tiny-yolov2 weights

wget https://pjreddie.com/media/files/yolov2-tiny-voc.weights


Run Code
./darknet detector test cfg/voc.data cfg/yolov2-tiny-voc.cfg yolov2-tiny-voc.weights data/dog.jpg

./darknet detector test cfg/voc.data cfg/yolov2-tiny-voc.cfg yolov2-tiny-voc.weights data/dog.jpg

Result




Process time = 32.36 sec.




Run on Raspberry pi with Intel Movidius ( Neural Compute Stick )

This project shows how to run tiny yolov2 (20 classes) with movidius stick:
  • A python convertor from yolo to caffe
  • A c/c++ implementation and python wrapper for region layer of yolov2
  • A sample for running yolov2 with movidius stick in images or videos

Install NCSDK 2.0 ( see this )
https://raspberrypi4u.blogspot.com/2018/10/install-intel-movidius-neural-compute-sdk.html


Install YOLOv2NCS
git clone https://github.com/duangenquan/YoloV2NCS.git

then make
cd YoloV2NCS
make

Convert Caffe to NCS
mvNCCompile ./models/caffemodels/yoloV2Tiny20.prototxt -w ./models/caffemodels/yoloV2Tiny20.caffemodel -s 12

Run Python Code
python3 ./detectionExample/Main.py --image ./data/dog.jpg

Result



Process time = 571 ms.


Reference

https://pjreddie.com/darknet/yolov2/
https://github.com/duangenquan/YoloV2NCS

How computers learn to recognize objects instantly | Joseph Redmon

https://www.youtube.com/watch?v=Cgxsv1riJhI

YOLO Object Detection (TensorFlow tutorial)

https://www.youtube.com/watch?v=4eIBisqx9_g


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