支持反向的上报,首先,再model.txt里面类别设置为!mouse等(在类别前面加一个英文的感叹号,表示非),然后yolov5正常上报,数字(比如,现在上报的是0个),rk1808-tool在收到消息之后,会查看前面是否有感叹号,如果有,表示在个数为0的时候,持续10秒钟,就上报;否则,就是在个数不为0,且持续10秒钟之后上报。
This commit is contained in:
+7
-1
@@ -33,6 +33,8 @@ int codes[OBJ_MAX_CLASS_NUM];
|
||||
int OBJ_CLASS_REAL_NUM = 0;
|
||||
int PROP_BOX_SIZE = 0;
|
||||
|
||||
int inited_after_out_of_time_gap = 0;
|
||||
|
||||
const int anchor[3][6] = {{10, 13, 16, 30, 33, 23},
|
||||
{30, 61, 62, 45, 59, 119},
|
||||
{116, 90, 156, 198, 373, 326}};
|
||||
@@ -610,10 +612,14 @@ int post_process(rknn_app_context_t *app_ctx, void *outputs, letterbox_t *letter
|
||||
|
||||
int init_post_process()
|
||||
{
|
||||
|
||||
char txt_path[128];
|
||||
snprintf(txt_path, 127, "%s/%s.txt", MODELDIR, global_model);
|
||||
|
||||
for (int i = 0; i < OBJ_CLASS_MAX; i++) {
|
||||
pre_change_objects[i] = -1;
|
||||
pre_change_frames[i] = 0;
|
||||
}
|
||||
|
||||
int ret = 0;
|
||||
ret = loadLabelName(txt_path, labels);
|
||||
if (ret < 0)
|
||||
|
||||
Reference in New Issue
Block a user