eVision C++ API 26.10.0-beta.2.dev
Loading...
Searching...
No Matches
eVision::EasyDeepLearning::EDatasetSplit Class Reference

The EDatasetSplit maps the image indexes of a EDataset to a dataset split type (EDatasetType). More...

#include <eVision/EasyDeepLearning/EDatasetSplit.h>

Collaboration diagram for eVision::EasyDeepLearning::EDatasetSplit:

Public Member Functions

 EDatasetSplit ()
 Creates a EDatasetSplit.
 EDatasetSplit (const std::vector< eVision::EasyDeepLearning::EDatasetType > &mapping)
 Creates a EDatasetSplit.
 EDatasetSplit (const eVision::EasyDeepLearning::EDatasetSplit &other)
 Creates a EDatasetSplit.
virtual ~EDatasetSplit () throw ()
eVision::EasyDeepLearning::EDatasetSplit & operator= (const eVision::EasyDeepLearning::EDatasetSplit &other)
 Assignment operator.
void CopyTo (eVision::EasyDeepLearning::EDatasetSplit &other) const
 Copy the dataset split to the other instance.
void Load (const std::string &path)
 Load the EDatasetSplit configuration. The given ESerializer must have been created for reading.
void Load (eVision::ESerializer *serializer)
 Load the EDatasetSplit configuration. The given ESerializer must have been created for reading.
void Save (const std::string &path)
 Save the EDatasetSplit configuration. The given ESerializer must have been created for writing.
void Save (eVision::ESerializer *serializer)
 Save the EDatasetSplit configuration. The given ESerializer must have been created for writing.
std::vector< int > GetSplit (eVision::EasyDeepLearning::EDatasetType type)
 Image indexes corresponding to the given type.
int GetNumImages () const
 Number of image indexes associated in the object.
int GetNumImages (eVision::EasyDeepLearning::EDatasetType type) const
 Number of image indexes associated with the given dataset type.
eVision::EasyDeepLearning::EDatasetType GetImageType (int imageIndex) const
 Dataset type for the given image index.
void SetImageType (int imageIndex, eVision::EasyDeepLearning::EDatasetType type)
 Dataset type for the given image index.
bool GetImageTypeLocked (int imageIndex) const
 Whether the image type is locked for the given image.
void SetImageTypeLocked (int imageIndex, bool isLocked)
 Whether the image type is locked for the given image.
void SetTypeLocked (int type, bool isLocked)
 Locks or unlocks all the images whose dataset type matches the given type. Note that the given type can be a combination of several dataset type (using the | operator).
bool HasLockedImages () const
 Whether the split contains images for which the dataset type is locked.
int GetNumLockedImages () const
 Number of images for which the dataset type is locked.
std::vector< eVision::EasyDeepLearning::EDatasetType > GetDatasetMapping () const
 Mapping between image indexes and the corresponding dataset split type.
 EDatasetSplit (CppWrapperInternal::InternalConstructor)

Public Attributes

CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

The EDatasetSplit maps the image indexes of a EDataset to a dataset split type (EDatasetType).

The image indexes mapped in the object are consecutive and between 0 and EDatasetSplit::GetNumImages - 1.

License(s): EasyClassify or EasySegment or EasyLocate

Constructor & Destructor Documentation

◆ EDatasetSplit() [1/4]

eVision::EasyDeepLearning::EDatasetSplit::EDatasetSplit ( )

Creates a EDatasetSplit.

◆ EDatasetSplit() [2/4]

eVision::EasyDeepLearning::EDatasetSplit::EDatasetSplit ( const std::vector< eVision::EasyDeepLearning::EDatasetType > & mapping)

Creates a EDatasetSplit.

Parameters
mappingVector where the value at index i is the dataset type for image i.

◆ EDatasetSplit() [3/4]

eVision::EasyDeepLearning::EDatasetSplit::EDatasetSplit ( const eVision::EasyDeepLearning::EDatasetSplit & other)

Creates a EDatasetSplit.

Parameters
otherOther instance of EDatasetSplit.

◆ ~EDatasetSplit()

eVision::EasyDeepLearning::EDatasetSplit::~EDatasetSplit ( )
throw ( )
virtual

◆ EDatasetSplit() [4/4]

eVision::EasyDeepLearning::EDatasetSplit::EDatasetSplit ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ CopyTo()

