Browse Source

[修改]改动peoplenet里面model_engine_file字段

非煤矿业企业安全风险监测预警系统
邵佳豪 2 years ago
parent
commit
a786075968
  1. 2
      src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts
  2. 4
      src/app/system-management/host-config/host-config.component.ts
  3. 32
      src/app/system-management/image-label2/image-label2.component.ts

2
src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts

@ -37,7 +37,7 @@ export class AnalysisOfTheHostComponent implements OnInit {
router.events
.pipe(filter((e) => e instanceof NavigationEnd))
.subscribe((e) => {
if(this.selectedOilStation && this.selectedOilStation.id){
this.getHost();
}

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

@ -838,7 +838,7 @@ peoplenet:
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'
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
# 2:车辆检测
@ -985,7 +985,7 @@ peoplenet:
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'
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:车辆检测

32
src/app/system-management/image-label2/image-label2.component.ts

@ -13,7 +13,7 @@ export class ImageLabel2Component implements OnInit {
private http: HttpClient,
private message: NzMessageService,
private modal: NzModalService
) { }
) {}
@Input() data: any; //传递id
camerasData: any; //摄像头Data
@ -27,7 +27,7 @@ export class ImageLabel2Component implements OnInit {
history.go(-1);
}
ngOnInit(): void { }
ngOnInit(): void {}
//获取 摄像头图片/标注点位
getImgMarkData() {
@ -68,15 +68,17 @@ export class ImageLabel2Component implements OnInit {
'向边缘设备发送请求成功,请过一段时间手动刷新页面!'
);
},
error: (error: HttpErrorResponse) => { },
complete: () => { },
error: (error: HttpErrorResponse) => {},
complete: () => {},
});
}
ngAfterContentInit(): void {
this.getImgMarkData()
.then((res: any) => {
console.log(111, res);
this.imgItem = window.URL.createObjectURL(res);
console.log(222, this.imgItem);
window.setTimeout(() => {
this.initBackgroundImg();
}, 0);
@ -356,7 +358,6 @@ export class ImageLabel2Component implements OnInit {
var upX = e.pageX - canvas.offsetLeft;
var upY = e.pageY - canvas.offsetTop;
if (this.isDrawArrow && !this.arrowDirection && !this.isAllMonitoring) {
console.log('八嘎');
//绘制 箭头
if (this.arrowPoints.length === 2) {
//限制数量
@ -386,10 +387,6 @@ export class ImageLabel2Component implements OnInit {
context,
'black'
);
}
if (
this.isDrawArrow &&
@ -424,8 +421,6 @@ export class ImageLabel2Component implements OnInit {
context,
'black'
);
}
if (
this.isDrawArrow &&
@ -453,7 +448,6 @@ export class ImageLabel2Component implements OnInit {
];
this.drawLine(arr, context);
this.redrawPolygon(
this.pointsOfmonitor,
this.allpointsOfmonitor,
@ -461,8 +455,6 @@ export class ImageLabel2Component implements OnInit {
context,
'black'
);
}
if (
this.isDrawArrow &&
@ -795,9 +787,9 @@ export class ImageLabel2Component implements OnInit {
((poly[i].y <= pt.y && pt.y < poly[j].y) ||
(poly[j].y <= pt.y && pt.y < poly[i].y)) &&
pt.x <
((poly[j].x - poly[i].x) * (pt.y - poly[i].y)) /
(poly[j].y - poly[i].y) +
poly[i].x &&
((poly[j].x - poly[i].x) * (pt.y - poly[i].y)) /
(poly[j].y - poly[i].y) +
poly[i].x &&
(c = !c);
return c;
}
@ -935,9 +927,9 @@ export class ImageLabel2Component implements OnInit {
((poly[i].y <= pt.y && pt.y < poly[j].y) ||
(poly[j].y <= pt.y && pt.y < poly[i].y)) &&
pt.x <
((poly[j].x - poly[i].x) * (pt.y - poly[i].y)) /
(poly[j].y - poly[i].y) +
poly[i].x &&
((poly[j].x - poly[i].x) * (pt.y - poly[i].y)) /
(poly[j].y - poly[i].y) +
poly[i].x &&
(c = !c);
return c;
}

Loading…
Cancel
Save