After converting to the Caffe model, YOLOv3 can be deployed to the FPGA after
quantization. Follow Vitis AI User Guide to quantize and
deploy.
- Set preprocessing for YOLO in prototxt.
YOLO has its own preprocessing scheme. This must be specified for better performance. Set
yolo_height
andyolo_width
to the input height and width of network intransform_param
as shown in the following code snippet.layer { name: "data" type: "ImageData" top: "data" top: "label" include { phase: TEST } transform_param { mirror: false yolo_height: 768 yolo_width: 1280 } image_data_param { source: "file_list.txt" root_folder: "/data/dataset/" batch_size: 10 shuffle: false } }
- Provide labels in file list.
Though labels are not required for quantization and will not affect the results, the ImageData layer in Caffe check labels in the source file. Ensure the file list assigned in source has a number after each image file name. Example of source file list is shown as follows:
ILSVRC2012_val_00000001.JPEG 65 ILSVRC2012_val_00000002.JPEG 970 ILSVRC2012_val_00000003.JPEG 230 ILSVRC2012_val_00000004.JPEG 809 ILSVRC2012_val_00000005.JPEG 516 ...