注意
点击 此处 下载完整示例代码
2. GluonCV C++ 推理示例¶
这是一个演示教程,说明了如何在 C++ 环境中使用导出的 JSON 和 PARAMS 文件来使用现有的 GluonCV 模型。
请查看 导出网络 以获取导出预训练模型的说明。
示例用法¶
# with yolo3_darknet53_voc-0000.params and yolo3_darknet53-symbol.json on disk
./gluoncv-detect yolo3_darknet53_voc demo.jpg

演示¶
用法
SYNOPSIS
./gluoncv-detect <model file> <image file> [-o <outfile>] [--class-file <classfile>] [-e
<epoch>] [--gpu <gpu>] [-q] [--no-disp] [-t <thresh>]
OPTIONS
-o, --output <outfile>
output image, by default no output
--class-file <classfile>
plain text file for class names, one name per line
-e, --epoch <epoch>
Epoch number to load parameters, by default is 0
--gpu <gpu> Which gpu to use, by default is -1, means cpu only.
-q, --quite Quite mode, no screen output
--no-disp Do not display image
-t, --thresh <thresh>
Visualize threshold, from 0 to 1, default 0.3.