From 20a08a978e1a6c716adecad65775ad2285c1a6cb Mon Sep 17 00:00:00 2001
From: "Daniel.Frisinghelli" <daniel.frisinghelli@eurac.edu>
Date: Fri, 5 Feb 2021 15:29:35 +0100
Subject: [PATCH] Fixed a bug: Scene identifiers are now correctly indexed.

---
 pysegcnn/core/trainer.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pysegcnn/core/trainer.py b/pysegcnn/core/trainer.py
index 457b524..c3066ad 100644
--- a/pysegcnn/core/trainer.py
+++ b/pysegcnn/core/trainer.py
@@ -2522,8 +2522,8 @@ class NetworkInference(BaseConfig):
                               (batch + 1) * self.dataloader.batch_size)]
 
                 # name of the current scene
-                batch = np.unique([sid for sid in self.trg_ds.dataset.scenes[
-                    current_tiles]['id']]).item()
+                batch = np.unique([self.trg_ds.dataset.scenes[sid]['id'] for
+                                   sid in current_tiles]).item()
 
                 # modify the progress string
                 progress = progress.replace('Sample', 'Scene')
-- 
GitLab