From 77967d78a4c72302543b549fccb0b67fc306f2bf Mon Sep 17 00:00:00 2001 From: Maxim Kolomeychenko Date: Thu, 24 Sep 2020 12:12:31 +0300 Subject: [PATCH] output: link to saved report --- src/classes_stats_for_images.py | 4 ++- src/gui.html | 64 +++++++++++++++++---------------- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/src/classes_stats_for_images.py b/src/classes_stats_for_images.py index ebfa6a9..8d18aeb 100644 --- a/src/classes_stats_for_images.py +++ b/src/classes_stats_for_images.py @@ -285,6 +285,7 @@ def calc(api: sly.Api, task_id, context, state, app_logger): {"field": "data.loading3", "payload": False}, {"field": "state.showDialog", "payload": True}, {"field": "data.savePath", "payload": remote_path}, + {"field": "data.reportName", "payload": report_name}, ] api.task.set_fields(task_id, fields) api.task.set_output_report(task_id, file_info["id"], report_name) @@ -316,7 +317,8 @@ def main(): "columns": overview_columns, "data": [] }, - "savePath": "..." + "savePath": "...", + "reportName": "..." } state = { diff --git a/src/gui.html b/src/gui.html index fd46a2c..f73efe5 100644 --- a/src/gui.html +++ b/src/gui.html @@ -1,28 +1,30 @@
- - - - {{data.projectName}} - - - - - - - - - - - - - - + + + + {{data.projectName}} + + + + + + + + {{data.reportName}} + + + + + + + + subtitle="Detailed classes statistics for every image" + style="margin-top: 15px;">
- class area (%)
- number of objects @@ -33,8 +35,8 @@ + subtitle="Summary statistics for all classes" + style="margin-top: 15px; min-height: 200px;"> @@ -42,30 +44,30 @@ + style="height:100%; margin-top: 15px;"> + :content="data.avgAreaCount"> + subtitle="For every class two values are calculated: how many images have / don't have a specific class" + style="height:100%; margin-top: 15px;"> + :content="data.imageWithClassCount"> + subtitle="Image resolutions distribution" + style="height:100%; margin-top: 15px;"> + :content="data.resolutionsCount">
\ No newline at end of file