Exemplo n.º 1
0
 def display(self,
             config,
             onlineDisplay=False,
             saveDisplay=True,
             forChecking=False,
             labelEncoder=None):
     """
     Function displaying all files of the dataset.
     Each file is dealt with as a Recording object, created and displayed.
     See Recording.analyze for more info.
     labelEncoder is only needed if forChecking.
     forChecking creates a file per observation and sort them in class by
     class folders that the expert can then review.
     Check README for more information.
     """
     if self._verbatim > 0:
         print('\n\n *** DATASET DISPLAY ***')
     tStartGlobal = time.time()
     for file_path in self.files:
         recording = Recording(file_path, config, verbatim=self._verbatim)
         recording.load(config)
         tStart = time.time()
         recording.display(config,
                           onlineDisplay=onlineDisplay,
                           saveDisplay=saveDisplay,
                           forChecking=forChecking,
                           labelEncoder=labelEncoder)
         tEnd = time.time()
         if self._verbatim > 1:
             print('\tRecording has been loaded and displayed', file_path,
                   tEnd - tStart)
     tEndGlobal = time.time()
     if self._verbatim > 0:
         print('Dataset has been displayed', tEndGlobal - tStartGlobal)
     return