《智能计算系统》实验-7-1-YOLOv3

在做《智能计算系统》综合实验7-1-YOLOv3时,遇到了很多问题,实验书过程不全,现将整个实验流程梳理如下,以对其他读者有所裨益:

一、搭建环境

新建容器v7(非v7-update1

二、nms_detection.h实现

  1. 补全 nms_detection.h,实现函数:
#define T half // ./plugin_yolov3_detection_helper.h

__mlu_func__ void nms_detection(
        int& output_box_num,
        T* output_data,
        Addr dst,
        T* input_data_score,
        T* input_data_box,
        Addr src,
        T *buffer,
        int buffer_size,
        T* sram,
        SplitMode split_mode,
        int input_box_num,
        int input_stride,
        int output_stride,
        int keepNum,
        T thresh_iou,
        T thresh_score,
        int save_method){...}

只需考虑以下情况:

src == NRAM
split_mode == NMS_BLOCK
save_method == 1
MODE == 1

此时,系统工作在单核模式下,输入数据存放在NRAM上,满足向量对其要求,且计算空间充分大,数据保存模式为score—, x1—, y1—, x2—, y2—。

上述条件下,在边界框保存阶段,每次搜索到的先保存在NRAM_save空间上,若存储的框个数M到达一定数量N(output_data_AddrType == NRAM ? N = 0 : N = 256)可批量拷贝到具体位置;当前max_box_Score

Original: https://blog.csdn.net/weixin_40943865/article/details/122059436
Author: 继明照于四方
Title: 《智能计算系统》实验-7-1-YOLOv3

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/682996/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球