You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2020/06/08 05:51:24 UTC

[incubator-streampipes] branch dev updated: Add area field to cooc information

This is an automated email from the ASF dual-hosted git repository.

zehnder pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git


The following commit(s) were added to refs/heads/dev by this push:
     new f592ce8  Add area field to cooc information
f592ce8 is described below

commit f592ce856d52611847b2d7a7a078736cd783865d
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Mon Jun 8 07:50:51 2020 +0200

    Add area field to cooc information
---
 ui/src/app/core-services/datalake/datalake-rest.service.ts | 1 +
 ui/src/app/core-ui/image/services/CocoFormat.service.ts    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/ui/src/app/core-services/datalake/datalake-rest.service.ts b/ui/src/app/core-services/datalake/datalake-rest.service.ts
index c17ac18..77e19ea 100644
--- a/ui/src/app/core-services/datalake/datalake-rest.service.ts
+++ b/ui/src/app/core-services/datalake/datalake-rest.service.ts
@@ -123,6 +123,7 @@ export class DatalakeRestService {
 
     getLabels() {
         return {
+          'sign': ['trafficsign'],
           'person': ['person', 'Child'],
           'vehicle': ['bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat'],
           'outdoor': ['traffic light', 'fire hydrant', 'stop sign', 'parking meter', 'bench'],
diff --git a/ui/src/app/core-ui/image/services/CocoFormat.service.ts b/ui/src/app/core-ui/image/services/CocoFormat.service.ts
index d91600d..a01e62e 100644
--- a/ui/src/app/core-ui/image/services/CocoFormat.service.ts
+++ b/ui/src/app/core-ui/image/services/CocoFormat.service.ts
@@ -61,6 +61,7 @@ export class CocoFormatService {
     annotation.iscrowd = 0;
     annotation.image_id = 1;
     annotation.bbox = [cords.x, cords.y, size.x, size.y];
+    annotation.area = size.x * size.y
     annotation.category_id = CocoFormatService.getLabelId(coco, supercategory, category);
     annotation.category_name = category;
     coco.annotations.push(annotation);