FPGA AI Suite: PCIe-based Design Example User Guide

ID 768977
Date 3/29/2024
Document Table of Contents Example of Inference on Object Detection Graphs

The following example makes the below 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 \
./dla_benchmark/dla_benchmark \
   -b=1 \
   -niter=5000 \
   -m=./graph.xml \
   -i=./mscoco-images \
   -plugins_xml_file=./plugins.xml \
   -arch_file=../../example_architectures/A10_Performance.arch \
   -yolo_version=yolo-v3-tf \
   -api=async \
   -groundtruth_loc=./groundtruth \
   -nireq=4 \
   -enable_object_detection_ap \
   -perf_est \