|
|
|
@ -35,6 +35,9 @@ interface Camera {
|
|
|
|
|
isEnabled: boolean; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
import yaml from 'js-yaml'; |
|
|
|
|
// declare var yaml: any;
|
|
|
|
|
|
|
|
|
|
@Component({ |
|
|
|
|
selector: 'app-host-config', |
|
|
|
|
templateUrl: './host-config.component.html', |
|
|
|
@ -55,6 +58,8 @@ export class HostConfigComponent implements OnInit {
|
|
|
|
|
hostId; //主机id
|
|
|
|
|
orId; //加油站id
|
|
|
|
|
hostType; //黄海还是交大的盒子
|
|
|
|
|
|
|
|
|
|
hostData; |
|
|
|
|
ngOnInit(): void { |
|
|
|
|
this.hostId = this.route.snapshot.queryParams.hostId; |
|
|
|
|
this.orId = this.route.snapshot.queryParams.orId; |
|
|
|
@ -65,6 +70,7 @@ export class HostConfigComponent implements OnInit {
|
|
|
|
|
this.http.get(`/api/EdgeDevices/${this.hostId}`).subscribe({ |
|
|
|
|
next: (data: any) => { |
|
|
|
|
console.log(data); |
|
|
|
|
this.hostData = data; |
|
|
|
|
// let isExist = data.configFiles.find((item, index, arr) => {
|
|
|
|
|
// if (item.name == 'source.yaml') {
|
|
|
|
|
// console.log("存在", index)
|
|
|
|
@ -616,11 +622,11 @@ oil_truck_threshold: 0.8
|
|
|
|
|
oil_other_threshold: 0.5 |
|
|
|
|
`;
|
|
|
|
|
let xieyouqu = []; |
|
|
|
|
let order; |
|
|
|
|
let oilDischargeOrder; |
|
|
|
|
copyListOfData.forEach((item: any, index) => { |
|
|
|
|
if (item.type == 2) { |
|
|
|
|
xieyouqu.push(item); |
|
|
|
|
order = item.order; |
|
|
|
|
oilDischargeOrder = item.order; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
@ -864,305 +870,347 @@ ${newstr}class-id=0
|
|
|
|
|
jingdian = '0,0,0,0'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
order != undefined |
|
|
|
|
oilDischargeOrder != undefined |
|
|
|
|
? null |
|
|
|
|
: (order = copyListOfData[copyListOfData.length - 1].order + 1); |
|
|
|
|
: (oilDischargeOrder = |
|
|
|
|
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 |
|
|
|
|
console.log(this.hostData); |
|
|
|
|
//如果之前保存过文件
|
|
|
|
|
if (this.hostData.configFiles && this.hostData.configFiles.length !== 0) { |
|
|
|
|
let config_arm = this.hostData.configFiles.find( |
|
|
|
|
(item) => item.name == 'config_arm.yaml' |
|
|
|
|
).content; |
|
|
|
|
let config_x86 = this.hostData.configFiles.find( |
|
|
|
|
(item) => item.name == 'config_x86.yaml' |
|
|
|
|
).content; |
|
|
|
|
// console.log(111, config_arm);
|
|
|
|
|
// console.log(222, config_x86);
|
|
|
|
|
//修改config_arm.yaml文件
|
|
|
|
|
//更改connet_oil
|
|
|
|
|
let config_armObj = yaml.load(config_arm); |
|
|
|
|
// for (const key in config_armObj.connet_oil.roi[0]) {
|
|
|
|
|
// delete config_armObj.connet_oil.roi[0][key];
|
|
|
|
|
// }
|
|
|
|
|
// let key1 = `oil_tube-${oilDischargeOrder}`;
|
|
|
|
|
// let arr1 = [];
|
|
|
|
|
// xieyouguan.split(',').forEach((item) => {
|
|
|
|
|
// arr1.push(Number(item));
|
|
|
|
|
// });
|
|
|
|
|
// config_armObj.connet_oil.roi[0][key1] = [arr1];
|
|
|
|
|
//更改connet_grounder
|
|
|
|
|
// for (const key in config_armObj.connet_grounder.roi[0]) {
|
|
|
|
|
// delete config_armObj.connet_grounder.roi[0][key];
|
|
|
|
|
// }
|
|
|
|
|
// let key2 = `grounder-${oilDischargeOrder}`;
|
|
|
|
|
// let arr2 = [];
|
|
|
|
|
// jingdian.split(',').forEach((item) => {
|
|
|
|
|
// arr2.push(Number(99));
|
|
|
|
|
// });
|
|
|
|
|
// config_armObj.connet_grounder.roi[0][key2] = [arr2];
|
|
|
|
|
config2 = yaml.dump(config_armObj); |
|
|
|
|
|
|
|
|
|
sources: |
|
|
|
|
config: 'config/source.yaml' |
|
|
|
|
console.log(555, config_armObj); |
|
|
|
|
console.log(6666, yaml.dump(config_armObj)); |
|
|
|
|
} else { |
|
|
|
|
//使用模板
|
|
|
|
|
config2 = `# The all in one config file.
|
|
|
|
|
|
|
|
|
|
tracker: |
|
|
|
|
config: 'config/dstest_tracker_config.txt' |
|
|
|
|
debug: false #when the debug is on, osd. |
|
|
|
|
video_record: 10 #time to record into the .ts video |
|
|
|
|
|
|
|
|
|
analytics: |
|
|
|
|
config: 'config/config_nvdsanalytics.txt' |
|
|
|
|
sources: |
|
|
|
|
config: 'config/source.yaml' |
|
|
|
|
|
|
|
|
|
## 通用模型 ## |
|
|
|
|
tracker: |
|
|
|
|
config: 'config/dstest_tracker_config.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/yolov4_cspdarknet_tiny_fp16.etlt_b16_gpu0_fp16.engine' |
|
|
|
|
threshold: 0.3 |
|
|
|
|
analytics: |
|
|
|
|
config: 'config/config_nvdsanalytics.txt' |
|
|
|
|
|
|
|
|
|
# 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 |
|
|
|
|
# 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/yolov4_cspdarknet_tiny_fp16.etlt_b16_gpu0_fp16.engine' |
|
|
|
|
threshold: 0.3 |
|
|
|
|
|
|
|
|
|
# 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 |
|
|
|
|
# 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' |
|
|
|
|
|
|
|
|
|
# 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' |
|
|
|
|
# 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 |
|
|
|
|
|
|
|
|
|
# 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' |
|
|
|
|
# 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' |
|
|
|
|
|
|
|
|
|
# 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' |
|
|
|
|
# 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' |
|
|
|
|
|
|
|
|
|
# 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' |
|
|
|
|
# 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 |
|
|
|
|
|
|
|
|
|
# 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 |
|
|
|
|
# 3:卸油管是否连接判定 |
|
|
|
|
connet_oil: |
|
|
|
|
enable: true |
|
|
|
|
apply_on: 2 |
|
|
|
|
roi: |
|
|
|
|
- 'oil_tube-${oilDischargeOrder}': |
|
|
|
|
- [${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' |
|
|
|
|
|
|
|
|
|
# 模型阈值通用设定 |
|
|
|
|
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.
|
|
|
|
|
# 4:静电接地仪器是否连接判定 |
|
|
|
|
connet_grounder: |
|
|
|
|
enable: true |
|
|
|
|
apply_on: 2 |
|
|
|
|
roi: |
|
|
|
|
- 'grounder-${oilDischargeOrder}': |
|
|
|
|
- [${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 |
|
|
|
|
|
|
|
|
|
debug: false #when the debug is on, osd. |
|
|
|
|
video_record: 10 #time to record into the .ts video |
|
|
|
|
# 模型阈值通用设定 |
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
sources: |
|
|
|
|
config: 'config/source.yaml' |
|
|
|
|
debug: false #when the debug is on, osd. |
|
|
|
|
video_record: 10 #time to record into the .ts video |
|
|
|
|
|
|
|
|
|
tracker: |
|
|
|
|
config: 'config/dstest_tracker_config.txt' |
|
|
|
|
sources: |
|
|
|
|
config: 'config/source.yaml' |
|
|
|
|
|
|
|
|
|
analytics: |
|
|
|
|
config: 'config/config_nvdsanalytics.txt' |
|
|
|
|
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/yolov4_cspdarknet_tiny_fp16.etlt_b16_gpu0_fp32.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' |
|
|
|
|
# 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/yolov4_cspdarknet_tiny_fp16.etlt_b16_gpu0_fp32.engine' |
|
|
|
|
threshold: 0.3 |
|
|
|
|
|
|
|
|
|
# 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 |
|
|
|
|
# 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' |
|
|
|
|
|
|
|
|
|
# 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 |
|
|
|
|
# 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 |
|
|
|
|
|
|
|
|
|
# 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' |
|
|
|
|
# 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 |
|
|
|
|
# 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' |
|
|
|
|
|
|
|
|
|
# 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' |
|
|
|
|
# 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 |
|
|
|
|
|
|
|
|
|
# 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' |
|
|
|
|
# 3:卸油管是否连接判定 |
|
|
|
|
connet_oil: |
|
|
|
|
enable: true |
|
|
|
|
apply_on: 2 |
|
|
|
|
roi: |
|
|
|
|
- 'oil_tube-${oilDischargeOrder}': |
|
|
|
|
- [${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' |
|
|
|
|
|
|
|
|
|
# 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 |
|
|
|
|
# 4:静电接地仪器是否连接判定 |
|
|
|
|
connet_grounder: |
|
|
|
|
enable: true |
|
|
|
|
apply_on: 2 |
|
|
|
|
roi: |
|
|
|
|
- 'grounder-${oilDischargeOrder}': |
|
|
|
|
- [${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' |
|
|
|
|
|
|
|
|
|
#模型阈值通用设定 |
|
|
|
|
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' |
|
|
|
|
`;
|
|
|
|
|
# 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); |
|
|
|
|