@@ -446,6 +446,26 @@ class ModelType(Enum): | |||
'Segweights': None | |||
}) | |||
CITYROAD_MODEL = ("20", "020", "城市公路模型", 'cityRoad', lambda device, gpuName: { | |||
'device': device, | |||
'labelnames': ["护栏", "交通标志", "非交通标志", "施工", "施工"], | |||
'trtFlag_seg': False, | |||
'trtFlag_det': True, | |||
'slopeIndex': [], | |||
'seg_nclass': 2, | |||
'segRegionCnt': 0, | |||
'segPar': None, | |||
'postFile': { | |||
"name": "post_process", | |||
"conf_thres": 0.25, | |||
"iou_thres": 0.45, | |||
"classes": 5, | |||
"rainbows": COLOR | |||
}, | |||
'Detweights': "../AIlib2/weights/cityRoad/yolov5_%s_fp16.engine" % gpuName, | |||
'Segweights': None | |||
}) | |||
@staticmethod | |||
def checkCode(code): | |||
for model in ModelType: |
@@ -643,6 +643,43 @@ class ModelType2(Enum): | |||
} | |||
) | |||
CITYROAD_MODEL = ("20", "020", "城市公路模型", 'cityRoad', lambda device, gpuName: { | |||
'device': device, | |||
'labelnames': ["护栏", "交通标志", "非交通标志", "施工", "施工"], | |||
'half': True, | |||
'trtFlag_det': True, | |||
'trtFlag_seg': False, | |||
'Detweights': "../AIlib2/weights/cityRoad/yolov5_%s_fp16.engine" % gpuName, | |||
'trackPar': { | |||
'sort_max_age': 2, # 跟踪链断裂时允许目标消失最大的次数。超过之后,会认为是新的目标。 | |||
'sort_min_hits': 3, # 每隔目标连续出现的次数,超过这个次数才认为是一个目标。 | |||
'sort_iou_thresh': 0.2, # 检测最小的置信度。 | |||
'det_cnt': 5, # 每隔几次做一个跟踪和检测,默认10。 | |||
'windowsize': 25, # 轨迹平滑长度,一定是奇数,表示每隔几帧做一平滑,默认29。一个目标在多个帧中出现,每一帧中都有一个位置,这些位置的连线交轨迹。 | |||
'patchCnt': 100, # 每次送入图像的数量,不宜少于100帧。 | |||
}, | |||
'seg_nclass': 2, | |||
'segRegionCnt': 0, | |||
'segPar': None, | |||
'Segweights': None, | |||
'postFile': { | |||
"name": "post_process", | |||
"conf_thres": 0.25, | |||
"iou_thres": 0.45, | |||
"classes": 5, | |||
"rainbows": COLOR | |||
}, | |||
'txtFontSize': 40, | |||
'digitFont': { | |||
'line_thickness': 2, | |||
'boxLine_thickness': 1, | |||
'fontSize': 1.0, | |||
'segLineShow': False, | |||
'waterLineColor': (0, 255, 255), | |||
'waterLineWidth': 3 | |||
} | |||
}) | |||
@staticmethod | |||
def checkCode(code): | |||
for model in ModelType2: |
@@ -472,5 +472,11 @@ MODEL_CONFIG = { | |||
ModelType.ILLPARKING_MODEL, | |||
lambda x, y, z: one_label(x, y, z), | |||
lambda x: model_process(x) | |||
) | |||
), | |||
# 城市公路模型 | |||
ModelType.CITYROAD_MODEL.value[1]: ( | |||
lambda x, y, r, t, z, h: TwoModel(x, y, r, ModelType.CITYROAD_MODEL, t, z, h), | |||
ModelType.CITYROAD_MODEL, | |||
lambda x, y, z: one_label(x, y, z), | |||
lambda x: forest_process(x)), | |||
} |
@@ -438,5 +438,10 @@ MODEL_CONFIG2 = { | |||
ModelType2.NOPARKING_MODEL, | |||
lambda x, y, z: one_label(x, y, z), | |||
lambda x: model_process(x) | |||
) | |||
), | |||
ModelType2.CITYROAD_MODEL.value[1]: ( | |||
lambda x, y, r, t, z, h: Model(x, y, r, ModelType2.CITYROAD_MODEL, t, z, h), | |||
ModelType2.CITYROAD_MODEL, | |||
lambda x, y, z: one_label(x, y, z), | |||
lambda x: model_process(x)) | |||
} |