Public Member Functions | Public Attributes | List of all members
ecvl::GenerateDataset Class Referenceabstract

Abstract class which fill the dataset object with name and description, features common to all types of datasets. More...

#include <dataset_generator.h>

Inheritance diagram for ecvl::GenerateDataset:
ecvl::GenerateClassificationDataset ecvl::GenerateSegmentationDataset

Public Member Functions

 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...
 
virtual int LoadSplitImages (const filesystem::path &split)=0
 Load the path of images and labels of the specified split. More...
 

Public Attributes

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...
 

Detailed Description

Abstract class which fill the dataset object with name and description, features common to all types of datasets.

Definition at line 26 of file dataset_generator.h.

Constructor & Destructor Documentation

◆ GenerateDataset()

ecvl::GenerateDataset::GenerateDataset ( const filesystem::path &  dataset_root_directory)
inline

GenerateDataset constructor.

Parameters
[in]dataset_root_directorypath containing the root directory of the dataset.

Definition at line 38 of file dataset_generator.h.

◆ ~GenerateDataset()

virtual ecvl::GenerateDataset::~GenerateDataset ( )
virtualdefault

Member Function Documentation

◆ GetDataset()

Dataset ecvl::GenerateDataset::GetDataset ( )
inline

Return the Dataset object obtained from the directory structure.

Returns
Dataset obtained from the directory structure.

Definition at line 67 of file dataset_generator.h.

◆ LoadImagesAndSplits()

void ecvl::GenerateDataset::LoadImagesAndSplits ( )

Call LoadSplitImages and load the splits with indexes of corresponding images.

If there aren't splits folders, only the list of images and corresponding labels will be loaded.

◆ LoadSplitImages()

virtual int ecvl::GenerateDataset::LoadSplitImages ( const filesystem::path &  split)
pure virtual

Load the path of images and labels of the specified split.

Parameters
[in]splitdirectory name of the split that we are considering.
Returns
The number of samples of the split.

Implemented in ecvl::GenerateClassificationDataset, and ecvl::GenerateSegmentationDataset.

Member Data Documentation

◆ d_

ecvl::Dataset ecvl::GenerateDataset::d_

Dataset object to fill.

Definition at line 32 of file dataset_generator.h.

◆ dataset_root_directory_

const filesystem::path ecvl::GenerateDataset::dataset_root_directory_

path containing the root directory of the dataset

Definition at line 29 of file dataset_generator.h.

◆ num_samples_

std::vector<int> ecvl::GenerateDataset::num_samples_

vector containing the number of samples for each split

Definition at line 31 of file dataset_generator.h.

◆ splits_

std::vector<std::string> ecvl::GenerateDataset::splits_

vector containing the splits found in the dataset directory, if present

Definition at line 30 of file dataset_generator.h.


The documentation for this class was generated from the following file: