Skip to main content

GoogLeNet Example

This document explains how to use the QAI AppBuilder Python library to run the GoogLeNet object detection model on the Radxa Dragon Q6A.

Install QAI AppBuilder

Run the Example

Install Dependencies

Device
pip3 install requests tqdm qai-hub py3_wget opencv-python torch

Run the Script

  • Navigate to the example directory

    Device
    cd ai-engine-direct-helper/samples/linux/python
  • Prepare the input image. The following image is used as an example:

    Input Image

  • Execute the inference

    Device
     python3 googlenet/googlenet.py --image googlenet/input.jpg
    (.venv) ubuntu@ubuntu:~/git_clone/ai-engine-direct-helper/samples/linux/python$ python3 googlenet/googlenet.py --image googlenet/input.jpg
    Current file directory: /home/ubuntu/git_clone/ai-engine-direct-helper/samples/linux/python/googlenet

    /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.4.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc

    Top 5 predictions for image:

    goldfish 0.7454143167
    rock beauty 0.1190399304
    clownfish 0.0221503042
    tench 0.0095548332
    pufferfish 0.0088517098

    /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.4.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
    314.2ms [WARNING] Time: model_destroy googlenet 15.64

The output shows that goldfish has the highest confidence score, which matches the content of the input image.