![]()  | 
  
    | 
 
Generate an ecvl::Dataset from a directory tree for a segmentation task. More...
#include <dataset_generator.h>
  
Public Member Functions | |
| GenerateSegmentationDataset (const filesystem::path &dataset_root_directory, filesystem::path suffix="", filesystem::path gt_name="") | |
| GenerateSegmentationDataset constructor.  More... | |
| virtual int | LoadSplitImages (const filesystem::path &split) override | 
| Load the path of images and labels of the specified split.  More... | |
  Public Member Functions inherited from ecvl::GenerateDataset | |
| GenerateDataset (const filesystem::path &dataset_root_directory) | |
| GenerateDataset constructor.  More... | |
| virtual | ~GenerateDataset ()=default | 
| void | LoadImagesAndSplits () | 
| Call LoadSplitImages and load the splits with indexes of corresponding images.  More... | |
| Dataset | GetDataset () | 
| Return the Dataset object obtained from the directory structure.  More... | |
Public Attributes | |
| filesystem::path | suffix_ | 
| path containing the suffix or extension of ground truth images  More... | |
| filesystem::path | gt_name_ | 
| path containing the ground truth name for images that share the same ground truth  More... | |
  Public Attributes inherited from ecvl::GenerateDataset | |
| const filesystem::path | dataset_root_directory_ | 
| path containing the root directory of the dataset  More... | |
| std::vector< std::string > | splits_ | 
| vector containing the splits found in the dataset directory, if present  More... | |
| std::vector< int > | num_samples_ | 
| vector containing the number of samples for each split  More... | |
| ecvl::Dataset | d_ | 
| Dataset object to fill.  More... | |
Generate an ecvl::Dataset from a directory tree for a segmentation task.
Assumes a directory structure where a top-level directory can have subdirectories named "training", "validation" and "test" (possibly not all present), each of which can have images and ground truth in different subdirectories (named "images" and "ground_truth") or in the same directory. If the ground truth images have a particular suffix or a different extension (necessary if they are in the same directory as the images) it's necessary to specify it in the constructor. For more detailed information about the supported directory structure check https://github.com/deephealthproject/ecvl/wiki/ECVL-Dataset-Generator.
Definition at line 85 of file dataset_generator.h.
      
  | 
  inline | 
GenerateSegmentationDataset constructor.
| [in] | dataset_root_directory | path containing the root directory of the dataset. | 
| [in] | suffix | suffix or extension of ground truth images, necessary if it's different from corresponding images (e.g., "_segmentation.png" or ".png"). | 
| [in] | gt_name | name of the ground truth for images that share the same ground truth. All images in the split (if available) which don't have their own ground truth will use this one. | 
Definition at line 98 of file dataset_generator.h.
      
  | 
  overridevirtual | 
Load the path of images and labels of the specified split.
| [in] | split | directory name of the split that we are considering. | 
Implements ecvl::GenerateDataset.
| filesystem::path ecvl::GenerateSegmentationDataset::gt_name_ | 
path containing the ground truth name for images that share the same ground truth
Definition at line 89 of file dataset_generator.h.
| filesystem::path ecvl::GenerateSegmentationDataset::suffix_ | 
path containing the suffix or extension of ground truth images
Definition at line 88 of file dataset_generator.h.
 1.8.15