Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
ecvl::Dataset Class Reference

DeepHealth Dataset. More...

#include <dataset_parser.h>

Inheritance diagram for ecvl::Dataset:
ecvl::DLDataset

Public Member Functions

 Dataset ()
 
 Dataset (const filesystem::path &filename, bool verify=false)
 
virtual ~Dataset ()
 
std::vector< int > & GetSplit (const ecvl::any &split=-1)
 Returns the image indexes of the requested split. More...
 
void SetSplit (const ecvl::any &split)
 Set the current split. More...
 
void Dump (const filesystem::path &file_path)
 Dump the Dataset into a YAML file following the DeepHealth Dataset Format. More...
 
std::vector< std::vector< filesystem::path > > GetLocations () const
 Retrieve the list of all samples locations in the dataset file. More...
 

Public Attributes

std::string name_ = "DeepHealth dataset"
 Name of the Dataset. More...
 
std::string description_ = "This is the DeepHealth example dataset!"
 Description of the Dataset. More...
 
std::vector< std::string > classes_
 Vector with all the classes available in the Dataset. More...
 
std::vector< std::string > features_
 Vector with all the features available in the Dataset. More...
 
std::vector< Samplesamples_
 Vector containing all the Dataset samples. See Sample. More...
 
std::vector< Splitsplit_
 Splits of the Dataset. See Split. More...
 
int current_split_ = -1
 Current split from which images are loaded. More...
 
Task task_
 Task of the dataset. More...
 

Static Public Attributes

static const std::regex url_regex_
 

Protected Member Functions

std::vector< ecvl::Split >::iterator GetSplitIt (ecvl::any split)
 
const int GetSplitIndex (ecvl::any split)
 

Detailed Description

DeepHealth Dataset.

This class implements the DeepHealth Dataset Format (https://github.com/deephealthproject/ecvl/wiki/DeepHealth-Toolkit-Dataset-Format).

Definition at line 131 of file dataset_parser.h.

Constructor & Destructor Documentation

◆ Dataset() [1/2]

ecvl::Dataset::Dataset ( )
inline

Definition at line 149 of file dataset_parser.h.

◆ Dataset() [2/2]

ecvl::Dataset::Dataset ( const filesystem::path &  filename,
bool  verify = false 
)
Parameters
[in]filenamePath to the Dataset file.
[in]verifyWhether to log the non-existence of a dataset sample location or not.

◆ ~Dataset()

virtual ecvl::Dataset::~Dataset ( )
inlinevirtual

Definition at line 158 of file dataset_parser.h.

Member Function Documentation

◆ Dump()

void ecvl::Dataset::Dump ( const filesystem::path &  file_path)

Dump the Dataset into a YAML file following the DeepHealth Dataset Format.

The YAML file is saved into the dataset root directory. Samples paths are relative to the dataset root directory.

Parameters
[in]file_pathWhere to save the YAML file.

◆ GetLocations()

std::vector<std::vector<filesystem::path> > ecvl::Dataset::GetLocations ( ) const

Retrieve the list of all samples locations in the dataset file.

A single Sample can have multiple locations (e.g., if they are different acquisitions of the same image).

Returns
vector containing all the samples locations.

◆ GetSplit()

std::vector<int>& ecvl::Dataset::GetSplit ( const ecvl::any split = -1)

Returns the image indexes of the requested split.

If no split is provided or an illegal value is provided, the current split is returned.

Parameters
[in]splitindex, name or ecvl::SplitType representing the split to get.
Returns
vector of image indexes of the requested split.

◆ GetSplitIndex()

const int ecvl::Dataset::GetSplitIndex ( ecvl::any  split)
protected

◆ GetSplitIt()

std::vector<ecvl::Split>::iterator ecvl::Dataset::GetSplitIt ( ecvl::any  split)
protected

◆ SetSplit()

void ecvl::Dataset::SetSplit ( const ecvl::any split)

Set the current split.

Parameters
[in]splitindex, name or ecvl::SplitType representing the split to set.
Examples
example_ecvl_eddl.cpp.

Member Data Documentation

◆ classes_

std::vector<std::string> ecvl::Dataset::classes_

Vector with all the classes available in the Dataset.

Examples
example_ecvl_eddl.cpp.

Definition at line 142 of file dataset_parser.h.

◆ current_split_

int ecvl::Dataset::current_split_ = -1

Current split from which images are loaded.

Definition at line 146 of file dataset_parser.h.

◆ description_

std::string ecvl::Dataset::description_ = "This is the DeepHealth example dataset!"

Description of the Dataset.

Definition at line 141 of file dataset_parser.h.

◆ features_

std::vector<std::string> ecvl::Dataset::features_

Vector with all the features available in the Dataset.

Definition at line 143 of file dataset_parser.h.

◆ name_

std::string ecvl::Dataset::name_ = "DeepHealth dataset"

Name of the Dataset.

Definition at line 140 of file dataset_parser.h.

◆ samples_

std::vector<Sample> ecvl::Dataset::samples_

Vector containing all the Dataset samples. See Sample.

Definition at line 144 of file dataset_parser.h.

◆ split_

std::vector<Split> ecvl::Dataset::split_

Splits of the Dataset. See Split.

Definition at line 145 of file dataset_parser.h.

◆ task_

Task ecvl::Dataset::task_

Task of the dataset.

Definition at line 147 of file dataset_parser.h.

◆ url_regex_

const std::regex ecvl::Dataset::url_regex_
static

Definition at line 191 of file dataset_parser.h.


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