mtmn
mtmn.h
Go to the documentation of this file.
1 /*
2  * ESPRESSIF MIT License
3  *
4  * Copyright (c) 2018 <ESPRESSIF SYSTEMS (SHANGHAI) PTE LTD>
5  *
6  * Permission is hereby granted for use on ESPRESSIF SYSTEMS products only, in which case,
7  * it is free of charge, to any person obtaining a copy of this software and associated
8  * documentation files (the "Software"), to deal in the Software without restriction, including
9  * without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  * and/or sell copies of the Software, and to permit persons to whom the Software is furnished
11  * to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all copies or
14  * substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18  * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22  *
23  */
24 #pragma once
25 
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30 #include "dl_lib.h"
31 
32  typedef enum
33  {
34  PNET = 0,
35  RNET = 1,
36  ONET = 2,
37  } net_type_en;
38 
39  typedef struct
40  {
42  char *file_name;
43  int w;
44  int h;
47  } net_config_t;
48 
49  typedef struct
50  {
51  dl_matrix3d_t *category;
52  dl_matrix3d_t *offset;
53  dl_matrix3d_t *landmark;
54  } mtmn_net_t;
55 
62  mtmn_net_t *pnet(dl_matrix3du_t *in);
63 
71  mtmn_net_t *rnet_with_score_verify(dl_matrix3du_t *in,
72  float threshold);
73 
81  mtmn_net_t *onet_with_score_verify(dl_matrix3du_t *in,
82  float threshold);
83 #ifdef __cplusplus
84 }
85 #endif
mtmn_net_t * rnet_with_score_verify(dl_matrix3du_t *in, float threshold)
Forward the rnet process, fine determine the boxes from pnet.
Definition: mtmn.h:36
char * file_name
Definition: mtmn.h:42
float score_threshold
Definition: mtmn.h:45
mtmn_net_t * pnet(dl_matrix3du_t *in)
Forward the pnet process, coarse detection.
Definition: mtmn.h:35
float nms_threshold
Definition: mtmn.h:46
Definition: mtmn.h:34
Definition: mtmn.h:39
Definition: mtmn.h:49
net_type_en net_type
Definition: mtmn.h:41
net_type_en
Definition: mtmn.h:32
dl_matrix3d_t * category
Definition: mtmn.h:51
mtmn_net_t * onet_with_score_verify(dl_matrix3du_t *in, float threshold)
Forward the onet process, fine determine the boxes from rnet.
int h
Definition: mtmn.h:44
dl_matrix3d_t * landmark
Definition: mtmn.h:53
dl_matrix3d_t * offset
Definition: mtmn.h:52
int w
Definition: mtmn.h:43