Commit a89b93e864aafab04062ae703bba3b19187386de
1 parent
e63aa283
更新注释
Showing
2 changed files
with
160 additions
and
160 deletions
algorithm/vehicle_analysis/vehicle_analysis.h
1 | /************************************************************ | 1 | /************************************************************ |
2 | * Version: vehicle_analysis_v0.0.0.190311.gpuonly | 2 | * Version: vehicle_analysis_v0.0.0.190311.gpuonly |
3 | -* CopyRight: �п�����������Ƽ�����˾ | 3 | +* CopyRight: 中科视语(北京)科技有限公司 |
4 | * UpdateDate: 20190311 | 4 | * UpdateDate: 20190311 |
5 | * Content: drafting the first edition by | 5 | * Content: drafting the first edition by |
6 | ************************************************************/ | 6 | ************************************************************/ |
@@ -23,50 +23,50 @@ extern "C" | @@ -23,50 +23,50 @@ extern "C" | ||
23 | { | 23 | { |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | -#include "sy_common.h" //ͨ�����ݽṹ�嶨�� | ||
27 | -#include "vehicle_result.h" //������������ṹ�嶨�� | 26 | +#include "sy_common.h" //通用数据结构体定义 |
27 | +#include "vehicle_result.h" //车辆分析结果结构体定义 | ||
28 | 28 | ||
29 | 29 | ||
30 | #ifndef __VEHICLE_INFO__ | 30 | #ifndef __VEHICLE_INFO__ |
31 | #define __VEHICLE_INFO__ | 31 | #define __VEHICLE_INFO__ |
32 | - typedef struct vehicle_info { //������������� | ||
33 | - vd_result vehicle_detect_res; //��(��ͷ+��β)����� | ||
34 | - vd_result vehicle_win_detect_res; //��������� | ||
35 | - vd_result vehicle_body_detect_res; //��������� | ||
36 | - vc_result vehicle_color_res; //����ɫ | ||
37 | - vr_result vehicle_recg_res; //����ʶ�� | ||
38 | - vplate_results vehicle_plate_det_recg_res; //���Ƽ��ʶ���� | ||
39 | - v_pendant_d_result vehicle_pendant_det_res; //������ | ||
40 | - vid_result vehicle_illegal_det_res; //���� | ||
41 | - vf_result vehicle_fea_res; //�Գ��ѳ� | ||
42 | - //vs_result vehicle_special_res; //����Ʒ��ͣ�ֻ�л������������� | ||
43 | - //mucktruckcover_result vehicle_mucktruckcover_res; //�������Ǹ�״̬(��ͷ��ֻ������Ʒ����е��������ͽ���������������������β��ֻ�л�����������) | 32 | + typedef struct vehicle_info { //单车辆分析结果 |
33 | + vd_result vehicle_detect_res; //车(车头+车尾)检测结果 | ||
34 | + vd_result vehicle_win_detect_res; //车窗检测结果 | ||
35 | + vd_result vehicle_body_detect_res; //车身检测结果 | ||
36 | + vc_result vehicle_color_res; //车颜色 | ||
37 | + vr_result vehicle_recg_res; //车型识别 | ||
38 | + vplate_results vehicle_plate_det_recg_res; //车牌检测识别结果 | ||
39 | + v_pendant_d_result vehicle_pendant_det_res; //车属性 | ||
40 | + vid_result vehicle_illegal_det_res; //车违规 | ||
41 | + vf_result vehicle_fea_res; //以车搜车 | ||
42 | + //vs_result vehicle_special_res; //特殊品类车型(只有货车有输出结果) | ||
43 | + //mucktruckcover_result vehicle_mucktruckcover_res; //渣土车盖盖状态(车头:只有特殊品类车型中的渣土车和建筑垃圾车有输出结果,车尾:只有货车有输出结果) | ||
44 | 44 | ||
45 | - mta_result mta_res; //Ħ�г��Ƿ�����/Ħ�г���ʻ���Ƿ��ͷ��/ũ�ó��Ƿ����� | 45 | + mta_result mta_res; //摩托车是否载人/摩托车驾驶人是否戴头盔/农用车是否载人 |
46 | 46 | ||
47 | - manned_result manned_res; //�Ƿ��ǻ������ֳ����� 0-���ǻ���/�������ֳ�/���ֳ�δ����/����δ���ˣ�1-�������ˣ�2-���ֳ����� | 47 | + manned_result manned_res; //是否是货车三轮车载人 0-不是货车/不是三轮车/三轮车未载人/货车未载人,1-货车载人,2-三轮车载人 |
48 | 48 | ||
49 | - int type; //�������0-��ͷ��1-��β��2-Ħ�г���3-���ֳ� ��4-���� | 49 | + int type; //车的类别:0-车头,1-车尾,2-摩托车,3-三轮车 ,4-车身 |
50 | int vpt_type; | 50 | int vpt_type; |
51 | int rainshed; //是否安装雨棚, 0 有雨棚 1 无雨棚 | 51 | int rainshed; //是否安装雨棚, 0 有雨棚 1 无雨棚 |
52 | - | ||
53 | - //int obj_quality_idx;//�۵��������ͣ�0-��Ч���ݣ�1-�������ݣ�2-�������� | 52 | + |
53 | + //int obj_quality_idx;//聚档数据类型:0-无效数据,1-低质数据,2-优质数据 | ||
54 | } vehicle_info; | 54 | } vehicle_info; |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | 57 | ||
58 | #ifndef __VEHICLE_ANALYSIS_RESULT__ | 58 | #ifndef __VEHICLE_ANALYSIS_RESULT__ |
59 | #define __VEHICLE_ANALYSIS_RESULT__ | 59 | #define __VEHICLE_ANALYSIS_RESULT__ |
60 | - typedef struct va_result { //����������� �ڴ����ⲿ���� | ||
61 | - vehicle_info *info; //������ȫ��������� | ||
62 | - int count; //�������� | 60 | + typedef struct va_result { //车辆分析结果 内存在外部申请 |
61 | + vehicle_info *info; //单车辆全部分析结果 | ||
62 | + int count; //车辆数量 | ||
63 | } va_result; | 63 | } va_result; |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | 66 | ||
67 | #ifndef __DET_PARAM__ | 67 | #ifndef __DET_PARAM__ |
68 | #define __DET_PARAM__ | 68 | #define __DET_PARAM__ |
69 | - typedef struct det_param //����㷨���� | 69 | + typedef struct det_param //检测算法参数 |
70 | { | 70 | { |
71 | int process_min_l; | 71 | int process_min_l; |
72 | int process_max_l; | 72 | int process_max_l; |
@@ -79,36 +79,36 @@ extern "C" | @@ -79,36 +79,36 @@ extern "C" | ||
79 | #define __VA_PARAM__ | 79 | #define __VA_PARAM__ |
80 | typedef struct va_param | 80 | typedef struct va_param |
81 | { | 81 | { |
82 | - //�㷨���ò��� | ||
83 | - sy_command vehicle_detect_config; //�Ƿ���������� | ||
84 | - sy_command vehicle_recg_config; //�Ƿ���������ʶ�� | ||
85 | - sy_command vehicle_recg_supplement_config; //�Ƿ���������ʶ��ʶ��(��ͷ��βlogo���ʶ��+����15����)��ǰ���������ʶ��vehicle_recg_config�� | ||
86 | - sy_command vehicle_plate_det_recg_config; //�Ƿ��������Ƽ��ʶ�� | ||
87 | - sy_command vehicle_color_config; //�Ƿ�����������ɫʶ�� | ||
88 | - sy_command vehicle_pendant_det_config; //�Ƿ�������������ʶ�� | ||
89 | - sy_command vehicle_illegal_config; //�Ƿ�������Υ����Ϊ��� | ||
90 | - sy_command vehicle_feature_config; //�Ƿ���������������ȡ | ||
91 | - //sy_command vehicle_special_config; //�Ƿ���������Ʒ���ʶ�𡣣�ǰ���������ʶ��vehicle_recg_config�� | ||
92 | - //sy_command vehicle_image_quality_config; //�Ƿ���������ͼ��������ʶ�� | ||
93 | - sy_command vehicle_motor_tricycle_analysis_config; //�Ƿ�����Ħ�г����ֳ�������Ħ�г��Ƿ�����/Ħ�г���ʻ���Ƿ��ͷ��/ũ�ó��Ƿ����ˣ� | ||
94 | - //sy_command vehicle_motor_hs_output_config; //�Ƿ�����Ħ�г�δ��ͷ�����ͷ�����ꡣ��ǰ�����Ħ�г����ֳ�����vehicle_motor_tricycle_analysis_config�� | ||
95 | - //sy_command vehicle_stain_vp_config; //�Ƿ������ڵ�����ʶ�� | ||
96 | - //sy_command vehicle_muck_truck_cover_config; //�Ƿ������������Ǹ�ʶ��(ǰ���������Ʒ���ʶ��vehicle_special_config) | ||
97 | - //sy_command vehicle_lorry_manned_config; //�Ƿ�������������ʶ�𡣣�ǰ���������ʶ��vehicle_recg_config�� | ||
98 | - sy_command vehicle_manned_config; //�Ƿ��������������ֳ�����ʶ�𡣣�ǰ���������ʶ��vehicle_recg_config�� | 82 | + //算法配置参数 |
83 | + sy_command vehicle_detect_config; //是否启动车检测 | ||
84 | + sy_command vehicle_recg_config; //是否启动车型识别 | ||
85 | + sy_command vehicle_recg_supplement_config; //是否启动车型识别补充识别(车头车尾logo检测识别+车型15分类)(前提:启动车型识别vehicle_recg_config) | ||
86 | + sy_command vehicle_plate_det_recg_config; //是否启动车牌检测识别 | ||
87 | + sy_command vehicle_color_config; //是否启动车辆颜色识别 | ||
88 | + sy_command vehicle_pendant_det_config; //是否启动车辆属性识别 | ||
89 | + sy_command vehicle_illegal_config; //是否启动车违规行为检测 | ||
90 | + sy_command vehicle_feature_config; //是否启动车辆特征提取 | ||
91 | + //sy_command vehicle_special_config; //是否启动特殊品类车型识别。(前提:启动车型识别vehicle_recg_config) | ||
92 | + //sy_command vehicle_image_quality_config; //是否启动车辆图像清晰度识别 | ||
93 | + sy_command vehicle_motor_tricycle_analysis_config; //是否启动摩托车三轮车分析(摩托车是否载人/摩托车驾驶人是否戴头盔/农用车是否载人) | ||
94 | + //sy_command vehicle_motor_hs_output_config; //是否启动摩托车未戴头盔输出头肩坐标。(前提:启动摩托车三轮车分析vehicle_motor_tricycle_analysis_config) | ||
95 | + //sy_command vehicle_stain_vp_config; //是否启动遮挡车牌识别 | ||
96 | + //sy_command vehicle_muck_truck_cover_config; //是否启动渣土车盖盖识别。(前提:开启特殊品类车型识别vehicle_special_config) | ||
97 | + //sy_command vehicle_lorry_manned_config; //是否启动货车载人识别。(前提:开启车型识别vehicle_recg_config) | ||
98 | + sy_command vehicle_manned_config; //是否启动货车、三轮车载人识别。(前提:开启车型识别vehicle_recg_config) | ||
99 | 99 | ||
100 | 100 | ||
101 | - //�㷨��ʼ������ | ||
102 | - int gpuid; //ָ���Կ�id | ||
103 | - float vehicle_det_thresld=0.5; //�������� | ||
104 | - int min_obj_size=200; //��ͷβ���Ŀ����С���ߣ�����ȡֵ��Χ100~200������С�ڸóߴ�Ĺ��˵��� | ||
105 | - float vehicle_plate_det_thresld=0.5; //���Ƽ����� | ||
106 | - float vehicle_attribute_det_thresld=0.5; //�����Լ����� | ||
107 | - float vehicle_logo_det_thresld=0.1; //��logo������ | 101 | + //算法初始化参数 |
102 | + int gpuid; //指定显卡id | ||
103 | + float vehicle_det_thresld=0.5; //车检测参数 | ||
104 | + int min_obj_size=200; //车头尾检测目标最小长边(建议取值范围100~200,长边小于该尺寸的过滤掉) | ||
105 | + float vehicle_plate_det_thresld=0.5; //车牌检测参数 | ||
106 | + float vehicle_attribute_det_thresld=0.5; //车属性检测参数 | ||
107 | + float vehicle_logo_det_thresld=0.1; //车logo检测参数 | ||
108 | 108 | ||
109 | - float vc_thresld=0.5; //����ɫ��ֵ | ||
110 | - char* dbPath; //����ʶ��������··�� <��ǰ��֧��Ӣ��·��> | ||
111 | - char* models_Path; //����ģ�͵�·�� <��ǰ��֧��Ӣ��·��>//20210615 | 109 | + float vc_thresld=0.5; //车颜色阈值 |
110 | + char* dbPath; //车型识别车型数据路路径 <当前仅支持英文路径> | ||
111 | + char* models_Path; //所有模型的路径 <当前仅支持英文路径>//20210615 | ||
112 | 112 | ||
113 | }va_param; | 113 | }va_param; |
114 | #endif | 114 | #endif |
@@ -124,7 +124,7 @@ extern "C" | @@ -124,7 +124,7 @@ extern "C" | ||
124 | * notes: null | 124 | * notes: null |
125 | *************************************************************************/ | 125 | *************************************************************************/ |
126 | VEHICLEANALYSIS_API int va_init(void ** handle, va_param param); | 126 | VEHICLEANALYSIS_API int va_init(void ** handle, va_param param); |
127 | - VEHICLEANALYSIS_API int va_acl_init();//������һ�Σ��ȵ���va_acl_init���ٵ���va_init | 127 | + VEHICLEANALYSIS_API int va_acl_init();//仅调用一次,先调用va_acl_init,再调用va_init |
128 | 128 | ||
129 | /************************************************************************* | 129 | /************************************************************************* |
130 | * function: va_release | 130 | * function: va_release |
@@ -135,7 +135,7 @@ extern "C" | @@ -135,7 +135,7 @@ extern "C" | ||
135 | * notes: null | 135 | * notes: null |
136 | *************************************************************************/ | 136 | *************************************************************************/ |
137 | VEHICLEANALYSIS_API void va_release(void ** handle); | 137 | VEHICLEANALYSIS_API void va_release(void ** handle); |
138 | - VEHICLEANALYSIS_API void va_acl_release();//������һ�Σ������е�va_release���ͷ��ˣ�������va_acl_release | 138 | + VEHICLEANALYSIS_API void va_acl_release();//仅调用一次,当所有的va_release都释放了,最后调用va_acl_release |
139 | 139 | ||
140 | /************************************************************************* | 140 | /************************************************************************* |
141 | * function: va_get_version | 141 | * function: va_get_version |
@@ -159,31 +159,31 @@ extern "C" | @@ -159,31 +159,31 @@ extern "C" | ||
159 | * notes: null | 159 | * notes: null |
160 | *************************************************************************/ | 160 | *************************************************************************/ |
161 | VEHICLEANALYSIS_API int va_batch(void * handle, sy_img * img_data_array, int batch_size, va_result *result); | 161 | VEHICLEANALYSIS_API int va_batch(void * handle, sy_img * img_data_array, int batch_size, va_result *result); |
162 | - //img_data_array��device���ݣ�batch_size==16ʱ���ù̶�16ģ�ͣ�С��16ʱ���ù̶�1ģ�͡� | 162 | + //img_data_array是device数据,batch_size==16时调用固定16模型,小于16时调用固定1模型。 |
163 | VEHICLEANALYSIS_API int va_batch16_device(void * handle, sy_img * img_data_array, int batch_size, va_result *result); | 163 | VEHICLEANALYSIS_API int va_batch16_device(void * handle, sy_img * img_data_array, int batch_size, va_result *result); |
164 | 164 | ||
165 | 165 | ||
166 | 166 | ||
167 | /************************************************************************* | 167 | /************************************************************************* |
168 | * FUNCTION: VA_ComputeSimilarity | 168 | * FUNCTION: VA_ComputeSimilarity |
169 | - * PURPOSE: �ȶ����ƶȣ�ͨ�ã� | 169 | + * PURPOSE: 比对相似度(通用) |
170 | * PARAM: | 170 | * PARAM: |
171 | - [in] Afea - ��һ��ͼƬ���� | ||
172 | - [in] Bfea - �ڶ���ͼƬ���� | ||
173 | - [in] featuresize - �������� | ||
174 | - * RETURN: ���ƶ� | 171 | + [in] Afea - 第一张图片特征 |
172 | + [in] Bfea - 第二张图片特征 | ||
173 | + [in] featuresize - 特征长度 | ||
174 | + * RETURN: 相似度 | ||
175 | * NOTES: | 175 | * NOTES: |
176 | *************************************************************************/ | 176 | *************************************************************************/ |
177 | VEHICLEANALYSIS_API float va_compute_similarity(float *Afea, float *Bfea, int featuresize); | 177 | VEHICLEANALYSIS_API float va_compute_similarity(float *Afea, float *Bfea, int featuresize); |
178 | 178 | ||
179 | /************************************************************************* | 179 | /************************************************************************* |
180 | * FUNCTION: va_compute_similarity_byvafeature | 180 | * FUNCTION: va_compute_similarity_byvafeature |
181 | - * PURPOSE: �ȶ����ƶȣ����va������ | 181 | + * PURPOSE: 比对相似度(针对va特征) |
182 | * PARAM: | 182 | * PARAM: |
183 | - [in] Afea - ��һ��ͼƬva���� | ||
184 | - [in] Bfea - �ڶ���ͼƬva���� | ||
185 | - [in] featuresize - ��������VA_FEATURESIZE | ||
186 | - * RETURN: ���ƶ� | 183 | + [in] Afea - 第一张图片va特征 |
184 | + [in] Bfea - 第二张图片va特征 | ||
185 | + [in] featuresize - 特征长度VA_FEATURESIZE | ||
186 | + * RETURN: 相似度 | ||
187 | * NOTES: | 187 | * NOTES: |
188 | *************************************************************************/ | 188 | *************************************************************************/ |
189 | VEHICLEANALYSIS_API float va_compute_similarity_byvafeature(void * handle , float *Afea, float *Bfea, int featuresize); | 189 | VEHICLEANALYSIS_API float va_compute_similarity_byvafeature(void * handle , float *Afea, float *Bfea, int featuresize); |
algorithm/vehicle_analysis/vehicle_result.h
1 | #include <stddef.h> | 1 | #include <stddef.h> |
2 | -//---------------- ������������ṹ�嶨�� ------------------// | 2 | +//---------------- 车辆分析结果结构体定义 ------------------// |
3 | 3 | ||
4 | -//�м�����Ϣ | 4 | +//中间结果信息 |
5 | #ifndef VPT_INFO_MIDD_TEMP_ | 5 | #ifndef VPT_INFO_MIDD_TEMP_ |
6 | #define VPT_INFO_MIDD_TEMP_ | 6 | #define VPT_INFO_MIDD_TEMP_ |
7 | typedef struct vpt_info_midd_temp | 7 | typedef struct vpt_info_midd_temp |
@@ -10,7 +10,7 @@ typedef struct vpt_info_midd_temp | @@ -10,7 +10,7 @@ typedef struct vpt_info_midd_temp | ||
10 | sy_rect obj_rect; | 10 | sy_rect obj_rect; |
11 | int obj_index; | 11 | int obj_index; |
12 | float obj_score; | 12 | float obj_score; |
13 | - int dis; //20220308�����Ŀ���ļ�Ȩ���� | 13 | + int dis; //20220308到最佳目标点的加权距离 |
14 | }vpt_info_midd_temp; | 14 | }vpt_info_midd_temp; |
15 | #endif | 15 | #endif |
16 | 16 | ||
@@ -20,8 +20,8 @@ typedef struct vpt_info_midd_temp | @@ -20,8 +20,8 @@ typedef struct vpt_info_midd_temp | ||
20 | 20 | ||
21 | 21 | ||
22 | 22 | ||
23 | -//1.������� | ||
24 | -#define MAXCARCOUNT 100 //֧�����100������� | 23 | +//1.车检测结果 |
24 | +#define MAXCARCOUNT 100 //支持最多100个车检测 | ||
25 | 25 | ||
26 | #ifndef VD_RESULT_ | 26 | #ifndef VD_RESULT_ |
27 | #define VD_RESULT_ | 27 | #define VD_RESULT_ |
@@ -33,28 +33,28 @@ typedef struct vd_result | @@ -33,28 +33,28 @@ typedef struct vd_result | ||
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | 35 | ||
36 | -//2.����ɫ��� | 36 | +//2.车颜色结果 |
37 | #ifndef VC_RESULT_ | 37 | #ifndef VC_RESULT_ |
38 | #define VC_RESULT_ | 38 | #define VC_RESULT_ |
39 | typedef struct vc_result | 39 | typedef struct vc_result |
40 | { | 40 | { |
41 | float score; | 41 | float score; |
42 | - int index;//����ɫ����0-12����Ӧ"��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��" | 42 | + int index;//车颜色索引0-12,对应"棕", "橙", "灰", "白", "粉", "紫", "红", "绿", "蓝", "银", "青", "黄", "黑" |
43 | }vc_result; | 43 | }vc_result; |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | 46 | ||
47 | -//3.����ʶ���� | 47 | +//3.车型识别结果 |
48 | #ifndef VR_RESULT_ | 48 | #ifndef VR_RESULT_ |
49 | #define VR_RESULT_ | 49 | #define VR_RESULT_ |
50 | -typedef struct vr_result //��� | 50 | +typedef struct vr_result //结果 |
51 | { | 51 | { |
52 | - char vehicle_brand[260]; //����Ʒ�� | ||
53 | - char vehicle_subbrand[260]; //������Ʒ�� | ||
54 | - char vehicle_issue_year[260]; //������� | ||
55 | - char vehicle_type[260]; //�������� | ||
56 | - char freight_ton[260]; //�����ּ� | ||
57 | - float name_score; //ʶ�����Ŷ� | 52 | + char vehicle_brand[260]; //车辆品牌 |
53 | + char vehicle_subbrand[260]; //车辆子品牌 | ||
54 | + char vehicle_issue_year[260]; //车辆年款 | ||
55 | + char vehicle_type[260]; //车辆类型 | ||
56 | + char freight_ton[260]; //货车吨级 | ||
57 | + float name_score; //识别置信度 | ||
58 | int index; | 58 | int index; |
59 | }vr_result; | 59 | }vr_result; |
60 | #endif | 60 | #endif |
@@ -62,20 +62,20 @@ typedef struct vr_result //��� | @@ -62,20 +62,20 @@ typedef struct vr_result //��� | ||
62 | 62 | ||
63 | 63 | ||
64 | 64 | ||
65 | -//4.���Ƽ��ʶ���� | ||
66 | -#define PLATENUM 8 //���ƺ���λ�� | ||
67 | -#define MAXPLATECOUNT 20 //֧�����20�����Ƽ�� | ||
68 | -//�������� | ||
69 | -#define SINGLETYPE_BLUE 0 //������ɫ | ||
70 | -#define SINGLETYPE_YELLOW 1 //���Ż�ɫ | ||
71 | -#define SINGLETYPE_WHITE 2 //���Ű�ɫ | ||
72 | -#define SINGLETYPE_BLACK 3 //���ź�ɫ | ||
73 | -#define DOUBLETYPE_YELLOW 4 //˫�Ż�ɫ | ||
74 | -#define DOUBLETYPE_WHITE 5 //˫�Ű�ɫ | ||
75 | -#define NEWENERGYTYPE_YELLOWGREEN 6 //����Դ����ɫ | ||
76 | -#define NEWENERGYTYPE_WHITEGRA 7 //����Դ����ɫ | 65 | +//4.车牌检测识别结果 |
66 | +#define PLATENUM 8 //车牌号码位数 | ||
67 | +#define MAXPLATECOUNT 20 //支持最多20个车牌检测 | ||
68 | +//车牌类型 | ||
69 | +#define SINGLETYPE_BLUE 0 //单排蓝色 | ||
70 | +#define SINGLETYPE_YELLOW 1 //单排黄色 | ||
71 | +#define SINGLETYPE_WHITE 2 //单排白色 | ||
72 | +#define SINGLETYPE_BLACK 3 //单排黑色 | ||
73 | +#define DOUBLETYPE_YELLOW 4 //双排黄色 | ||
74 | +#define DOUBLETYPE_WHITE 5 //双排白色 | ||
75 | +#define NEWENERGYTYPE_YELLOWGREEN 6 //新能源黄绿色 | ||
76 | +#define NEWENERGYTYPE_WHITEGRA 7 //新能源白绿色 | ||
77 | 77 | ||
78 | -//���ƺ��� | 78 | +//车牌号码 |
79 | #ifndef VPLATENUM_RESULT_ | 79 | #ifndef VPLATENUM_RESULT_ |
80 | #define VPLATENUM_RESULT_ | 80 | #define VPLATENUM_RESULT_ |
81 | typedef struct vplate_num | 81 | typedef struct vplate_num |
@@ -86,18 +86,18 @@ typedef struct vplate_num | @@ -86,18 +86,18 @@ typedef struct vplate_num | ||
86 | }vplate_num; | 86 | }vplate_num; |
87 | #endif | 87 | #endif |
88 | 88 | ||
89 | -//�����ڵ�ʶ�� | ||
90 | -//#define COVER 0 //ȫ���ڵ� | ||
91 | -//#define NO_COVER 1 //���� | ||
92 | -//#define NORMAL 2 //�������� | ||
93 | -//#define PARTIAL 3 //�����ڵ� | 89 | +//车牌遮挡识别 |
90 | +//#define COVER 0 //全部遮挡 | ||
91 | +//#define NO_COVER 1 //无车牌 | ||
92 | +//#define NORMAL 2 //正常车牌 | ||
93 | +//#define PARTIAL 3 //部分遮挡 | ||
94 | 94 | ||
95 | #ifndef SVP_RESULT_ | 95 | #ifndef SVP_RESULT_ |
96 | #define SVP_RESULT_ | 96 | #define SVP_RESULT_ |
97 | typedef struct stain_vplate_result | 97 | typedef struct stain_vplate_result |
98 | { | 98 | { |
99 | - float score; //ʶ�����Ŷ� | ||
100 | - int type; //COVER ���� NO_COVER ���� NORMAL ���� PARTIAL | 99 | + float score; //识别置信度 |
100 | + int type; //COVER 或者 NO_COVER 或者 NORMAL 或者 PARTIAL | ||
101 | }stain_vplate_result; | 101 | }stain_vplate_result; |
102 | #endif | 102 | #endif |
103 | 103 | ||
@@ -105,31 +105,31 @@ typedef struct vplate_num | @@ -105,31 +105,31 @@ typedef struct vplate_num | ||
105 | #define VPLATE_RESULTS_ | 105 | #define VPLATE_RESULTS_ |
106 | typedef struct vplate_results | 106 | typedef struct vplate_results |
107 | { | 107 | { |
108 | - sy_rect rect;//���Ƽ������ | ||
109 | - float detect_score;//���Ƽ�����Ŷ� | ||
110 | - vplate_num recg[PLATENUM];//ʶ������� | ||
111 | - float num_score;//ʶ�����Ŷ� | ||
112 | - int type; //�������ͣ�0-������ɫ 1-���Ż�ɫ 2-���Ű�ɫ 3-���ź�ɫ 4-˫�Ż�ɫ 5-˫�Ű�ɫ 6-����Դ����ɫ 7-����Դ����ɫ | 108 | + sy_rect rect;//车牌检测坐标 |
109 | + float detect_score;//车牌检测置信度 | ||
110 | + vplate_num recg[PLATENUM];//识别号码结果 | ||
111 | + float num_score;//识别置信度 | ||
112 | + int type; //车牌类型:0-单排蓝色 1-单排黄色 2-单排白色 3-单排黑色 4-双排黄色 5-双排白色 6-新能源黄绿色 7-新能源白绿色 | ||
113 | 113 | ||
114 | - //stain_vplate_result stain_vp_result; //�����ڵ�ʶ���� | ||
115 | - int special_type; //���泵�ơ���ʱ���ơ����ٳ��ơ�0-common,1-temporary_license_plate,2-low_speed_license_plate. | 114 | + //stain_vplate_result stain_vp_result; //车牌遮挡识别结果 |
115 | + int special_type; //常规车牌、临时车牌、低速车牌。0-common,1-temporary_license_plate,2-low_speed_license_plate. | ||
116 | }vplate_results; | 116 | }vplate_results; |
117 | #endif | 117 | #endif |
118 | 118 | ||
119 | 119 | ||
120 | -//5.�����Խ�� | 120 | +//5.车属性结果 |
121 | #define VPD_FACE_FEATURESIZE 512 | 121 | #define VPD_FACE_FEATURESIZE 512 |
122 | -//����Ľṹ����vpd.h�еIJ�һ���ˡ� | 122 | +//这里的结构体与vpd.h中的不一样了。 |
123 | #ifndef VPENDANTD_RESULT_ | 123 | #ifndef VPENDANTD_RESULT_ |
124 | #define VPENDANTD_RESULT_ | 124 | #define VPENDANTD_RESULT_ |
125 | typedef struct v_pendant_d_info | 125 | typedef struct v_pendant_d_info |
126 | { | 126 | { |
127 | sy_rect rect; | 127 | sy_rect rect; |
128 | - int index; //���� 0-driver 1-face 2-belt 3-sunshield 4-tag 5-decoration 6-napkinbox 7-zhuanjt 8-callPhone 9-sunRoof 10-holder 11-smoke | ||
129 | - float confidence; //���Ŷ� | 128 | + int index; //类型 0-driver 1-face 2-belt 3-sunshield 4-tag 5-decoration 6-napkinbox 7-zhuanjt 8-callPhone 9-sunRoof 10-holder 11-smoke |
129 | + float confidence; //置信度 | ||
130 | 130 | ||
131 | - int driver_copilot_info; //�����Ե����ݸ�����Ϣ��0-�������ݸ��ݣ�1-���ݣ�2-���ݣ���ֻ��˾�� ����������ȫ���������塢��绰������ �������ݸ��ݣ���������Ĭ�������0�� | ||
132 | - //float feature[VPD_FACE_FEATURESIZE]; //�������е����������� | 131 | + int driver_copilot_info; //车属性的主驾副驾信息,0-不分主驾副驾,1-主驾,2-副驾,(只有司机 、人脸、安全带、遮阳板、打电话、抽烟 区分主驾副驾,其他属性默认是输出0) |
132 | + //float feature[VPD_FACE_FEATURESIZE]; //车属性中的人脸特征。 | ||
133 | }v_pendant_d_info; | 133 | }v_pendant_d_info; |
134 | 134 | ||
135 | typedef struct v_pendant_d_result | 135 | typedef struct v_pendant_d_result |
@@ -140,43 +140,43 @@ typedef struct v_pendant_d_result | @@ -140,43 +140,43 @@ typedef struct v_pendant_d_result | ||
140 | #endif | 140 | #endif |
141 | 141 | ||
142 | 142 | ||
143 | -//6.������ | ||
144 | -#define ILLEGAL 1000 //�� | ||
145 | -#define lEGAL 1001 //�Ϸ� | ||
146 | -#define UNCERTAINTY 1002 //��ȷ�� | ||
147 | -#define NOBODY 1003 //���� | ||
148 | -#define SOMEBODY 1004 //���� | 143 | +//6.车违规结果 |
144 | +#define ILLEGAL 1000 //违规 | ||
145 | +#define lEGAL 1001 //合法 | ||
146 | +#define UNCERTAINTY 1002 //不确定 | ||
147 | +#define NOBODY 1003 //无人 | ||
148 | +#define SOMEBODY 1004 //有人 | ||
149 | 149 | ||
150 | #ifndef VID_RESULT_ | 150 | #ifndef VID_RESULT_ |
151 | #define VID_RESULT_ | 151 | #define VID_RESULT_ |
152 | 152 | ||
153 | typedef struct vid_details | 153 | typedef struct vid_details |
154 | { | 154 | { |
155 | - int status; //�Ƿ�Υ�� ILLEGAL��Υ��(���� δϵ��ȫ�� ��绰) lEGAL��δΥ��(δ���� ϵ��ȫ�� δ��绰) UNCERTAINTY����ȷ�� | ||
156 | - float confidence; //���Ŷ� | 155 | + int status; //是否违规 ILLEGAL:违规(抽烟 未系安全带 打电话) lEGAL:未违规(未抽烟 系安全带 未打电话) UNCERTAINTY:不确定 |
156 | + float confidence; //置信度 | ||
157 | }vid_details; | 157 | }vid_details; |
158 | 158 | ||
159 | typedef struct vid_info | 159 | typedef struct vid_info |
160 | { | 160 | { |
161 | - vid_details belt; //�Ƿ�ϵ��ȫ�� ILLEGAL��δϵ��ȫ�� LEGAL��ϵ��ȫ�� | ||
162 | - vid_details smoke; //�Ƿ���� ILLEGAL������ LEGAL��δ���� | ||
163 | - vid_details phone; //�Ƿ�ʹ�õ绰 ILLEGAL��ʹ�õ绰 LEGAL��δʹ�õ绰 | ||
164 | - vid_details call; //�Ƿ��绰 ILLEGAL����绰 LEGAL��δ��绰 | ||
165 | - vid_details person; //�Ƿ����� NOBODY������ SOMEBODY:���� | 161 | + vid_details belt; //是否系安全带 ILLEGAL:未系安全带 LEGAL:系安全带 |
162 | + vid_details smoke; //是否抽烟 ILLEGAL:抽烟 LEGAL:未抽烟 | ||
163 | + vid_details phone; //是否使用电话 ILLEGAL:使用电话 LEGAL:未使用电话 | ||
164 | + vid_details call; //是否打电话 ILLEGAL:打电话 LEGAL:未打电话 | ||
165 | + vid_details person; //是否有人 NOBODY:无人 SOMEBODY:有人 | ||
166 | }vid_info; | 166 | }vid_info; |
167 | 167 | ||
168 | typedef struct vid_result | 168 | typedef struct vid_result |
169 | { | 169 | { |
170 | - vid_info driver; //����ʻ | ||
171 | - vid_info copilot; //����ʻ | 170 | + vid_info driver; //主驾驶 |
171 | + vid_info copilot; //副驾驶 | ||
172 | }vid_result; | 172 | }vid_result; |
173 | #endif | 173 | #endif |
174 | 174 | ||
175 | 175 | ||
176 | -//7.�Գ��ѳ���� | ||
177 | -//#define FEATURESIZE 256 //�������� | ||
178 | -//#define VA_FEATURESIZE 268 //�������� | ||
179 | -#define VA_FEATURESIZE 520 //�������� | 176 | +//7.以车搜车结果 |
177 | +//#define FEATURESIZE 256 //特征长度 | ||
178 | +//#define VA_FEATURESIZE 268 //特征长度 | ||
179 | +#define VA_FEATURESIZE 520 //特征长度 | ||
180 | #ifndef VF_RESULT_ | 180 | #ifndef VF_RESULT_ |
181 | #define VF_RESULT_ | 181 | #define VF_RESULT_ |
182 | typedef struct vf_result | 182 | typedef struct vf_result |
@@ -185,13 +185,13 @@ typedef struct vf_result | @@ -185,13 +185,13 @@ typedef struct vf_result | ||
185 | }vf_result; | 185 | }vf_result; |
186 | #endif | 186 | #endif |
187 | 187 | ||
188 | -//8.����Ʒ��� | 188 | +//8.特殊品类车型 |
189 | #ifndef VS_INFORMATION_ | 189 | #ifndef VS_INFORMATION_ |
190 | #define VS_INFORMATION_ | 190 | #define VS_INFORMATION_ |
191 | typedef struct vs_information | 191 | typedef struct vs_information |
192 | { | 192 | { |
193 | - float score;//���������Ŷ� | ||
194 | - int index; //����������0-10:"����", "��װ��", "����", "������", "���˳�","��Ԯ��", "������", "������", "��ɨ��", "�泵��","Σ��Ʒ��" | 193 | + float score;//车类型置信度 |
194 | + int index; //车类型索引0-10:"吊车", "罐装车", "货车", "渣土车", "轿运车","救援车", "垃圾车", "消防车", "清扫车", "随车吊","危化品车" | ||
195 | }vs_information; | 195 | }vs_information; |
196 | #endif | 196 | #endif |
197 | 197 | ||
@@ -200,66 +200,66 @@ typedef struct vs_information | @@ -200,66 +200,66 @@ typedef struct vs_information | ||
200 | #define VS_RESULT_ | 200 | #define VS_RESULT_ |
201 | typedef struct vs_result | 201 | typedef struct vs_result |
202 | { | 202 | { |
203 | - vs_information vs_info[2];//��������Ϣ | ||
204 | - int count;//�����͵���������1���ڲ�û����ֵ | 203 | + vs_information vs_info[2];//车类型信息 |
204 | + int count;//车类型的数量,是1,内部没设阈值 | ||
205 | }vs_result; | 205 | }vs_result; |
206 | #endif | 206 | #endif |
207 | 207 | ||
208 | -//9.�������Ǹ� | ||
209 | -#define COVER 1012 //�Ǹ� | ||
210 | -#define NOCOVER_NODIRT 1013 //������ | ||
211 | -#define NOCOVER_DIRT 1014 //������ | 208 | +//9.渣土车盖盖 |
209 | +#define COVER 1012 //盖盖 | ||
210 | +#define NOCOVER_NODIRT 1013 //无盖无土 | ||
211 | +#define NOCOVER_DIRT 1014 //无盖有土 | ||
212 | 212 | ||
213 | #ifndef MUCKTRUCKCOVER_RESULT_ | 213 | #ifndef MUCKTRUCKCOVER_RESULT_ |
214 | #define MUCKTRUCKCOVER_RESULT_ | 214 | #define MUCKTRUCKCOVER_RESULT_ |
215 | typedef struct mucktruckcover_result | 215 | typedef struct mucktruckcover_result |
216 | { | 216 | { |
217 | - int status; //�Ƿ�Ǹ� COVER-�Ǹ� NOCOVER_NODIRT-������ NOCOVER_DIRT-������ | ||
218 | - float confidence; //���Ŷ� | 217 | + int status; //是否盖盖 COVER-盖盖 NOCOVER_NODIRT-无盖无土 NOCOVER_DIRT-无盖有土 |
218 | + float confidence; //置信度 | ||
219 | }mucktruckcover_result; | 219 | }mucktruckcover_result; |
220 | 220 | ||
221 | #endif | 221 | #endif |
222 | 222 | ||
223 | 223 | ||
224 | -//11.Ħ�г��Ƿ�����/Ħ�г���ʻ���Ƿ��ͷ��/���ֳ��Ƿ����� | ||
225 | -#define MOTOR_MANNED 1005 //Ħ�г����� | ||
226 | -#define MOTOR_NOT_MANNED 1006 //Ħ�г�δ���� | ||
227 | -#define MOTOR_DRIVER_HELMETED 1007 //Ħ�г���ʻ�˴�ͷ�� | ||
228 | -#define MOTOR_DRIVER_NOT_HELMETED 1008 //Ħ�г���ʻ��δ��ͷ�� | ||
229 | -#define TRICYCLE_MANNED 1009 //���ֳ����� | ||
230 | -#define TRICYCLE_NOT_MANNED 1010 //���ֳ�δ���� | 224 | +//11.摩托车是否载人/摩托车驾驶人是否戴头盔/三轮车是否载人 |
225 | +#define MOTOR_MANNED 1005 //摩托车载人 | ||
226 | +#define MOTOR_NOT_MANNED 1006 //摩托车未载人 | ||
227 | +#define MOTOR_DRIVER_HELMETED 1007 //摩托车驾驶人戴头盔 | ||
228 | +#define MOTOR_DRIVER_NOT_HELMETED 1008 //摩托车驾驶人未戴头盔 | ||
229 | +#define TRICYCLE_MANNED 1009 //三轮车载人 | ||
230 | +#define TRICYCLE_NOT_MANNED 1010 //三轮车未载人 | ||
231 | 231 | ||
232 | #ifndef MTA_RESULT_ | 232 | #ifndef MTA_RESULT_ |
233 | #define MTA_RESULT_ | 233 | #define MTA_RESULT_ |
234 | 234 | ||
235 | typedef struct mta_details | 235 | typedef struct mta_details |
236 | { | 236 | { |
237 | - int status; //Ħ�г��Ƿ�����/Ħ�г���ʻ���Ƿ��ͷ��/���ֳ��Ƿ����� UNCERTAINTY����ȷ�� | ||
238 | - float confidence; //���Ŷ� | 237 | + int status; //摩托车是否载人/摩托车驾驶人是否戴头盔/三轮车是否载人 UNCERTAINTY:不确定 |
238 | + float confidence; //置信度 | ||
239 | }mta_details; | 239 | }mta_details; |
240 | 240 | ||
241 | typedef struct mta_result | 241 | typedef struct mta_result |
242 | { | 242 | { |
243 | - mta_details motor_driver_helmeted; //Ħ�г���ʻ���Ƿ��ͷ�� | ||
244 | - mta_details motor_manned; //Ħ�г��Ƿ����� | ||
245 | - mta_details tricycle_manned; //���ֳ��Ƿ����� | ||
246 | - vd_result motor_driver_hs_rect; //Ħ�г���ʻ�ˣ�δ��ͷ��ʱ�����ͷ������ | 243 | + mta_details motor_driver_helmeted; //摩托车驾驶人是否戴头盔 |
244 | + mta_details motor_manned; //摩托车是否载人 | ||
245 | + mta_details tricycle_manned; //三轮车是否载人 | ||
246 | + vd_result motor_driver_hs_rect; //摩托车驾驶人(未带头盔时输出)头肩坐标 | ||
247 | }mta_result; | 247 | }mta_result; |
248 | 248 | ||
249 | #endif | 249 | #endif |
250 | 250 | ||
251 | 251 | ||
252 | 252 | ||
253 | -//12.�Ƿ����� | 253 | +//12.是否载人 |
254 | #ifndef MANNED_RESULT_ | 254 | #ifndef MANNED_RESULT_ |
255 | #define MANNED_RESULT_ | 255 | #define MANNED_RESULT_ |
256 | typedef struct manned_result | 256 | typedef struct manned_result |
257 | { | 257 | { |
258 | - //int status; //�Ƿ����� 0-���ǻ����������ֳ������ֳ�δ���˻����δ���ˣ�1-�������ˣ�2-���ֳ����� | ||
259 | - //float confidence; //���Ŷ� | 258 | + //int status; //是否载人 0-不是货车或不是三轮车或三轮车未载人或货车未载人,1-货车载人,2-三轮车载入 |
259 | + //float confidence; //置信度 | ||
260 | 260 | ||
261 | - vd_result hs_rect[10]; //ͷ������ | ||
262 | - int hs_count; //ͷ����� | 261 | + vd_result hs_rect[10]; //头肩坐标 |
262 | + int hs_count; //头肩个数 | ||
263 | }manned_result; | 263 | }manned_result; |
264 | #endif | 264 | #endif |
265 | 265 |