![]() |
|
Generate an ecvl::Dataset from a directory tree for a classification task. More...
#include <dataset_generator.h>
Public Member Functions | |
GenerateClassificationDataset (const filesystem::path &dataset_root_directory) | |
GenerateClassificationDataset constructor. More... | |
virtual int | LoadSplitImages (const filesystem::path &split) override |
Load the path of images and labels of the specified split. More... | |
![]() | |
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... | |
Additional Inherited Members | |
![]() | |
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 classification 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 has in turn one subdirectory for each class, containing the images for that class. For more detailed information about the supported directory structure check https://github.com/deephealthproject/ecvl/wiki/ECVL-Dataset-Generator.
Definition at line 121 of file dataset_generator.h.
|
inline |
GenerateClassificationDataset constructor.
All the splits must have a directory for each class. If there aren't samples of that class, the directory has to be empty.
[in] | dataset_root_directory | path containing the root directory of the dataset. |
Definition at line 131 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.