1 Star 0 Fork 0

code_cso / yolov9_rknn_Cplusplus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause

yolov9_rknn_Cplusplus

yolov9 瑞芯微 rknn 板端 C++部署,使用平台 rk3588。模型转换参考 【yolov9 瑞芯微芯片rknn部署、地平线芯片Horizon部署、TensorRT部署】

模型文件比较大存放路径【rknn模型链接】

编译和运行

1)编译

cd examples/rknn_yolov9_demo_dfl_open

bash build-linux_RK3588.sh

2)运行

cd install/rknn_yolov9_demo_dfl_open

./rknn_yolov8_demo

注意:修改模型、测试图像、保存图像的路径,修改文件为src下的main.cc


int main(int argc, char **argv)
{
    char model_path[256] = "/home/zhangqian/rknn/rknpu2_1.4.0/examples/rknn_yolov9_demo_dfl_open/model/RK3588/yolov9_relu_80class_zq.rknn";
    char image_path[256] = "/home/zhangqian/rknn/rknpu2_1.4.0/examples/rknn_yolov9_demo_dfl_open/test.jpg";
    char save_image_path[256] = "/home/zhangqian/rknn/rknpu2_1.4.0/examples/rknn_yolov9_demo_dfl_open/test_result.jpg";

    detect(model_path, image_path, save_image_path);
    return 0;
}

测试效果

冒号“:”前的数子是coco的80类对应的类别,后面的浮点数是目标得分。(类别:得分)

images

说明:训练代码参考官方开源的yolov9训练代码,考虑到有些板端对SiLU的支持有限,本示例训练前把激活函数SiLU替换成了ReLU,训练使用的模型配置文件是yolov9.yaml,输入分辨率640x640。用 from thop import profile 统计的模型计算量和参数 Flops: 120081612800.0(120G),Params: 55388336.0(55M)

把板端模型推理和后处理时耗也附上供参考,使用的芯片rk3588,模型输入640x640,检测类别80类。

17090077736846

// Copyright 2020 Rockchip Electronics Co.,Ltd. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // 3. Neither the name of the copyright holder nor the names of its contributors // may be used to endorse or promote products derived from this software without // specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE.

简介

暂无描述 展开 收起
C++ 等 3 种语言
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C++
1
https://gitee.com/code_cso/yolov9_rknn_Cplusplus.git
git@gitee.com:code_cso/yolov9_rknn_Cplusplus.git
code_cso
yolov9_rknn_Cplusplus
yolov9_rknn_Cplusplus
main

搜索帮助