Skip to content

Repository files navigation

imx500_spi_examples

This repository provides example code for using the Arducam AI MCU Cam Module (B0564), covering USB interface and SPI interface AI inference data acquisition, as well as image preview and model switching functions.


Introduction

The Arducam AI MCU Cam Module (B0564) supports SPI / USB interfaces and two operating modes:

  • Deploy Mode

    • No image output
    • Works with both SPI and USB interfaces
    • Outputs only AI inference data
    • Suitable for model deployment
  • Preview Mode

    • USB interface only
    • Outputs image data
    • Preview camera feed with IMX500PreviewGUI
    • Suitable for installation, debugging, and image preview

🚀 Quick Start

1. Get AI inference data via USB

Required hardware:

  1. Arducam AI MCU Cam Module (B0564)
  2. Type-C USB cable
  3. Windows PC

Install dependencies:

cd arducam_imx500_mcu_serial_example
pip install -r requirements.txt

Run the example:

python serial_deploy_mode_demo.py

After starting the program, use the arrow keys to select the serial port and press Enter.

You will then see bounding boxes drawn based on AI inference results:


2. Get AI inference data via SPI

Required hardware:

  1. Arducam AI MCU Cam Module (B0564)
  2. Arduino Uno R3 board
  3. Arduino Uno R3 adapter test board
  4. SPI cables
  5. Type-B USB cable
  6. Windows PC

This example uses Arduino Uno R3 to receive AI data via SPI and forward it to the USB serial port.

Steps:

  1. Connect Arduino Uno R3 to the PC using a Type-B USB cable.
  2. Install Arduino IDE.
  3. Open the project arducam_imx500_mcu_spi_arduino_uno_r3_example/main/main.ino in Arduino IDE.
  4. Select the correct board in Arduino IDE and upload the firmware.
  5. Wire the devices as shown below:

Once wired, refer to the Get AI inference data via USB to view inference results on the PC.


3. Image Preview Mode

There is a Mode button on the back of the Arducam AI MCU Cam Module.

  • Hold down the Mode button while connecting the camera to the PC with a Type-C USB cable
  • The red LED on the side will turn on, indicating Preview Mode

⚠️ Some older versions of Windows may require libusb driver installation. Download zadig, run it, and install as shown below:

Download preview tool: Go to Releases to get IMX500PreviewGUI.exe.

After launching the software:

  1. Click the Open button
  2. Click the Play button to preview the camera in real time

4. Model Switching

  1. Connect the camera to the PC via Type-C USB. A flashing green LED indicates Deploy Mode.
  2. In Deploy Mode, long press the Mode button (>2s), and the PC will mount a USB drive named IMX500.
  3. Copy a .adm model file to the drive to complete model switching.

.adm model files are available in the arducam_imx500_model_zoo project.

For example you can switch the yolov8n_pos adm model to implement human pose estimation applications.


License

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages