import { Component, OnInit, ViewContainerRef } from '@angular/core'; import { ActivatedRoute, Route, Router } from '@angular/router'; import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { NzFormTooltipIcon } from 'ng-zorro-antd/form'; import { NzModalService } from 'ng-zorro-antd/modal'; import { AddcameraComponent } from './addcamera/addcamera.component'; import { NzMessageService } from 'ng-zorro-antd/message'; import { HttpClient, HttpErrorResponse, HttpResponse } from '@angular/common/http'; import { EditcameraComponent } from './editcamera/editcamera.component'; import { catchError, tap } from 'rxjs/operators'; import { ConfigFormDataService } from 'src/app/service/configFormData.service'; import { SendFileComponent } from './send-file/send-file.component'; import { ImageLabel2Component } from '../image-label2/image-label2.component'; interface Camera { name: string; user: string; password: string; uri: string; type: number; order: number; dimensionedPoints: string, isEnabled: boolean } @Component({ selector: 'app-host-config', templateUrl: './host-config.component.html', styleUrls: ['./host-config.component.scss'] }) export class HostConfigComponent implements OnInit { constructor(private router: Router, private route: ActivatedRoute, private fb: FormBuilder, private modal: NzModalService, private message: NzMessageService, private viewContainerRef: ViewContainerRef, private http: HttpClient, public configFormData: ConfigFormDataService,) { } hostId//主机id orId//加油站id ngOnInit(): void { this.hostId = this.route.snapshot.queryParams.hostId this.orId = this.route.snapshot.queryParams.orId this.getCamera() this.http.get(`/api/EdgeDevices/${this.hostId}`).subscribe( { next: ((data: any) => { console.log(data) // let isExist = data.configFiles.find((item, index, arr) => { // if (item.name == 'source.yaml') { // console.log("存在", index) // return item // } // }) if (data.configFiles && data.configFiles.length != 0) { this.isSourceYaml = true } else { this.isSourceYaml = false } }), error: (err) => { // this.message.create('error', '请先下发source.yaml配置'); } } ) } listOfData: Camera[] = []; goback() { history.go(-1) } //摄像头 isLoading = false getCamera() { let params = { ContainsChildren: true, EdgeDeviceId: this.hostId, pageNumber: 1, pageSize: 99 } this.isLoading = true this.http.get('/api/Cameras', { params: params }).subscribe((data: any) => { data.items.forEach(element => { element.dimensionedPointsObj = JSON.parse(element.dimensionedPoints) }); this.listOfData = data.items this.isLoading = false console.log('摄像头列表', data.items) }) } addCamera() { const modal = this.modal.create({ nzTitle: '新增加油站摄像头', nzContent: AddcameraComponent, nzViewContainerRef: this.viewContainerRef, nzWidth: 388, nzComponentParams: {}, nzOnOk: async () => { if (instance.validateForm.valid) { await new Promise((resolve, rejects) => { console.log('表单信息', instance.validateForm) let body = { name: instance.validateForm.value.name, user: instance.validateForm.value.user, password: instance.validateForm.value.password, uri: instance.validateForm.value.uri, type: instance.validateForm.value.type, organizationId: this.orId, edgeDeviceId: this.hostId, // order: instance.validateForm.value.order, } this.http.post('/api/Cameras', body).subscribe({ next: data => { resolve(data) this.message.create('success', '创建成功!'); this.getCamera() this.isSourceYaml = false return true }, error: (err) => { rejects(err) return false } }) }) } else { this.message.create('warning', '请填写完整!'); return false } } }); const instance = modal.getContentComponent(); } editCamera(data) { console.log(data) const modal = this.modal.create({ nzTitle: '编辑加油站摄像头', nzContent: EditcameraComponent, nzViewContainerRef: this.viewContainerRef, nzWidth: 388, nzComponentParams: { data: data }, nzOnOk: async () => { if (instance.validateForm.valid) { await new Promise(resolve => { console.log('表单信息', instance.validateForm) let body = { name: instance.validateForm.value.name, user: instance.validateForm.value.user, password: instance.validateForm.value.password, uri: instance.validateForm.value.uri, type: instance.validateForm.value.type, organizationId: this.orId, edgeDeviceId: this.hostId, order: instance.validateForm.value.order, } this.http.put(`/api/Cameras/${data.id}`, body).subscribe(data => { resolve(data) this.message.create('success', '编辑成功!'); this.getCamera() this.isSourceYaml = false return true }) }) } else { this.message.create('warning', '请填写完整!'); return false } } }); const instance = modal.getContentComponent(); } deleteCamera(item) { console.log(item) this.modal.confirm({ nzTitle: `确定要删除${item.name}这个摄像头吗?`, nzOkText: '确定', nzOkType: 'default', nzOnOk: () => { this.http.delete(`/api/Cameras/${item.id}`).subscribe(data => { this.message.create('success', '删除成功!'); this.getCamera() this.isSourceYaml = false }) }, nzCancelText: '取消' }); } isSourceYaml: boolean label(item) { this.http.get(`/api/EdgeDevices/${this.hostId}`).subscribe( { next: ((data: any) => { if (data.configFiles) { this.isSourceYaml = true const element = document.documentElement if (element.requestFullscreen) { //进入全屏 element.requestFullscreen(); } const modal = this.modal.create({ nzContent: ImageLabel2Component, nzViewContainerRef: this.viewContainerRef, nzWidth: 1920, nzClosable: false, nzFooter: null, nzWrapClassName: 'canvasContentBox', nzBodyStyle: { 'border-radius': '0px', 'padding': '0px', 'margin': '0px', }, nzComponentParams: { data: item.id }, nzOnOk: async () => { } }); const instance = modal.getContentComponent(); modal.afterClose.subscribe(result => { this.ngOnInit() }); //this.router.navigate(['/system/host/camera/imageLabel'], { queryParams: { id: item.id } }) } else { this.isSourceYaml = false this.message.create('error', '请先下发source.yaml配置'); } }), error: (err) => { // this.message.create('error', '请先下发source.yaml配置'); } } ) } connect() { // let isAllLabel = this.listOfData.find((item: any) => { // if (item.type != 1 && !item.dimensionedPoints) { // console.log('存在摄像头未标注的情况') // return item // } // }) // if (isAllLabel) { // this.message.create('error', '存在摄像头未标注的情况'); // return // } // let ids = [] // this.listOfData.forEach((item: any) => { // ids.push(item.id) // }) // this.http.get('/api/Cameras/Statuses', { // params: { ids: ids } // }).subscribe({ // next: (data) => { // console.log('连接状态', data) // }, // error: (err) => { // console.log('连接失败', err) // } // }) this.disposalData() this.router.navigate(['/system/host/camera/configForm'], { queryParams: { 'hostId': this.hostId, 'orId': this.orId } }) } forbidden(item) { console.log(item) let body = { isEnabled: !item.isEnabled, } this.http.put(`/api/Cameras/${item.id}`, body).subscribe(data => { this.message.create('success', '修改成功!'); this.getCamera() }) } sourceYaml() { let copyListOfData = JSON.parse(JSON.stringify(this.listOfData)) copyListOfData = copyListOfData.filter((item, i) => { return item.isEnabled; }) let config4 = `video_rate: 5 inference_buffer_second: 10 sources:` copyListOfData.forEach((item: any, index) => { if (item.type == 3 && item.dimensionedPointsObj && item.dimensionedPointsObj.arrow.length != 0) { let arrowArr = item.dimensionedPointsObj.arrow let str = arrowArr[1].startX + ',' + arrowArr[1].startY + ',' + arrowArr[1].endX + ',' + arrowArr[1].endY + ',' + arrowArr[0].startX + ',' + arrowArr[0].startY + ',' + arrowArr[0].endX + ',' + arrowArr[0].endY config4 += ` - name: '${item.name}' user: '${item.user}' password: '${item.password}' uri: '${item.uri}' type: ${item.type} line-crossing-Entry: [${str}] ` } else if (item.type == 2 && item.dimensionedPointsObj && item.dimensionedPointsObj.arrow.length != 0 && item.dimensionedPointsObj.arrowOfWest && item.dimensionedPointsObj.arrowOfWest.length == 0) { let arrowArr = item.dimensionedPointsObj.arrow let str = arrowArr[1].startX + ',' + arrowArr[1].startY + ',' + arrowArr[1].endX + ',' + arrowArr[1].endY + ',' + arrowArr[0].startX + ',' + arrowArr[0].startY + ',' + arrowArr[0].endX + ',' + arrowArr[0].endY config4 += ` - name: '${item.name}' user: '${item.user}' password: '${item.password}' uri: '${item.uri}' type: ${item.type} line-crossing-Entry: [${str}] ` } else if (item.type == 2 && item.dimensionedPointsObj && item.dimensionedPointsObj.arrow.length != 0 && item.dimensionedPointsObj.arrowOfWest && item.dimensionedPointsObj.arrowOfWest.length != 0) { let arrowArr = item.dimensionedPointsObj.arrow let str = arrowArr[1].startX + ',' + arrowArr[1].startY + ',' + arrowArr[1].endX + ',' + arrowArr[1].endY + ',' + arrowArr[0].startX + ',' + arrowArr[0].startY + ',' + arrowArr[0].endX + ',' + arrowArr[0].endY let arrowArr2 = item.dimensionedPointsObj.arrowOfWest let str2 = arrowArr2[1].startX + ',' + arrowArr2[1].startY + ',' + arrowArr2[1].endX + ',' + arrowArr2[1].endY + ',' + arrowArr2[0].startX + ',' + arrowArr2[0].startY + ',' + arrowArr2[0].endX + ',' + arrowArr2[0].endY let str3 = '[' + str + ',' + str2 + ']' config4 += ` - name: '${item.name}' user: '${item.user}' password: '${item.password}' uri: '${item.uri}' type: ${item.type} line-crossing-Entry: ${str3} ` } else { config4 += ` - name: '${item.name}' user: '${item.user}' password: '${item.password}' uri: '${item.uri}' type: ${item.type} ` } }) const modal = this.modal.create({ nzTitle: '下发source.yaml配置', nzContent: SendFileComponent, nzViewContainerRef: this.viewContainerRef, nzWidth: 1000, nzBodyStyle: { 'border-radius': '0px', 'padding': '7px', }, nzComponentParams: { data: config4 }, nzOnOk: async () => { await new Promise(resolve => { console.log('表单信息', instance.validateForm) let body = { configFiles: [ { name: 'source.yaml', content: instance.datacopy } ] } this.http.put(`/api/EdgeDevices/${this.hostId}`, body).subscribe({ next: (data) => { this.message.create('success', `文件保存成功`); resolve('成功了') this.isSourceYaml = true let params = { edgeDeviceId: this.hostId, fileName: 'source.yaml' } this.http.put('/api/EdgeDevices/Commands/PushFile', '', { params: params }).subscribe({ next: (data) => { this.message.create('success', `发送文件名成功`); }, error: err => { // this.message.create('error', `发送文件名失败`); // reject('失败了') } }) }, error: (err) => { // this.message.create('error', `文件保存失败`); } }) }) } }); const instance = modal.getContentComponent(); } //整理配置文件数据 disposalData() { let copyListOfData = JSON.parse(JSON.stringify(this.listOfData)) copyListOfData = copyListOfData.filter((item, i) => { return item.isEnabled; }) console.log('摄像头列表', copyListOfData) // return let config1 = `[property] enable=1 #Width height used for configuration to which below configs are configured config-width=1980 config-height=1080 #osd-mode 0: Dont display any lines, rois and text # 1: Display only lines, rois and static text i.e. labels # 2: Display all info from 1 plus information about counts osd-mode=2 #Set OSD font size that has to be displayed display-font-size=12 ` let config2 = '' let config3 = '' let config4 = `test_action: true logging_interval : 600 ` let xieyouqu = [] let order copyListOfData.forEach((item: any, index) => { if (item.type == 2) { xieyouqu.push(item) order = item.order } if (item.type == 0 && item.dimensionedPointsObj && item.dimensionedPointsObj.polygon.length != 0) { let str = '' item.dimensionedPointsObj ? item.dimensionedPointsObj.polygon.forEach(element => { str += element.x + ';' str += element.y + ';' }) : 0; str = str.substring(0, str.lastIndexOf(';')) console.log('进出口多边形', str) config1 += ` ## Per stream configuration [roi-filtering-stream-${item.order}] #enable or disable following feature enable=1 #ROI to filter select objects, and remove from meta data roi-RF=${str} #remove objects in the ROI inverse-roi=0 class-id=-1 ` } if (item.type == 3 && item.dimensionedPointsObj && item.dimensionedPointsObj.arrow.length != 0) { let arrowArr = item.dimensionedPointsObj.arrow let str = arrowArr[1].startX + ';' + arrowArr[1].startY + ';' + arrowArr[1].endX + ';' + arrowArr[1].endY + ';' + arrowArr[0].startX + ';' + arrowArr[0].startY + ';' + arrowArr[0].endX + ';' + arrowArr[0].endY config1 += ` [line-crossing-stream-${item.order}] enable=1 #Label;direction;lc line-crossing-Entry=${str} class-id=0 extended=0 mode=strict ` } if (item.type == 2 && item.dimensionedPointsObj && item.dimensionedPointsObj.arrow.length != 0 && item.dimensionedPointsObj.arrowOfWest && item.dimensionedPointsObj.arrowOfWest.length == 0) { let arrowArr = item.dimensionedPointsObj.arrow let str = arrowArr[1].startX + ';' + arrowArr[1].startY + ';' + arrowArr[1].endX + ';' + arrowArr[1].endY + ';' + arrowArr[0].startX + ';' + arrowArr[0].startY + ';' + arrowArr[0].endX + ';' + arrowArr[0].endY config1 += ` [line-crossing-stream-${item.order}] enable=1 #Label;direction;lc line-crossing-Entry=${str} class-id=0 extended=0 mode=strict ` } if (item.type == 2 && item.dimensionedPointsObj && item.dimensionedPointsObj.arrow.length != 0 && item.dimensionedPointsObj.arrowOfWest && item.dimensionedPointsObj.arrowOfWest.length != 0) { let arrowArr = item.dimensionedPointsObj.arrow let str = arrowArr[1].startX + ';' + arrowArr[1].startY + ';' + arrowArr[1].endX + ';' + arrowArr[1].endY + ';' + arrowArr[0].startX + ';' + arrowArr[0].startY + ';' + arrowArr[0].endX + ';' + arrowArr[0].endY let arrowArr2 = item.dimensionedPointsObj.arrowOfWest let str2 = arrowArr2[1].startX + ';' + arrowArr2[1].startY + ';' + arrowArr2[1].endX + ';' + arrowArr2[1].endY + ';' + arrowArr2[0].startX + ';' + arrowArr2[0].startY + ';' + arrowArr2[0].endX + ';' + arrowArr2[0].endY config1 += ` [line-crossing-stream-${item.order}] enable=1 #Label;direction;lc line-crossing-Entry1=${str} class-id=0 extended=0 mode=strict line-crossing-Entry2=${str2} class-id=0 extended=0 mode=strict ` } }) //新增东南西北参数 copyListOfData.forEach(element => { if (element.type == 2 || element.type == 3) {//卸油区 let obj = element.dimensionedPointsObj let str1 = '' if (obj && obj.arrow && obj.arrow.length == 2) { str1 = `${obj.arrow[1].startX};${obj.arrow[1].startY};${obj.arrow[1].endX};${obj.arrow[1].endY}` } let str2 = '' if (obj && obj.arrowOfWest && obj.arrowOfWest.length == 2) { str2 = `${obj.arrowOfWest[1].startX};${obj.arrowOfWest[1].startY};${obj.arrowOfWest[1].endX};${obj.arrowOfWest[1].endY}` } if (str1 || str2) { let arr = [ { name: 'South', value: str1 }, { name: 'West', value: str2 } ] let newstr = '' arr.forEach(item => { if (item.value) { newstr += `direction-${item.name}=${item.value} ` } }); config1 += ` [direction-detection-stream-${element.order}] enable=1 #Label;direction; ${newstr}class-id=0 ` } } }); let xieyouguan = ''; let jingdian = ''; if (xieyouqu.length != 0 && xieyouqu[0].dimensionedPointsObj && xieyouqu[0].dimensionedPointsObj.rectangle.length != 0) { xieyouqu[0].dimensionedPointsObj.rectangle.forEach(element => { if (element.oilUnloadingArea) { xieyouguan = element.x + ',' + element.y + ',' + element.width + ',' + element.height } else { jingdian = element.x + ',' + element.y + ',' + element.width + ',' + element.height } }) } else { xieyouguan = '0,0,0,0' jingdian = '0,0,0,0' } (order != undefined) ? null : order = copyListOfData[copyListOfData.length - 1].order + 1 console.log('泄油管区域', xieyouguan) console.log('静电接地', jingdian) config2 = `# The all in one config file. debug: false #when the debug is on, osd. video_record: 10 #time to record into the .ts video sources: config: 'config/source.yaml' tracker: config: 'config/dstest_tracker_config.txt' analytics: config: 'config/config_nvdsanalytics.txt' ## 通用模型 ## # 1:人物检测 peoplenet: enable: true apply_on: -1 interval: 1 batch_size: 16 topk: 5 roi-top-offset: 0 roi-bottom-offset: 0 detected-min-w: 20 detected-min-h: 200 model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/peoplenet/weights/resnet34_peoplenet_int8.etlt_b16_gpu0_int8.engine' threshold: 0.3 # 2:车辆检测 trafficcam: enable: true apply_on: 0 interval: 1 batch_size: 16 topk: 5 roi-top-offset: 0 roi-bottom-offset: 0 detected-min-w: 100 detected-min-h: 100 model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/trafficcam/weights/resnet18_trafficcamnet_pruned.etlt_b16_gpu0_int8.engine' # 3:人物倚靠行为 actionnet: enable: false apply_on: 1 # roi: # - 'fuel_island-4': # - [200, 0, 450, 500] # - 'fuel_island-5': # - [930, 93, 940, 987] # - 'fuel_island-6': # - [1174, 151, 746, 929] # - 'fuel_island-7': # - [1450, 300, 460, 650] interval: 1 batch_size: 32 # 4:烟火检测 fire_smoke_net: enable: true apply_on: -1 interval: 1 batch_size: 16 model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/fire_smoke_net/weights/yolov4_cspdarknet_tiny_fp16.etlt_b16_gpu0_fp16.engine' threshold: 0.95 # 5:抽烟打电话检测 smoking_calling_net: enable: true apply_on: -1 interval: 1 batch_size: 2 model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/smoking_calling_net/weights/resnet50_smoking_calling_net_fp16.etlt_b2_gpu0_fp16.engine' ## 油站专用模型 ## # 1:身份判别:工装、反光衣、便衣 idnet: enable: true apply_on: -1 interval: 1 batch_size: 2 model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/idnet/weights/resnet50_idnet_fp16.etlt_b2_gpu0_fp16.engine' # 2:卸油区物体识别:油罐车、灭火器、手推车、三角木、取样桶、隔离锥、卸油管 oilnet: enable: true apply_on: 2 interval: 1 batch_size: 2 roi-top-offset: 0 roi-bottom-offset: 0 detected-min-w: 20 detected-min-h: 20 model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/oilnet/weights/yolov4_cspdarknet_tiny_fp16.etlt_b2_gpu0_fp16.engine' threshold: 0.5 # 3:卸油管是否连接判定 connet_oil: enable: true apply_on: 2 roi: - 'oil_tube-${order}': - [${xieyouguan}] interval: 1 batch_size: 2 model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/connet_oil/weights/resnet50_connet_oil_fp16.etlt_b2_gpu0_fp16.engine' # 4:静电接地仪器是否连接判定 connet_grounder: enable: true apply_on: 2 roi: - 'grounder-${order}': - [${jingdian}] interval: 1 batch_size: 2 model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/connet_grounder/weights/resnet50_connet_grounder_fp16.etlt_b2_gpu0_fp16.engine' # 5:散装桶加油 bulk_oil_net: enable: False apply_on: 2 interval: 1 batch_size: 2 model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/bulk_oil_net/weights/yolov4_cspdarknet_tiny_fp16.etlt_b2_gpu0_fp16.engine' threshold: 0.2 # 模型阈值通用设定 rule_threshold: object_occurence_interval_second: 3 object_disappear_interval_second: 10 on_car_parking_interval_second: 1800 on_fire_smoke_interval_second: 5 on_helmet_interval_second: 5 threshold_relying_sitting: 0.4 #rolling mean confidence threshold_smoking_calling: 0.3 #rolling mean confidence threshold_connecting: 0.667 #rolling mean confidence threshold_identity: 0.1 #only to filter out people net error threshold_helmet: 0 #num of helmet detected on a person enable_seconday_model: False # secondary model (双模型) threshold_secondary_model: 0.5 secondary_model_window: 50 secondary_model_path: '/opt/app/xgboost' ` config3 = `# The all in one config file. debug: false #when the debug is on, osd. video_record: 10 #time to record into the .ts video sources: config: 'config/source.yaml' tracker: config: 'config/dstest_tracker_config.txt' analytics: config: 'config/config_nvdsanalytics.txt' ## 通用模型 ## # 1:人物检测 peoplenet: enable: true apply_on: -1 interval: 1 batch_size: 16 topk: 5 roi-top-offset: 0 roi-bottom-offset: 0 detected-min-w: 20 detected-min-h: 200 model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/peoplenet/weights/resnet34_peoplenet_int8.etlt_b16_gpu0_int8.engine' threshold: 0.3 # 2:车辆检测 trafficcam: enable: true apply_on: 0 interval: 1 batch_size: 16 topk: 5 roi-top-offset: 0 roi-bottom-offset: 0 detected-min-w: 100 detected-min-h: 100 model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/trafficcam/weights/resnet18_trafficcamnet_pruned.etlt_b16_gpu0_int8.engine' # 3:人物倚靠行为 actionnet: enable: false apply_on: 1 # roi: # - 'fuel_island-4': # - [200, 0, 450, 500] # - 'fuel_island-5': # - [930, 93, 940, 987] # - 'fuel_island-6': # - [1174, 151, 746, 929] # - 'fuel_island-7': # - [1450, 300, 460, 650] interval: 1 batch_size: 32 # 4:烟火检测 fire_smoke_net: enable: true apply_on: -1 interval: 1 batch_size: 16 model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/fire_smoke_net/weights/yolov4_cspdarknet_tiny_fp16.etlt_b16_gpu0_fp32.engine' threshold: 0.95 # 5:抽烟打电话检测 smoking_calling_net: enable: true apply_on: -1 interval: 1 batch_size: 2 model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/smoking_calling_net/weights/resnet50_smoking_calling_net_fp16.etlt_b2_gpu0_fp32.engine' ## 油站专用模型 ## # 1:身份判别:工装、反光衣、便衣 idnet: enable: true apply_on: -1 interval: 1 batch_size: 2 model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/idnet/weights/resnet50_idnet_fp16.etlt_b2_gpu0_fp32.engine' # 2:卸油区物体识别:油罐车、灭火器、手推车、三角木、取样桶、隔离锥、卸油管 oilnet: enable: true apply_on: 2 interval: 1 batch_size: 2 roi-top-offset: 0 roi-bottom-offset: 0 detected-min-w: 20 detected-min-h: 20 model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/oilnet/weights/yolov4_cspdarknet_tiny_fp16.etlt_b2_gpu0_fp32.engine' threshold: 0.5 # 3:卸油管是否连接判定 connet_oil: enable: true apply_on: 2 roi: - 'oil_tube-${order}': - [${xieyouguan}] interval: 1 batch_size: 2 model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/connet_oil/weights/resnet50_connet_oil_fp16.etlt_b2_gpu0_fp32.engine' # 4:静电接地仪器是否连接判定 connet_grounder: enable: true apply_on: 2 roi: - 'grounder-${order}': - [${jingdian}] interval: 1 batch_size: 2 model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/connet_grounder/weights/resnet50_connet_grounder_fp16.etlt_b2_gpu0_fp32.engine' # 5:散装桶加油 bulk_oil_net: enable: False apply_on: 2 interval: 1 batch_size: 2 model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/bulk_oil_net/weights/yolov4_cspdarknet_tiny_fp16.etlt_b2_gpu0_fp32.engine' threshold: 0.3 #模型阈值通用设定 rule_threshold: object_occurence_interval_second: 3 object_disappear_interval_second: 10 on_car_parking_interval_second: 1800 on_fire_smoke_interval_second: 5 on_helmet_interval_second: 5 threshold_relying_sitting: 0.4 #rolling mean confidence threshold_smoking_calling: 0.3 #rolling mean confidence threshold_connecting: 0.667 #rolling mean confidence threshold_identity: 0.1 #only to filter out people net error threshold_helmet: 0 #num of helmet detected on a person enable_seconday_model: False # secondary model (双模型) threshold_secondary_model: 0.5 secondary_model_window: 50 secondary_model_path: '/opt/app/xgboost' ` sessionStorage.setItem('config1', config1) sessionStorage.setItem('config2', config2) sessionStorage.setItem('config3', config3) sessionStorage.setItem('config4', config4) } }