mldas.explore.loading.load_bulk ¶
- mldas.explore.loading. load_bulk ( dname , size , rgb = False , to_numpy = False , labeled = True ) [source] ¶
 - 
          
Load multiple images from directory.
- Parameters
 - 
            
- 
              
               dname
              
              
               
                
str - 
              
Path to directory where images are saved.
 - 
              
               size
              
              
               
                
int - 
              
Number of images to be loaded
 - 
              
               rgb
              
              
               
                
bool - 
              
Convert data to RGB data image
 - 
              
               to_numpy
              
              
               
                
bool - 
              
Convert data to numpy array
 - 
              
               labeled
              
              
               
                
bool - 
              
Whether images are saved in a labeled structure (same structure than for
torchvision.datasets.ImageFolderclass) or directly in target repository. 
 - 
              
               dname
              
              
               
                
 - Returns
 - 
            
- 
              
               tensors
              
              
               
                
torch.Tensorornumpy.ndarray - 
              
Output list of loaded images either in tensor or numpy array formats.
 - 
              
               labels
              
              
               
                
torch.Tensorornumpy.ndarray - 
              
Output list of labels either in tensor or numpy array formats.
 
 - 
              
               tensors