Browse Source

[修改]修改配置文件

develop
邵佳豪 2 years ago
parent
commit
09b9b946c2
  1. 10
      src/app/system-management/config-form/config-form.component.html
  2. 10
      src/app/system-management/config-form/config-form.component.ts
  3. 2
      src/app/system-management/host-config/host-config.component.html
  4. 151
      src/app/system-management/host-config/host-config.component.ts

10
src/app/system-management/config-form/config-form.component.html

@ -4,9 +4,13 @@
<nz-tabset> <nz-tabset>
<nz-tab nzTitle="config_nvdsanalytics.txt"><textarea name="config1" id="config1" [(ngModel)]="config1"></textarea> <nz-tab nzTitle="config_nvdsanalytics.txt"><textarea name="config1" id="config1" [(ngModel)]="config1"></textarea>
</nz-tab> </nz-tab>
<nz-tab nzTitle="config.yaml"> <textarea name="config2" id="config2" [(ngModel)]="config2"></textarea></nz-tab> <nz-tab nzTitle="config_arm.yaml"> <textarea name="config2" id="config2" [(ngModel)]="config2"></textarea>
<nz-tab nzTitle="producer.yaml"> <textarea name="config3" id="config3" [(ngModel)]="config3"></textarea></nz-tab> </nz-tab>
<!-- <nz-tab nzTitle="source.yaml"> <textarea name="config4" id="config4" [(ngModel)]="config4"></textarea></nz-tab> --> <nz-tab nzTitle="config_x86.yaml"> <textarea name="config3" id="config3" [(ngModel)]="config3"></textarea>
</nz-tab>
<nz-tab nzTitle="producer.yaml"> <textarea name="config4" id="config4" [(ngModel)]="config4"></textarea>
</nz-tab>
</nz-tabset> </nz-tabset>
</div> </div>
<div class="btnbox"> <div class="btnbox">

10
src/app/system-management/config-form/config-form.component.ts

