collection/collectionMaker.py
def make_collection(self):
        """
        Make meta data of the collection, including tile dimension, ground truth and rgb files list
        means of all channels in rgb files
        :return:
        """
        # collect files selection
        gt_regexp = self.make_regexp(self.field_name, self.field_id, self.gt_ext, self.file_ext[-1])
        gt_files = self.get_files(gt_regexp, full_path=True)
        # rgb data can have multiple channels and be stored in multiple files
        rgb_files = []
        for cnt, ext in enumerate(self.rgb_ext):
            rgb_regexp = self.make_regexp(self.field_name, self.field_id, ext, self.file_ext[cnt])
            rgb_files.append(self.get_files(rgb_regexp, full_path=True))
        rgb_files = ersa_utils.rotate_list(rgb_files)

        # make meta_data
        tile_dim = ersa_utils.load_file(rgb_files[0][0]).shape[:2]
        channel_mean = get_channel_mean(self.raw_data_path, rgb_files)

        meta_data = {'raw_data_path': self.raw_data_path,
                     'field_name': self.field_name,
                     'field_id': self.field_id,
                     'rgb_ext': self.rgb_ext,
                     'gt_ext': self.gt_ext,
                     'file_ext': self.file_ext,
                     'clc_name': self.clc_name,
                     'tile_dim': tile_dim,
                     'gt_files': gt_files,
                     'rgb_files': rgb_files,
                     'chan_mean': channel_mean,
                     'files': self.files}
        ersa_utils.save_file(os.path.join(self.clc_dir, 'meta.pkl'), meta_data)

        Make meta data of the collection, including tile dimension, ground truth and rgb files list
        means of all channels in rgb files
        :return:
        
Make meta data of the collection, including tile dimension, ground truth and rgb files list
means of all channels in rgb files
Make meta data of the collection including tile dimension ground truth and rgb files list means of all channels in rgb files
def make_collection(self):
        gt_regexp = self.make_regexp(self.field_name, self.field_id, self.gt_ext, self.file_ext[-1])
        gt_files = self.get_files(gt_regexp, full_path=True)
        rgb_files = []
        for cnt, ext in enumerate(self.rgb_ext):
            rgb_regexp = self.make_regexp(self.field_name, self.field_id, ext, self.file_ext[cnt])
            rgb_files.append(self.get_files(rgb_regexp, full_path=True))
        rgb_files = ersa_utils.rotate_list(rgb_files)
        tile_dim = ersa_utils.load_file(rgb_files[0][0]).shape[:2]
        channel_mean = get_channel_mean(self.raw_data_path, rgb_files)
        meta_data = {'raw_data_path': self.raw_data_path,
                     'field_name': self.field_name,
                     'field_id': self.field_id,
                     'rgb_ext': self.rgb_ext,
                     'gt_ext': self.gt_ext,
                     'file_ext': self.file_ext,
                     'clc_name': self.clc_name,
                     'tile_dim': tile_dim,
                     'gt_files': gt_files,
                     'rgb_files': rgb_files,
                     'chan_mean': channel_mean,
                     'files': self.files}
        ersa_utils.save_file(os.path.join(self.clc_dir, 'meta.pkl'), meta_data)
def make_collection ( self ) : gt_regexp = self . make_regexp ( self . field_name , self . field_id , self . gt_ext , self . file_ext [ - 1 ] ) gt_files = self . get_files ( gt_regexp , full_path = True ) rgb_files = [ ] for cnt , ext in enumerate ( self . rgb_ext ) : rgb_regexp = self . make_regexp ( self . field_name , self . field_id , ext , self . file_ext [ cnt ] ) rgb_files . append ( self . get_files ( rgb_regexp , full_path = True ) ) rgb_files = ersa_utils . rotate_list ( rgb_files ) tile_dim = ersa_utils . load_file ( rgb_files [ 0 ] [ 0 ] ) . shape [ : 2 ] channel_mean = get_channel_mean ( self . raw_data_path , rgb_files ) meta_data = { 'raw_data_path' : self . raw_data_path , 'field_name' : self . field_name , 'field_id' : self . field_id , 'rgb_ext' : self . rgb_ext , 'gt_ext' : self . gt_ext , 'file_ext' : self . file_ext , 'clc_name' : self . clc_name , 'tile_dim' : tile_dim , 'gt_files' : gt_files , 'rgb_files' : rgb_files , 'chan_mean' : channel_mean , 'files' : self . files } ersa_utils . save_file ( os . path . join ( self . clc_dir , 'meta.pkl' ) , meta_data )
Make meta data of the collection, including tile dimension, ground truth and rgb files list
means of all channels in rgb files
Make meta data of the collection including tile dimension ground truth and rgb files list means of all channels in rgb files
"""
        Make meta data of the collection, including tile dimension, ground truth and rgb files list
        means of all channels in rgb files
        :return:
        """ # collect files selection # rgb data can have multiple channels and be stored in multiple files # make meta_data
None
self