From a238fb780003e847d388861c41f0facdc5738dd0 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Wed, 27 Jul 2022 06:56:40 +0200 Subject: [PATCH] Compute both the average number of requested and obtained properties. --- main.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/main.py b/main.py index 82caebe..6592204 100755 --- a/main.py +++ b/main.py @@ -254,14 +254,14 @@ class TaskPicoCLVR(Task): ) log_string(f'wrote {image_name}') - nb_missing = sum( [ - x[2] for x in picoclvr.nb_missing_properties( - descr, - height = self.height, width = self.width - ) - ] ) + np = picoclvr.nb_properties( + descr, + height = self.height, width = self.width + ) + + nb_requested_properties, _, nb_missing_properties = zip(*np) - log_string(f'nb_missing {nb_missing / len(descr):.02f}') + log_string(f'nb_requested_properties {sum(nb_requested_properties) / len(descr):.02f} nb_missing_properties {sum(nb_missing_properties) / len(descr):.02f}') ###################################################################### -- 2.39.5