1 Star 0 Fork 21

iynaur87/yolo_v5_nnie

forked from shopping/yolo_v5_nnie 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
config.h 1.24 KB
一键复制 编辑 原始数据 按行查看 历史
shopping 提交于 2020-11-28 17:52 . add config.h.
#ifndef FD_CONFIG
#define FD_CONFIG
#include <stdio.h>
//#include"list.h"
#include<math.h>
#include "sample_comm_nnie.h"
#define QUANT_BASE 4096.0f
#define yolo_layer_num 3 // yolo layer 层数
#ifndef YOLO_MIN
#define YOLO_MIN(a,b) ((a) > (b) ? (b) : (a))
#endif
#ifndef YOLO_MAX
#define YOLO_MAX(a,b) ((a) < (b) ? (b) : (a))
#endif
#define IMAGE_W 320.0f // 输入图片大小
#define IMAGE_H 320.0f
typedef struct anchor_w_h
{
float anchor_w;
float anchor_h;
}anchor_w_h;
typedef struct yolo_result
{
float left_up_x;
float left_up_y;
float right_down_x;
float right_down_y;
int class_index;
float score;
struct yolo_result* next;
}yolo_result;
anchor_w_h anchor_grids[3][3] = {{{10.0f, 13.0f}, {16.0f, 30.0f}, {33.0f, 23.0f}}, // small yolo layer 层 anchor
{{30.0f, 61.0f}, {62.0f, 45.0f}, {59.0f, 119.0f}}, // middle yolo layer 层 anchor
{{116.0f, 90.0f}, {156.0f, 198.0f}, {373.0f, 326.0f}}}; // large yolo layer 层 anchor
float strides[3] = {8.0f, 16.0f, 32.0f}; // 每个 yolo 层,grid 大小,与上面顺序对应
int map_size[3] = {40, 20, 10}; // 每个 yolo 层,feature map size 大小,与上面顺序对应
#endif // FD_CONFIG
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/iynaur/yolo_v5_nnie.git
git@gitee.com:iynaur/yolo_v5_nnie.git
iynaur
yolo_v5_nnie
yolo_v5_nnie
master

搜索帮助