FPGA AI Suite: PCIe-based Design Example User Guide

ID 768977
Date 7/31/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

5.5.2.3. Example of Inference on Object Detection Graphs

The example that follows makes the following assumptions:
  • The Model Optimizer IR graph.xml for either YOLOv3 or TinyYOLOv3 is in the current working directory.

    Model Optimizer generates an FP32 version and an FP16 version. Use the FP32 version.

  • The validation images downloaded from the COCO website are placed in the ./mscoco-images directory.
  • The JSON annotation file is downloaded and unzipped in the current directory.
To compute the accuracy scores on many images, you can usually increase the number of iterations using the flag -niter instead of a large batch size -b. The product of the batch size and the number of iterations should be less than or equal to the number of images that you provide.
cd $COREDLA_ROOT/runtime/build_Release
python ./convert_annotations.py ./instances_val2017.json \
   ./groundtruth
./dla_benchmark/dla_benchmark \
   -b=1 \
   -niter=5000 \
   -m=./graph.xml \
   -d=HETERO:FPGA,CPU \
   -i=./mscoco-images \
   -plugins=./plugins.xml \
   -arch_file=../../example_architectures/AGX7_Performance.arch \
   -yolo_version=yolo-v3-tf \
   -api=async \
   -groundtruth_loc=./groundtruth \
   -nireq=8 \
   -enable_object_detection_ap \
   -perf_est \
   -bgr