source: azure_iot_hub_riscv/trunk/app_iothub_client/kendryte/region_layer.h@ 453

Last change on this file since 453 was 453, checked in by coas-nagasima, 4 years ago

ファイルを追加

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr;charset=UTF-8
File size: 1.2 KB
Line 
1#ifndef _REGION_LAYER
2#define _REGION_LAYER
3
4#include <stdint.h>
5#include "kpu.h"
6
7typedef struct
8{
9 uint32_t obj_number;
10 struct
11 {
12 uint32_t x1;
13 uint32_t y1;
14 uint32_t x2;
15 uint32_t y2;
16 uint32_t class_id;
17 float prob;
18 } obj[10];
19} obj_info_t;
20
21typedef struct
22{
23 float threshold;
24 float nms_value;
25 uint32_t coords;
26 uint32_t anchor_number;
27 float *anchor;
28 uint32_t image_width;
29 uint32_t image_height;
30 uint32_t classes;
31 uint32_t net_width;
32 uint32_t net_height;
33 uint32_t layer_width;
34 uint32_t layer_height;
35 uint32_t boxes_number;
36 uint32_t output_number;
37 void *boxes;
38 float *input;
39 float *output;
40 float *probs_buf;
41 float **probs;
42} region_layer_t;
43
44typedef void (*callback_draw_box)(uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t class, float prob);
45
46int region_layer_init(region_layer_t *rl, int width, int height, int channels, int origin_width, int origin_height);
47void region_layer_deinit(region_layer_t *rl);
48void region_layer_run(region_layer_t *rl, obj_info_t *obj_info);
49void region_layer_draw_boxes(region_layer_t *rl, callback_draw_box callback);
50
51#endif // _REGION_LAYER
Note: See TracBrowser for help on using the repository browser.