@ -15,7 +15,7 @@ export class ConfigFormComponent implements OnInit {
config1: string config1: string
config2: string config2: string
config3: string config3: string
// config4: string config4: string
hostId//主机id hostId//主机id
orId//加油站id orId//加油站id
ngOnInit(): void { ngOnInit(): void {
@ -24,7 +24,7 @@ export class ConfigFormComponent implements OnInit {
this.config1 = sessionStorage.getItem('config1') this.config1 = sessionStorage.getItem('config1')
this.config2 = sessionStorage.getItem('config2') this.config2 = sessionStorage.getItem('config2')
this.config3 = sessionStorage.getItem('config3') this.config3 = sessionStorage.getItem('config3')
// this.config4 = sessionStorage.getItem('config4') this.config4 = sessionStorage.getItem('config4')
} }
goback() { goback() {
history.go(-1) history.go(-1)
@ -33,9 +33,9 @@ export class ConfigFormComponent implements OnInit {
let body = { let body = {
configFiles: [ configFiles: [
{ name: 'config_nvdsanalytics.txt', content: this.config1 }, { name: 'config_nvdsanalytics.txt', content: this.config1 },
{ name: 'config.yaml', content: this.config2 }, { name: 'config_arm.yaml', content: this.config2 },
{ name: 'producer.yaml', content: this.config3 }, { name: 'config_x86.yaml', content: this.config3 },
// { name: 'source.yaml', content: this.config4 } { name: 'producer.yaml', content: this.config4 }
] ]
} }
this.http.put(`/api/EdgeDevices/${this.hostId}`, body).subscribe({ this.http.put(`/api/EdgeDevices/${this.hostId}`, body).subscribe({

2
src/app/system-management/host-config/host-config.component.html

@ -6,7 +6,7 @@
<span>摄像头列表</span> <span>摄像头列表</span>
<button nz-button nzType="primary" (click)="addCamera()">新增摄像头</button> <button nz-button nzType="primary" (click)="addCamera()">新增摄像头</button>
</div> </div>
<nz-table #basicTable [nzData]="listOfData" [nzShowPagination]="false" [nzLoading]="isLoading"> <nz-table [nzPageSize]="999" #basicTable [nzData]="listOfData" [nzShowPagination]="false" [nzLoading]="isLoading">
<thead> <thead>
<tr> <tr>
<th>序号</th> <th>序号</th>

151
src/app/system-management/host-config/host-config.component.ts

@ -73,7 +73,9 @@ export class HostConfigComponent implements OnInit {
getCamera() { getCamera() {
let params = { let params = {
ContainsChildren: true, ContainsChildren: true,
EdgeDeviceId: this.hostId EdgeDeviceId: this.hostId,
pageNumber:1,
pageSize:99
} }
this.isLoading = true this.isLoading = true
this.http.get('/api/Cameras', { params: params }).subscribe((data: any) => { this.http.get('/api/Cameras', { params: params }).subscribe((data: any) => {
@ -372,7 +374,8 @@ osd-mode=2
display-font-size=12 display-font-size=12
` `
let config2 = '' let config2 = ''
let config3 = `test_action: true let config3 = ''
let config4 = `test_action: true
logging_interval : 600 logging_interval : 600
` `
let xieyouqu = [] let xieyouqu = []
@ -536,6 +539,8 @@ peoplenet:
roi-bottom-offset: 0 roi-bottom-offset: 0
detected-min-w: 20 detected-min-w: 20
detected-min-h: 200 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.8
trafficcam: trafficcam:
enable: true enable: true
@ -547,6 +552,7 @@ trafficcam:
roi-bottom-offset: 0 roi-bottom-offset: 0
detected-min-w: 100 detected-min-w: 100
detected-min-h: 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'
actionnet: actionnet:
enable: false enable: false
@ -567,30 +573,162 @@ idnet:
enable: true enable: true
apply_on: -1 apply_on: -1
interval: 1 interval: 1
batch_size: 32 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'
oilnet: oilnet:
enable: true enable: true
apply_on: 2 apply_on: 2
interval: 1 interval: 1
batch_size: 16 batch_size: 2
roi-top-offset: 0 roi-top-offset: 0
roi-bottom-offset: 0 roi-bottom-offset: 0
detected-min-w: 20 detected-min-w: 20
detected-min-h: 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
fire_smoke_net: fire_smoke_net:
enable: true enable: true
apply_on: -1 apply_on: -1
interval: 1 interval: 1
batch_size: 16 batch_size: 2
model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/fire_smoke_net/weights/yolov4_cspdarknet_tiny_fp16.etlt_b2_gpu0_fp16.engine'
threshold: 0.95
smoking_calling_net: smoking_calling_net:
enable: true enable: true
apply_on: -1 apply_on: -1
interval: 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'
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'
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'
#new field for rule threshold
rule_threshold:
object_occurence_interval_second: 3
object_disappear_interval_second: 10
on_car_parking_interval_second: 1800
on_fire_smoke_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.5 #only to filter out people net error
`
config3 = `# The all in one config file.
# RTSP sources
# type
# 0 ViolateArea.ENTRANCE,
# 1 ViolateArea.GAS_AREA,
# 2 ViolateArea.FUEL_AREA,
# 3 ViolateArea.MART,
# don't change the key name.
debug: false #when the debug is on, osd.
video_record: 3 #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'
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.8
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'
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 batch_size: 32
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'
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
fire_smoke_net:
enable: true
apply_on: -1
interval: 1
batch_size: 2
model_engine_file: '/opt/nvidia/deepstream/deepstream-6.0/sources/project/models/fire_smoke_net/weights/yolov4_cspdarknet_tiny_fp16.etlt_b2_gpu0_fp32.engine'
threshold: 0.95
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'
connet_oil: connet_oil:
enable: true enable: true
apply_on: 2 apply_on: 2
@ -599,6 +737,7 @@ connet_oil:
- [${xieyouguan}] - [${xieyouguan}]
interval: 1 interval: 1
batch_size: 2 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'
connet_grounder: connet_grounder:
enable: true enable: true
@ -608,6 +747,7 @@ connet_grounder:
- [${jingdian}] - [${jingdian}]
interval: 1 interval: 1
batch_size: 2 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'
#new field for rule threshold #new field for rule threshold
rule_threshold: rule_threshold:
@ -624,5 +764,6 @@ rule_threshold:
sessionStorage.setItem('config1', config1) sessionStorage.setItem('config1', config1)
sessionStorage.setItem('config2', config2) sessionStorage.setItem('config2', config2)
sessionStorage.setItem('config3', config3) sessionStorage.setItem('config3', config3)
sessionStorage.setItem('config4', config4)
} }
} }

Loading…
Cancel
Save