CV / EfficientDet

EfficientDet

EfficientDet-Lite0/1/2 detect objects across 80 COCO classes and run NMS on the accelerator. Choose Lite0 with 320x320 input, Lite1 with 384x384, or Lite2 with 448x448. Start a prebuilt Docker image with one command and run inference through the REST API on Hailo-8 and Hailo-10H. The guide covers device setup and troubleshooting.

271 downloads
Size
9.3 MB
Memory
4GB+
Precision
INT8
Inference Engine
HailoRT
Image input size
320x320

Start right away with Seeed Products

Platform
Size
  1. Install the Hailo driver and runtime

    On Raspberry Pi OS, install the package for your accelerator from the Raspberry Pi OS repository. Check that the installed HailoRT version matches the library path in the Docker command.

    bash
    sudo apt update
    sudo apt install hailo-all
    sudo reboot

    On other systems, install the vendor’s Hailo driver and matching HailoRT runtime for your accelerator, OS, and kernel. Manual Hailo installation guide

    After reboot, confirm that the accelerator is detected and the device node is available. Raspberry Pi AI setup guide

    bash
    hailortcli fw-control identify
    ls /dev/hailo0
  2. Install Docker

    bash
    bash <(curl -fsSL https://get.docker.com)
  3. Run the Docker command

    bash
    sudo docker run --rm \
      --name cm5-hailo8-efficientdet-lite0 \
      --privileged \
      --net=host \
      -e PYTHONUNBUFFERED=1 \
      --device /dev/hailo0:/dev/hailo0 \
      -v /usr/lib/libhailort.so.4.23.0:/usr/lib/libhailort.so.4.23.0:ro \
      -v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro \
      ghcr.io/seeed-projects/recomputer-hailo8-cv/efficientdet_lite0:latest \
      python web_detection.py --model_path model/efficientdet_lite0.hef --video_path video/test.mp4

Deploy on hardware you already have

Platform
Size

Hailo-8

  1. Install the Hailo driver and runtime

    On Raspberry Pi OS, install the package for your accelerator from the Raspberry Pi OS repository. Check that the installed HailoRT version matches the library path in the Docker command.

    bash
    sudo apt update
    sudo apt install hailo-all
    sudo reboot

    On other systems, install the vendor’s Hailo driver and matching HailoRT runtime for your accelerator, OS, and kernel. Manual Hailo installation guide

    After reboot, confirm that the accelerator is detected and the device node is available. Raspberry Pi AI setup guide

    bash
    hailortcli fw-control identify
    ls /dev/hailo0
  2. Install Docker

    bash
    bash <(curl -fsSL https://get.docker.com)
  3. Run the Docker command

    bash
    sudo docker run --rm \
      --name cm5-hailo8-efficientdet-lite0 \
      --privileged \
      --net=host \
      -e PYTHONUNBUFFERED=1 \
      --device /dev/hailo0:/dev/hailo0 \
      -v /usr/lib/libhailort.so.4.23.0:/usr/lib/libhailort.so.4.23.0:ro \
      -v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro \
      ghcr.io/seeed-projects/recomputer-hailo8-cv/efficientdet_lite0:latest \
      python web_detection.py --model_path model/efficientdet_lite0.hef --video_path video/test.mp4

Check that it’s running

Open the address below in a browser. Replace <board-ip> with your board’s IP address.

http://<board-ip>:8000

If you see the detection stream with boxes around objects, you’re all set.

Benchmark Performance

EfficientDet reported inference throughput (FPS) on CM5 + Hailo-8, CM5 + Hailo-10H.
  • EfficientDet-Lite0 · reComputer R Series (CM5 + Hailo-8)
    Batch 1 FPS
    57.2
  • EfficientDet-Lite0 · reComputer R Series (CM5 + Hailo-10H)
    Batch 1 FPS
    21.22
  • EfficientDet-Lite1 · reComputer R Series (CM5 + Hailo-8)
    Batch 1 FPS
    33.86
  • EfficientDet-Lite1 · reComputer R Series (CM5 + Hailo-10H)
    Batch 1 FPS
    14.94
  • EfficientDet-Lite2 · reComputer R Series (CM5 + Hailo-8)
    Batch 1 FPS
    26.64
  • EfficientDet-Lite2 · reComputer R Series (CM5 + Hailo-10H)
    Batch 1 FPS
    10.81

RESTful API

API endpoints

MethodPathPurpose
GET/Web preview UI
POST/api/models/efficientdet_lite0/predictDetections (JSON)
GET/api/video_feedMJPEG preview stream

Test the API

Replace <board-ip> with your board’s IP address. Save an image as test.jpg in your current directory and send it to the prediction endpoint.

bash
curl -X POST "http://<board-ip>:8000/api/models/efficientdet_lite0/predict" \
  -F "file=@test.jpg"

Develop with the API

Install requests with python -m pip install requests. In the example, replace <board-ip> with your board’s IP address and use an image named test.jpg.

python
import requests

with open("test.jpg", "rb") as image:
    response = requests.post(
        "http://<board-ip>:8000/api/models/efficientdet_lite0/predict",
        files={"file": image},
        timeout=30,
    )
response.raise_for_status()
print(response.json())

Frequently Asked Questions (FAQ)

Why do some sizes disappear when I switch platforms?

The size picker shows the variants with a deployment command for your selected platform. Switch platforms in the quick start to see the sizes available for each one.

What should I check if the accelerator is unavailable?

Check that the host OS, drivers, and runtime match the selected platform’s guide. For Hailo, verify that the host detects the accelerator and that the installed HailoRT version matches the deployment instructions.

Where do I find the inference endpoint?

Select your platform and open the RESTful API section for the endpoint and input format.

More FAQs