GithubHelp home page GithubHelp logo

lj-hao / benchmark-of-yolo-on-cm4-with-ai-kit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from seeed-projects/benchmarking-yolov8-on-raspberry-pi-recomputer-r1000-and-aikit-hailo-8l

4.0 0.0 0.0 242.99 MB

This repository provides benchmarks and performance evaluations of the YOLO (You Only Look Once) object detection model running on the Raspberry Pi Compute Module 4 (CM4) with an AI kit.

License: MIT License

Shell 9.65% Python 90.35%

benchmark-of-yolo-on-cm4-with-ai-kit's Introduction

Benchmarking-YOLOv8-on-Raspberry-PI-reComputer-r1000-and-AIkit-Hailo-8L

This repository demonstrates object detection model using YOLOv8 on a Raspberry Pi CM4 with Hailo Acceleration. The Raspberry Pi AI Kit enhances the performance of the Raspberry Pi and unlock its potential in artificial intelligence and machine learning applications, like smart retail, smart traffic and more. Although the Raspberry AI Kit is designed for Raspberry Pi 5, we have experimented it on our CM4-powered edge gateway. Excited about turning our edge device into an intelligent IoT gateway!

Hardware Preparation

reComputer R1000: Raspberry Pi CM4 Gateway, 4GB RAM, 32GB eMMC

M.2 hat Raspberry Pi 5(Only need for Raspberry Pi 5)

Install Hailo-8L on the reComputer R1000

step 1. Install the Hailo-8L on the Raspberry Pi CM4

image

Step 2. Update system & Set pcie to gen3

sudo apt update
sudo apt full-upgrade
sudo raspi-config

Select option "6 Advanced Options":

Then select option "A8 PCIe Speed":
Choose "Yes" to enable PCIe Gen 3 mode:
Click "Finish" to exit.

Step 3. Install Hailo Software & Verify Installation

Install hailo-all and reboot

sudo apt install hailo-all
sudo reboot

Check that the Hailo software is installed correctly by running the following command:

hailortcli fw-control identify

The true result is as follows:

Check hailo hardware is installed correctly by running the following command:

lspci | grep Hailo

The true result is as follows:

Install AI kit on Respberry Pi5

Step 1. Install the Hailo-8L on the Raspberry Pi 5

Please reference Respberry Pi 5 to install AI kit on Respberry Pi5.

Step 2. Install Hailo Software & Verify Installation

Install hailo-all and reboot

sudo apt install hailo-all
sudo reboot

Check that the Hailo software is installed correctly by running the following command:

hailortcli fw-control identify

The true result is as follows:

Check hailo hardware is installed correctly by running the following command:

lspci | grep Hailo

The true result is as follows:

Step 3. Set pcie to gen2/gen3(gen3 is faster than gen2)

Add follows to /boot/firmware/config.txt

#Enable the PCIe external connector

dtparam=pciex1

#Force Gen 3.0 speeds

dtparam=pciex1_gen=3

Note

If you want to use gen2,please comment dtparam=pciex1_gen=3

Run this project

Run object detection AI kit

Step 1. Install the repository

git clone https://github.com/Seeed-Projects/Benchmarking-YOLOv8-on-Raspberry-PI-reComputer-r1000-and-AIkit-Hailo-8L.git

Step 2. The following command to run the object

cd Benchmarking-YOLOv8-on-Raspberry-PI-reComputer-r1000-and-AIkit-Hailo-8L
bash ./run.sh object-detection

Result

image

Run object detection with AI kit

Step 1. Install the repository

git clone https://github.com/Seeed-Projects/Benchmarking-YOLOv8-on-Raspberry-PI-reComputer-r1000-and-AIkit-Hailo-8L.git

Step 2. The following command to run the object

cd Benchmarking-YOLOv8-on-Raspberry-PI-reComputer-r1000-and-AIkit-Hailo-8L
bash ./run.sh object-detection-hailo

Result

image

Run pose estimation without AI kit

Step 1. Install the repository

git clone https://github.com/Seeed-Projects/Benchmarking-YOLOv8-on-Raspberry-PI-reComputer-r1000-and-AIkit-Hailo-8L.git

Step 2. The following command to run the object

cd Benchmarking-YOLOv8-on-Raspberry-PI-reComputer-r1000-and-AIkit-Hailo-8L
bash ./run.sh pose-estimation

Result

image

Run pose estimation with AI kit

Step 1. Install the repository

git clone https://github.com/Seeed-Projects/Benchmarking-YOLOv8-on-Raspberry-PI-reComputer-r1000-and-AIkit-Hailo-8L.git

Step 2. The following command to run the object

cd Benchmarking-YOLOv8-on-Raspberry-PI-reComputer-r1000-and-AIkit-Hailo-8L
bash ./run.sh pose-estimation-hailo

Result

image

Results

we test Yolov8s, with 640*640 input and int8 format. And we also test Yolov8s int8 on Jetson Orin NX 16GB with TensorRT accelerate. The result is shown as below:

benchmark-of-yolo-on-cm4-with-ai-kit's People

Contributors

lj-hao avatar

Stargazers

Milan Kryl avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.