void eVision::EasyDeepLearning::EDatasetSplit::CopyTo ( eVision::EasyDeepLearning::EDatasetSplit & other) const

Copy the dataset split to the other instance.

Parameters
otherOther instance of EDatasetSplit.

◆ GetDatasetMapping()

std::vector< eVision::EasyDeepLearning::EDatasetType > eVision::EasyDeepLearning::EDatasetSplit::GetDatasetMapping ( ) const

Mapping between image indexes and the corresponding dataset split type.

The value at index i of the vector is the dataset split type for the image index i.

◆ GetImageType()

eVision::EasyDeepLearning::EDatasetType eVision::EasyDeepLearning::EDatasetSplit::GetImageType ( int imageIndex) const

Dataset type for the given image index.

Parameters
imageIndexImage index.

◆ GetImageTypeLocked()

bool eVision::EasyDeepLearning::EDatasetSplit::GetImageTypeLocked ( int imageIndex) const

Whether the image type is locked for the given image.

This property is mainly used to lock training and validation images after the split was used in a training.

Parameters
imageIndexImage index.

◆ GetNumImages() [1/2]

int eVision::EasyDeepLearning::EDatasetSplit::GetNumImages ( ) const

Number of image indexes associated in the object.

◆ GetNumImages() [2/2]

int eVision::EasyDeepLearning::EDatasetSplit::GetNumImages ( eVision::EasyDeepLearning::EDatasetType type) const

Number of image indexes associated with the given dataset type.

Parameters
typeDataset split type

◆ GetNumLockedImages()

int eVision::EasyDeepLearning::EDatasetSplit::GetNumLockedImages ( ) const

Number of images for which the dataset type is locked.

◆ GetSplit()

std::vector< int > eVision::EasyDeepLearning::EDatasetSplit::GetSplit ( eVision::EasyDeepLearning::EDatasetType type)

Image indexes corresponding to the given type.

Parameters
typethe type of split to retrieve

◆ HasLockedImages()

bool eVision::EasyDeepLearning::EDatasetSplit::HasLockedImages ( ) const

Whether the split contains images for which the dataset type is locked.

◆ Load() [1/2]

void eVision::EasyDeepLearning::EDatasetSplit::Load ( const std::string & path)

Load the EDatasetSplit configuration. The given ESerializer must have been created for reading.

Parameters
pathThe file path.

◆ Load() [2/2]

void eVision::EasyDeepLearning::EDatasetSplit::Load ( eVision::ESerializer * serializer)

Load the EDatasetSplit configuration. The given ESerializer must have been created for reading.

Parameters
serializerThe serializer.

◆ operator=()

eVision::EasyDeepLearning::EDatasetSplit & eVision::EasyDeepLearning::EDatasetSplit::operator= ( const eVision::EasyDeepLearning::EDatasetSplit & other)

Assignment operator.

Parameters
otherOther instance of EDatasetSplit.

◆ Save() [1/2]

void eVision::EasyDeepLearning::EDatasetSplit::Save ( const std::string & path)

Save the EDatasetSplit configuration. The given ESerializer must have been created for writing.

Parameters
pathThe file path.

◆ Save() [2/2]

void eVision::EasyDeepLearning::EDatasetSplit::Save ( eVision::ESerializer * serializer)

Save the EDatasetSplit configuration. The given ESerializer must have been created for writing.

Parameters
serializerThe serializer.

◆ SetImageType()

void eVision::EasyDeepLearning::EDatasetSplit::SetImageType ( int imageIndex,
eVision::EasyDeepLearning::EDatasetType type )

Dataset type for the given image index.

Parameters
imageIndexImage index.
typeDataset split type.

◆ SetImageTypeLocked()

void eVision::EasyDeepLearning::EDatasetSplit::SetImageTypeLocked ( int imageIndex,
bool isLocked )

Whether the image type is locked for the given image.

This property is mainly used to lock training and validation images after the split was used in a training.

Parameters
imageIndexImage index.
isLockedWhether to lock the image

◆ SetTypeLocked()

void eVision::EasyDeepLearning::EDatasetSplit::SetTypeLocked ( int type,
bool isLocked )

Locks or unlocks all the images whose dataset type matches the given type. Note that the given type can be a combination of several dataset type (using the | operator).

Parameters
typeDataset type to lock.
isLockedWhether to lock the images

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::EasyDeepLearning::EDatasetSplit::wrappedClass_