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
demo

演示

用法

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.

源代码和构建说明

C++ 演示代码和构建说明可在我们的仓库 scripts 中找到。

提示

提供适用于 Linux、Mac OS 和 Windows 的预构建二进制文件

你也可以从源代码构建 MXNet 以支持 C++ 推理示例。

脚本总运行时间: ( 0 分 0.000 秒)

由 Sphinx-Gallery 生成的画廊